5

I read grub2 allows booting from an ISO image (at least for most live-cds). How can I add such an entry to my grub configuration? Please mention all files to modify and all commands to run since I haven't used grub2 before upgrading.

1

As far as I know while grub2 supports iso files and booting from CD it does not support loading systems from one yet.

cdboot module is compiled from cdboot.S which is support of booting from CD but not loading kernels (at least as of 1.98).

  • This is currently possible. See my answer. ;-) – Elder Geek Dec 14 '16 at 17:40
1

For Grub 2

menu entries such as the Kubuntu example below have been known to work.

menuentry "Try kubuntu-16.04.1-desktop-amd64.iso - 64 bit live" {
 loopback loop /kubuntu-16.04.1-desktop-amd64.iso
 linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=/kubuntu-16.04.1-desktop-amd64.iso splash --
 initrd (loop)/casper/initrd.lz
}

The content between the quotes on the first line is what you will see on the menu.

The second line mounts the named ISO on the loopback device.

The third line specifies the name of the Linux kernel executable.

The fourth line specifies the initial RAM disk. The initial RAM disk (initrd) is an initial root file system that is mounted prior to when the real root file system is available and contains the necessary modules to boot the real root file system.

You will likely have to check the content of the specific ISO you wish to boot to obtain the specific filenames for vmlinuz on the linux line and initrd on the intird line as these can vary from one distribution to another, and also insure that you are providing the full path to the ISO on the loopback line

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.