Results 1 to 5 of 5

Thread: Fix for Live USB boot in EFI mode (64 bits)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    2014-Jan
    Posts
    15

    Fix for Live USB boot in EFI mode (64 bits)

    hi.
    So here is what I have used to sucessfully boot in EFI mode the Live USB key I have made. (The original boot did not worked at all. I had to boot in legacy BIOS mode)

    Summary: We replace the broken syslinux boot with a grub EFI boot

    TL;DR
    Download and burn/use the efi patched kali iso

    Step by step walkthrough to change Live USB

    On the USB key, you have a second partition (ESP). Mount it if it is not already done
    For example:
    Code:
    # mount /dev/sdc2 /mnt/kali
    then
    Code:
    # cd /mnt/kali/EFI/BOOT
    # rm -f *
    We don't need any of the already existing file

    then copy into that directory the following file BOOTX64.EFI

    For the one not trusting that file, they can recreate it like I did on my Ubuntu 15.04 with this command:
    Code:
    # grub-mkstandalone -d /usr/lib/grub/x86_64-efi/ -O x86_64-efi --modules="part_gpt part_msdos iso9660 all_video efi_gop efi_uga video_bochs video_cirrus gfxterm gettext font" --fonts="unicode" --themes="" -o /mnt/kali/EFI/BOOT/BOOTX64.EFI --compress=gz "boot/grub/grub.cfg=/root/kali.cfg"
    where the config file kali.cfg is the following:
    Code:
    # Config file for GRUB2 - The GNU GRand Unified Bootloader
    
    set menu_color_normal=white/black
    set menu_color_highlight=black/white
    
    function load_video {
        if [ x$feature_all_video_module = xy ]; then
            insmod all_video
        else
            insmod efi_gop
            insmod efi_uga
            insmod video_bochs
            insmod video_cirrus
        fi
    }
    
    load_video
    set gfxmode=auto
    set gfxpayload=800x600
    
    insmod font
    font=unicode
    loadfont $font
    
    insmod gfxterm
    insmod gettext
    
    # Timeout for menu
    set timeout=5
    
    # Set default boot entry as Entry 0
    set default=0
    set color_normal=white/black
    
    function find_root {
        insmod part_gpt
        insmod part_msdos
        insmod iso9660
        search --no-floppy --fs-uuid --set=root 2015-03-12-17-52-45-00
    }
    
    menuentry "Live (amd64)" {
        find_root
        linux /live/vmlinuz boot=live noconfig=sudo username=root hostname=kali
        initrd /live/initrd.img
    }
    
    menuentry "Live (amd64 failsafe)" {
        find_root
        linux /live/vmlinuz boot=live config memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal
        initrd /live/initrd.img
    }
    
    menuentry "Live USB Persistence              (check kali.org/prst)" {
        find_root
        linux /live/vmlinuz boot=live noconfig=sudo username=root hostname=kali persistence
        initrd /live/initrd.img
    }
    
    menuentry "Live USB Encrypted Persistence    (check kali.org/prst)" {
        find_root
        linux /live/vmlinuz boot=live persistent=cryptsetup persistence-encryption=luks noconfig=sudo username=root hostname=kali persistence
        initrd /live/initrd.img
    }
    
    menuentry "Live (forensic mode)" {
        find_root
        linux /live/vmlinuz boot=live noconfig=sudo username=root hostname=kali noswap noautomount
        initrd /live/initrd.img
    }
    #####
    menuentry "Install" {
        find_root
        linux /install/vmlinuz vga=788 -- quiet
        initrd /install/initrd.gz
    }
    
    menuentry "Graphical Install" {
        find_root
        linux /install/gtk/vmlinuz video=vesa:ywrap,mtrr vga=788 -- quiet
        initrd /install/gtk/initrd.gz
    }
    
    menuentry "Install with speech synthesis" {
        find_root
        linux /install/gtk/vmlinuz video=vesa:ywrap,mtrr vga=788 speakup.synth=soft -- quiet
        initrd /install/gtk/initrd.gz
    }
    this file is an adaptation fo the boot file used by the original syslinux kali. If you don't use Ubuntu 15.04, you may have to make some adjustement to the grub-mkstandalone command above

    Then
    Code:
    # umount /mnt/kali
    And reboot!

    TODO: Use a graphical background with the original splash.png
    Last edited by zebul666; 2015-06-09 at 16:32. Reason: Add link to iso

Similar Threads

  1. Replies: 0
    Last Post: 2022-03-14, 13:39
  2. Kali live 2.0 boot USB persistence mode on MacBook Pro 2011
    By matheusnno in forum Installing Archive
    Replies: 2
    Last Post: 2017-03-03, 13:57
  3. Can't boot into persistent mode live USB only forensic.
    By perception in forum Installing Archive
    Replies: 1
    Last Post: 2013-11-27, 22:51

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •