- Please do not work on a running system but use the SuSE Linux
rescue system instead.
- Partition the new hard disk:
fdisk /dev/hdc
and create a file system on it:
mke2fs /dev/hdc1
- Create mountpoints for both hard disks:
mkdir /mnt/OLD
mkdir /mnt/NEW
and mount them:
mount -t ext2 /dev/hda1 /mnt/OLD
mount -t ext2 /dev/hdc1 /mnt/NEW
- Copy the root partition's /home directory to the new hard disk.
Please use tar in order to maintain the owner, user permissions, and links:
cd /mnt/OLD/home
tar -cpf - . --numeric-owner | ( cd /mnt/NEW && tar xpvf - )
- Move the /home directory away and create a new, empty /home directory as
a mountpoint for the new hard disk:
cd /
mv /mnt/OLD/home /mnt/OLD/home.old
mkdir /mnt/NEW/home
- Adapt the root partition's fstab (/mnt/OLD/etc/fstab)
to the new partition with an editor of your choice (e.g. vi)
by entering for example:
/dev/hdc1 /home ext2 defaults 1 1
- Change to /, unmount the hard disks, and reboot:
cd /
umount /mnt/OLD
umount /mnt/NEW
shutdown -r now
- If everything has worked, you can delete /home.old;
but only after making sure that everything is OK!