LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Blogs > donatom
User Name
Password

Notices

Rate this Entry

Booting Mint Linux 14 iso and other isos from the hard drive using grub2

Posted 02-09-2013 at 01:09 AM by donatom

Booting a live iso from your harddrive is generally pretty easy. You store your live isos in a directory (I created the "ISOS" directory under the Downloads directory for this purpose) on your system. You then open the iso (# mount -o loop /path-to-iso /mnt OR right click the iso file and choose "open with Archive Manager") and look for either the syslinux.cfg or the isolinux.cfg file. Open this file with gedit and look for "append:". Copy all the info that follows "append:". This information will be used in the grub2 menuentry. Then open /etc/grub.d/40_custom with a text editor and add a menuentry for each iso you wish to boot. The following is a sample of a typical entry:

menuentry "Lucid Puppy 5.2.8" {
loopback loop (hd0,6)/donatom/Downloads/ISOS/LucidPuppy/lupu-528.iso
linux (loop)/vmlinuz pmedia=atahd --
initrd (loop)/initrd.gz
}

On the "loopback" line you give the path to the iso, preceded by the word "loop".
On the "linux" line you add the path to "vmlinuz"; this info will be found right before "append:" in the isolinux.cfg file (or syslinux.cfg file). Then you list all the info you copied above (i.e., following the word "append:").
On the last line (initrd) you will give the path to the proper initrd file, which can be found among the directories in the iso; for instance, for ubuntu and its dirivatives you would look in the casper directory of the iso (you should see the vmlinuz and the proper initrd file in this directory). Generally you place "(loop)" right before the paths to the vmlinuz and the initrd files.

After you have added your menuentries for grub2, you then run "update-grub". If you are using Fedora on you system, you would run "grub2-mkconfig -o /boot/grub2/grub.cfg" instead.

Reboot and you should see the titles of the menuentries at the bottom of the grub menu. Click on the title and your iso should boot. As you probably have realized, this process is a lot like the process for setting up mulitboot usb devices.

Now some live linux isos are somewhat problematic. Mint Linux is one of the troublesome ones.

To get Mint to boot on a system hard drive, you would copy all of the contents of the iso (# mount -o loop /path-to-iso /mnt; then # cp -vr /mnt/* /path-to-MintLinux-directory) and place them in a directory on your hard drive. I created the "MintLinux" directory inside the ISOS directory. You would also have to copy the iso itself and place it in the same directory. Use the process listed above to get the proper kernel options. To get Mint Linux to boot, you leave out the first line (loopback) of the menuentry and you have to include "iso-scan/filename=" followed by the path to the Mint Linux iso. You must also add "toram" at the end of the "linux" line. You should not place "(loop)" in front of the path to the vmlinuz or to the initrd file.

The following menuentry should allow you to boot Mint Linux from you system hard drive:
(make sure you use the proper paths to your isos, including the proper partition; (hd0,6) refers to the sixth partition of the first harddrive -- even if the hard drive is a sata drive; yours, of course, will probably be different from mine)

menuentry "mint 14.1 mate 64 bit" {
linux (hd0,6)/donatom/Downloads/ISOS/LinuxMint/casper/vmlinuz file=/cdrom/preseed/mint.seed boot=casper initrd=/casper/initrd.lz iso-scan/filename=/donatom/Downloads/ISOS/LinuxMint/linuxmint14-64bit.iso splash toram --
initrd (hd0,6)/donatom/Downloads/ISOS/LinuxMint/casper/initrd.lz
}


I am including all of the entries I have on my drive for live isos (some are utilities). You could actually create a separate partition for your isos, if you preferred (the paths, of course, would be shorter and the menu entry would look nicer perhaps):


menuentry "AVG Rescue CD" {

loopback loop (hd0,6)/donatom/Downloads/ISOS/AVG-Live.iso
linux (loop)/isolinux/vmlinuz max_loop=255 vga=791 init=linuxrc iso-scan/filename=/donatom/Downloads/ISOS/AVG-Live.iso
initrd (loop)/isolinux/initrd.lzm
}

menuentry "System Rescue CD 2.8.1" {
set isofile="/donatom/Downloads/ISOS/systemrescuecd-2.8.1.iso"
loopback loop (hd0,6)$isofile
linux (loop)/isolinux/rescuecd setkmap=us isoloop=/donatom/Downloads/ISOS/systemrescuecd-2.8.1.iso
initrd (loop)/isolinux/initram.igz
}

menuentry "Memory test (memtest86+)" {
linux16 (hd0,6)/donatom/Downloads/ISOS/memtest86+-4.20.bin
}

menuentry "Partion Magic ISO" {
set isofile="/donatom/Downloads/ISOS/PartitionMagic.iso"
loopback loop (hd0,6)$isofile
linux (loop)/pmagic/bzImage iso_filename=$isofile boot=live load_ramdisk=1 prompt_ramdisk=0 noeject noprompt
initrd (loop)/pmagic/initramfs
}

menuentry "Seagate SeaTools" {
linux16 (hd0,6)/donatom/Downloads/Seatools/memdisk bigraw
initrd16 (hd0,6)/donatom/Downloads/Seatools/SeaTools.img
}

menuentry "BackTrack5 r3" {
set gfxpayload=1024x768x16
insmod vbe
loopback loop (hd0,6)/donatom/Downloads/ISOS/BackTrack5-r3/BT5r3.iso
linux (hd0,6)/donatom/Downloads/ISOS/BackTrack5-r3/casper/vmlinuz file=(loop)/casper/custom.seed boot=casper BOOT=casper persistent rw iso-scan/filename=/donatom/Downloads/ISOS/BackTrack5-r3/BT5r3.iso
initrd (hd0,6)/donatom/Downloads/ISOS/BackTrack5-r3/casper/initrd.bt5r3.gz
}

menuentry "Super Grub2 Disk" {
linux16 (hd0,6)/donatom/Downloads/ISOS/memdisk iso bigraw
initrd16 (hd0,6)/donatom/Downloads/ISOS/super_grub_disk.iso
}

menuentry "Slacko Puppy" {

linux16 (hd0,6)/donatom/Downloads/ISOS/Puppy/memdisk iso bigraw
initrd16 (hd0,6)/donatom/Downloads/ISOS/Puppy/slacko-5.3.3-4g-SCSI.iso
}

menuentry "Lucid Puppy 5.2.8" {
loopback loop (hd0,6)/donatom/Downloads/ISOS/LucidPuppy/lupu-528.iso
linux (loop)/vmlinuz pmedia=atahd --
initrd (loop)/initrd.gz
}

menuentry "ultimate boot cd 5.1.1" {
linux16 (hd0,6)/donatom/Downloads/ISOS/memdisk iso raw
initrd16 (hd0,6)/donatom/Downloads/ISOS/ubcd511.iso
}



I hope some of you will find this useful.
Posted in Uncategorized
Views 1190 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 07:22 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration