Completely new HD based HowTo page

From Knoppix Documentation Wiki
Revision as of 15:35, 13 July 2011 by Capricorny (Talk | contribs)

Jump to: navigation, search

HOWTO set up Knoppix to run from harddisk. Knoppix 6+ version

There are 5 basically different ways to run Knoppix 6.X

  • Off the CD/DVD, the "classic", fall-back-to method
  • Off the CD/DVD ISO image on disk
  • From flash/USB media
  • From harddisk copy of Knoppix, "Poor man's install"
  • From full HD install of Knoppix, "Knoppix, Debian-style"

Running Knoppix from flash/USB media or from poor man's install to HD is very similar in all respects. In both cases, it is a matter of 1) copying the KNOPPIX system files to the root directory of a partition and 2) finding a workable booting solution. Persistent store is created as needed, and copied around together with the Knoppix system.

Except for speed differences, there is nothing you can do with a poor man's install that you can't do with properly formatted flash media, and with increasingly larger capacity flash media (16+ GB), the methods of setting them up and running from them may become similar to hard disk. Also, an external USB harddisk is a preferred way of backup and mobile data storage, and it may easily be set up for booting Knoppix, be several methods.

Knoppix is a "file system agnostic" Linux version. It can be run from different media, like

  • FAT16/32 - typically used on flash media (like USB sticks, CF-, SD- and micro-SD cards), but also perfectly usable for hard disk partitions when there is no need for >4GB files.
  • NTFS - used on hard disks and larger flash media
  • Ext2/3/4 - native Linux file system, can be used anywhere (For Ext4 boot, a small adaptation is needed for Knoppix 6.4 and earlier.)
  • ReiserFS, the preferred file system for full Linux HD installs
  • ....

Overview of HD installs

Knoppix 6.X runs very well from harddisk by either install method. In poor man's install, the way of booting is virtualy identical to removable media, and I think it is also very similar in Knoppix 6.X full HD installs. The main differences are 1) that there is no persistent image union-mounted any more 2) all programs are uncompressed to a partition mounted read-write (rw).

Knoppix 6.X being very close to standard Debian re program packages, a full HD install resembles standard Debian even more. The structure of such an install is described in Debian documentation, and it is fully possible to convert a Debian install into a Knoppix version - a pure 64-bits version of Knoppix was created that way.

A basic install only relates to the root and swap partitions, but may easily be modified to include several partitions. Knoppix 6.X has a "passive" attitude towards volume (partition) mounting, in that nothing is auto-mounted. This can easily be modified, but for safety reasons, it may be good only to mount partitions when they are to be used.

The poor man's install is also in effect very close to standard Debian, uses the same packages, and may be modified for multi-user situations. Also, the union-file system mounting of the compressed and persistent image allows for exactly the same kind of file administration as in ordinary installs, and for hard disk use, one may easily expand the persistent image beyond the 4GB limit on FAT32.Furthermore, on newer processors, the decompression of programs upon running goes so fast that there is not much noticable difference running compressed or uncompressed. The large differences in this respect is with CD/DVDs, and to som extent with slow flash media. Even with external USB harddisks or fast external flash memory, there is, generally, little slowing down compared to full install after the system has been used for some hours.

When running full HD install with 0wn, booting is taken care of automatically, but it does not necessarily give the best setup for multi-booting. Poor man's installs done fully manually does nothing about booting, and booting could be handled separately, for optimal multi-boot setup. Poor man's installs don't need any booting modifications to be used, when not instructed otherwise, Knoppix will in fact search for them at bootup, and boot the first that is found.

Full HD install

This is performed by a program called 0wn (Zero Work Needed). It requires 1) a swap partition set up and 2) A ReiserFS install partition. It can be installed to a prepared HD, or setup the HD itself. The safest use is to have everything prepared for 0wn in advance. Up to, and including, a bootloader (typically, legacy grub) which can easily be modified with more alternatives.

gparted may be run during the install, but except for minor partition edits, it is really better to run it in advance. Unless Knoppix is surely the one and only system to install on the actual disk, it is normally optimal to allocate max 2-3x the system size for the system partition. So, starting from a compressed DVD image of 3.6GB, we will get ca 9GB when uncompressed, and we may quickly add a few GB of new programs. So, 20-30 GB is a good size for a Knoppix 6.X system partition. With lots of memory, swap space is not that important any longer, but it may be of use now and then, and 1-4GB isn't a bad choice. The old rule of swap=2xRAM isn't valid anymore. For example with 16GB RAM, we should need 32GB swap, and just reading that whole amount would take minutes on standard hard disks.

It is the whole actual Knoppix at install time, not only the initial compressed image, that gets installed. Therefore, it may be an advantage to start with a USB or poor man's install with a large persistent store, and install as much of the desired programs as possible before doing the hard disk install. This way, the compressed version will serve as a simple system backup, so it is only userspace on the install that urgently needs to be backed up.

Counterindications for full HD install

Full HD install of 6.X is simple and relatively safe, but there are a few contraindications

  • Actual version approaches end of expected lifetime. It is harder to upgrade a full install than a poor man's.
  • Hardware problems on the actual computer. Only install when Knoppix runs with no grave hardware problems.
  • Probable problems with setting up Linux booting on the computer. Poor man's install avoids such conflicts.
  • The system is going to be copied to/run on other computers. Much easier to transfer poor man's installs.
  • The computer is not going to be run with Knoppix on a daily basis. For occasional use, USB or poor man's installs are better.
  • Poor man's runs OK,but persistent store is too small. Then grow it! 4GB is limit only on FAT32.
  • Wants to run Knoppix faster and smoother. It's not going to help much. Try running 64-bits kernel, upgrading and restricting resource hog processes.
  • Hard disk use needs full HD install. That's the worst miscomprehension.
  • Want to boot Knoppix from HD. It's even easier with PMI.
  • Want to be able to tweak settings. Most can be done with a persistent image.
  • Want to be able to install programs. Second worst miscomprehension.
Indications for full HD install
Poor man's HD install

This is, basically, just copying the KNOPPIX system files to an existing partition. Standard is to place them in the root directory of the partition, but elsewhere is also possible, using cheat codes.