Monday, September 7, 2009

Startup and Shutdown

1. Run Levels:

0 - To halt a system
1,s,S - Single user mod
2 - Multiuser, no network
3 - Multiuser with network, but no XWindows
4 - Unused
5 - Multiuser with XWindows and network
6 - Reboot

2. To switch to single user run level:
# telinit 5

3. Directory containing Runlevel Scripts:

0 - /etc/init.d/rc0.d
1 - /etc/init.d/rc1.d
2 - /etc/init.d/rc2.d
3 - /etc/init.d/rc3.d
4 - /etc/init.d/rc4.d
5 - /etc/init.d/rc5.d
6 - /etc/init.d/rc6.d

4. Boot Loaders:
a. LILO
b. GRUB

5. Config Files for Boot Loaders :
LILO: /etc/lilo.conf

GRUB: /boot/grub/menu.lst

6. To set password for grub:

a.
# grub
grub> md5crypt
Password: ibmlnx
Encrypted: $1$JGuR//$kjOu7Q9kTZk01wFKWQqMb/
grub> quit

b.
# vi /boot/grub/menu.lst
Add the following line below the “splashimage” line (Red Hat)
After you see title SUSE Linux 10.0 on the next line type lock.
On the following line type password md5 [the encrypted password you copied from previous shell]:

###Don't change this comment YaST2 identifier: Original name: linux###
title SUSE Linux 10.0
lock
password md5 $1$Rdv455345ga345GvIRgXWxcF1Vjb7tZ//
root (hd0,1)
kernel /boot/vmlinuz root=/dev/hda2 vga=0x31a selinux=0
resume=/dev/hda1 splash=silent showopts
initrd /boot/initrd

7. To shutdown a system :
# shutdown now
# halt

8. To reboot a system :
# shutdown -r now
# reboot

9. To install GRB :
# /sbin/grub-install /dev/sda

3 comments:

Lee said...

HI Raja

Today only i got the chance to see your blog. Really Amazing, Very very useful. Thank you so much. Kindly keep update your blog.

Siva

SATKR said...

very good information on your blog

SATKR said...

very good information on your blog