6
votes

Most linux bootloaders let you edit the kernel boot command line before booting. There are often lots of parameters available -- Knoppix, for instance, has a list on their Knoppix Cheat Codes page -- but most are applicable only to compatibility and special situations. A few are hidden gems.

Common usages of these codes are to boot to single-user mode, alter screen mode or drivers, or to specify an alternative root directory.

Other more exotic uses are possible. Some linux distributions let you copy the boot cd into ram. Others (e.g., Ubuntu) let you use preseed files to clone installs when setting up multiple systems -- useful when installing a lab full of computers without having to baby sit each install.

What other tricks have you found useful in system installs, repairs, backups, restores, establishing temporary servers, or other tasks?

To add your favorite trick to the list: As much of the code for these options goes on either in initrd, or in a service handler that detects the kernel parameters, please list (1) the kernel boot line parameter, (2) what it does, (3) the linux distribution and any required packages to activate the feature. Thanks.

2 Answers 2

3
votes

In Debian (and probably Debian-derivatives like Ubuntu) the options are documented on the man-page initramfs-tools(8).

3
votes

The old standby for when you really break something in your init system is to add init=/bin/bash to get taken straight to a shell. Great for fixing root passwords!

Also sometimes it's nice to change the output verbosity of the kernel. Adding "quiet" or "debug" can take this a couple directions.

1
  • That "old standby" doesn't work anymore with initramfs systems, which now seems to be the norm.
    – Teddy
    Jul 18, 2011 at 12:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.