How To Replace A Linux Root Drive

Instructions for replacing the root disc in a SuSE 10 linux installation PC with a new Maxtor L01Y500 (STM3500630A) drive. The drive being replaced is a PATA/133 drive.

 
  1. Inserted the new 500GB hard drive.
  2. Booted using Partition Commander 10.
  3. Copied /dev/hda6 (linux Reiserfs root partition) to /dev/hdb. One recoverable read error was encountered.
  4. Created swap and 2 additional partitions on the new drive using the free space leftover from the copy. Put /home on it's own filesystem and copied the data to it. Now have
    Filesystem 1K-blocks Used Available Use% Mounted on

    /dev/hda1 148444064 22848916 125595148 16% /

    /dev/hdb1 120056620 32840 120023780 1% /spare

    /dev/hda3 205762228 1766912 203995316 1% /home

    /dev/hda4 130001980 32840 129969140 1% /export

    115 basil mse (/home/mse): /sbin/swapon -s

    Filename Type Size Used Priority

    /dev/hda2 partition 4160824 515328 -1

     

  5. Replaced the bad root drive and set the jumpers on the new drive to make it the master.
  6. Booted the Suse 10 install DVD into rescue mode.
  7. From command I mounted the new root partition at /mnt.
  8. I edited the /mnt/boot/grub/menu.lst file to change hd0,5 to hd0,0 to reflect the new location of the root partition. I also removed entries for any boot systems no longer available (i.e. windows, etc.)
  9. I ran grub-install --root-directory=/mnt /dev/hda to update the MBR record.
  10. Rebooted and this time selected the Boot from Hard Drive,option from the SuSE 10 menu.
  11. I edited the /etc/grub.conf file with the same edits I made to the menu.lst file above.

I no longer see any bad sector messages in the /var/log/messages file. I see new entries from the SMARTD disk monitoring daemon for the new drive. It tracks the drive temp in Celsius.

 

Match: Format: Sort by:
Refine search: