Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: UEFI booting BT5R1

  1. #1
    Good friend of the forums
    Join Date
    Jan 2010
    Location
    outside chicago, il
    Posts
    442

    Default UEFI booting BT5R1

    Hi,

    I just bought a new HP computer and it supports UEFI booting. I installed windows 7 pro 64 bit using UEFI by booting from a UEFI enabled windows 7 pro usb thumb drive. I am now trying for a UEFI booting BT5R1 install. The first problem is my BIOS EFI issues and I have already contacted HP about this. I have 4 Windows Boot Manager entries in my EFI menu and I can't get rid of them I also can't boot a non UEFI thumb drive anymore.
    The next issue is the isos don't support UEFI. The final issue is the Ubuntu installer screws up the existing UEFI partition.

    I realize that the BT developers didn't write the installer or syslinux or even grub2. I am only asking that they and everyone else help pester the Ubuntu people to get these problems fixed so the next version of BT can be booted by both UEFI and legacy systems. UEFI is the future and the sooner these issues get fixed upstream the sooner the BT developers can take advantage of them.

    The bugs can be found here:
    UEFI bugs:
    Deletes Windows efi partition
    Installer should not format an existing EFI System Partition
    https://bugs.launchpad.net/ubuntu/+s...fi/+bug/769669
    EFI SYSTEM PARTITION should be atleast 100 MiB size and formatted as FAT32, not FAT16
    https://bugs.launchpad.net/ubuntu/+s...fi/+bug/811485
    ctrl-x does not work in grub-efi
    https://bugs.launchpad.net/ubuntu/+s...b2/+bug/722950
    grub-update fails to detect windows bootloader on a uefi system
    https://bugs.launchpad.net/ubuntu/+s...b2/+bug/807801

    Please add yourself to these bugs so we can get them fixed.
    Thank you.
    I like the bleeding edge, but I don't like blood loss

  2. #2
    Good friend of the forums
    Join Date
    Jan 2010
    Location
    outside chicago, il
    Posts
    442

    Default Re: UEFI booting BT5R1

    I was able to EFI boot from my USB thumb drive and EFI install BT5R1 onto my computer. Here is how I did it.

    I booted from my usb thumb drive in legacy mode. I downloaded grub and compiled it as follows:
    export EFI_ARCH=x86_64
    ./configure --with-platform=efi --target=${EFI_ARCH} --program-prefix=""
    make
    sudo mkdir -p /mnt/EFISYS # if the mount-point does not exist
    sudo modprobe dm-mod # required to make grub-probe stop complaining
    sudo mount -t vfat -o rw,users /dev/sda1 /mnt/EFISYS # replace /dev/sda1 with your thumb drive
    sudo mkdir -p /mnt/EFISYS/efi/boot
    cd <grub2_compiled_source_dir>/grub-core
    ../grub-mkimage -O ${EFI_ARCH}-efi -d . -o grub.efi -p "" part_gpt part_msdos ntfs ntfscomp hfsplus fat ext2 normal chain boot configfile linux multiboot
    sudo cp grub.efi *.mod *.lst /mnt/EFISYS/efi/boot
    sudo touch /mnt/EFISYS/efi/boot/grub.cfg

    your /mnt/EFISYS/efi/boot/grub.cfg should look like this:
    # Config file for GRUB2 - The GNU GRand Unified Bootloader
    # /boot/grub/grub.cfg

    # DEVICE NAME CONVERSIONS
    #
    # Linux Grub
    # -------------------------
    # /dev/fd0 (fd0)
    # /dev/sda (hd0)
    # /dev/sdb2 (hd1,2)
    # /dev/sda3 (hd0,3)
    #

    # Timeout for menu
    set timeout=5

    # Set default boot entry as Entry 0
    set default=0

    # (0) Linux
    menuentry "BT5R1 x64 Linux" {
    set root=(hd0,1)
    linux /casper/vmlinuz file=/cdrom/preseed/custom.seed boot=casper
    initrd /casper/initrd.gz
    }

    You should be able to EFI boot from your usb thumb drive now. Start the BT installation. When you get to the hard drive partitioning part choose advanced so you can create your own partitions. I have 2 hard drives in my system Windows 7 and BT5R1 so I choose to wipe /dev/sdb and created the following partition layout:
    /dev/sdb1 200MB fat32 /dos mount point
    /dev/sdb2 240GB ext4 / mount point
    /dev/sdb3 swap

    UNDER NO CIRCUMSTANCES SHOULD YOU LET THE INSTALLER INSTALL ANYTHING TO THE WINDOWS 7 EFI PARTITION. BAD THINGS WILL HAPPEN. IF YOU INTEND TO USE THE MS EFI PARTITION FOR GRUB DO IT MANUALLY.

    I formatted /dev/sdb1 and /dev/sdb2. The installation finished. I then did:
    # cp -R /cdrom/efi /target/dos
    This copies all of the EFI boot files to the new EFI boot partition.
    # cp /target/boot/vmlinuz-2.6.39.4 /target/dos/
    # cp /target/boot/initrd.img-2.6.39.4 /target/dos/

    I changed /target/dos/efi/boot/grub.cfg to:

    # Config file for GRUB2 - The GNU GRand Unified Bootloader
    # /boot/grub/grub.cfg

    # DEVICE NAME CONVERSIONS
    #
    # Linux Grub
    # -------------------------
    # /dev/fd0 (fd0)
    # /dev/sda (hd0)
    # /dev/sdb2 (hd1,2)
    # /dev/sda3 (hd0,3)
    #

    # Timeout for menu
    set timeout=5

    # Set default boot entry as Entry 0
    set default=1

    # Set default color
    set color_normal=white/blue

    # (0) Original
    menuentry "x64 Linux" {
    set root=(hd1,1)
    linux /vmlinuz-2.6.39.4 root=/dev/sdb2
    initrd /initrd.img-2.6.39.4
    }

    # (1) Windows
    menuentry "Windows" {
    set root=(hd0,1)
    chainloader (${root})/EFI/Boot/bootx64.efi
    }

    I rebooted, brought up my one time select your boot device screen by pressing F9 (F12 on other systems) and selected my second hard drive. Grub's menu popped up I selected x64 Linux and the system booted. Everything is working OK so far. I did have to compile a 3.1.6 kernel as my system would hang on reboot or shutdown with the BT5R1 kernel. I don't do wireless testing on this system so rolling my kernel using the BT5 config is good enough. I don't recommend compiling your kernel unless you exactly what you are doing and what you are giving up vs a BT kernel.

    You could put all of the grub files on the windows 7 EFI partition and use grub to dual boot however the MS efi partition is only 100MB in size so you will run into space problems if you install too many Linux kernels. The MS efi files take 33 MB. The grub boot files take 4MB. The BT kernel and initrd take 22MB. Grand total 59MB used. Just beware of space issues. All you have to do is rename the /boot/efi/bootx64.efi on the MS efi partition to /boot/efi/win7.efi and update the grub.cfg to point to the win7.efi file.

    Have fun EFI booting.
    I like the bleeding edge, but I don't like blood loss

  3. #3
    Good friend of the forums
    Join Date
    Jan 2010
    Location
    outside chicago, il
    Posts
    442

    Default Re: UEFI booting BT5R1

    double posted by accident
    I like the bleeding edge, but I don't like blood loss

  4. #4
    Senior Member hypervista's Avatar
    Join Date
    Feb 2010
    Posts
    121

    Default Re: UEFI booting BT5R1

    Awesome bofh28!! I presented a UEFI hypervisor at Black Hat several years ago. I'm going to have to dust that work off and play with a BT5 version.

  5. #5
    Good friend of the forums
    Join Date
    Jan 2010
    Location
    outside chicago, il
    Posts
    442

    Default Re: UEFI booting BT5R1

    It took a lot of research and I ran into too many bugs but it all worked out in the end. I do ask you add yourself to the above bugs so they can hopefully get fixed before the next LTS release.
    I like the bleeding edge, but I don't like blood loss

  6. #6
    Just burned their ISO
    Join Date
    Nov 2012
    Posts
    8

    Default Re: UEFI booting BT5R1

    Hiies..

    Wow that's quite a chunk of stuff @_@

    Now there is BT5R3, seems for me. non-UEFI win7 install is preventing BT from detecting my win7.
    Is UEFI really becoming the de-facto here? o.O?

  7. #7
    Good friend of the forums
    Join Date
    Jan 2010
    Location
    outside chicago, il
    Posts
    442

    Default Re: UEFI booting BT5R1

    Yes it is. UEFI is mandatory for all windows 8 computers so it is the only option now. The good news is Ubuntu 12.10 now includes a UEFI boot loader so you don't have to compile everything yourself. Just copy the files from the iso image, edit the grub.cfg and you should be good to go.
    I like the bleeding edge, but I don't like blood loss

  8. #8
    Just burned their ISO
    Join Date
    Dec 2012
    Posts
    2

    Default Re: UEFI booting BT5R1

    Quote Originally Posted by bofh28 View Post
    Yes it is. UEFI is mandatory for all windows 8 computers so it is the only option now. The good news is Ubuntu 12.10 now includes a UEFI boot loader so you don't have to compile everything yourself. Just copy the files from the iso image, edit the grub.cfg and you should be good to go.
    hello ..
    i have MacBook Pro 8.1 13-inch, Early 2011
    ( Processor 2.3 GHz Intel Core i5 Memory 4 GB 1333 MHz DDR3 Graphics Intel HD Graphics 3000 384 MB )
    i have 4 native operating systems on it
    1- mac osx 10.8
    2- windows 8
    3-ubuntu-12.10-desktop-amd64+mac
    4-backtrack 5 r3 64 bit gnome
    i installed all the operating systems with no problem at all and i use refit boot loader ( mac ) to boot to each system
    the ubuntu-12.10 installed all the drivers automaticaly i didn't install any extra drivers the Intel HD Graphics is working with the same native resolution on os x opirating system 1280x800
    the problem is
    on backtrack no drivers are installed so Intel HD Graphics is not giving me the naative resoluton 1280x800 it has to resolutions there 1024x768 & 800x600 the sound is not working to the network allso not working i think the problem is the backtrack has not efi booting but the new 12.10 ubuntu has it

    so you said that we have to Just copy the files from the iso image of ubuntu, edit the grub.cfg

    the problem is the ubuntu iso files are very complicated it has the following
    ..................
    boot > grub > loopback.cfg

    isolinux > grub > grub.cfg
    isolinux > grub > efi.img
    isolinux > grub > x86_64-efi > grub.cfg
    and many other files
    syslinux > grub > grub.cfg
    syslinux > grub > efi.img
    and many other files
    syslinux > grub > x86_64-efi > grub.cfg
    .................
    so how can i merge ubuntu files with backtrack files without problems and which grub.cfg to edit

  9. #9
    Good friend of the forums
    Join Date
    Jan 2010
    Location
    outside chicago, il
    Posts
    442

    Default Re: UEFI booting BT5R1

    In the Ubuntu iso there should be a \EFI\Boot\ directory. It should have a bootx64.efi file in there. Copy the \EFI directory and all of its contents to the thumb drive. Make sure that you have the exact directory structure of \EFI\Boot\ and bootx64.efi is in that exact folder. Most UEFI system look in this spot only. There should be a grub.cfg file in this directory. Edit this grub.cfg file as needed.

    You already have a UEFI system partition so all you have to do is UEFI boot BT5R3, create an ext4 partition to be the home for your BT5 install, use the installer to copy all of the files to this new partition. Then mount your EFI partition and copy /boot/vmlinuz-3.2.6 and /boot/initrd.img-3.2.6 to your /EFI partition and modify your Ubuntu grub.cfg to include a BT5 option like:
    menuentry "BT5R2 3.2.6" {
    search --fs-uuid --no-floppy --set=root 6808-1AE3
    linux /vmlinuz-3.2.6 root=UUID=aa512382-97d8-4bca-af30-f38fa6a166ac
    initrd /initrd.img-3.2.6
    }
    the --set=root 6809-1AE3 is the UUID of my EFI system partition.
    root=UUID is the UUID of the ext4 partition.
    Read
    https://help.ubuntu.com/community/UsingUUID
    on how to list all of the UUIDs for your system.
    Last edited by bofh28; 12-29-2012 at 08:12 PM. Reason: added more information
    I like the bleeding edge, but I don't like blood loss

  10. #10
    Just burned their ISO
    Join Date
    Jun 2012
    Posts
    8

    Default Re: UEFI booting BT5R1

    Hello bofh28. I took a break from EFI booting and linux related stuff for awhile, but now I am back to try again.

    I read up on some documentation about EFI boot loaders here: Managing EFI Boot Loaders for Linux.

    I have a basic understanding of partitions in linux too.

    My EFI partition (ESP?) is /dev/sda1. Using the command "mountvol Z: /s" in Windows to see my EFI partition, My bootx64.efi file is located in Z:\EFI\Boot.

    Here is my, "setup:"

    Windows 7: installed on Hard drive
    Ubuntu 12.10: installed on one flash drive
    Backtrack 5 R3 Gnome 64 Bit: installed on another flash drive

    So where should I copy the EFI folder from the Ubuntu 12.10 iso to? I suppose I would copy it to my ESP partition, overwriting my old bootx64.efi.
    However, once copied, there is no grub.cfg or any of the grub .mod files in my ESP partition.

    My question is, should i be copying anything over to my Backtrack USB? Because at the moment, when I copy the files over to my /dev/sda1 (EFI) partition and create a grub.cfg in the same folder as bootx64.efi and grubx64.efi, nothing noticable happens when I attempt to boot my BT thumb drive.

    I would prefer to have all of my GRUB2 files on my ESP partition. Rob Smith from the site I linked says this is the best way to configure GRUB2.

Page 1 of 2 12 LastLast

Similar Threads

  1. armitage??BT5R1
    By zimmaro in forum BackTrack 5 Videos
    Replies: 7
    Last Post: 12-23-2011, 08:38 AM
  2. Trouble booting the 32-bit Gnome BT5R1 live C on a 64-bit Intel processor
    By wpa2wire in forum BackTrack 5 General Topics
    Replies: 5
    Last Post: 11-02-2011, 07:42 PM
  3. Trouble booting BT5r1 live dvd
    By Nightspear in forum BackTrack 5 Beginners Section
    Replies: 0
    Last Post: 11-01-2011, 09:13 PM
  4. How to install kernel 2.6.38-rc4 on BT5R1
    By bidalot in forum BackTrack 5 Beginners Section
    Replies: 1
    Last Post: 10-27-2011, 01:15 PM
  5. BT5R1 won't boot from dvd
    By cmburns in forum BackTrack 5 Beginners Section
    Replies: 2
    Last Post: 09-05-2011, 01:53 PM

Tags for this Thread

Posting Permissions

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