Last Modified: Wed, 15 Apr 2015 15:11:35 +0000 ; Created: Fri, 16 Dec 2011 14:55:57 +0000
I like being able to boot various Linux distros from USB sticks. It makes it easy to update to newer versions, is faster, and doesn't require using up DVD-R discs. Previously this required extracting the ISO contents to a USB disk and setting up special boot loaders. I have found a new way using grub2 to just copy the unmodified ISO file to the USB stick without extraction.
Prerequisites
Steps
Example \boot\grub\grub.cfgmenuentry "Ubuntu 11.10 Desktop x86 (toram)" { set isofile="/boot/isos/ubuntu-11.10-desktop-i386.iso" loopback loop $isofile linux (loop)/casper/vmlinuz boot=casper toram iso-scan/filename=$isofile quiet splash noprompt -- initrd (loop)/casper/initrd.lz } menuentry "Ubuntu 11.10 Desktop AMD64" { set isofile="/boot/isos/ubuntu-11.10-desktop-amd64.iso" loopback loop $isofile linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile quiet splash noprompt -- initrd (loop)/casper/initrd.lz } set isofilename="systemrescuecd-x86-2.4.1.iso" # Because System Rescue CD's boot loader adds a / when searching as it really likes it in the root of the drive set isorelativepath="boot/isos/$isofilename" set isofullpathname="/$isorelativepath" menuentry "systemrescuecd-x86-2.4.1 (docache setkmap=us)" { loopback loop $isofullpathname linux (loop)/isolinux/rescuecd isoloop=$isorelativepath docache setkmap=us initrd (loop)/isolinux/initram.igz } menuentry "systemrescuecd-x86-2.4.1 x64 Mode (docache setkmap=us)" { loopback loop $isofullpathname linux (loop)/isolinux/rescue64 isoloop=$isorelativepath docache setkmap=us initrd (loop)/isolinux/initram.igz } menuentry "System Rescue CD MemTest86+" { loopback loop $isofullpathname linux16 (loop)/bootdisk/memtestp } # Not working yet, not sure how to get multiple initramfs working in grub2 like grub1 # See http://savannah.gnu.org/bugs/?35238 which has a pushed fix not yet released #menuentry "System Rescue CD NTPASSWD" { # loopback loop $isofullpathname # # linux (loop)/ntpasswd/vmlinuz rw # initrd (loop)/ntpasswd/initrd.cgz # initrd (loop)/ntpasswd/scsi.cgz #} # |
|