Booting into specified Run levels

When you need to boot into non-default Run level, for example 1, specify the run level at LILO prompt:

linux single
or

linux 1 

In case of GRUB, edit the GRUB menu (type e at the prompt then type e again at the Kernel line) and add "single" or "1" as follows:

grub edit> kernel /boot/vmlinuz-2.6.8-2-686 root=/dev/hda1 ro single
Then type b to boot into Run level 1.

Booting into the system without password
You can modify entry for the single user mode in /etc/inittab to bypass authentication:

# What to do in single-user mode.
#~:S:wait:/sbin/sulogin
~:S:wait:/bin/bash
However, it is not a great idea in terms of security. Alternatively, you can prescribe init at boot time to execute only /bin/bash when a system boots up:

grub edit> kernel /boot/vmlinuz-2.6.8-2-686 root=/dev/hda1 ro init=/bin/bash
When the system boots up, remount/mount all the file systems for (rw):

mount -n -o remount,rw /
mount /usr
mount /var
mount /home
mount /tmp

Previous Pageprevious First Pagetop Next Pagenext