[SWLUG] mounting ext3 partition

Justin Mitchell justin at discordia.org.uk
Fri Feb 2 09:30:37 UTC 2007


On Fri, 2007-02-02 at 08:21 +0000, Richard Rogers wrote:
> I'm pretty new to Linux and have managed most things by trawling the net
> and playing. But I'm having difficulty moving my home dir on ubuntu.
> I've re-sized the main partition and have a 40 gig /dev/hda4 partition
> formatted ext3 (qtparted). The problem is it doesn't show up anywhere on
> the system to allow me to move /home in the user settings. 

i dont know specifically about ubuntu, so i will give you
generalised instructions for moving your home directories to a new
disk/partition.

# mount the new disk somewhere
mkdir /newhome
mount /dev/hda4 /newhome

# copy the contents across
cp -a /home/. /newhome/

# now, if /home was already on a seperate partition
# edit the entry in /etc/fstab and change the 1st column
# to the name of the new partition
# the reboot

or

# if there wasnt an entry with 'home' in the 2nd column
# add one like this.
/dev/hda4	/home	ext3	defaults 	1 1

# then
mv /home /oldhome
mkdir /home

# and again reboot to make sure its all correct.

it can all be done without a reboot, but theres alsorts of gotchas
depending on whos logged in and whats running etc, so just rebooting is
quicker to describe :)





More information about the Swlug mailing list