Wednesday, June 30, 2010

How to edit a read-only /etc/fstab during single-mode on CentOS

If somehow like me, you edited the /etc/fstab wrongly and have to enter the maintenance mode to rescue it but was not able to edit it.



For this blog entry, I'm writing on using a Linux CD to do a rescue.

Step 1: Put in the CentOS 5.4 CD and boot to CD

Step 2: Press F5 and type linux rescue at the boot prompt
linux rescue

Step 3: When given the command prompt again after a series of screen
# vi /mnt/sysimage/etc/fstab
Do the necessary changes to /etc/fstab
Step 4: Do the reboot
# reboot

Wednesday, June 23, 2010

MEEP a free finite-difference time-domain (FDTD) simulation software package

From the MEEP Website
"Meep (or MEEP) is a free finite-difference time-domain (FDTD) simulation software package developed at MIT to model electromagnetic systems, along with our MPB eigenmode package......"
For more information on MEEP,
  1. MEEP Manual
  2. MEEP Download
  3. MEEP FAQ

Monday, June 21, 2010

Rpmbuild Tutorial

RPMBuild is used to build both binary and source packages that can be used with the rpm commands.

There are a few good resources
  1. Rpmbuild Tutorial is a detailed well-written tutorial on rpmbuild utilities.
  2. RPM.org User Documentation is also another good material to read on.
  3. RPM Guild an excellent document that covers all aspects of the Red Hat Package Management system

Sunday, June 20, 2010

Protecting GRUB Boot loader for CentOS

Much of the material is taken from "How Do I Secure Grub Boot Loader?" taken from http://www.cyberciti.biz/ and the book "Foundation of CentOS Linux" from aspress

Without the GRUB Password, anyone can edit the kernel parameters and boot into single-user mode and  enable them to log as root.

Step 1:
Use grub-md5-crypt command encrypt password in MD5 format:
# grub-md5-crypt

Password:
Retype password:
$1$gBrNd/$QccThGN4QFPdOiOtaTl.c0



Step 2: Edit GRUB configuration file
# vi /boot/grub/menu.lst

Insert this line into /boot/grub/menu.lst
password --md5 $1$gBrNd/$QccThGN4QFPdOiOtaTl.c0

Something like this....
# grub.conf generated by anaconda
#........
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
password --md5 $1$H7tNd/$GEYVMUDHmIkhb4xwNwywR.
title CentOS (2.6.18-164.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-164.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-164.el5.img

It's done. Horray