Friday, May 20, 2011

Simple Things Made Hard

I am using CentOS 5.6 as my desktop so it serves me right.  I really like CentOS though - even though it may not have all the fluff of Fedora or Ubuntu.  I have Xen running with Windows 7 and Fedora 14.  I loaded Fedora to try out Red Hat's 389 Directory.  I wanted to keep CentOS as vanilla as possible.  Here it is day 2 and I'm adding a non-standard repository to get my external 1TB hard drive to work. 

It took me a while to figure this out so I thought I'd better record it.  The issue was the ext. drive was ntfs-3g and CentOS didn't support it.  So I set up /etc/fstab to do this "mount -t ntfs -o defaults /dev/sdb1 /usbdrive" and then ...

# cd /etc/yum.repos.d/
# wget http://apt.sw.be/RPM-GPG-KEY.dag.txt
# wget http://packages.sw.be/rpmforge-release/rpmforge-#release0.5.2-2.el5.rf.i386.rpm
# rpm -ivh rpmforge-release-0.5.2-2.el6.rf.i386.rpm
# rpm -ivh rpmforge-release-0.5.2-2.el5.rf.i386.rpm 

# yum install -y --enablerepo=rpmforge ntfs-3g
# mount /usbdrive


Ta-dahhh!

Thursday, May 19, 2011

Success with Splitting?

I finally caught some bees carrying pollen entering the hive I put the two frames (containing queen cells) in.  It's a pretty weak hive but it looks like it may be a success.  I will give them pollen patties and check for brood on the next good inspection day.

Wednesday, May 11, 2011

More Fun With Xen

My colleague presented me with a poser: Lost password on Xen guest - What do you do?  What I normally do is, of course, mount the file system, edit the /etc/passwd (shadow file) and restart without a root password - quickly resetting it once back in.  Of course, with all the virtualization - what do you do?  I tried just mounting the /var/lib/xen/vutil.img file - no luck.  Then someone said try 

# losetup -f /var/lib/xen/images/vutil.img

I did but still couldn't get /dev/loop0 to mount.  So I tried another tip - this got me closer:

# kpartx -av /dev/loop0

This created /dev/mapper/loop0p1 and /dev/mapper/loop0p2. I really wanted to immediately mount the root partition so I tried the loop0p2 which was obviously larger.  p1 was probably /boot, I thought - it was.  Eventually, I realized p1 would be useful after all.  Since I couldn't get p2 to mount, I mounted p1, edited the grub.conf to include a single user mode boot option and then ran:

# xm create -c vutil

The -c makes it go directly to the console where the grub menu was displayed.  I picked my new single user mode boot option and "Ta-Dah!"  Whew!  

Thanks a bunch to the Xen Users mailing list.  They gave me a lot of great info (especially that last one).  I'm still not sure why I couldn't mount the file. It may be because I did not create a separate LVM filesystem for my guest.  I'm new to Xen - still have a lot of experimenting to do.