Live CD Tips


From Knoppix Documentation Wiki
Jump to: navigation, search

Using a Live CD does not mean that you are stuck with what is on the CD. New technologies make the Knoppix Live CD very versatile and flexible, and there are many things you can do with the Live CD without having to resort to a full-blown hard disk install.

With a Live CD, you will be using Knoppix in the way it was designed for. You will be mobile. All you need to carry around is a CD and a small USB flash drive to store your settings and configurations. You will then be able to start Knoppix from almost anywhere with the same data, settings and even your own installed programs. A hard disk installation on the other hand, will tie you to the disk where you installed it, plus all the possible problems that come with a hard disk install.


Free up the CD Drive

toram cheat code

At the boot prompt, type "knoppix toram". Knoppix will load the contents of the CD into ram and run from there. After boot up, the CD can be removed and the cd drive will be available for other uses. Because this will take up a lot of ram, it is recommended for those with at least 1 GB of ram. See also Cheat Codes

tohd cheat code

Insert and start with the CD. At the boot prompt, type "knoppix tohd=<path to some hard disk>". For example if you have space in sda2, type "knoppix tohd=/dev/sda2. Knoppix will create a folder called "KNOPPIX" in the disk you chose and you will be asked to create persistent memory. After this Knoppix runs from hard drive; the CD can be removed. The disk partition used can be a Linux format such as ext3 but can also be fat32, but not ntfs. See also Cheat Codes.

At the next boot, you can save some steps by using the cheat code: "knoppix fromhd=<path to the disk you used>. This procedure has been called the "poor man installation".

Caution: It isn't the same as "poor man harddrive installation". Some people select 'Preferences/ Install KNOPPIX to flash disk' and do the installation not only on an flash device but also on a partiton of a harddrive and call it "poor man harddrive installation". This installation uses Syslinx to boot but you need Knoppix CD to boot "poor man installation".

bootfrom cheat code

This allows you to use an iso image file stored on media. Insert the CD and start with the CD. At the boot prompt, type: “knoppix bootfrom=<path to where iso is stored>. After boot up, the CD can be removed. See also Cheat Codes.

Several different isos can be booted from the same CD. The only limitation is that the kernel version on the CD must be the same as that in the iso file. This method is often used to test remastered Knoppix iso files before committing to a burn.

There are also tweaks which allow you to do away with the CD altogether.

This method is more robust than a full-blown hard disk install. Since the integrity of the iso file is maintained just as it would be on a CD itself, the likelihood of problems arising is reduced.


UNIONFS

One of the limitations of a Live CD is that most of the system area is read-only – in particular, /usr where most executable programs are kept. Some programs can run from /home, which is writable, but many programs need to change and access components into standard locations like /lib or /usr/lib are read-only. Fortunately there are solutions.

Unionfs is another important development introduced into Knoppix from Version 3.8 onwards. Unionfs is a virtual filesystem. It creates a writable system file area in ram with all the system directories such as /etc /usr and so on. This is then seamlessly merged with the read-only system files on the CD. A very readable description of unionfs can be found here: Kyle Rankin on unionfs

With unionfs, it becomes possible to "write" to the system area. Knoppix can then be treated almost like it is installed on a writable media. You can do install programs with apt-get or synaptic, download and install .deb packages, compile and install new drivers, edit config files in /etc and so on.

Of course, you may still download an incompatible package which upsets Knoppix's delicate balance and break Knoppix, just like in a hard disk install. But this is a Live CD! The problems go away at the next reboot.

On the other hand, if you installed something which works well, you will not have to do it again. You can save it and it can be made available at the next session – see below.

Persistent Memory

This is one of the most useful features in Knoppix, and together with unionfs, makes Knoppix very versatile indeed. The entire unionfs can be saved, so that configuration changes, settings, user data, packages which have been downloaded and installed etc can all be saved and will be available at subsequent sessions.

With "Flash disk Installation", "Poor man Installation" or "Poor man harddrive Installation" ( Install_FAQ ) you will be asked to create persistent memory. A image file '/KNOPPIX/knoppix-data.img' will be created respectively '/KNOPPIX/knoppix-data.aes' in case of encryption. At the next boot, Knoppix will scan for any image file named knoppix-data.img or knoppix-data.aes.