[xubuntu-users] How can I select a hard drive as /home directory afterwards?

Vincent mailinglists at vinnl.nl
Fri Oct 23 21:27:18 UTC 2009


On Fri, Oct 23, 2009 at 9:18 PM, John Culleton <john at wexfordpress.com>wrote:

> On Friday 23 October 2009 16:30:10 Vincent wrote:
> > Hi everybody,
> >
> > Having inserted a new hard drive in my PC, I'm planning to
> install Xubuntu
> > 9.10 to that. I then want to move my documents from my old
> hard drive there
> > and reformat my old hard drive.
> >
> > Now, my problem is that I then want to make that hard drive
> my /home
> > directory. How would I go about doing that? Do I have to
> manually edit
> > /etc/fstab (please say no :).
> >
> > Thanks in advance,
>
> Reformatting is not necessary. If you want to change the size of
> the partitions etc. cfdisk is your friend.
> First you need to give yourself a root password.
> sudo passwd root
> (etc)
> Note spelling of passwd command.
> Next  you need to login as root and create an empty directory:
> mkdir /mnt/foo
> Then mount the old partition on that directory.
> mount /dev/sdb1 /mnt/foo -t ext3
> ---using the correct partition name of course. Run cfdisk /dev/sdb
> or whatever to find the correct partition name. Try sda, sdb, hda,
> hdb.
> Next copy the contents of /home to that directory.
> cp -p -R /home /mnt/foo
> Next you can put a line in /etc/fstab like
> /dev/sdb1        /home          ext3        defaults
>
> ---substituting the correct partition name for sdb1 of course. Then
> you need to reboot.
>
> In any form of Linux manual editing of things like fstab is a fact of
> life.  But it doesn't hurt a bit.
> --
> John Culleton
> "Create Book Covers with Scribus"
> http://www.booklocker.com/books/4055.html
>

Hi John,

Thanks for the help. I'll do the reformatting anyway because I want to try
ext4. The fstab line is helpful though, I assume I can just insert the line
you gave, replacing ext3 by ext4 and sdb1 by the drive's name (sda1)?

-- 
Vincent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/xubuntu-users/attachments/20091023/ab57e614/attachment.html>


More information about the xubuntu-users mailing list