Below is how to turn a USB drive into a bootable device. Booting into the device brings up a menu from which a variety of ISO disk images may be selected.
Steps:
- Format the USB drive into a single FAT32 partition; include the "boot" flag. This step may easily be accomplished using GParted
- Install GRUB2 to the device using the command: grub-install --force --no-floppy --root-directory=/path/to/mounted/usb /dev/usb-device
- Install GRUB4DOS to the device by extracting the GRUB4DOS archive to /boot/grub4dos. GRUB4DOS is required in certain cases where a disk image has trouble booting from GRUB2, e.g. UBCD
- Create folder /iso to contain the disk image files
- Configure GRUB2 and GRUB4DOS by altering /boot/grub/grub.cfg and /boot/grub4dos, respectively
Note: Puppy Linux and RIPLinuX had to be extracted from ISO to their own directory in order to boot properly
Sample /boot/grub/grub.cfg file:
set timeout=10
# Set default boot entry
set default=0
# Set menu entries
menuentry "GRUB4DOS" {
linux16 /boot/grub4dos/grub.exe --config-file=/boot/grub4dos/menu.lst
}
menuentry "Linux:" {
true
}
menuentry " Puppy Linux 5.2" {
echo "Loading Puppy Linux 5.2..."
linux /puppy/vmlinuz
initrd /puppy/initrd.gz
}
menuentry " SLiTaz 3.0" {
echo "Loading SLiTaz 3.0..."
set isofile="/iso/slitaz-3.0.iso"
loopback loop $isofile
linux (loop)/boot/vmlinuz-2.6.30.6-slitaz
initrd (loop)/boot/rootfs.gz
}
menuentry " Tiny Core 3.5" {
echo "Loading Tiny Core 3.5..."
set isofile="/iso/tinycore-3.5.iso"
loopback loop $isofile
linux (loop)/boot/bzImage
initrd (loop)/boot/tinycore.gz
}
menuentry " Ubuntu 10.10 Desktop Edition" {
echo "Loading Ubuntu 10.10 Desktop Edition..."
set isofile="/iso/ubuntu-10.10-desktop-i386.iso"
loopback loop $isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noeject noprompt splash --
initrd (loop)/casper/initrd.lz
}
menuentry " Ubuntu 10.10 Netbook Edition" {
echo "Loading Ubuntu 10.10 Netbook Edition..."
set isofile="/iso/ubuntu-10.10-netbook-i386.iso"
loopback loop $isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noeject noprompt splash --
initrd (loop)/casper/initrd.lz
}
menuentry "Tools:" {
true
}
menuentry " Clonezilla 1.2.6-59" {
echo "Loading Clonezilla 1.2.6-59..."
set isofile="/iso/clonezilla-1.2.6-59-i686.iso"
loopback loop $isofile
linux (loop)/live/vmlinuz boot=live live-config union=aufs nolocales noprompt ip=frommedia toram=filesystem.squashfs findiso=$isofile
initrd (loop)/live/initrd.img
}
menuentry " DBAN 2.2.6" {
echo "Loading DBAN 2.2.6..."
set isofile="/iso/dban-2.2.6-i586.iso"
loopback loop $isofile
linux (loop)/DBAN.BZI nuke="dwipe" silent --
}
menuentry " GParted 0.8.0-1" {
echo "Loading GParted 0.8.0-1..."
set isofile="/iso/gparted-0.8.0-1.iso"
loopback loop $isofile
linux (loop)/live/vmlinuz boot=live config union=aufs noswap noprompt ip=frommedia findiso=$isofile toram=filesystem.squashfs
initrd (loop)/live/initrd.img
}
menuentry " Memtest86+ 4.20" {
echo "Loading Memtest86+ 4.20..."
linux16 /boot/memtest86-4.20.bin
}
menuentry " Parted Magic 5.10" {
echo "Loading Parted Magic 5.10..."
set isofile="/iso/partedmagic-5.10.iso"
loopback loop $isofile
linux (loop)/pmagic/bzImage iso_filename=$isofile boot=live load_ramdisk=1 prompt_ramdisk=0 noeject noprompt
initrd (loop)/pmagic/initramfs
}
menuentry " RIPLinuX 11.4" {
echo "Loading RIPLinuX 11.4..."
linux /riplinux/kernel32
initrd /riplinux/rootfs.cgz
}
menuentry " SystemRescueCd 2.0.1" {
echo "Loading SystemRescueCd 2.0.1..."
set isofile="/iso/systemrescuecd-2.0.1.iso"
loopback loop $isofile
linux (loop)/isolinux/rescuecd setkmap=us isoloop=$isofile
initrd (loop)/isolinux/initram.igz
}
Sample /boot/grub4dos/menu.lst file:
Log in to comment