I'm trying to boot off CentOS iso from an USB drive. I've already got grub installed on my usb device.
For example I can easily boot Ubuntu/Debian based distros with the help of their loopback.cfg grub config file provided in their iso files as follows..
Code: Select all
menuentry "Ubuntu 15.04" {
set iso_path='/iso/ubuntu-15.04-desktop-amd64.iso'
export iso_path
loopback loop (hd0,1)$iso_path
# load config file
set root=(loop)
configfile /boot/grub/loopback.cfg
}
Code: Select all
menuentry "[LinuxDev] CentOS" {
set iso_path='/iso/CentOS-7-x86_64-DVD-1503-01.iso'
export iso_path
loopback loop (hd0,1)$iso_path
# load config file
set root=(loop)
configfile /EFI/BOOT/grub.cfg
}
Code: Select all
search --no-floppy --set=root -l 'CentOS 7 x86_64'
# THIS WORK
menuentry 'Install CentOS 7' {
linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:/dev/sdb1:${iso_path} quiet
initrdefi /images/pxeboot/initrd.img
}
As you could see, using a config file (comes with the iso) make things simpler as we don't have to rewrite all the menu entries and boot parameters manually.
So I'd like to know if I can use the default `/EFI/BOOT/grub.cfg` for Loopback booting? If so how?