[Ilugc] Locked Root password, Debian 5 refuses to go into single user mode
- From: rajasuperman@xxxxxxxxx (Raja Subramanian)
- Date: Mon, 11 Jul 2011 00:26:20 +0530
On Sun, Jul 10, 2011 at 11:14 PM, Roshan George <roshan at arjie.com> wrote:
Unfortunately, on Debian this leads to a deadly situation. In the event
of a failed fsck, Debian gives you the bog standard, "Enter root
password to continue (or press Ctrl-D)" message. The problem is that the
root user is locked. There is simply no password. `Ctrl-D` just restarts
the OS.
This is *very easy* to recover. I've done this several times.
1. In your boot loader, pass the "init=/bin/sh" option and boot
your kernel
2. when the kernel completes boot, it will immediately drop you
into a root shell. Here you remount your root fs rw, run passwd
to reset root password. See below.
3. mount /proc; swapon -a
4. mount -o remount,rw / # mounts root fs rw, if this fails run fsck
5. run passwd to reset the root password. You are already root
so you will not be promoted for current password.
6. mount -o remount,ro /
7. exec /sbin/init # will continue boot procedure
8. Once system boots up, I recommend you reboot immediately
to ensure system is up following correct boot procedure.
Any advice would be appreciated. I'm having that horrible sinking
feeling right now.
This made plea me get out of bed, power up my laptop and post.
Let me know how it goes.
- Raja
Other related posts:
- » [Ilugc] Locked Root password, Debian 5 refuses to go into single user mode- Roshan George
- » [Ilugc] Locked Root password, Debian 5 refuses to go into single user mode- Amresh Singh
- » [Ilugc] Locked Root password, Debian 5 refuses to go into single user mode - Raja Subramanian
- » [Ilugc] Locked Root password, Debian 5 refuses to go into single user mode- Raja Subramanian
- » [Ilugc] Locked Root password, Debian 5 refuses to go into single user mode- Arun Khan
- » [Ilugc] Locked Root password, Debian 5 refuses to go into single user mode- Rahul Sundaram
- » [Ilugc] Locked Root password, Debian 5 refuses to go into single user mode- Roshan George
- » [Ilugc] Locked Root password, Debian 5 refuses to go into single user mode- Roshan George
- » [Ilugc] Locked Root password, Debian 5 refuses to go into single user mode- Roshan George
- » [Ilugc] Locked Root password, Debian 5 refuses to go into single user mode- Roshan George
- » [Ilugc] Locked Root password, Debian 5 refuses to go into single user mode- Roshan George