Page 1 of 1

How To: Make an USB-boot-stick

Posted: Mon Aug 09, 2010 12:21 pm
by oobetimer
1. Umount USB

2. Check the media -->
sudo fdisk -l

3. Make a filesystem to the USB partition. An example /dev/sdb1 -->
mkfs.ext2 /dev/sdb1 . You can use GParted also.

4. Mount USB partition -->
sudo mount /dev/sdb1 /mnt

5. Install grub to USB -->
sudo grub-install --root-directory=/mnt/ /dev/sdb

Edit: The new grub2´s command is sudo grub-install --boot-directory=/mnt/boot /dev/sdb

6. Copy /boot -folder to the USB partition -->
sudo cp -R /boot* /mnt/

7. Umount USB
sudo umount /mnt

Works with grub and grub2 .. :D ... #msg273148 ... =en&swap=1

Re: How to make an USB-boot-stick

Posted: Fri Jan 21, 2011 1:10 am
by oobetimer
Click the picture and watch a video .. :D


Re: How To: Make an USB-boot-stick

Posted: Fri May 13, 2016 4:53 am
by kukamuumuka
With newer grub2, the commands should be

Code: Select all

sudo mount /dev/sdb1 /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sdb
sudo cp -R /boot* /mnt/
sudo umount /mnt

Re: How To: Make an USB-boot-stick

Posted: Fri Nov 11, 2016 1:44 am
by austin.texas
I don't really see the point of this procedure.
To begin with, my /boot directory is 2.9GB. Why would I copy all that to my 8GB USB drive? All you really need is one file - grub.cfg
So changing the third command to sudo cp /boot/grub/grub.cfg /mnt/boot/grub/ would make better sense. Then the /boot directory on the USB would be about 4.5MB, instead of 2.9GB

Next, the only reason to do all that, is if you wanted to edit the grub.cfg on the USB to accomplish something special.
Otherwise, you could skip this entire procedure and just do

Code: Select all

sudo grub-install /dev/sdb
That will install grub to the MBR of the USB, and point to the grub.cfg on the hard drive. You don't even need to have an ext partition on the USB for that to work. You can have a FAT32 partition full of music files (as I do on my bootable flash drive).