| Lilo and grub are two most used boot managers in the linux world. This micro how-to is not intended to be a complete lilo configuration manual, but more of a tip and trick thing. 1. Changing lost root password It happends from time to time that you forget the root password. Your only choice is to bypass the authentication process in order to get to the / partition. This can be achieved by mounting the drive on another system, chrooting to the root partition and do a passwd. But if your boot manager is able to pass parameters to the loading kernel, you can do it in a shorter way. When lilo first comes up, you choose the kernel you wish to be loaded and add init kernel parameter to it. This parameter tells the kernel what init script should run after the kernel loads the hardware.
Let's say your kernel image is named simple LINUX, then you ought to write it like: LINUX init=/bin/bash This will give you an root access right after the kernel finishes hw detection. The partition might be mounted read-only. Then you need to issue: mount -o remount,rw / and passwd afterwards you have to remout the partition read-only again in order to make sure that all data is written: mount -o remount,ro / then do a ctrl-alt-del or hit the reset button. |