Cheat Codes, Boot Codes

From PCLinuxOSHelp Knowledge Base
Jump to: navigation, search
  • Relevant to All editions of PCLinuxOS.


Introduction

PCLinuxOS accepts certain "command line options" or "boot time parameters" (a.k.a cheat codes) at the moment of starting. These are used to provide the Operating System with information which can change the normal behavior of the start-up or to provide the kernel with information it would not be able to detect or to override values it would normally detect/use.

How to enter the boot codes

Boot codes are used more often when booting Live Media to try to override hardware detection or change the normal mode of start-up. PCLinuxOS has several codes which are specific to Live Media booting. The boot code is entered directly on the Boot Menu screen before initiating the boot. The PCLinuxOS distribution media ISOs can be booted in UEFI mode or Legacy/CSM (BIOS) mode depending on your firmware settings. See Installing PCLinuxOS for an illustration of the boot menus

Booting Live Media in Legacy/CSM mode

When the boot menu is displayed, highlight the required entry and the Boot Options are displayed near the bottom of the screen. Simply type your chosen boot code(s) which will be added to the end of the line (separated by spaces) and then press ENTER to boot.

Booting Live Media in UEFI mode

When the boot menu is displayed, use the arrow keys to highlight the entry you wish to boot and then press the e key. This will open an editor window containing the GRUB "script" for the boot entry. Use the arrow keys to scroll down to find the line which begins with linux

linux /isolinux/vmlinuz livecd=livecd root=/dev/rd/3 vga=788 keyb=us quiet splash=silent

Add your chosen boot code(s) to the end of the line (separated by spaces) and the press CTRL-X to start the boot. The change to the GRUB script applies only to that boot so if it fails you can just power off and restart back to normal.

Booting an installed system (all modes)

The procedure for booting an installed system with additional boot code(s) is the same as for UEFI boot above regardless of the firmware mode. When the boot menu is displayed, use the arrow keys to highlight the entry you wish to boot and then press the e key. This will open an editor window containing the GRUB "script" for the boot entry. Use the arrow keys to scroll down to find the line which begins with linux

linux /boot/vmlinuz-5.7.8-pclos1 root=UUID=5e1a1319-fed8-4131-9908-7d593e288d0a splash quiet noiswmd audit=0 vga=788

Add your chosen boot code(s) to the end of the line (separated by spaces) and the press CTRL-X to start the boot. The change to the GRUB script applies only to that boot so if it fails you can just power off and restart back to normal.


If the boot is successful and you want to make the boot code apply on every boot then you need to edit /etc/default/grub and add your chosen code(s) to the end of the GRUB_CMDLINE_LINUX_DEFAULT line:

GRUB_CMDLINE_LINUX_DEFAULT="splash quiet noiswmd audit=0 vga=788"

Save the file and then run (as root):

update-grub2

to rebuild the GRUB configuration.

Kernel Boot Codes

The majority of the boot codes are used to supply the Kernel with information about hardware parameters that the Kernel cannot determine on its own or to override parameters that the kernel would otherwise detect or use. A detailed list of available codes can be found in the Kernel Documentation however some of the common boot codes used in PCLinuxOS are:

code Description
root= Specify Root filesystem.
rootflags= Root filesystem mount options.
ro Mount root device read-only on boot.
rw Mount root device read-write on boot.
resume= Specify a swap device to use when waking from hibernation.
nomodeset Disable Kernel Modesetting (KMS).
quiet Disable most Kernel log messages.
debug Enable kernel debugging (events log level).
noiswmd Disable MD RAID for imsm/isw raids.
mem= Force usage of a specific amount of memory to be used.
maxcpus= Maximum number of processors that an SMP kernel will bring up during bootup.

PCLinuxOS specific Live Media Boot Codes

The following codes are specific to PCLinuxOS. They are processed by the system start (sysinit) routine rather than the Kernel.

code Description
debug Display extra debug information during the system boot procedure
splash=silent Disable Plymouth splash screen.
livecd=name Specify name of compressed image as name.sqfs (default: livecd.sqfs)
livecd=initrd Only boot as far as initrd and start a shell
copy2ram Load the entire compressed image into RAM
changes_dev=device Specify device/partition to use for changes when using persistence
changes_file=file Specify file to use for changes when using persistence
bootfromiso=file Specify ISO path when booting an ISO directly
keyb= Specify keyboard map (us,uk,ie,de etc.)
xdriver= Set a specific Xorg driver (vesa, modesetting etc.)