I'm trying to boot a Knoppix ISO from Grub like so:
loopback loop /boot/iso/knoppix.iso
linux (loop)/boot/isolinux/linux lang=en bootfrom=/mnt-iso//boot/iso/knoppix.iso
initrd (loop)/boot/isolinux/minirt.gz
My question is the bootfrom
parameter. If I don't include the double slash the system will never boot. It will complain that it couldn't find the KNOPPIX
folder on the drive (Because it's inside the ISO).
It will search the drives in an attempt to locate this folder - by the end of which drives have appeared in /dev/
from sda1
to sdz15
.
If I include the double-slash in the
bootfrom
parameter it will search the drives a few times, then (presumably after mounting/mnt-iso
) it will triumphantly state "Yay! I found it in/dev/sdd5/boot/iso/knoppix.iso
"
Of course by this timesda1
throughsdh15
have been generated in/dev/
so this can't be a good thing.If I use
bootfrom=/dev/sdd5/boot/iso/knoppix.iso
it works straight away, but I can't guarantee it will be this device on all systems. Can I use UUID?
I read that in fedora 15 you could useroot=live:UUID={uuid}:{isofile}
but this doesn't seem to be the case any moreWhy does it behave differently if I have only one slash?
This is very confusing.
Edit: Progress!
With the following menuentry I've managed to get knoppix to claim to open and check an ISO file, only to claim it can't find the KNOPPIX folder therein.
Cannot find KNOPPIX dir in iso image:
loopback loop /boot/iso/knoppix.iso
linux (loop)/boot/isolinux/linux lang=en bootfrom=UUID=<uuid>/boot/iso/knoppix.iso
initrd (loop)/boot/isolinux/minirt.gz
It's hard to tell what's going on because the TTY is small and the text doesn't wrap.
Edit: Yet more progress. After going through half the the knoppix repo with a fine tooth grep
I decided to see if the problem was in the kernel since obviously the rest of the system wasn't being loaded anyway.
strings linux | grep "Cannot find"
- No results
Well what about initrd.gz? (Note that I have no idea what's in here, I heard somewhere that it was an actual chunk of memory)
Ooh there's another archive in there... Ooh there's a filesystem! What's in this big file named init?...
if [ ! -r "$BOOTSYS/$knoppix_dir/KNOPPIX" ]; then
message "${CRE}${RED}Cannot find $knoppix_dir dir in ISO image ${MAGENTA}${BOOTDEV}${YELLOW}/${BOOTFILE}${NORMAL} "
REALLY? Who on earth makes the error message use a clearly separate variable from the condition?
All right, at least I know the exact line of the problem (591) but the only way I see out of this is an extremely hackish attempt to mess with this bash and hardcode it to let me through... Or to set my partition in question to sda. And of course I don't know how to do either yet. Yay! So. How do I go about editing init
?