Monday, December 1, 2008

Troubleshooting in RHCE Exams with answers

Troubleshooting in Linux

------------------------

* Boot Related

* File System Related

* User Related

5 1/2 Hours

-----------

TS Session A - 2 1/2h Session B 3h

--------------------- ------------

10 questions 20-25 questions

5 cumpulsary 1h RHCT min70% RHCE min70%

5 choice 1 1/2 Installation sendmail

F.S+RAID+LVM postfix

rpm,nic,xwindows squid

cups,crontab samba

user administration ftp,nfs,nisclient


Troubleshooting - Boot Related

------------------------------

steps to look

-------------

1. bios

2. grub

grub-install /dev/hda <--- in rescue mode

3. /etc/grub.conf <--- if any line is missing - add the line

<--- if grub.conf file is missing - cmd line booting

4. /boot/

vmlinuz |

initrd | <--- if these files are missing


If vmlinuz is missing

---------------------

* mount the nfs share

* cp the kernel-2.6.9-42.EL...rpm to /misc

* cp /misc

* rpm2cpio kernel....rpm > llc

* cpio -ivd <>

* cp vmlinuz-2...EL to the /boot directory






If initrd is missing

--------------------

  • mkinitrd /boot/initrd-2.6.9-42.EL.ing

or

* mkinitrd /boot/initrd-`uname -r`.img


5. if /sbin/init is missing <--- reinstall SysVinit

6. contineous reboot/shutdown <--- in /etc/inittab

goto single user mode & change the values in /etc/inittab


7. /etc/fstab


To clear the bootloader from mbr

--------------------------------

# dd if=/dev/zero of=/dev/hda bs=446 count=1


To install grub bootloader in mbr

---------------------------------

boot: linux rescue

-/bin/sh-3.00# chroot /mnt/sysimage

sh-3.00# grub-install /dev/hda

sh-3.00# reboot


If kernel panic comes steps to do

---------------------------------

grub> root

grub> kernel /vmlinuz-2.6.9-42.EL.img ro root=LABEL=/

grub> initrd /initrd-2.6.9-42.EL.img

grub> boot


If fstab file entry is changed steps to do

------------------------------------------

1 # mout -o remount,rw /

2 # /bin/vi /etc/fstab


Troubleshooting - User Related

------------------------------

* Password forgot <--- single user mode

* Login failed <--- goto /etc/password in last field /sbin/nologin

* /etc/inittab <--- tty - terminals commented

* /etc/shadow <--- password age set

* (none) login <--- /bin/bash is renamed with some other. single user mode

cd /mnt/sysimage

cd bin

mv bash.xxx bash

0 Comments: