Booting linux from usb using EFI
You need to install an EFI bootloader to the USB drive; elilo is what I've used before, but you could potentially use GRUB2. The Ubuntu amd64 elilo package installs the 64bit binary to /usr/lib/elilo/elilo.efi
and the 32bit binary to /usr/lib32/elilo/elilo.efi
.
EFI firmware will search removable media for a FAT32 filesystem containing the file /EFI/BOOT/BOOTX64.efi
(for both 32bit and 64bit systems). Make sure that you're using a FAT32 filesystem on the USB drive, and copy elilo.efi
to that path.
Some EFI systems may also need a startup script, in which case put the following in /EFI/BOOT/startup.nsh
:
BOOTX64
You then probably want to create a config file for elilo to specify how to boot the kernel. Create /EFI/BOOT/elilo.conf
and configure it as appropriate for the distro you want to boot. My configuration to boot RIPLinux looks like this:
image=/riplinux/kernel64
label=rip64
initrd=/riplinux/rootfs.cgz
append="root=/dev/ram0 rw"
And that should be it. There is no "install to MBR" type operation in EFI.
By the way, Rod Smith's Managing EFI Boot Loaders for Linux site is very useful for understanding how EFI works.
Related videos on Youtube
Comments
-
Khaleel over 1 year
I need to use a USB drive as an installation media for my Mint and Ubuntu. For that I have unetbootin to make the usb bootable.
But my PC only supports EFI boot (while adding the boot device, I need to provide an
.efi
file path etc).My question is how can I make my Linux distribution by copying some files (
.efi
file)?I have heard of a boot loader called
elilo
, but don't know how to use. And I tried rEFInd, rEFIt etc., they are booting from usb, but I don't know how to configure it to boot the Linux distribution in my usb drive.-
philcolbourn almost 11 yearsWhat type of PC?
-
-
Khaleel almost 12 yearsThanks, i tried with new Mint 13 version where i found the efi boot loader(grub 2) in it by defualt. I managed to start the boot loader, but i could not start the linux from it. After choosing "install linux mint" the whole screen goes black and unresponsive. I could not figure out what's happening. I will try your method.
-
mgorven almost 12 years@QuickSilver That sounds like a problem with Linux, not the bootloader then. You may need to play with the video options to the kernel.
-
Khaleel almost 12 yearsUpdate: I could boot using a DVD as media.