Sunday, April 25, 2010

How to install GRUB2 bootloader in USB drive from ubuntu 9.10?

This Grub2 USB Flash Drive Install tutorial assumes you will be running from an Ubuntu 9.10 Live CD to create your Grub2 enabled Flash Drive. If this is not the case, it will not work as is.

Grub2 USB Install From Ubuntu 9.10 Live CD Essentials:
  • Ubuntu 9.10 Live CD
  • A PC that can boot from USB/CD
  • 1GB or larger USB Flash Drive
  • No Fear of the Terminal 
          
Grub2 USB Flash Drive Install using the Ubuntu Live CD:
  1. Boot from your Live Ubuntu 9.10 Linux CD
  2. Once booted, insert your USB Flash Drive
  3. Open a terminal and type sudo su
  4. Type  fdisk -l (and note which device is your USB)
  5. Type mkdir /mnt/USB && mount /dev/sdx1 /mnt/USB (replacing x with your actual usb device)
  6. Type grub-install –no-floppy –root-directory=/mnt/USB /dev/sdx (replacing  x with your actual USB device)
  7. Type cd /mnt/USB/boot/grub
  8. Type wget http://pendrivelinux.com/downloads/grub.cfg
  9. Type df (and locate where cdrom is mounted I.E./dev/sr0)
  10. Type dd if=/dev/sr0 of=/mnt/USB/ubuntu-9.10-desktop-i386.iso (replacing sr0 with the device found in step 9)
  11. Remove your Live CD and reboot your PC, setting your BIOS or Boot Menu to boot from the USB device.
If all goes well, you should now be booting into your Grub2 prepared USB Flash Drive, with a Grub2 Boot Menu option to Boot from your Ubuntu 9.10 ISO.

0 comments:

Post a Comment