Rescuing Linux: Difference between revisions
| (3 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
==firmware== | ==firmware== | ||
System firmware configuration can usually be entered by holding one of Delete, F2, or F1. A boot menu can commonly be accessed with F10. | System firmware configuration can usually be entered by holding one of Delete, F2, or F1. A boot menu can commonly be accessed with F10. All of these are of course motherboard-specific. | ||
If you need clear a firmware password, try removing the battery and unplugging the machine for 30s. | If you need clear a firmware password, try removing the battery and unplugging the machine for 30s. | ||
<tt>systemctl reboot --firmware-setup</tt> will attempt to reboot into firmware configuration. | |||
==grub== | ==grub== | ||
| Line 16: | Line 18: | ||
==kernel command line== | ==kernel command line== | ||
The bootloader can provide command line parameters to the kernel (they can also be specified at build time, see <tt>CONFIG_CMDLINE</tt>). [[systemd]] can take many parameters off of the kernel command line. | The bootloader can provide command line parameters to the kernel (they can also be specified at build time, see <tt>CONFIG_CMDLINE</tt>). GRUB supports providing them in interactive mode. With UEFI firmware, they can be specified in the EFI shell. | ||
[[systemd]] can take many parameters off of the kernel command line, including <tt>systemd.unit=</tt> to specify a boot target. | |||
For more output, ensure "quiet" is not present. For still more output, add "debug=vc" (by default, <tt>debug</tt> writes to <tt>/run/initramfs/initramfs.debug</tt>; this sends it to the console). | For more output, ensure "quiet" is not present. For still more output, add "debug=vc" (by default, <tt>debug</tt> writes to <tt>/run/initramfs/initramfs.debug</tt>; this sends it to the console). | ||
| Line 23: | Line 27: | ||
Note that the kernel does not by default reboot following a panic. This can be undesirable on remote machines. <tt>panic=N</tt> will reboot N seconds after a panic, if N is positive. <tt>/proc/sys/kernel/panic</tt> exposes this. | Note that the kernel does not by default reboot following a panic. This can be undesirable on remote machines. <tt>panic=N</tt> will reboot N seconds after a panic, if N is positive. <tt>/proc/sys/kernel/panic</tt> exposes this. | ||
Modules can be blacklisted with <tt>modprobe.blacklist=</tt>. | |||
===my video is borked=== | ===my video is borked=== | ||
| Line 47: | Line 53: | ||
==fsck on boot== | ==fsck on boot== | ||
this doesn't happen much anymore since most everyone's running at least ext3, but ext2 required <tt>fsck</tt> on boot when not cleanly unmounted, and every so often just to make sure things hadn't shifted around. | |||
if you don't want a filesystem to block booting under [[systemd]], use <tt>nofail</tt> in <tt>/etc/fstab</tt>. | |||
==access sans password== | ==access sans password== | ||
| Line 86: | Line 95: | ||
<b>ESP, bootloader, initramfs...</b> | <b>ESP, bootloader, initramfs...</b> | ||
==reassembling a degraded MDRAID== | |||
... | |||
==External links== | ==External links== | ||
* Debian wiki page for [https://wiki.debian.org/initramfs initramfs] | * Debian wiki page for [https://wiki.debian.org/initramfs initramfs] | ||
* Kernel documentation for [https://www.kernel.org/doc/html/latest/filesystems/ramfs-rootfs-initramfs.html Ramfs, Rootfs, and Initramfs] | * Kernel documentation for [https://www.kernel.org/doc/html/latest/filesystems/ramfs-rootfs-initramfs.html Ramfs, Rootfs, and Initramfs] | ||