« previous: Upgrades: Ubuntu, Gnome, Firefox | next: IIS error: The page cannot be found »
I needed to upgrade the hard drive in my Ubuntu Edgy Eft (6.10) system. I first connected the new drive via USB enclosure and partitioned it, then copied my whole system onto it using rsync:
# rsync -av --delete --exclude /mnt/newdisk / /mnt/newdisk
Then I shut down, removed the old hard drive, and put the new one in. But the system wouldn’t boot because there was no boot manager on the new disk’s MBR. So I booted the Rescue Is Possible (RIP) Linux boot CD and at the grub prompt, I hit ’c’ to get a command prompt. Then I did:
grub> setup (hd0) (hd0,0)
...which installs grub into the MBR of hd0 (hda) using the boot files that were already in /boot on hd0,0 (hda1).
Then the system booted, but the progress bar on the Ubuntu splash screen didn’t move at all. After a few minutes it dumped me onto a text console which said:
ALERT! /dev/disk/by-uuid/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx does not exist. Dropping to a shell! BusyBox v1.1.3 (Debian 1:1.1.3-2ubuntu3) Built-in shell (ash) Enter 'help' for a list of built-in commands. /bin/sh: can't access tty; job control turned off (initramfs)
Of course: because every disk has a different UUID, and the UUID of the old disk was still referenced in my /boot/grub/menu.lst file. At this pseudo-shell prompt, I looked into the /dev/disk/by-uuid/ directory to find out what the new UUID was (and had to write it down, ugh). Then I booted the RIP disc again to edit my menu.lst file and replace the old UUID with the new one.
Then the system booted a little more, but still got stuck -- because of course, /etc/fstab was still referencing the old UUID. Again I booted the RIP disc and updated the UUID in the fstab file. I also replaced "ext3" with "reiserfs" in there because I made the new disk’s partition a Reiser one instead.
Now the system really booted, but GDM gave me an error on an ugly GUI-made-of-text screen. Apparently the filesystem was mounted read-only. I could remount it manually, but why was it doing that in the first place?
I ran "dmesg" and saw this near the end of the output:
ReiserFS: hda1: warning: bad value "remount-ro" for option "errors"
So apparently the "errors=remount-ro" bit in the fstab file that worked fine for ext3 did not work with ReiserFS. I removed that, rebooted, and finally the system booted successfully with the new hard drive.