Don't fool around for info on set isoname on archlinux, go to:
https://bbs.archlinux.org/edit.php?id=1565724
https://wiki.archlinux.org/index.php/Mu ... lling_GRUB
The following syntax will permit to run from porteus.iso or archlinux.iso. The only modification needed is in 40_custom folder:
/etc/grub.d/40_custom:
Code: Select all
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
# path to the partition holding ISO images (using UUID)
probe -u $root --set=rootuuid
set imgdevpath="/dev/disk/by-uuid/$rootuuid"
menuentry '[loopback]archlinux-2015.09.01-dual.iso' {
set isofile='/ISO/archlinux-2015.09.01-dual.iso'
loopback loop $isofile
linux (loop)/arch/boot/x86_64/vmlinuz archisodevice=/dev/loop0 img_dev=$imgdevpath img_loop=$isofile
initrd (loop)/arch/boot/x86_64/archiso.img
}
menuentry "Arch Linux Install ISO" {
set isoname='archlinux-2015.09.01-dual.iso'
set isofile=/ISO/$isoname
echo "Using ${isoname}...'
loopback loop $isofile
linux (loop)/arch/boot/x86_64/vmlinuz img_dev=$imgdevpath img_loop=$isofile archisobasedir=arch archisolabel=ARCH_201509
initrd (loop)/arch/boot/x86_64/archiso.img
}
menuentry "porteus on sda5 64bit_v31 XFCE" {
set root=(hd0,6)
linux /64bit_v31/boot/syslinux/vmlinuz from=/dev/sda6/64bit_v31 extramod=/mnt/sda6/64bit_v31/xfce changes=EXIT:/64bit_v31/xfce login=root
initrd /64bit_v31/boot/syslinux/initrd.xz
}
menuentry "Porteus XFCE x86-64 ISO" {
insmod part_msdos
insmod ext2
set root=(hd0,1)
set isofile="/ISO/Porteus-XFCE-v3.1-x86_64.iso"
search --no-floppy --file --set=root $isofile
loopback loop $isofile
linux (loop)/boot/syslinux/vmlinuz from=$isofile changes=1_porteus login=root
initrd (loop)/boot/syslinux/initrd.xz
}
menuentry "Porteus XFCE x86-64 ISO" {
insmod part_msdos
insmod ext2
set root=(hd0,1)
set isofile="/ISO/Porteus-XFCE-v3.1-x86_64.iso"
search --no-floppy --file --set=root $isofile
loopback loop $isofile
linux (loop)/boot/syslinux/vmlinuz from=$isofile changes=1_porteus login=root copy2ram
initrd (loop)/boot/syslinux/initrd.xz
}
2.0 update-grub will not reset grub.cfg under archlinux, you need to use:
Code: Select all
# grub-mkconfig -o /boot/grub/grub.cfg
How to make things complex when they could be so simple. This is not KISS technology, and personally syslinux is not that much better.
And the pretext to such sophistication is a more secure system.