Booting ISO Files Directly From USB

Avatar image for deactivated-6610658acf7f5
deactivated-6610658acf7f5

962

Forum Posts

23877

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

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: 

  1. Format the USB drive into a single FAT32 partition; include the "boot" flag. This step may easily be accomplished using GParted
  2. Install GRUB2 to the device using the command: grub-install --force --no-floppy --root-directory=/path/to/mounted/usb /dev/usb-device
  3. 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
  4. Create folder /iso to contain the disk image files
  5. 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: 
# Timeout for menu
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: 
timeout 10
default 0

title Ultimate Boot CD 5.0.3
find --set-root /iso/ubcd-5.0.3.iso
map /iso/ubcd-5.0.3.iso (hd32)
map --hook
chainloader (hd32)

title
root

title Reboot
reboot 
Avatar image for deactivated-6610658acf7f5
deactivated-6610658acf7f5

962

Forum Posts

23877

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

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: 

  1. Format the USB drive into a single FAT32 partition; include the "boot" flag. This step may easily be accomplished using GParted
  2. Install GRUB2 to the device using the command: grub-install --force --no-floppy --root-directory=/path/to/mounted/usb /dev/usb-device
  3. 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
  4. Create folder /iso to contain the disk image files
  5. 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: 

Sample /boot/grub4dos/menu.lst file: 
Avatar image for xeiphyer
Xeiphyer

5962

Forum Posts

1193

Wiki Points

0

Followers

Reviews: 0

User Lists: 8

#2  Edited By Xeiphyer
@Mercanis: 
Great, why did you post this to the forums?
Avatar image for deactivated-6610658acf7f5
deactivated-6610658acf7f5

962

Forum Posts

23877

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

@Xeiphyer: It took me a while to figure out, so I thought I'd drop the information in the off topic section in case anyone was interested.
Avatar image for geno
Geno

6767

Forum Posts

5538

Wiki Points

0

Followers

Reviews: 15

User Lists: 3

#4  Edited By Geno
@Mercanis said:
" @Xeiphyer: It took me a while to figure out, so I thought I'd drop the information in the off topic section in case anyone was interested. "
Not sure I'll use this info immediately, but thanks for posting!
Avatar image for weapon82x
weapon82x

2

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

I know this is an old post. Can you post the configs again please.

Thanks

Avatar image for aperture_science
Aperture_Science

23

Forum Posts

20

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

You should try out YUMI it's far easier and quicker than doing it all manually. Been using it for a while and hasn't let me down yet.

http://www.pendrivelinux.com/yumi-multiboot-usb-creator/