This is a FYI, so I'm not sure if this is the right place for it.
I was foolishly reading the actual Grub2 online documentation and noticed that it refers to using "loop" as booting an "image" file.
So, I did a litle experiment:
I created a 'puppy_upuphh+d_21.04.sfs' that contained only the ".sfs" files and 'vmlinuz' and 'initrd.gz'.
I then setup a boot of this file in 'grub.cfg' using the following:
Code: Select all
menuentry "UPupHH+D-21.04+5.sfs (sdc2)" {
insmod ext2
set boot_id="3702c495-ed38-4d72-ab44-667389b0597c"
search --no-floppy --fs-uuid --set=root $boot_id
insmod test
probe --set=pup_id --label ($root)
if [ "${pup_id}" = "" ]; then
set pup_id="${boot_id}"
fi
insmod sfs
set sfsfile="/sfss/UPupHH+D-21.04+5.sfs"
loopback loop $sfsfile
set root=(loop)
echo "Loading vmlinuz"
linux (loop)/vmlinuz libata.noacpi=1 net.ifnames=0 pmedia=usbhd img_dev=$pup_id img_loop=$sfsfile pfix=fsck,fsckp TZ=AEST-10
echo "Loading initrd.gz"
initrd (loop)/initrd.gz
}
The boot was sucessful, and after a reboot I had the following PUPSTATE (note the file-system):
Code: Select all
PUPMODE=12
PDEV1='loop0'
DEV1FS='squashfs'
PUPSFS='loop0,squashfs,/puppy_upuphh+d_21.04.sfs'
PUPSAVE='sdc2,ext4,/sfss/saves/upuphh+dsave'
PMEDIA='usbhd'
#ATADRIVES is all internal ide/pata/sata drives, excluding optical, excluding usb...
ATADRIVES='sda sdb sdc '
#ATAOPTICALDRIVES is list of non-usb optical drives...
ATAOPTICALDRIVES='sr0 '
#these directories are unionfs/aufs layers in /initrd...
RW_LAYER='/pup_rw'
SAVE_LAYER='/pup_rw'
PUP_LAYER='/pup_ro2'
#The partition that has the upuphh+dsave file is mounted here...
PUP_HOME='/mnt/dev_save'
#(in /initrd) ...note, /mnt/home is a link to it.
#this file has extra kernel drivers and firmware...
ZDRV='loop0,squashfs,/zdrv_upuphh+d_21.04.sfs'
FDRV='loop0,squashfs,/fdrv_upuphh+d_21.04.sfs'
ADRV='loop0,squashfs,/adrv_upuphh+d_21.04.sfs'
YDRV='loop0,squashfs,/ydrv_upuphh+d_21.04.sfs'
#Partition no. override on boot drive to which session is (or will be) saved...
PSAVEMARK=''
PSAVEPART='sdc2'
PSAVEDIR='/sfss/saves/'
PSUBDIR=''
PUNIONFS='aufs'
DOIMODS='yes'
DOMIBS='no'
So, not only can you boot "image" files other than ".iso" files,
it seems that using Grub2 to boot an "image" file does not boot the "image" file, it boots using the files inside the "image" file.
What's the difference?
Well the "image" file does not need to contain any "boot-loader" files, just the Puppy files.