Wednesday, September 26, 2007

Setting up LVM in RHEL kickstart file

Another piece of fun today...

Task:
Set up and configure a linux box with the following partition information.

Non-LVM
/boot - 100MB

LVM
/ - 9GB
/opt - 12GB
/var - 8GB
swap - 8GB

Kickstart Entries:
clearpart --all
part /boot --fstype ext3 --size=100 --ondisk=sda
part pv.4 --size=0 --grow --ondisk=sda
volgroup VolGroup00 pv.4
logvol / --fstype ext3 --name=root --vgname=VolGroup00 --size=9216
logvol /opt --fstype ext3 --name=usr --vgname=VolGroup00 --size=12228
logvol /var --fstype ext3 --name=var --vgname=VolGroup00 --size=8192
logvol swap --fstype swap --name=swap --vgname=VolGroup00 --size=8192

My big mistake was trying to set the "pesize" in the volgroup line. Apparently, it will assume to use all if not set, which is what I wanted. RedHat documentation about kickstart options can be found here.

Friday, September 14, 2007

Creating ISO images with Mac OS X

Since moving .iso files is easier than CD's when performing remote installs, I was trying to find out how I could without paying for software. Apparently, you can do this natively with Mac OS X.

Giving credit where credit is due, I found this link very useful.

http://www.slashdotdash.net/articles/2006/08/14/create-iso-cd-dvd-image-with-mac-os-x-tiger-10-4

And then, if your kernel supports it, you can mount it like this.

# mount -o loop -t iso9660 file.iso

Tuesday, September 4, 2007

Cfengine File Permission Blunder

While testing some changes to our sshd_config, I imported a copy of it from another host to our cfengine repository. After making adjustments to our cfagent.conf so that the test machine would be the only host to get this copy, I saved the file and ran cfagent.

Much to my surprise, the test server's sshd_config file would not update. I double checked my cfagent.conf, made sure the file was correct in the cfengine repository, etc. Looking at /var/log/messages, I saw

Sep 4 12:52:50 testhost cfengine:testhost[4333]: Network access to cfserver:/repository/cfengine/test/etc/ssh/sshd_config denied

This was confusing, because the testhost:/var/cfengine/cfagent.conf was getting the new configuration file. After banging my head for a while, I realized that the permissions of cfserver:/repository/cfengine/test/etc/ssh/sshd_config were incorrect.

-r-------- 1 root root 3050 Sep 4 10:53 sshd_config

Apparently, when importing the file over to my repository, I kept its original permissions. After chown'ing the file to cfengine, everything worked. Unfortunately, "Network access denied" is misleading. So, in the future, check you file perms to make sure cfengine can read the file.