Thread: ISO Booting with Grub 2
this page has been migrated ubuntu community documentation site. up-to-date information, please visit:
https://help.ubuntu.com/community/grub2/isoboot
above page sub-page of main community documentation regarding grub2.
thank users posted in these threads , expanded our knowledge of grub 2 since it's introduction.
thread discussion of wiki can found @ http://ubuntuforums.org/showthread.php?p=12073029
if have known working menuentry not posted on community grub2/isoboot/examples page please post on page. if not have write privileges on page post menuentry in previous link.
support threads regarding wiki , it's content should created in suitable forum.
----
iso booting grub 2
thread detail how place menu entry in grub 2 allow booting iso file stored on computer without cd/dvd. not isos work grub 2. iso must constructed in manner allow method of booting. ubuntu family of live cd isos (9.10 , later), gparted cd, parted live cd, , systemrescue cd, among others, support feature. pointed out splooshie123 in post 240, method (as described) won't work ubuntu alternate installation cd.
have thread covers installing ubuntu iso booted grub promtp. might useful can download iso can't use cd/dvd. thread located here:
howto: boot & install ubuntu grub rescue prompt
have received report yoryor in grub 2 basics post #642 @ least image files (.img) can booted grub 2. example menuentry included below.
note 1: in addition being able use grub2 boot ubuntu (and other) isos, multisystem offers additional capabilities user may find helpful in booting , testing other os's isos such fedora without installing os. seanbw in post #137 calling attention app.
note 2: have written guide on booting ubuntu iso grub rescue prompt in order repair previously-working installation. guide includes instructions on how install ubuntu rescue prompt via live cd iso or via internet.
howto: boot & install ubuntu grub rescue prompt
being able mount ubuntu iso via grub menu has following advantages:
- there no need insert cd/dvd.
- boot times of cd/dvd's iso faster booting actual cd/dvd.
downloading isos:
note: users should consider using torrents download isos, after new release when servers busy.
here few sites users can download bootable iso images:
- ubuntu/kubuntu/edbuntu download mirrors:
http://www.ubuntu.com/getubuntu/downloadmirrors#mirrors
- if know name of server , file, can download via command line. instance:
code:wget http://ftp.ucsb.edu/pub/mirrors/linux/ubuntu/10.04/ubuntu-10.04-desktop-amd64.iso- systemrescue cd:
http://www.sysresccd.org/download
notes: opens command line. type "wizard" enable gui. gui contains firefox, terminal, gparted, file browser, cd/dvd burning, text editor.- gparted cd:
http://sourceforge.net/projects/gpar...d-live-stable/
notes: screenshot, terminal, gparted. gui.- parted cd:
http://sourceforge.net/projects/gpar...d-live-stable/
notes: windows users feel comfortable app. gparted, system profiler/benchmark, pcmanfm file browser, terminal, networking.
where place isos:
prefer storing iso files on non-system partition simplicity's sake in post make new folder in system's /boot folder called "iso". iso files reside in sda1 partition in /boot/iso folder. in example, address of iso, translated grub2 understands, is:
(hd0,1)/boot/iso/<iso_filename>
since 'rescue cds' such gparted loaded memory , use self-contained version of linux, format of partition not matter long 1 grub 2 can recognize. additionally, isos gparted's can located on system partition since partition not mounted. allows real partition resized if iso located in same partition.
the user need adjust grub menu entries point correct partition , folder own situation.
notes on iso locations
- separate /home folder: many ubuntu users have separate home partition. if iso folder or file placed in home folder, sure use correct path in menuentry - not include "/home" in path. since separate /home partition mounted fstab later in boot process, grub 2 not find file if path designated (hdx,y)/home/username/iso/isofilename.
- non-linux partitions: if iso stored on non-linux partition (ntfs, vfat, etc), appropriate module must loaded ensure grub2 can read filesystem. example of added module first line below menuentry follows. (see ny6ga's post #39 complete example)
menuentry "parted magic" {
insmod ntfs
... continued ....
- the correct grub 2 path iso file found in /home/username/iso/isofilename (hdx,y)/username/iso/isofilename, (hdx,y) being partition of separate home files , username being user's login name.
- example: / on sda5, /home/drs305 on sda10. iso file in folder "iso" , filename "maverick-desktop-i386.iso". when running ubuntu, file can found @ /home/drs305/iso/maverick-desktop-i386.iso.
in grub 2, address be: (hd0,10)/drs305/iso/maverick-desktop-i386
to make new folder in store isos:
then copy iso file(s) root new folder.code:sudo mkdir /boot/iso
note: if have iso's stored on partition, sure partition mounted before copying files mount point.
summarize, have downloaded isos, placed them in /boot/iso folder of sda1 partition. if did search ubuntu lucid iso, shown in:
/boot/iso/ubuntu-10.04-desktop-i386.iso
customizing menuentries:
in following examples, user can change title (between quotation marks) on menuentry line whatever title desired.
filenames reflect current release version of isos mentioned previously. newer versions released filenames need adjusted reflect newer filename.
making grub 2 entry:
following line not necessary provides feedback during execution of "update-grub". generates line in terminal when updating grub indicate 40_custom file contents being added grub2 menu:
sample /etc/grub.d/40_custom file:echo "adding 40_custom." >&2
the simple way add entries. easiest way incorporate isos grub2 menu add them /etc/grub.d/40_custom file. leave existing lines in 40_custom are, , add new entries below. menu items appear @ bottom of grub 2 menu. if wish items appear first, name menu "06_custom" , make file executable. items in "06_custom" appear before linux , other os menu items.
manually creating menuentry. if create entry manually, recommend different format menuentry. incorporating set isofile= line set path , filename of iso file allows easier troubleshooting , less confusion. allows user change 1 entry if file's name changes (e.g. version update). thank forum user oldfred, showed me method. entries not copied directly grub.cfg file:
menuentry "lucid iso" {
set isofile="/boot/iso/ubuntu-10.04-desktop-i386.iso"
loopback loop (hd0,1)$isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject
initrd (loop)/casper/initrd.lz
}
#!/bin/sh
echo "adding 40_custom." >&2
exec tail -n +3 $0
# file provides easy way add custom menu entries. type the
# menu entries want add after comment. careful not change
# 'exec tail' line above.
menuentry 'iso precise ' {
isofile=ubuntu-12.04-desktop-amd64.iso
loopback loop (hd0,1)/iso/$isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/iso/$isofile noprompt noeject
initrd (loop)/casper/initrd.lz
}
menuentry 'oneiric ' {
isofile=ubuntu-11.10-desktop-amd64.iso
loopback loop (hd0,1)/iso/$isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/iso/$isofile noprompt noeject
initrd (loop)/casper/initrd.lz
}
menuentry "lucid iso" {
loopback loop (hd0,1)/boot/iso/ubuntu-10.04-desktop-i386.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/boot/iso/ubuntu-10.04-desktop-i386.iso noprompt noeject
initrd (loop)/casper/initrd.lz
}
menuentry "karmic 64-bit iso" {
loopback loop (hd0,1)/boot/iso/ubuntu-9.10-desktop-amd64.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/boot/iso/ubuntu-9.10-desktop-amd64.iso noprompt quiet splash
initrd (loop)/casper/initrd.lz
}
menuentry "gparted live iso" {
set isofile="/boot/iso/gparted-live-0.8.0-1.iso"
loopback loop (hd0,1)$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 "systemrescue cd iso" {
set isofile="/boot/iso/systemrescuecd-x86-1.5.8.iso"
loopback loop (hd0,1)$isofile
linux (loop)/isolinux/rescue64 setkmap=us isoloop=/systemrescuecd-x86-1.5.8.iso
initrd (loop)/isolinux/initram.igz
}
menuentry "parted magic iso" {
set isofile="/boot/iso/pmagic-5.2.iso"
loopback loop (hd0,1)$isofile
linux (loop)/pmagic/bzimage iso_filename=$isofile boot=live load_ramdisk=1 prompt_ramdisk=0 noeject noprompt
initrd (loop)/pmagic/initramfs
}
menuentry "boot img - seagate tools" {
linux16 /memdisk bigraw
initrd16 /seatools.img
}
courtesy of cbowman57 in post #54; clonezilla iso located in sda9's root directory (/)
menuentry "clonezilla live" {
set isofile="(hd0,9)/clonezilla-live-1.2.8-3-amd64.iso"
loopback loop $isofile
linux (loop)/live/vmlinuz boot=live live-config noswap nolocales edd=on nomodeset ocs_live_run=\"ocs-live-general\" ocs_live_extra_param=\"\" ocs_live_keymap=\"\" ocs_live_batch=\"no\" ocs_lang=\"\" vga=788 ip=frommedia nosplash toram=filesystem.squashfs findiso=$isofile
initrd (loop)/live/initrd.img
}
modified post dancer_69
menuentry "gentoo 11 live dvd" {
set isofile="/boot/iso/gentoo-livedvd-x86-amd64-32ul-11.0.iso"
loopback loop (hd1,6)$isofile
linux (loop)/boot/gentoo root=/dev/ram0 init=/linuxrc dokeymap looptype=squashfs loop=/image.squashfs cdroot initrd=/boot/gentoo.igz isoboot=/boot/iso/gentoo-livedvd-x86-amd64-32ul-11.0.iso
initrd (loop)/boot/gentoo.igz
}
- run "sudo update-grub" after saving /etc/grub.d/40_custom include new entries grub 2 menu.
persistence:
see post #254 nikth information on making iso persistent. http://ubuntuforums.org/showpost.php...&postcount=253
more iso menuentries:
if need inspect contents of iso troubleshooting purposes, can mount while running linux os following commands. make mount point in /mnt , mount iso /mnt/temp. after mounting, can use file browser inspect contents of /mnt/temp.
- one example of using mount command inspect contents check initrd file. in bootable ubuntu isos (karmic & later) file initrd.lz in other third-party isos, file may initrd.gz rather initrd.lz.
code:sudo mkdir /mnt/temp sudo mount -o loop /boot/iso/<filename.iso> /mnt/temp when finished: sudo umount /mnt/temp
thread update of closed karmic testing thread created during testing of karmic , grub 2:
http://ubuntuforums.org/showthread.php?t=1295506
more iso menuentries:
if add examples of other iso menuentries, please start post os or utility name , place menu entry within "code" tags.
got me going. great info, always, , in love ability boot isos.
post.
Forum The Ubuntu Forum Community Other Discussion and Support Tutorials ISO Booting with Grub 2
Ubuntu
Comments
Post a Comment