Reboot the system; pressing Ctrl-Alt-Del from the console should achieve this without causing and damage to the running system.
At the LILO prompt, type:
This will cause the Linux kernel to boot, and drop you straight into a running copy of the bash shell
When the system boots, it leaves the root filesystem in read-only mode. Once the system's booted and you're in bash, type the following command to remount the root filesystem as read-write:
mount -o remount,rw -n /
Now you can run passwd and simply enter your preferred new root password.
Now you can type exit and the system will return to multi-user mode, and you should be able to log in as root with your new password!
As we've mentioned previously, Debian makes use of the Linux Loader (LILO) as the boot manager.
As LILO has to fit into a very small space in the first part of the disk, it doesn't come with very descriptive error messages.
If you attempt to boot your LILO-enabled Linux system and are presented with a partial LILO prompt, the following table will hopefully be able to help you track down the cause of the problem:
L 00 internal error L 01 illegal command L 02 address mark not found L 03 write-protected disk L 04 sector not found L 06 change line active L 07 invalid initialization L 08 DMA overrun L 09 DMA attempt across 64k boundary L 0C invalid media L 10 CRC error L 11 ECC correction successful L 20 controller error L 40 seek failure L 80 disk timeout L BB BIOS error LI the second-stage boot loader loaded, but could not run LIL the descriptor table could not be read LIL? the second-stage boot loader loaded at an incorrect address LIL- LILO found a corrupt descriptor table LILO LILO ran successfully
The following error codes usually indicate a problem with the physical hardware:
L 02, L 0C, L 40
You should attempt to reboot the system a few times and see if this error is transient; if not, it may be time to replace that disk!
The other "L ##" error codes usually indicate a problem with the BIOS and its understanding of the device you are attempting to boot from.
A common cause of the "L 01" error message is as follows:
If your hard drive is not the primary master drive in the system (i.e. hda), then LILO may fail to detect this when it looks for the first (i.e., bootable) drive in the system.
Assuming that your drive is the secondary master (hdb), you can add the following entries to your /etc/lilo.conf file to fix the problem:
--- disk = /dev/hdc bios = 0x80 ---
Once that's done, rerun the lilo command to install the new boot loader. The "0x80" value is the drive that the BIOS considers to be the first drive it detects in the system. Therefore, if you wished to boot from the second drive that the BIOS normally detects during bootup, you would specify "0x81".
If you can't boot from your hard drive because of a LILO error, use the boot floppy that you created during the Debian installation process.
Some other LILO related problems could be caused by:
not rerunning lilo following a kernel change
installing and booting Linux from a very large (>2GB) partition you should either make the partition smaller, or switch to using GRUB
installing an additional operating system, which overwrites the master boot record, and thus LILO
errors in your lilo.conf file
LILO comes with some intensive documentation, which is available on your Debian system in the following directory: