Tarik Guelzim

Computer Science, Networking, Telecom, Web 2.0 & Open Source

An expert is a person who has made all the mistakes that can be made in a very narrow field.


--- Niels Bohr (1885 - 1962)

Lately I have locked myself out my gentoo linux box and not been able to log on to root.

This situation happens to most of Careless! Linux users, but thanks to the GRUB flags, one might

able to overcome this situation with ease.

my /boot/grub/grub.conf looks like this

on your machine, you can do

1. $more /boot/grub/grub.conf to view yours

default 0

timeout 30

splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux

root (hd0,0)

kernel /kernel-genkernel-x86-2.6.17-gentoo-r7 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda3 doscsi

initrd /initramfs-genkernel-x86-2.6.17-gentoo-r7

2. Now reboot the machine, and at the grub menu press ‘e’ then ‘e’

now what do you wanna do is boot the machine to single mode.

3. Go down to the line kernel /kernel… and add ‘1′ to its end. you’ll wind up with:

kernel /kernel-genkernel-x86-2.6.17-gentoo-r7 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda3 doscsi 1

4. Now press ENTER and ‘b’ et voila.

Comments are closed.