[Hampshire] Adding a new system disk

Top Page

Reply to this message
Author: David Webb
Date:  
To: hampshire
Subject: [Hampshire] Adding a new system disk
My new system disk and everything is working OK but I had a few problems which
I will briefly list in case anyone else tries to do the same.

1. The plan was to add the new disk as primary master and have my old disk
as primary slave. So before adding the new hardware I changed '/etc/fstab'
so all the /dev/hda? items were replaced by the corresponding /dev/hdb? I
use grub for booting so I made similar changes in '/boot/grub/menu.lst'.

2. I added the new disk and when restarting edited the bios to restart from
my old disk, the primary slave. The restart failed because I had also
changed the (hd0) items in 'menu.lst' to (hd1). It looks as if the bios
makes (hd0) the 'bios name' for whichever disk it boots from (but this might
depend on the bios in your system). grub allowed me to correct my mistake
and the old system disk then booted OK.

3. I partitioned and formatted the new disk using Yast, there were no
problems, and copied the old system to its new location using 'cp -a' to keep
permissions, times etc. The pseudo-directories /proc and /sys should not be
copied but the directories should exist in the new system. /tmp should also
exist (I did not do this and so caused an error later).

4. The most difficult problem I found was putting a useful MBR at the start
of the new disk. I tried yast but, although it changed the mbr on /dev/hda
and partition /dev/hda1, when I changed the bios again to start from the
primary master the system hung before grub started. I then tried
grub-install to do the same thing. This worked in that grub was loaded and
linux started.

5. But the kernel then hung with the messages 'mount root /dev/hda3', 'mount
no such device'. Not much help but I eventually twigged that I had changed
the filesystem to ext3 and although ext2 was built into the kernel I had to
get the ext3 module loaded before the root file system could be mounted.

6. This I did by adding ext3 to the INITRD_MODULES line in
'/etc/sysconfig/kernel' and then running 'mkinitrd'. This generates the
'initrd' file in the boot directory which the kernel reads in order to load
modules required before any file system is available. I copied this to the
boot directory of the new system disk, restarted and success!

So thanks for the help, the new system is working, the new system disk
(Samsung 250GB) is fast and very quiet and I have learnt more than I want
about the bios, grub, grub-install, initrd and mkinitrd.

David Webb.