Friday, September 11, 2009

Top 5 things You Don't Want to See on a Sys Admin's Desktop

5. Your username at the top of a "Block these Accounts" List
4. The Book "Learn Linux in 24 Hours"
3 . ...opened to "Hour 1"
2. List of "Top 10 things to do when you hate your job"
1. Your username at the top of a "Most Visited Pages" chart

Friday, July 10, 2009

Where's that drive? Could not find filesystem '/dev/root'

If you see this on the remote console:

mount: could not find filesystem '/dev/root'
setuproot: moving /dev failed: No such file or directory
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
switchroot: mount failed: No such file or directory
Kernel panic - not syncing: Attempted to kill init!

Ask yourself the following: Was the e2label for the root partition been changed?
The LABEL must match in /etc/fstab and grub.conf

LABEL=/ / ext3 defaults 1 1
  1. Powercycle the system.
  2. At the boot menu, edit the grub configuration.
  3. Continue with the boot process
  4. login
  5. su as root
  6. view LABEL of the boot partition e.g. e2label /dev/sda1
  7. compare with /etc/fstab and /etc/grub.conf values.
  8. Edit files as needed.
Remember to make a copies before editting files! e.g.
cp -p /etc/grub.conf /etc/old/grub.conf.20090710

Thursday, February 12, 2009


When was a system last rebooted
It is useful at times to know when a given system was last rebooted e.g. the last time a shutdown -r now command was executed. As root, execute the following commands.
# mkdir /tmp/last
# cd
# foreach f (wtmp*)
last -f $f > /tmp/last/$f
# cd /tmp/last
# grep reboot wtmp wtmp.? wtmp.??

The output from the grep command will look something like this:
wtmp:reboot system boot 2.4.21-47.0.1.EL Thu Feb 12 11:49 (01:01)
wtmp.2:reboot system boot 2.4.21-57.ELsmp Tue Dec 9 14:39 (72+03:19)
wtmp.3:reboot system boot 2.4.21-57.ELsmp Wed Nov 19 12:32 (92+05:26)
wtmp.7:reboot system boot 2.4.21-57.ELsmp Sun Jul 27 12:10 (207+06:48)