(U)EFI-Booting of legacy Multiboot USB-Sticks

  • fuwi

    fuwi - 2013-08-15

    I'm trying to setup my Multiboot USB-Sticks so that they are bootable as legacy drives and as (U)EFI drives.

    The Sticks have either Syslinux or grub4dos as bootmanager.

    They should also be bootable in UEFI Secure Boot mode.
    They should also be bootable in Apple Mac's.

    The EFI\boot folder on the Sticks contains this files:
    - bootx64.efi and MokManager.efi is the MS-signed Shim from here:
    - grubx64.efi is rEFInd 0.7.3
    - refind.cer is the rEFInd public key from the rEFInd-CD

    my refind.conf:
    timeout 20
    textonly 1
    scan_delay 1
    showtools about shutdown reboot
    scanfor hdbios

    My questions:
    I can not make tests with Secure Boot because i have currently not such a machine
    -> can anybody test this on newer hardware with my EFI\boot files?

    MacBook Pro: why is rEFInd not recognizing the USB-Stick? (see screenshot below).

    Why has the HP Compaq 8200 Desktop one menu item for the USB-Stick, and the HP 8440p NoteBook two?

    HP Compaq 8200 Elite Convertible Minitower (UEFI 2.10)
    -> selecting the 'legacy target Drive' boots the bootmenu on the USB-Stick correctly:
    file not found

    HP EliteBook 8440p NoteBook (UEFI 2.00)
    -> both 'legacy target Drive' menu items boots the bootmenu on the USB-Stick correctly:
    file not found

    Apple MacBook Pro (EFI 1.10)
    -> the USB-Stick is not recognized. Only a Windows 7 BootCamp installation is bootable:
    file not found


    Last edit: fuwi 2013-08-15
  • Joe van Tunen

    Joe van Tunen - 2013-08-15

    Check your scanfor option. I think you need to add external and biosexternal for USB devices.

    You can press Escape to rescan partitions, F10 to take screen shots (it also works in text mode), F12 or Eject to eject.

    More info about your USB stick might be helpful:
    diskutil list /dev/disk1
    sudo gpt -r show -l disk1
    sudo gpt -r show disk1
    sudo fdisk /dev/disk1
    sudo dd count=1 if=/dev/disk1 | xxd
    ls -l /Volumes/yourusbstick (include a listing of any EFI or boot directories)

    Can you enter the EFI Shell, find the file system for your USB device, and list the contents?

    If you install the NTFS.efi driver from Clover, then the NTFS partitions will be named instead of saying "Partition 4".

    The USB stick might not be bootable in legacy mode (Boot Camp) while you have a Windows partition on the main hard disk (not a problem on all Macs) so you could try hiding that partition (change the type). Either way, rEFInd should be able to see it though so that would be the first priority - making rEFInd see your USB stick.

  • fuwi

    fuwi - 2013-08-16

    If you install the NTFS.efi driver from Clover, then the NTFS partitions will be named instead of saying "Partition 4".

    This works!
    reEFInd say now "Booting Windows from BOOTCAMP"
    instead "Booting Windows from Partition 4"

    But this is not my primary problem.

    I have added EFI Shell to my rEFInd on the USB stick.

    The following commands list the files and folder on my stick:
    fs5: <enter>
    ls <enter>

    So Mac EFI can see my stick!

    Adding 'external' to the 'scanfor' option doesn't change anything.
    After adding 'biosexternal' to the 'scanfor' option, i see a new menu item
    in rEFInd: "Boot Windows from PE-Stick" ('PE-Stick' is the label of my stick).
    But if i select this item then Windows 7 in BootCamp is booting.

    On the other hand, a in Windows 8 created Recovery boot stick boots flawlessly
    on the PowerBook (direct EFI boot: Microsoft bootx64 boots bootmgr directly).

    So i think, Apple has some code in his efi which supress legacy booting of
    bootable USB drives.

    If this is true than we can forget this option...


    Last edit: fuwi 2013-08-16
  • Joe van Tunen

    Joe van Tunen - 2013-08-18

    I think you can test that theory by hiding the BOOTCAMP partition in the MBR using "sudo fdisk -e /dev/disk1". Set the partition to blank values like this:
    2: 00 0 0 0 - 0 0 0 [ 0 - 0] unused
    Then try booting your USB stick in legacy mode.
    After the test, restore the MBR partition settings.

  • Roderick W. Smith

    A failure to recognize a disk (especially an external one) can sometimes be overcome by re-scanning it -- that is, by pressing the Esc key. If this works and if you regularly boot with the external disk attached, you can use the scan_delay option in refind.conf to pause the specified number of seconds and force a re-scan. Usually scan_delay 1 does the job, although you might need a higher value.

    • fuwi

      fuwi - 2013-08-26

      In Apple MacBook Pro the the USB-Stick is not recognized, rescanning with
      esc doesn't help.

      Here my experiences with some Apple MacBook's:

      Older MacBook Pro:
      the USB-Stick is not recognized in Mac bootmanager, not as legacy boot drive and not as EFI drive.

      Newer MacBook Pro:
      the USB-Stick is not recognized as legacy boot drive in Mac bootmanager, but it is recognized as EFI drive -> in rEFInd the Stick is not visible.

      MacBook Air:
      the USB-Stick is recognized as legacy boot drive and as EFI drive in Mac bootmanager,
      i can legacy-boot my grub4dos Multiboot-Stick directly from Mac bootmanager
      but in rEFInd the Stick is also not visible.


      Last edit: fuwi 2013-08-26

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks