Fedora Live USB with GRUB
As already mentioned in my last post, my laptop won’t boot from a USB stick prepared using a binary copy of an ISO (by means of dd
). Here is the method I use to boot the Fedora Live images off my USB stick using GNU GRUB2. The device node of the USB driver is denoted /dev/sdX
in the following and must be replaced with the actual device node (e.g. /dev/sdc
).
- Prepare a partition on the USB stick and/or make sure there is enough space on it (it must be slightly larger than the ISO image).
- Make sure it is flagged bootable. (
fdisk -l /dev/sdX
is your friend) - Remember the name of the USB partition you’re going to use or if unlabelled, label it.
- Loop-mount the ISO image using something like
mount -o loop /path/to/iso /mnt/loop
- Copy the content of the ISO over to the USB
- Install GRUB on the USB by issuing
grub-install --no-floppy --root-directory=/mnt/usb /dev/sdX
- Create a
/mnt/usb/boot/grub/grub.cfg
with the following contentmenuentry "Fedora Live" { linux /isolinux/vmlinuz0 root=live:LABEL=XYZ rootfstype=auto ro liveimg quiet rhgb rd_NO_LUKS rd_NO_MD rd_NO_DM initrd /isolinux/initrd0.img } menuentry "Fedora Live (Basic Video)" { linux /isolinux/vmlinuz0 root=live:LABEL=XYZ rootfstype=auto ro liveimg quiet rhgb rd_NO_LUKS rd_NO_MD rd_NO_DM xdriver=vesa nomodeset initrd /isolinux/initrd0.img }
where
XYZ
must be replaced by the actual partition name of your USB partition. - Unmount and boot