HD based HowTo


From Knoppix Documentation Wiki
Jump to: navigation, search

Different ways to run Knoppix

There are basically different ways to run Knoppix

Running Knoppix from flash disk install or from poor man's install is very similar in all respects. In both cases, it is a matter of

  • copying the KNOPPIX system files to the root directory of a partition
  • finding a workable booting solution
  • creating → persistent memory as needed

Except for speed differences, there is nothing you can do with a poor man's install that you can't do with flash disk install on a 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

  • FAT32 - 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
  • ReiserFS, the preferred file system for full HD install
Top

Overview of HD installs

  1. → Poor man's install
  2. → Full HD install

Knoppix 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 full HD install. The main differences are

  • there is no persistent image union-mounted any more
  • all programs are uncompressed to a partition mounted read-write (rw).

Knoppix 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 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 → Unionfs mounting of the compressed systemfile image (KNOPPIX) and the persistent memory allows for exactly the same kind of file administration as in ordinary installs, and for hard disk use, one may easily expand the → persistent memory 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 some extent with slow flash media. Even with external USB harddisks or fast external flash memory, there is, generally, little slowing down compared to full HD install after the system has been used for some hours.

When running full HD install with the Knoppix-script "0wn", booting is taken care of automatically, but it does not necessarily give the best setup for multi-booting. Poor man's install done fully manually does nothing about booting, and booting could be handled separately, for optimal multi-boot setup. Poor man's install 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.

Top

Poor man's install

This is, basically, just copying the KNOPPIX system files to an existing partition. This copying may be done from within the version to copy, by other Linux versions, or from Windows. It is possible, but hardly necessary, to set up scripts for it. The default way is to use a Knoppix DVD using cheatcodes. Standard is to place the system files in the root directory of the partition, but elsewhere is also possible.

Writing to NTFS is still (2011) inherently not quite safe, but reported problems are few with restricted use like in this case. Therefore, general backup measures should be adequate also for Knoppix use. If there is more than one partition to install to, it might be smart to avoid the system partition, as the data partition should be well backed up in any case,

Important note: Beware of Boot directory on Windows!

Top

Full HD install

Full HD install will create Knoppix "Debian-style", which some of us much prefer to the vanilla version. 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.

Planning for preparing partitions

Is the disk big enough? If not, the best starting point may be to swap it with a bigger one. Hard disks are cheap, with only a few cents per GB and any problems due to disk size simply can't be defended economically any more. Today, 250GB should be considered a minimum.

You know your partitioning tools? Gparted may be run during the install, but except for minor partition edits, it is really better to run it in advance. In case you have a dual boot installation, use Windows tools to shrink Win partition, if necessary.

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 more than 4GB, we will get ca 10GB when uncompressed, and we may quickly add a few GB of new programs. So, 20-30GB is a good size for a Knoppix 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, it would unnecessarily be 32GB swap).

  • Whenever possible, create a separate boot partition 0.2-6GB, and install legacy grub there.
  • Create eventual other partitions for multi-booting. (Developing a 64-bits Knoppix, 4 different installs were used.)
  • Need an exchange partition with Windows? Some GB FAT32-space could fix that.
  • Possible leaving some space for future use, use the remaining space for a storage partition.

Planning for preparing packages on the to-install version

For general use it is, generally, not a good idea to start full HD install from DVD media. Tweaking, upgrading, extra install work should be done on beforehand. Therefore, it may be an advantage to start with a flash disk install or a poor man's install with a large persistent store.

If you lack some packages, go ahead and install them on your to-install version. Also removal of packages should be done now - they are of course not physically removed from compressed image, but they will not be copied over during install. Check if you have optimal versions, or that some upgrades might be in place. Don't postpone any work to after install, if you don't have to.

It is the whole actual Knoppix within your flash disk install or the poor man's install at install time, not only the initial compressed image, that gets installed in the full HD install..

Top

Counterindications for full HD install

Full HD install of Knoppix is simple and relatively safe, but there are a few counterindications

  • Actual version approaches end of expected lifetime. It is harder to upgrade a full HD install than a poor man's install.
  • 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, flash disk installs or poor man's installs are better.
  • Poor man's install 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 poor man's install.
  • 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.
Top

Indications for full HD install

Here are a few indications for full HD install

  • Have used poor man's install for a while, got a stable system to install
  • Will use Knoppix for servers
  • Want to work less on a package basis, more occasional compiles etc.
  • Development versions. E.g. pure 64-bits version
  • Need to make some special adaptations, and the compressed image gets in the way.
  • Needs better individual control over files in preparation of remastering
  • Want to experiment with mixing elements of Debian, Knoppix and Ubuntu initalization.
Top