brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: cat /proc/cmdline shows the boot options your Linux kernel really started with

Linux
~/tips/tip-linux-proc-cmdline-boot-parameters

cat /proc/cmdline

Check whether a kernel option you added to GRUB actually reached the kernel.

You add an option to the kernel command line, run the bootloader update, reboot, and it seems to have no effect. Before you dig further, check whether the option arrived at all.

cat /proc/cmdline

This file holds the exact command line the running kernel was booted with: the kernel image, the root device and every extra option, such as quiet, mitigations=off or pcie_aspm=off. It is read only and reflects this boot, not what your config files say.

To check a single option, grep for it:

grep -o 'pcie_aspm=[^ ]*' /proc/cmdline

No output means the option is not there, and the problem is in how it was added, not in what it does. On Debian and Ubuntu with GRUB, the usual cause is that /etc/default/grub was edited but update-grub was not run, or the option went into a line that only applies to recovery mode. Some systems use systemd-boot or a firmware boot entry instead, with their own config.

Comparing it with /etc/default/grub after every change is a good habit, I think. If the option is in the file but not in /proc/cmdline, the bootloader is using a different config than you think.

Seeing an option there does not prove the kernel accepted it. Typos and unknown parameters are passed along quietly, often to init as an argument or an environment variable. Check the kernel log for messages about the parameter, and the kernel parameters documentation for the right spelling.

Further reading: proc_cmdline(5) manual page, The kernel's command-line parameters

More Linux tips a2query -m rewrite renice -n 10 -p 4242 cat config.yml | xsel -ib xvfb-run -a your-program --some-flag dpkg --get-selections > packages.txt All Linux tips (261) All topics

Link