Make USB drive bootable

Many new systems lack cd/dvd drive. An external cd/dvd drive is not easy to carry around. In such cases, installing Ubuntu linux or VMware ESXi from a bootable USB may be the only choice. Once you have it on USB, its even easier than to carrying cd/dvd media. [toc]

BIOS support for USB boot

Most modern systems can boot off USB drives. The BIOS should properly recognize the USB drive and show it under boot options.

Some older systems can be tricky but they might boot off USB selecting “USB HDD” option.

Converting ISO image into bootable USB

Mount the ISO image and USB.
$ sudo mkdir /media/iso
$ sudo mount -o loop my-image.iso /media/iso

If the image is already on the cdrom, it is good too, just mount the cdrom.

Mount your USB drive. You’ll need a FAT32 partition on the usb. In this case it’s showing up as /dev/sdb1. It might be /dev/sdc1 or different letter in your case.

$ sudo mkdir /media/usb
$ sudo mount /dev/sdb1 /media/usb

Then copy the whole contents of the ISO image into the usb

$ sudo cp -r /media/iso/* /media/usb

Rename file isolinux.cfg to syslinux.cfg

$ mv /media/usb/isolinux.cfg /media/usb/syslinux.cfg

You might need to update the file as per your requirement. For VMWare ESXi 3.5, it worked without any update.

Make the USB bootable

Time to umount the image and usb drive.

$ sudo umount /media/iso
$ sudo umount /media/usb

Now, you’ll need syslinux package. If it’s not in your system, you’ll have to install it

$ sudo apt-get install syslinux
$ sudo syslinux -f /dev/sdb1

Try booting off the USB now. If it gives problem, you might need to fix the MBR

$ lilo -M /dev/sdb

Voila. You now have a bootable USB drive.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *