Rev. 2006.04.15. Original updated source: http://www.insulae.net/doc/knoppix.poor.en.php
What is required
Prepare the disk
Prepare the Knoppix partition
A bit of condensed theory
Prepare the boot partition and install LILO
Change LILO version
Configure Knoppix and create a persistent home
Questions and unresolved things
Having an old idle 1,2 GB hard drive, I decided to try a Knoppix "poor man's install". In plain words, to copy the content of the Knoppix CD-ROM to a hard drive to get Knoppix load into RAM from disk, as normally were from CD, combining the higher speed of the hard drive with autoconfiguration, that allows booting the same disk and running the OS on different systems — different from installation, that prepares the OS to run on a specific machine (1).
Shorter, get the CD's content work from hard disk.
Quite satisfied, except for the few questions reported below, I wrote this guide to let me remember and repeat what I did, and show a hypothetical beginner, looking for something easy and usable as his first approach to Linux, the steps needed to make Knoppix 3.6 run from a disk or other bootable device. In principle, this information should adapt to other versions or to any live Linux distribution, that loads itself from CD-ROM to run in RAM.
It is even possible that simply changing the KNOPPIX/KNOPPIX file upgrades to a newer Knoppix version (if this one comes with a new kernel, you'd likely have to change it too).
A Linux system to carry out the operations described in the following. Since we are talking about a beginner, this could be an available Knoppix version on CD-ROM; or the very beginner can download the tomsrtbt floppy from www.toms.net/rb and, following simple instructions, have in a few minutes, without hassles, a running Linux mini-distribution (a basic knowledge of Unix environment and common commands is required). All Linux commands described below have been given under tomsrtbt.
Remember to tell the BIOS to boot from the device, floppy or o CD-ROM, that contains your choosen Linux system.
The ISO image, or the CD-ROM, of the Knoppix version to be copied on the destination hard disk.
Of course, an empty hard disk with at least 1.2 GByte. Even a bit less, if calculating space carefully.
Within tomsrtbt, I created four partitions on the hda drive:
# fdisk /dev/hda
Disk dev/hda: 64 heads, 63 sectors, 621 cylinders Units = cylinders of 4032 * 512 bytes P Device B Start End Blocks Id System 1 /dev/hda1 * 1 6 12064+ 83 Linux - boot partition 2 /dev/hda2 7 413 850512 83 Linux - partition for the KNOPPIX file 3 /dev/hda3 414 544 264096 82 Linux swap - swap partition 4 /dev/hda4 545 621 155232 83 Linux - home
reserving 10 MB for the boot partition, 800 MB for the one to store the Knoppix image, 256 MB for the swap partition, and the remaining 150 MB for the user's persistent home and configuration files.
About disk partitioning, more than a choice is possible.
I prudentially kept separate the boot and Knoppix partitions, that could coincide. In general, a small boot partition, distinct from the system one, is needed by old BIOS versions that don't allow to boot from partitions extending beyond cylinder 1024: but the Knoppix partition here created is far smaller.
The swap partition has been assigned 256 MB, twice the RAM of the intended destination computer, and also twice the ramdisk size specified in the LILO configuration.
The left space is for configuration files and the home directory of the knoppix user, corresponding to the default KDE session, that can't reside in the boot partition as Knoppix takes exclusive control over it (2). One can choose to keep the home directory and configuration files in two separate partitions or in the same one, and to write home content to the partition or to an image file, which can also reside in a FAT32 partition. For a discussion of the possible combinations of these choices and their resulting consequences, also relating to known bugs of some Knoppix versions, see the document mentioned in note (3).
Created these partitions, I formatted hda1, hda2 and hda4 as ext2 filesystems, hda3 as swap:
# mke2fs -c /dev/hda1 # mke2fs -c /dev/hda2 # mke2fs -c /dev/hda4 # mkswap -c /dev/hda3
Created lost+found directories in the hda partitions may be deleted.
The swapon command, to activate swapping, is included in the operations performed by Knoppix initialization scripts.
Under Windows I downloaded (taking almost one day with ADSL) the Knoppix 3.6 ISO image on a disk, mounted it under tomsrtbt as hdc1, and verified the MD5 checksum of the image:
/mnt/hdc1/Knoppix 3.6# more KNOPPIX_V3.6-2004-08-16-EN.iso.md5 5bc8e9fee2a8be0b7180fcf3e49b5386 *KNOPPIX_V3.6-2004-08-16-EN.iso /mnt/hdc1/Knoppix 3.6# md5sum KNOPPIX_V3.6-2004-08-16-EN.iso 5bc8e9fee2a8be0b7180fcf3e49b5386 KNOPPIX_V3.6-2004-08-16-EN.iso
I mounted this image (note the -o loop option to mount a file) as a filesystem under /mnt/iso,
# mkdir /mnt/iso # mount -t iso9660 -o loop /mnt/hdc1/"Knoppix 3.6"/KNOPPIX_V3.6-2004-08-16-EN.iso /mnt/iso
and copied its content to hda2, keeping file attributes and permissions:
# cp -afr /mnt/iso/* /mnt/hda2
Having a working Knoppix CD-ROM, one can copy its content to hda2. To avoid burning one, I used the ISO image as source.
I cleaned /mnt/hda2 from some unnecessary files (e.g. the boot directory and autorun.* files used to boot from CD-ROM, now useless), getting
# ls -alR /mnt/hda2
total 17 drwxr-xr-x 4 root root 4096 Dec 5 17:55 . drwxr-xr-x 5 505 100 160 Dec 5 19:07 .. dr-xr-xr-x 2 root root 4096 Dec 4 17:44 Demos dr-xr-xr-x 3 root root 4096 Dec 5 05:28 KNOPPIX -r--r--r-- 1 root root 315 Dec 5 17:55 index.html /mnt/hda2/Demos: total 3124 dr-xr-xr-x 2 root root 4096 Dec 4 17:44 . drwxr-xr-x 4 root root 4096 Dec 5 17:55 .. -r--r--r-- 1 root root 55 Feb 20 2004 .directory -r--r--r-- 1 root root 6421 May 14 2002 OpenSourceSong-LICENSE.txt -r--r--r-- 1 root root 323 Aug 13 2001 OpenSourceSong-README.txt -r--r--r-- 1 root root 3170106 Oct 4 2002 OpenSourceSong.ogg /mnt/hda2/KNOPPIX: total 709524 dr-xr-xr-x 3 root root 4096 Dec 5 05:28 . drwxr-xr-x 4 root root 4096 Dec 5 17:55 .. -r--r--r-- 1 root root 725253780 Aug 22 19:22 KNOPPIX -r--r--r-- 1 root root 10130 May 9 2004 KNOPPIX-FAQ-EN.txt -r--r--r-- 1 root root 10577 May 9 2004 KNOPPIX-FAQ-ES.txt -r--r--r-- 1 root root 12056 May 9 2004 KNOPPIX-FAQ-FR.txt -r--r--r-- 1 root root 11852 May 9 2004 KNOPPIX-FAQ-IT.txt -r--r--r-- 1 root root 9733 May 9 2004 KNOPPIX-FAQ-NL.txt -r--r--r-- 1 root root 11352 May 9 2004 KNOPPIX-FAQ.txt -r--r--r-- 1 root root 18487 Oct 3 2003 LICENSE.txt -r--r--r-- 1 root root 2207 Apr 27 2004 README_Security.txt -rw-r--r-- 1 root root 338276 Dec 5 05:26 background.png dr-xr-xr-x 2 root root 4096 Aug 22 04:08 images -r--r--r-- 1 root root 8634 Aug 22 04:06 index.html -r--r--r-- 1 root root 10573 Aug 22 04:06 index_dk.html -r--r--r-- 1 root root 8171 Aug 22 04:06 index_en.html -r--r--r-- 1 root root 11835 Aug 22 04:06 index_es.html -r--r--r-- 1 root root 9617 Aug 22 04:06 index_fr.html -r--r--r-- 1 root root 10390 Aug 22 04:06 index_it.html -r--r--r-- 1 root root 10580 Aug 22 04:06 index_jp.html -r--r--r-- 1 root root 10437 Aug 22 04:06 index_nl.html -r--r--r-- 1 root root 13131 Aug 22 04:06 index_ru.html -r--r--r-- 1 root root 9946 Aug 21 06:25 knoppix-cheatcodes.txt -r--r--r-- 1 root root 15 Aug 22 04:35 knoppix-version -r--r--r-- 1 root root 2680 Aug 22 21:00 md5sums /mnt/hda2/KNOPPIX/images: total 216 dr-xr-xr-x 2 root root 4096 Aug 22 04:08 . dr-xr-xr-x 3 root root 4096 Dec 5 05:28 .. -r--r--r-- 1 root root 6148 Aug 4 10:01 .DS_Store -r--r--r-- 1 root root 172842 Aug 22 02:56 knoppix-header.gif -r--r--r-- 1 root root 15227 Aug 22 03:40 knoppix-logo.gif -r--r--r-- 1 root root 934 Aug 22 02:46 sidefill.gif -r--r--r-- 1 root root 2464 Aug 22 03:30 topleft.gif
Adjustments. After starting the KDE graphic environment, Knoppix looks in the hda2 partition for a file index.html to open in Konqueror. If needed, modify index.html to load in a frame the introductory page KNOPPIX/index_en.html:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <html> <head> <title>KNOPPIX 3.6</title> </head> <frameset rows="100%,*" framespacing=0 border=0> <frame src="KNOPPIX/index_en.html" frameborder=0 scrolling="auto" noresize="noresize"> </frameset> </html>
At start, Knoppix loads the image background.png and then the choosen KDE background. To have them coincide, I converted my preferred background default_blue.jpg in a PNG image saved as background.png in /mnt/hda2/KNOPPIX.
Mainly based on The Linux Bootdisk HOWTO, see footnotes.
The booting procedure of a PC starts running from ROM a program, the BIOS, that loads the content of sector 0, cylinder 0 from the boot disk and tries to execute it. This sector, named Master Boot Record (MBR), can either contain the start of an operating system kernel or a program called boot loader that will detect, load and run the kernel or take to other boot loaders installed in the first sectors of other partitions. A common boot loader for Linux systems is LILO.
The kernel initializes the device drivers and its internal data structures; then reads, from a special location in its image called ramdisk word, where and how to find the filesystem to mount as root. If it doesn't find a loadable image here, it halts.
Once loaded and mounted the root filesystem, a message like this is displayed: VFS: mounted root (ext2) readonly.
Under some situations, for space and speed reasons, the kernel loads the root filesystem from a compressed file into a ramdisk, a portion of RAM structured to emulate a disk.
The loaded root filesystem contains what the kernel needs to continue the launch procedure. The kernel executes from /bin or /sbin the init program, which reads from the
sysinit row in its configuration file /etc/inittab the name of a script that mounts the devices — and eventual filesystem images to expand the one just loaded — initializes the network, sets swapping and other basic system services, then returns back to init that enters the runlevel specified at the
initdefault row in inittab. This row points to a program, usually getty, that handles communications between keyboard and screen and invokes the login program to manage user validation and sessions.
In a standard distribution the kernel usually corresponds to the vmlinuz file, and the root filesystem is stored in miniroot.gz.
Knoppix 3.6 allows to choose between the 2.4 e 2.6 kernel versions, corrisponding to the linux24 and linux26 files, that create a ramdisk where to load the root filesystems respectively compressed in minirt24.gz and minirt26.gz, which init procedures expand the filesystem with the content of the KNOPPIX/KNOPPIX image located in the partition passed by LILO to the kernel as a parameter.
Now LILO must be installed to make the hda1 partition bootable.
Once consulted the huge documentation about LILO and its configuration, I mounted /dev/hda1 as /mnt/hda1 and copied in it the files linux24, linux26, minirt24.gz, minirt26.gz from the ISO image.
I created under /mnt/hda1 a directory etc where to put the following lilo.conf file,
boot=/dev/hda map=/boot/map install=/boot/boot.b read-only prompt timeout=50 default=knoppix single-key message=/boot/message image=/linux24 label=knoppix alias=1 initrd=/minirt24.gz append="fromhd=/dev/hda2 ramdisk_size=100000 init=/etc/init home=/dev/hda4 myconf=/dev/hda4 apm=power-off lang=en" root=/dev/hda2 read-only image=/linux26 label=knoppix26 alias=2 initrd=/minirt26.gz append="fromhd=/dev/hda2 ramdisk_size=100000 init=/etc/init home=/dev/hda4 myconf=/dev/hda4 apm=power-off lang=en" root=/dev/hda2 read-only
compiled according the configuration file of the isolinux boot loader, found in the ISO image, to let the user select starting Knoppix with the kernel 2.4 or 2.6. This file is read when LILO is installed, then each time the system boots.
boot=/dev/hda instructs LILO to install in that device's Master Boot Record. Specifying a partition, e.g.
boot=/dev/hda1, would install LILO in the first sector of this partition.
install=/boot/boot.b specifies the file to copy by the lilo command into the boot sector as the boot loader binary.
message=/boot/message tells LILO the path of a file with a message to display at boot,
map=/boot/map where to create the map file.
prompt tells to wait five seconds (
timeout=50) for the user to select a boot option, writing its
label name and entering Return or pressing an
alias key, before starting the default selection (
single-key allows to boot an image pressing the key specified by the
alias entry in the related section.
image=kernel section corresponds to a kernel to boot, passing to it parameters in the
append strings. The
initrd entry specifies the path of the boot filesystem to load in memory,
root the partition to mount as root,
alias the identificatives to type or press to select this kernel.
append, in our case LILO passes to the kernel the following parameters:
ramdisk_size=100000 with the size in bytes of the ramdisk to create (copied this value from the isolinux configuration);
apm=power-off (Advanced Power Management) to automatically shut down the computer on exit (idem);
init=/etc/init to tell where to look, in the root filesystem extracted from the file specified in the
initrd directive, for the location of the init program that goes on with the initializazion;
fromhd=/dev/hda, tells which partition to search for the KNOPPIX/KNOPPIX image that will expand the filesystem;
home=/dev/hda4 specifies the partition where to find the user persistent home directory, further created;
myconf=/dev/hda4 specifies the partition that will store the configuration files created by Knoppix at user's request;
lang=en tells to use the English language.
Since lilo.conf refers to a /dev/hda, I made a directory dev under /mnt/hda1 where I copied the following from the /dev directory of the running tomsrtbt ramdisk,
# cp -dpR /dev/console /mnt/hda1/dev # cp -dpR /dev/kmem /mnt/hda1/dev # cp -dpR /dev/mem /mnt/hda1/dev # cp -dpR /dev/null /mnt/hda1/dev # cp -dpR /dev/ram0 /mnt/hda1/dev # cp -dpR /dev/tty[0-6] /mnt/hda1/dev # cp -dpR /dev/fd* /mnt/hda1/dev # cp -dpR /dev/hda* /mnt/hda1/dev # cp -dpR /dev/hdb* /mnt/hda1/dev # cp -dpR /dev/hdc* /mnt/hda1/dev # cp -dpR /dev/hdd* /mnt/hda1/dev
to create the required dev structure on the boot partition (melius abundare quam deficere) using the options, suggested by the documentation,
Copy symbolic links as symbolic links rather than copying the files that they point to, and preserve hard link relationships between source files in the copies.
Preserve the original filesí owner, group, permissions, and timestamps.
Copy directories recursively. Different from -r, Copy directories recursively, copying all non-directories as if they were regular files.
Under /mnt/hda1 I created a boot directory and put the file boot.b in it. As LILO and boot.b versions must match, and I was going to install LILO from tomsrtbt, I copied this one from the tomsrtbt floppy (not the ramdisk) in /mnt/fd0:
# cp -afr /mnt/fd0/boot.b /mnt/hda1/boot
Tomsrtbt's LILO version requires, before installation, the presence in the directory specified by lilo.conf of its own boot.b, to copy in the boot sector as the boot loader. With other versions the lilo command is said to create boot.b automatically, or installs the boot loader directly into the MBR without creating boot.b.
I placed in /mnt/hda1/boot a message file like the following, with the message LILO displays at boot, before loading the kernel:
=========================================== Knoppix From Hard Disk ---------------------- 2004.12.01 =========================================== Boot:  knoppix boot Knoppix with Linux kernel 2.4  knoppix26 boot Knoppix with Linux kernel 2.6 or press ENTER for default (1)
If the first character corresponds to hexadecimal
FF (don't know how to write it, see questions) the screen clears before displaying the message.
The file /mnt/hda1/boot/map mentioned in lilo.conf, listed below, will be created by LILO during its installation.
At this point I had got the following structure:
# ls -alR /mnt/hda1
total 4000 drwxr-xr-x 5 root root 1024 Dec 4 17:47 . drwxr-xr-x 5 505 100 160 Dec 5 19:07 .. drwxr-xr-x 2 root root 1024 Dec 5 19:21 boot drwxr-xr-x 2 root root 1024 Nov 22 15:39 dev drwxr-xr-x 2 root root 1024 Nov 22 15:57 etc -r--r--r-- 1 root root 1018412 Aug 22 05:22 linux24 -r--r--r-- 1 root root 1458194 Nov 18 17:19 linux26 -r--r--r-- 1 root root 799962 Aug 22 05:22 minirt24.gz -r--r--r-- 1 root root 789544 Nov 18 17:19 minirt26.gz /mnt/hda1/boot: total 56 drwxr-xr-x 2 root root 1024 Dec 5 19:21 . drwxr-xr-x 5 root root 1024 Dec 4 17:47 .. -rw-r--r-- 1 root root 512 Nov 22 15:59 boot.0300 -rwxr-xr-x 1 root root 4536 Nov 25 21:03 boot.b -rw------- 1 root root 46592 Nov 27 19:24 map -rwxr-xr-x 1 root root 352 Nov 22 14:39 message /mnt/hda1/dev: total 2 drwxr-xr-x 2 root root 1024 Nov 22 15:39 . drwxr-xr-x 5 root root 1024 Dec 4 17:47 .. crwxr-xr-x 1 505 100 4, 0 Nov 22 14:17 console brwxr-xr-x 1 505 100 2, 0 May 12 2001 fd0 brwxr-xr-x 1 505 100 2, 28 May 12 2001 fd0H1440 brwxr-xr-x 1 505 100 2, 40 May 12 2001 fd0h1440 brwxr-xr-x 1 505 100 2, 60 May 12 2001 fd0u1722 brwxr-xr-x 1 505 100 2, 1 May 12 2001 fd1 brwxr-xr-x 1 505 100 2, 29 May 12 2001 fd1H1440 brwxr-xr-x 1 505 100 2, 41 May 12 2001 fd1h1440 brwxr-xr-x 1 505 100 2, 61 May 12 2001 fd1u1722 brwxr-xr-x 1 505 100 3, 0 May 12 2001 hda brwxr-xr-x 1 505 100 3, 1 May 12 2001 hda1 brwxr-xr-x 1 505 100 3, 2 May 12 2001 hda2 brwxr-xr-x 1 505 100 3, 3 May 12 2001 hda3 brwxr-xr-x 1 505 100 3, 4 May 12 2001 hda4 brwxr-xr-x 1 505 100 3, 5 May 12 2001 hda5 brwxr-xr-x 1 505 100 3, 6 May 12 2001 hda6 brwxr-xr-x 1 505 100 3, 7 May 12 2001 hda7 brwxr-xr-x 1 505 100 3, 8 May 12 2001 hda8 brwxr-xr-x 1 505 100 3, 64 May 12 2001 hdb brwxr-xr-x 1 505 100 3, 65 May 12 2001 hdb1 brwxr-xr-x 1 505 100 3, 66 May 12 2001 hdb2 brwxr-xr-x 1 505 100 3, 67 May 12 2001 hdb3 brwxr-xr-x 1 505 100 3, 68 May 12 2001 hdb4 brwxr-xr-x 1 505 100 3, 69 May 12 2001 hdb5 brwxr-xr-x 1 505 100 3, 70 May 12 2001 hdb6 brwxr-xr-x 1 505 100 3, 71 May 12 2001 hdb7 brwxr-xr-x 1 505 100 3, 72 May 12 2001 hdb8 brwxr-xr-x 1 505 100 22, 0 May 12 2001 hdc brwxr-xr-x 1 505 100 22, 1 May 12 2001 hdc1 brwxr-xr-x 1 505 100 22, 2 May 12 2001 hdc2 brwxr-xr-x 1 505 100 22, 3 May 12 2001 hdc3 brwxr-xr-x 1 505 100 22, 4 May 12 2001 hdc4 brwxr-xr-x 1 505 100 22, 5 May 12 2001 hdc5 brwxr-xr-x 1 505 100 22, 6 May 12 2001 hdc6 brwxr-xr-x 1 505 100 22, 7 May 12 2001 hdc7 brwxr-xr-x 1 505 100 22, 8 May 12 2001 hdc8 brwxr-xr-x 1 505 100 22, 64 May 12 2001 hdd brwxr-xr-x 1 505 100 22, 65 May 12 2001 hdd1 brwxr-xr-x 1 505 100 22, 66 May 12 2001 hdd2 brwxr-xr-x 1 505 100 22, 67 May 12 2001 hdd3 brwxr-xr-x 1 505 100 22, 68 May 12 2001 hdd4 brwxr-xr-x 1 505 100 22, 69 May 12 2001 hdd5 brwxr-xr-x 1 505 100 22, 70 May 12 2001 hdd6 brwxr-xr-x 1 505 100 22, 71 May 12 2001 hdd7 brwxr-xr-x 1 505 100 22, 72 May 12 2001 hdd8 crwxr-xr-x 1 505 100 1, 2 May 12 2001 kmem crwxr-xr-x 1 505 100 1, 1 May 12 2001 mem crwxr-xr-x 1 505 100 1, 3 May 12 2001 null brwxr-xr-x 1 505 100 1, 1 May 12 2001 ram brwxr-xr-x 1 505 100 1, 0 May 12 2001 ram0 brwxr-xr-x 1 505 100 1, 1 May 12 2001 ram1 brwxr-xr-x 1 505 100 1, 2 May 12 2001 ram2 brwxr-xr-x 1 505 100 1, 3 May 12 2001 ram3 brwxr-xr-x 1 505 100 1, 4 May 12 2001 ram4 brwxr-xr-x 1 505 100 1, 5 May 12 2001 ram5 crwxr-xr-x 1 505 100 4, 0 May 12 2001 tty0 crw--w--w- 1 root root 4, 1 Nov 22 15:35 tty1 crw--w--w- 1 root root 4, 2 Nov 22 15:01 tty2 crw--w--w- 1 root root 4, 3 Nov 22 14:56 tty3 crw--w--w- 1 root root 4, 4 Nov 22 14:17 tty4 crwxr-xr-x 1 505 100 4, 5 Nov 22 14:17 tty5 crwxr-xr-x 1 505 100 4, 6 May 12 2001 tty6 /mnt/hda1/etc: total 3 drwxr-xr-x 2 root root 1024 Nov 22 15:57 . drwxr-xr-x 5 root root 1024 Dec 4 17:47 .. -rwxr-xr-x 1 root root 558 Nov 24 21:49 lilo.conf
Finally, LILO was installed giving the command
# lilo -r /mnt/hda1
with the -r option to have it look for lilo.conf in /mnt/hda1/etc, and interpret the paths specified in lilo.conf as relative to /dev/hda1.
Added knoppix (alias 1) * Added knoppix26 (alias 2)
creating map and boot.0300 under /mnt/hda1/boot.
Every time lilo.conf, the kernel or the message file are modified, one has to uninstall LILO,
# lilo -r /mnt/hda1 -U /dev/hda
and re-install it,
# lilo - r /mnt/hda1
to update the map file.
Inserted finally the disk as primary master in a suitable computer (*), we can taste the inestimable satisfation of seeing our own message displayed, making us feel so hacker, followed by the fast succeeding multicolor text rows output by Knoppix while booting and configuring itself.
All this labor yields a fast Knoppix system, that can be configured and used in productive environments.
Note. The installed LILO was the minimal version coming with tomsrtbt. It doesn't have nothing to do with Knoppix but, except for the problem described in note (*), works the same.
2006.04.15. Tried to install another LILO version to see if booting problems with this disk persist with a different version.
As a first problem, I didn't find a live distribution providing, with the LILO executable, the corresponding boot.b. I had read that such a file must reside in the specified directory before installation, somewhere else that it is created by the lilo command, so tried looking what happens without the file.
Presuming that LILO has to be uninstalled by the same version used to install it, I removed LILO with tomsrtbt:
# mkdir /mnt/hda1 # mount /dev/hda1 /mnt/hda1 # lilo -r /mnt/hda1 -U /dev/hda
then I renamed boot.b in a backup copy,
# cd /mnt/hda1/boot # mv boot.b backup.boot.b
and tried reinstalling LILO,
# lilo - r /mnt/hda1
getting the error message
open /boot/boot.b No such file or directory
Thus, tomsrtbt's LILO wants its boot.b present in the directory mentioned in lilo.conf.
On the other hand, with SystemRescueCD the lilo command installs the boot loader directly into the MBR without creating boot.b or requiring its presence.
Rebooting from SystemRescueCD, launched the lilo command again, still without boot.b:
# mkdir /mnt/hda1 # mount -t ext2 /dev/hda1 /mnt/hda1 # lilo - r /mnt/hda1
(Note that in SystemRescueCD, instead than tomsrtbt, the mount command wants the filesystem type declared explicitly). The operating system coughs awful messages about a wrong /dev structure, that being copied from the tomsrtbt floppy may be different than expected, then announces the creation of the aliases specified in lilo.conf. LILO is successfully installed.
Rebooting the hard disk, the new LILO presents its own interactive boot menu, with options according lilo.conf.
After this experiment, since nothing had changed about the disk being unable to boot on some machines, I removed the new LILO and reinstalled tomsrtbt's one, returning to the previous situation.
Like any Linux system, Knoppix can be customized according our own preferences, choosing a particular background or making the KDE window manager look like Windows 98, for users who are familiar with it.
In this guide, the /dev/hda4 partition has been reserved to knoppix.sh and configs.tbz configuration files, created and updated by the system when the user selects Save Knoppix configuration from the KNOPPIX - Configure KDE menu and chooses hda4 as destination partition.
Selecting Create a persistent KNOPPIX home directory saves the user's home directory in a file knoppix.img, created in hda4 and automatically updated on exit. I assigned this fixed-size file 100 MB (4) on approximate 150 available, to leave some space to configuration files and eventual others. This directory can be accessed mounting knoppix.img, which contains an ext2 filesystem, within tomsrtbt or other Linux system:
# mkdir /mnt/hda4 # mkdir /mnt/home # mount /dev/hda4 /mnt/hda4 # mount -o loop /mnt/hda4/knoppix.img /mnt/home # cd /mnt/home # ls -al
and so on.
I'm not claiming to have said all that was to say, and this is one of my first non-trivial tries with Linux. Some of what is described has been tried, some other only read and reported as understood. For instance, the A bit of condensed theory section is wholly based on reading rather than experience, and condensed reports are mostly imprecise. Therefore error, uncertainty and approximation may nest at many levels. Whoever noticed any, or would like to add observations or improvements, is welcome.
2006.04.15 Some notes added about changing installed LILO version.
2005.05.05 Added changelog.
2005.04.26 English version.
2004.12.01 Original document, in Italian.
How to insert at the beginning of the message file the screen clearing character? Tried tomshexd without result.
Does the KNOPPIX/KNOPPIX content expand the root filesystem initially loaded in the ramdisk, or re-create a new filesystem?
What is the format of the KNOPPIX file? how does it store a file system? I didn't succeed in mounting it as is.
A. This file contains a filesystem compressed with a special utility. See Remastering Knoppix on their site.
Is the swap partition actually used? I don't see any swapon mention between the output rows displayed when the system starts.
* On the old Pentium II 266 MHz I use to surf the Web and test my sites, where I wanted to run my prepared Knoppix, the disk doesn't boot for some obscure reasons. The same for another machine, an AMD K2 450 Mhz.
At boot, appears the frustrating message
Non bootable device - Replace the disk and press any key
and from the BIOS settings screen the disk is not recognized, even trying autodetect. This would look like a hardware problem, but
– on many tries, this disk booted twice;
– tomsrtbt sees, mounts, reads and writes the disk on this computer too;
– previously used as secondary master with one FAT32 partition, using Windows 98 SE on the primary master, this disk never gave any problem;
– on another machine, a Pentium III 800 MHz, this disk is recognized and booted regularly, and the system works, excluding that the problem may depend on errors in the operations above described.
Any suggestion or explanation about this mystery will be appreciated.
Under the hypothesis that the disk doesn't boot on every machine because of the reduced LILO version provided with tomsrtbt, I tried changing it with SystemRescueCD's version, without any improvement.
1. "how to put a Knoppix distribution onto a hard drive or a Compact Flash IDE drive without actually installing it. (The knoppix.net HowTo page uses the term "HD Based" to contrast this scenario with an "HD install"). A drive with such a "non-installed" OS is used just like a "live CD", with the drive serving in lieu of the CDROM. This allows the CDROM drive to be used for other things, and is typically faster and quieter than using the CDROM.
[...] Why not just do a normal hard drive installation? [...] one of the beauties of Knoppix is that it represents a complex unit that can be upgraded enmasse, with all local customization kept completely separate (not intermixed with the "installed" files). [...] there is an opportunity to adjust the default boot options to your liking, so you don't have to type in your desired kernel boot options every time you start Knoppix.
— Terry Gray, Running KNOPPIX from HD or CF Without Actually Installing it!
2. "Knoppix will take exclusive control of the partition it boots from, so saving configs to it or using it for your home directory will not work." — Terry Gray, Running KNOPPIX from HD or CF Without Actually Installing it!
3. "I chose to have a separate dedicated partition for the persistent home feature of Knoppix, rather than use the facility to create a loopback file for HOME that shares an existing partition. This makes it easier for me to deal with expanding the HOME partition if needed later, or to access HOME files in other contexts than the running Knoppix system. On the other hand, if you use the "knoppix.img" loopback file to save the HOME files in, you can use a single partition to share both it and the saved configuration files, knoppix.sh and configs.tbz." — Terry Gray, Running KNOPPIX from HD or CF Without Actually Installing it!
4. I initially assigned 140 MB to knoppix.img, but configs.tbz grew fast so saving new configurations soon became impossible. To keep my configuration, I moved the existing knoppix.img to another partition and created in hda4 a new one of only 100 MB. Then I mounted both files as filesystems and copied the old one's content to the new.
Georg O'Keefe, From Power Up To Bash Prompt
Terry Gray, Running KNOPPIX from HD or CF Without Actually Installing it!
Tom Fawcett, The Linux Bootdisk HOWTO. 3. Bootdisks and the boot process
Author: Gatto Selvaggio / Wild Cat. The author reserves for himself all appliable rights. Any use of this document by third parties is subject to a Creative Commons license. For any use not covered by this license, included commercial use, or in case of doubt, please ask. The aim of this document is being diffused, but if you earn on it, please let me share the income.
4855 hits since April 22, 2005