Boot Linux GRUB or LILO Into Single User Mode
Posted by jpluimers on 2012/08/17
Sometimes when you are at a Linux site, there is no one available with the right credential information for doing emergency maintenance.
There is a way around it: boot your Linux in Single user mode. Then it will not ask for a password, and boot straight into the user root.
When you are lucky, your linux site:
- allows for console access
- boots through a boot loader like GRUB or LILO, which allows for speicifying the kernel boot parameters
Modern systems usually use GRUBand you can follow the steps in
Boot Linux Grub Into Single User Mode.
or
Older systems often use LILO. There it depends on the kind of Linux installed. Usually you specify either one of these parameters for booting into Single user mode:
Single user mode is a very primitive environment (usually you only have VI as your editor, and often the file systems are all mounted read only. However as root you can do anything, so this mode usually gets you going.
In this case, I needed VI to do some search replace in a config file and the system was running fine again.
Later a secondary HDD needs to be added, and the GRUB default boot partition changed. That is regular maintenance, so someone with the right credentials should be available.
–jeroen






Leave a comment