I just installed a new SATA hard drive. Prior to the installation, I had two IDE hard drives (labels are the ones used by Parted Magic, for reasons that will become apparent):
hda: 60GB
hda1: ~25GB /
hda2: ~25GB /home
hda3: 2GB swap
hdb: 400GB
hdb1: 400GB /data
The hda drive is dying, so I installed the SATA drive and (using Parted Magic) copied the contents of hdb1 onto the new drive, sda, then created three partitions on hdb corresponding to hda1,2,3.
I then edited fstab (sorry, now with Ubuntu disc labels):
Code:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
/dev/sda1 / ext3 relatime,errors=remount-ro 0 1
# /dev/sda2
/dev/sda2 /home ext3 relatime 0 2
# /dev/sdc1
/dev/sdc1 /data reiserfs relatime 0 2
# /dev/sda3
UUID=9fbc25b9-c24c-438f-bd9e-7bb821b31f4d none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/scd1 /media/cdrom1 udf,iso9660 user,noauto,exec,utf8 0 0
What I've yet to figure out is how to create a new master boot record. I tried simply copying the mbr from the dying drive using
Code:
dd if=hda0 of=hdb0 bs=< 5something > pass=2
but no dice. I also tried using the Ubuntu liveCD install program, mounted all the partitions without formatting them and tried to skip to the GRUB installation, but the installer went ahead and overwrote hdb1 anyway, forcing me to copy hda1 to hdb1 all over again.
I'm not sure if this might be an indicator of the problem, but even with the dying hda removed from the computer, Parted Magic still recognizes hdb as hdb despite having switched it to the primary master drive (on both cable and jumpers) and shows no hda whatsoever.
So, ultimately two questions:
Is it a problem that Parted Magic is finding no hda?
How can I create a new mbr wihout having to reinstall Hardy?