Quote:
Originally posted by Ragnaar
...
How would it be possible for me to retain only the operating system stuff on the current partition (9Gb), and move stuff like the /home directory to the new partition - would linux recognise that users home directories had moved to a new partition? Or would I have to specify that somewhere?
Also, if I wanted to install new software, programs etc, would installing them to the new partition be a reasonable course of action - for example if i ran out of space on the 9Gb partition?
...
|
That's what I like! Concise, precise questions are easily answered with the appropriate commands:
Suppose your new partition is /dev/hda2 (substitute for the appropriate device and partition)
As root
#telinit 1 (useful when doing brain surgery in case other processes are doing stuff)
#mke2fs -j /dev/hda2 (will make a journalling filesystem on the new space. Skip if already there)
#mkdir /newhome (make a temporary connection between the new partition and the old fs)
#mount /dev/hda2 /newhome
cd /home
cp * /newhome
When you are satisfied that the files in /newhome are OK edit the line in /etc/fstab refferring to /home to mount /dev/hda2. If there is no such line, add
/dev/hda2 /home ext3 defaults 1 2
Then
#cd /
#umount /newhome
#mount /dev/hda2 /home
#rmdir /newhome
This leaves your original /home stuff still on the drive. If you wish to delete it, put
#rm -fr /home/*
just before the line #mount /dev/hda2 /home
#telinit 3 or 5 or whatever your usual run level is. Next time you reboot, /home should mount
Most user software is installed in /usr. If you have space, you could create a partition for a larger /usr and do the above. Another possibility is to mount a new partition on /usr/local
I hope this helps. Brain surgery is very scary. You can kill the patient with a little mis-typing.