Tuesday, 10 February 2015

GRUB configuration topic






One of the greatest advantages of GRUB is customizability.
Especially the possibility to boot from ISO files is a big 'plus'.

You don't need to burn a CD or create an USB disk anymore.
The only exeption is when you can not boot to GRUB menu.
Then naturally you need to have such a separate boot media.

You just have to create a menu entry and you are ready to go.
This is my setup meant to serve as an example for illustration:

gksudo gedit /etc/grub.d/40_custom

menuentry "clonezilla" {
set isofile="/ubuntu/clonezilla-*.iso"
loopback loop (hd0,5)$isofile
linux (loop)/live/vmlinuz boot=live config union=aufs noswap noprompt vga=788 ip=frommedia toram=filesystem.squashfs findiso=$isofile
initrd (loop)/live/initrd.img
}


menuentry "gparted" {
set isofile="/ubuntu/gparted-*.iso"
loopback loopg(hd0,5)$isofile
linux (loop)/live/vmlinuz boot=live config union=aufs noswap noprompt vga=788 ip=frommedia toram=filesystem.squashfs findiso=$isofile
initrd (loop)/live/initrd.img
}


menuentry "ubuntu-rescue" {
set isofile="/ubuntu/ubuntu-*.iso"
loopback loop (hd0,5)$isofile
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=$isofile noprompt noeject
initrd (loop)/casper/initrd.lz
}

sudo update-grub

(* = file name | hd0,5 = disk 1 / partition 5)






No comments:

Post a Comment