# --- generate GRUB2 configuration with linuxmint.iso as rescue # add this in the wiki :https://wiki.gentoo.org/wiki/Handbook:X86/Installation/Bootloader#Default:_Using_GRUB2 foo=/etc/grub.d/50_iso [ -f $foo ] && mv $foo $foo.bak cat << 00 > /etc/grub.d/50_iso # -- LinuxMint #{{{ menuentry "/d8/iso/linuxmint-17.1-kde-32bit.iso" { # set isofile="/boot/iso/linuxmint-17.1-kde-32bit.iso set isofile="/iso/linuxmint-17.1-kde-32bit.iso" loopback loop (hd0,8)$isofile linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile locale=en_US.UTF-8 initrd (loop)/casper/initrd.lz } #}}} # -- Gentoo #{{{ #0 menuentry "/d8/iso/gentoo" { #0 set cmdline="dokeymap looptype=squashfs loop=/image.squashfs cdroot" #0 loopback loop /stg3-amd64-<DATE>.iso #0 linux (loop)/isolinux/gentoo $cmdline root=/dev/ram0 init=/linuxrc initrd=gentoo.igz #0 initrd (loop)/isolinux/gentoo.igz menuentry "Gentoo" { set cmdline="dokeymap looptype=squashfs loop=/image.squashfs cdroot" set isofile="/iso/gentoo-x86-amd64-32ul-20140826.iso" loopback loop (hd0,8)$isofile linux (loop)/isolinux/gentoo $cmdline root=/dev/ram0 init=/linuxrc initrd=gentoo.igz initrd (loop)/isolinux/gentoo.igz } #}}} # --- <t:50_isofile:0> #}}} 00 chmod 755 $f00 cat $foo To generate the final GRUB2 configuration, run the grub2-mkconfig command: grub2-mkconfig -o /boot/grub/grub.cfg Reproducible: Always
# --- sorry some typos ... # --- generate GRUB2 configuration with linuxmint.iso as rescue #{{{ foo=/etc/grub.d/50_iso [ -f $foo ] && mv $foo $foo.bak cat << 00 > /etc/grub.d/50_iso #!/bin/sh exec tail -n +3 $0 # -- LinuxMint #{{{ menuentry "/d8/iso/linuxmint-17.1-kde-32bit.iso" { # set isofile="/boot/iso/linuxmint-17.1-kde-32bit.iso" set isofile="/iso/linuxmint-17.1-kde-32bit.iso" loopback loop (hd0,8)$isofile linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile locale=en_US.UTF-8 initrd (loop)/casper/initrd.lz } #}}} # -- Gentoo #{{{ #0 menuentry "/d8/iso/gentoo" { #0 set cmdline="dokeymap looptype=squashfs loop=/image.squashfs cdroot" #0 loopback loop /stg3-amd64-<DATE>.iso #0 linux (loop)/isolinux/gentoo $cmdline root=/dev/ram0 init=/linuxrc initrd=gentoo.igz #0 initrd (loop)/isolinux/gentoo.igz menuentry "Gentoo" { set cmdline="dokeymap looptype=squashfs loop=/image.squashfs cdroot" set isofile="/iso/gentoo-x86-amd64-32ul-20140826.iso" loopback loop (hd0,8)$isofile linux (loop)/isolinux/gentoo $cmdline root=/dev/ram0 init=/linuxrc initrd=gentoo.igz initrd (loop)/isolinux/gentoo.igz } #}}} 00 chmod 755 $foo cat $foo #}}}
Your suggested changes are not applicable in the scope of the Handbook (where do the isos come from?). It also isn't needed for a standard system. Users wanting to include this can find more information outside of the installation docs: https://wiki.gentoo.org/wiki/GRUB2/Chainloading