Flash devices onto which ttop had written Knoppix 7.0.5 (both using the experimental installer "
flash-knoppix2" and the "traditional" installer) were directly bootable (as USB block storage devices) on some PCs, but not on the main PC of ttop. He could not resolve this via BIOS setup changes.
I had suggested to him (as a Test) to try to boot from a Knoppix CD or DVD; And at the kernel prompt to enter a cheat code in order to mount the compressed read-only file system image in file
KNOPPIX/KNOPPIX from the flash device (instead of the copy on the optical medium). The cheat code "
knoppix fromhd=/dev/sdX1" does this (not "
bootfrom=", as I had wrongly suggested before). ttop replied that this had solved his Knoppix booting problems, which was a suprise for me:
Then it occured to me to try this scenario myself, in order to learn what had happened on the PC of ttop. My PC can boot from USB, but I tried to boot from a DVD with Knoppix 7.0.5, while a SDHC memory card with Knoppix 7.0.5 was already inserted/connected. At the kernel/boot prompt I entered the cheat code:
knoppix fromhd=/dev/sdb1 . To my suprise, not only did Knoppix continue loading from my SDHC card, but it also had the persistent overlay reiserfs filesystem from the SDHC card mounted. This means one can work with a read-write Knoppix system started from a flash storage device even on PCs which are unable to boot from USB devices! (Provided the PC has a DVD drive and one brings a Knoppix DVD, too.)
To further my (at this point clearly broken) understanding of the Knoppix boot process, I decided to investigate: Like most Linux systems nowadays, the Knoppix kernel first passes control to configuration software (which for example might supplement the kernel with kernel modules for support of the present hardware) before initialising the system services (by using SysV init scripts or upstart or...). The kernel modules and configuration software can be found in a special compressed archieve/file system image file, which gets loaded and used directly after the kernel has finished loading. I have unpacked this file system using these commands:
Code:
cd
mkdir minirt
cd minirt
gzip -dc /mnt-system/boot/syslinux/minirt.gz | cpio -idv 2>minirt_cpio_errors.log
The
cpio command will try to unpack even the special files in the
/dev directory of this file system, but this will fail and cause error messages because user knoppix does not have the needed permissions to invoke mknod to create the special files.
Anyway, after this I could read the system configuration script using this:
This shell script implements the support for most of the Knoppix cheat codes. The version on the Knoppix 7.0.5 DVD images not only identifies a storage device from which the file system image in file
KNOPPIX/KNOPPIX can be mounted, it also looks for a second partition on the same device from which an overlay file system can be mounted (as
/KNOPPIX-DATA) for persistent storage (among many other measures). It will not find such a partition on a DVD or CD (No partitioning, therefore no second partition), but if directed to another storage medium using the "
fromhd=" cheat code, then the script does find it there and mounts it. This behavior is flexible and very useful!