tips
16 tips Boots and kernel
One command, setting or habit at a time about Boots and kernel: what it does, the line to copy and a caveat or two.
Boots and kernel 16
-
A config.txt line that stops the startup probe for a PoE HAT fan, which saves a little boot time.
disable_poe_fan=1 -
Sets which GRUB menu entry boots once, and the normal default returns after that.
sudo grub-reboot MENU_ENTRY -
Hides the GRUB menu behind a short timeout, and the menu still appears when you press ESC or hold Shift.
GRUB_TIMEOUT_STYLE=hidden -
Lists systemd-boot entries with bootctl list and picks one for the next boot only.
sudo bootctl set-oneshot ID -
Adds one option to the kernel command line for a single boot, to land in rescue or emergency mode.
systemd.unit=rescue.target -
Lists the files in an initramfs image, so you can check a driver is in it.
lsinitramfs /boot/initrd.img-$(uname -r) -
Save raw kernel messages on one machine and study them on another.
sudo dmesg -r > kernel.raw -
Filter kernel and udev messages to one kind of hardware, like USB or PCI.
journalctl -F _KERNEL_SUBSYSTEM -
Read the final lines before a reboot or crash to see whether it was a clean shutdown.
journalctl -b -1 -n 50 -
Check whether a kernel option you added to GRUB actually reached the kernel.
cat /proc/cmdline -
Reports whether the bootloader in the Pi's EEPROM has a newer version available.
vcgencmd bootloader_version -
Shows the boot settings stored in the Pi's bootloader EEPROM before you change them.
rpi-eeprom-config -
Keep kernel messages off your console screen while they still land in the log.
sudo dmesg -n 4 -
Follows kernel messages live, handy while you plug in or remove hardware.
journalctl -kf -
Shows kernel messages from the previous boot, which dmesg has already lost.
journalctl -k -b -1 -
Lists every boot the journal knows, with offsets you can pass to -b.
journalctl -b -2 -u nginx
Nothing in this filter yet.