

I found this thread useful, and based my process on the instructions provided there: Even with much more I wasn't able to let Debian Live finish booting.Įxtra: configuring Debian Live directly and attempting to enable persistence.Note: this HOWTO relates to Grub (legacy), not Grub2 or Grub4dos. It is possible that 500 Mo be insufficient for some distros. drive file=/tmp/disk,format=raw,index=1,media=disk \ drive file=/dev/sdc,format=raw,index=0,media=disk \ drive if=pflash,format=raw,file=/tmp/OVMF.fd \ Assuming the device is plugged as /dev/sdc and we have a raw disk image /tmp/disk we want to use, it can look like that: ISO images can then be copied to the key and stances added to boot/grub/grub.cfg like explained in this article.Įxtra: to test the disk without rebooting a machine, we can use qemu, with the packages qemu-system-x86, qemu-system-gui and ovmf for the UEFI firmware. Let us put something in the device and unmount it. If background_image /boot/grub/grub-16x9.png then Sfdisk -no-reread /dev/sdc /media/boot/boot/grub/grub.cfg < Device path:įirst, let us wipe the device, so that traces of previous partitions and attemps do not interfer. Note that sfdisk is probably not in the default path. We assume we have read and write permissions on the device and use pmount to mount partitions, but otherwise we do not need root privileges. The size can be obtained from /proc/partitions (un units of 1024, so need to multiply by 2) or using /sbin/blockdev -getsz. This is written as a script, to have it compute the partitions positions and sizes automatically based on the size of the USB stick. It is a complement to this article about using GRUB to boot a live image written as a file rather than an image.Īfter this, the device has a little wasted space and a directory named boot, but is otherwise completely usable for other tasks. The purpose of this article is to explain how to install GRUB on an USB stick, or any other kind of USB mass-storage device, to make it bootable in either legacy BIOS or UEFI mode and allow to load live images installed in a directory. Installing GRUB on an hybrid BIOS/UEFI stick