[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: mounting /home somewhere else

On Wednesday, March 5, 2003 14:55, Mirabella, Mathew J wrote:
> how can i assign /home to be mounted in /dev/hda5 that is, inside the /.
> what i want is to use one partition for the lot (except the swap of
> course). how can i now do this with a minimum of fuss and data loss.

You've used some incorrect terminology, but if I understand correctly, you 
just want to combine all the data from your root (/) and home (/home) 
partitions on to the root partition.  To do this all you need to do is copy 
the files over, preserving permissions.  The commands to run would look 
something like:
# init 1
# cd /
# mkdir /home.new
# cp -rp /home /home.new
# umount /home
# rmdir /home
# mv /home.new /home

You'll then want to update your file system table (/etc/fstab) to no longer 
mount /dev/hda6 on /home, clear the data off /dev/hda6, and bring the system 
back to a multiuser runlevel (such as 3), again using init.

You can also do the copying using an archival utility such as tar, but I don't 
think that's any better than using cp as shown above.

Hope this helps

Michael Wardle
Adacel Technologies

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]