[CLUE-Tech] LILO vs. GRUB root reset

Dave Anselmi anselmi at americanisp.net
Mon Dec 10 15:15:38 MST 2001


Jason Canney wrote:

> I've been lurking for a bit,,,, this is my first post.  Hello :)~

Welcome!  Come to the meeting tomorrow night or we won't talk to you anymore!

Just kidding :-)

> There is a process with LILO for resetting the root password.  How is this
> done with GRUB?  I don't seem to find the method for booting into a single
> user mode.  This is with the caveat that I am unable to get into the system
> at all.

Don't know about grub - I've read about it but not used it.  Lilo deals with
bootsectors and kernels, doesn't do passwords.

Typically, booting into single user mode still requires the root password.
Here's a little trick though:

At the lilo boot prompt type init=/bin/bash.  Then when the system boots it
will run bash instead of init - no password required.

Now, how do you fix things?  Well, init didn't run so your system is not at all
like you expect it to be.  You have the kernel and bash and that's it.

So, run mount -o remount,rw / to make your root partition read/write.  Then run
passwd to change your root password.  Then reboot and see if it works (exiting
might do that, or you might have to use the shutdown command).

Note that your path may not be what you expect so you might have to set it
before you run mount, passwd, or shutdown, or use complete paths.  Also, if
your /usr is on a different partition you'll have to mount it before you can
run any programs off of it.

Probably you can use a similar method with grub, but I don't know how to pass
kernel parameters with it.

Dave





More information about the clue-tech mailing list