#Put grub on usb stick install
In these examples, the USB stick is at /dev/sde (this computer has a silly number of hard drives) and the filesystem is mounted at /media/sde1, amend the paths to suit your circumstances.įirst, we install Grub on the stick to make it bootable: $ mkdir -p /media/MULTIBOOT/boot Whatever you use give the filesystem a label, we used MULTIBOOT, as it will be important later.
Use whatever fits in with your other planned uses of the drive, we generally stick with FAT as it means we can download and add ISO images from a Windows computer if necessary. We’ve used FAT and ext2 (there’s no point in using the journalling ext3 or ext4 on a flash drive). The choice of filesystem is largely up to you, as long as it is something that Grub can read. If that’s the case, use fdisk or GParted to partition the drive, then you can create the filesystem. What you cannot get away with is a stick formatted with no partition table, as some are. We will assume that the USB stick is set up with a single partition, although you could use the first partition of a multi-partition layout. Setting up the USB stickįirst, we need to format the USB stick. If you want to use your USB stick with 32-bit equipment, stick with the MBR booting method. This is a 64-bit target, as UEFI is only fully supported on 64-bit hardware. $ sudo grub-install -target=x86_64-efi-boot-directory=/media/MULTIBOOT/boot /dev/sde
So this makes our stick the most portable option, but if you need to boot your stick using UEFI, change the grub-install command to use the UEFI target, like this: While most computers of the last few years use UEFI, they still have a compatibility mode to boot from an MBR. In this instance, we’ve created a flash drive that uses the old style MBR booting.