- Change to a single user mode.
This mode doesn't run any other user's task.
This mode runs only root user's task.
# telinit 1
- fdisk. Make a ext3 partition in the new disk.
# fdisk
- format for ext3 file system
# mkfs -t ext3 /dev/hdxx
- mount
# mkdir /usr2
# mount -t ext3 /dev/hdxx /usr2
- copy files
# cd /usr
# tar cvf - . | ( cd /usr2; tar xpf - )
- Mount again
# umount /usr2
# rmdir /usr2
# mv /usr /usr.bak
# mkdir /usr
# mount -t ext3 /dev/hdxx /usr
- Change to the multi user mode and test some programs.
# telinit 3
# startx
...............
- edit /etc/fstab
# cp -p /etc/fstab /etc/fstab.bak
# vi fstab
- /etc/fstab
/dev/hda1 / ext2 defaults 1 1
/dev/hdxx /usr ext2 defaults 1 1
/dev/hda5 swap swap defaults 0 0
/dev/fd0 /mnt/floppy ext2 user,noauto 0 0
/dev/cdrom /mnt/cdrom iso9660 user,exec,noauto,ro 0 0
none /proc proc defaults 0 0
- Reboot or mount
# shutdown -r now
or mount -a
# mount -a
- Check new partition
# df
- Remove old /usr directory
# rm -fr /usr.bak