Replacing System Drve

Slackkeymike

Distinguished
Aug 17, 2010
10
0
18,510
So I built this CentOS 4.8 system using two removable sata disks. On the second disk I put the home and opt directories so if I wanted to rebuild the OS or the main system drive failed, I would not have to back up user data. Welllll, the main drive with root, etc is not behaving well. Making sick sounds. What I want to know how to do is how to build a new disk containing the OS sans the home and opt directories but still boot and have the system recognize the second drive as home and opt. Thoughts please? And thanks!
 

linux_0

Splendid
Buy a new drive, install the latest version of CentOS on it, I think it's 5.5, then when you're done, power down, plug in your 2nd disk, boot up and add it to your fstab.

su to root

Backup /etc/fstab

Edit /etc/fstab

Add lines for your 2nd drive at the bottom and run /bin/mount -a

Make sure you've got good backups of your fstab in case something doesn't work quite right.

The syntax is pretty simple.

It's something like this:

Code:
/dev/sdb1 /home ext3 defaults 1 4

Good luck :)