For the sake of experimentation, I am trying to document a minimal procedure for a pure EFI boot of 14.04 on a Mac Mini.

This involves installing a base system (using the Mac-flavoured server install ISO) to the hard drive, but NOT installing GRUB to the MBR. GRUB is installed to the first partition of the hard drive, but until I manually set up the EFI boot partition, the system will be unbootable.

Is there a way to use the bootloader on the USB installer to boot into the installed system manually? I have access to "advanced options" (ie. the bootloader command line) on the installer, but I don't know what bootloader it is, and so I can't find full documentation for it.

  • The bootloader is probably SYSLINUX. So you could try the 64-bit Ubuntu Desktop version which boots via GRUB, and then use the GRUB shell to manually boot. – muru Aug 27 '14 at 3:16
  • @muru Thanks, that helps. It looks like there's a lot of extra options for the installer itself, but I suspect I need a lower-level SYSLINUX command, not an installer option. – detly Aug 27 '14 at 3:25
  • @muru - I found a non-Mac installer and used that. The whole thing works much better. – detly Aug 29 '14 at 14:05
  • Excellent. The mac versions of the image have are all legacy boot and so continue to use Syslinux, whereas the normal 64-bit versions support UEFI and use Grub. Its to do with some weirdness in the Mac's implementation of uefi. – muru Aug 29 '14 at 14:38
  • @muru - I think the "weirdness" you're referring to is that it insists on looking for an HFS+ partition, and having that "bless" utility. I'm hoping to write up a minimal procedure for this so that it can be fixed in the future. – detly Aug 29 '14 at 14:59

Don't use the Mac-specific installer. Use the normal (server, desktop) installer, install the system using all the defaults (except avoid LVM), and then reboot.

Boot off the USB installer again, but when you see the GRUB menu, press C to bring up the GRUB console.

Finding your installation's drive

At the GRUB console, do

grub> ls
(memdisk) (hd0) (hd0,msdos) (hd1) (hd2) (hd2,gpt3) (hd2,gpt2) (hd2,gpt1)

You may not get exactly the same results as this, but you'll have some options. You want to look for your new installation, not the installer/live system. I suggest finding a partition with your new user's home directory on it:

grub> ls (hd2,gpt2)/home

Keep trying this pattern until you find it.

Finding your installation's boot partition

If you know you installed everything to one partition, you're done — just use the result from the last step, the (hdX,gptY). If you didn't, or you're unsure, keep the hdX part, but go through all the gptY options looking for a /boot/grub directory:

grub> ls (hd2,gpt1)/boot/grub
error: file `/boot/grub' not found.

Nope, not that one.

grub> ls (hd2,gpt2)/boot/grub
unicode.pf2 [...] grub.cfg

Found it!

Now you want to set this as your root for further commands:

grub> set root=(hd2,gpt2)

Figuring out the boot command

I found that the only way to boot properly was to use the UUID of the drive (ie. no shortcuts with /dev/sdaX!) - so let's get that:

grub> ls -l (hd2,gpt2)
        Partition hd2,gpt2: Filesystem type ext* [...snip...] UUID e86c20b9-83e1-447d-a3be-d1ddaad6c4c6 - Partition start at [...]

Note the UUID string! Yours will be different. Now tell GRUB where Linux is:

grub> linux /boot/vmlinuz[...tab here!...].efi.signed root=UUID=<the UUID from above>

The GRUB console can do tab completion, so if you just type out the vmlinuz part and hit tab, then hit . and tab again... you won't have to type out the whole filename. But do make sure the .efi.signed bit is there! And yes, you will have to type out that whole UUID.

Now set the initrd (initial RAM disk):

grub> initrd /boot/initrd[...tab here!...]



grub> boot

You should find yourself booted into your installation!

I'm no GRUB wizard, so I'd welcome any tips on how to trim this down. Especially the UUID part, that is a little bit heinous.

  • The kernel root parameter is supposed to support /dev/sdXY. Did you get kernel panic with that? – muru Aug 30 '14 at 8:58
  • @muru - No, I just ended up at a prompt that said (initramfs). I tried just about everything for that root param. When I'm actually booted, it's /dev/sda2 (that contains /boot/grub, the EFI partition is /dev/sda1). Since GRUB saw it as (hd2,gpt2), I also tried /dev/sd[abc]2. Only the root=UUID=... form worked (and that's what's in /boot/grub/grub.cfg). – detly Aug 30 '14 at 13:22
  • 1
    thank you, this was very helpful. I just installed ubuntu on a sony vaio and can just not get grub or similar options to function due to UEFI and whatever else is going on. I read descriptions of how to manually boot from grub console but didn't know what paths to use so your explanations really helped. – Dan Roberts Apr 25 '16 at 18:12

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.