I had done a new lucid install to a 1 TB RAID 1 array using the alternate CD a few weeks back. I messed up that system trying to some hardware working that lucid doesn't have drivers for yet, so I gave up on it and reinstalled to a single 80 GB disk that I now want to move over to the RAID array.
I moved all of the existing files on the array to a single folder, then copied all of the folders from the 80 GB disk over to the array with permissions and symlinks (minus the contents of /proc and /sys, which I created empty).
These are the commands I used:
p -a -d -R -v -t /media/raid_array /b*
cp -a -d -R -v -t /media/raid_array /d*
cp -a -d -R -v -t /media/raid_array /e*
cp -a -d -R -v -t /media/raid_array /h*
cp -a -d -R -v -t /media/raid_array /i*
cp -a -d -R -v -t /media/raid_array /l*
cp -a -d -R -v -t /media/raid_array /mnt
cp -a -d -R -v -t /media/raid_array /opt
cp -a -d -R -v -t /media/raid_array /root
cp -a -d -R -v -t /media/raid_array /sbin
cp -a -d -R -v -t /media/raid_array /selinux
cp -a -d -R -v -t /media/raid_array /srv
cp -a -d -R -v -t /media/raid_array /tmp
cp -a -d -R -v -t /media/raid_array /usr
cp -a -d -R -v -t /media/raid_array /v*
mkdir /media/raid_array/sys
chmod 755 /media/raid_array/sys
mkdir /media/raid_array/proc
chmod 555 /media/raid_array/proc
After copying everything, I replaced the fstab that I copied over from the 80 GB disk with the fstab from my backup of the RAID array, shut down, and unplugged the 80 GB disk. When I try to boot from the array, I get an error that the UUID that's in fstab can't be located (/dev/disk/by-uuid/412d...).
mdadm --detail --scan gives me UUID=689a..., and blkid shows UUID=689a... for both of the raid members, too.
I tried to change fstab to use the 689a... for root, but when I try to boot, it's still trying to open /dev/disk/by-uuid/412d...
So then I booted from the single disk again and chrooted into the array, then ran update-initramfs -u. I got 3 "grep: /proc/modules: No such file or directory" errors, and "cat: /proc/cmdline: No such file or directory"- so I created directory /proc/modules, created an empty file /proc/cmdline, and ran the initramfs update again. Then I tried to shut down, which hung (probably because I was doing all of this from a terminal window in Gnome), so I killed the power after a couple of minutes.
It's still trying to use /dev/disk/by-uuid/412d... to boot.
What am I missing? I assume I just have to change the UUID to mount as root, but I don't know how. Help!
Bookmarks