2009-08-25

Linux - what to do if single user mode does not work

I just been through the problem, where I desperately needed root access to a system and could not boot into single user mode.

It uses grub, but the timeout=0, I was able to mount the harddisk and edit the menu.lst under /boot/grub/menu.lst to timeout=30.

Also I added a second entry and put the word "single" behind the kernel line:

kernel /boot/bzImage rw root=/dev/sda1 Single

but when I booted into the system it just booted into Runlevel 3 as usual.

What I had to do is to add init=/bin/bash to that line and then I was accessing the system again.

Update:

You should run:

sync
reboot

but reboot failed!!

there was a message  init: timeout opening/writing control channel /dev/initctl

I had to run reboot -f !!

No comments: