Archive for December, 2010

We have a number of vme computers that I need to set up. All of them will be using an 8GB compact flash drive as their hard disk. The details for how to set this up are all on this page. Now, I need to install linux on a bunch of compact flash drives and was looking for a way to clone one after I’d set it up how I wanted. Since I normally use a mac laptop, I also wanted to be able to use that. Here’s what I did.

First, install linux on one of the compact flash drives by pulling all the internal drives out of a computer and using the linux expert method. Once this is installed and all the other required software is installed, use dd to make an image on my mac.

sudo dd if=/dev/disk2 of=~/Desktop/crate.img

I know the input is /dev/disk2 because when I mount the compact flash drive, it would show as:

/dev/disk2s3    6.9G   1.6G   5.0G    24%    /Volumes/:
/dev/disk2s1    101M   9.1M    87M    10%    /Volumes/:boot

The s3 is the partition for / and s1 is the partition for /boot. (s2 would also be the swap partition.) Since I want to copy the entire disk and not each partition, I use /dev/disk2.

Using dd to copy the disk takes a long time, but it can be left unattended. You can check that it’s working by doing a listing of ~/Desktop/crate.img. The size will slowly be increasing.

Once the image has been created, prepare a new compact flash drive to use for the clone. The key here is that the partition on the drive must first be deleted. I used Disk Utility for this.

Here’s how the new compact flash card looked when I attached it to my laptop.

I needed to delete that KINGSTON partition to be able to copy my image back. Change the Volume Scheme to 1 Partition and then format it with Free Space.

The disk is now still connected to the laptop, but it has no partitions, so nothing is mounted. Now use the dd command again to copy the image to the new compact flash card.

sudo dd of=/dev/disk2 if=crate.img

Again, it takes a long time, but when it’s done, I can put the card in the vme crate and it boots successfully. I just need to ok any new hardware changes it finds and configure a new ip address for it.

We got a couple of new Supermicro Superservers (sys-5026t-tb) that I was planning to set up as dual-boot computers. I installed windows xp fine and did a kickstart install of RHEL5. The installation went fine, but after rebooting, every time I tried to boot to linux I would get this error:

Unable to access resume device (LABEL=SWAP-sdb2)
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 - no syncing: Attempted to kill init', -12000

The problem was that, even though it installed the operating system, it did not load the sata drivers. I had this problem before and could just go in and edit /etc/modprobe.conf to alias scsihostadapter ahci from ata-piix. But the problem I was having now, is that the ahci drivers were never installed. I got a file from Supermicro that was supposed to fix this, but I was having a problem installing it when I boot into rescue mode.

I did find out that the reason that it was not installing the driver was due to the presence of the dvd drive that I was using to boot. So, my solution was to take out the dvd drive and boot from a usb flash drive. I did the installation that way and things worked just fine. I could probably reconnect the dvd drive and use it now, but I’ve decided that I really don’t need it, as I install most software from the network.