[xubuntu-users] How can I select a hard drive as /home directory afterwards?
John Culleton
john at wexfordpress.com
Tue Oct 27 19:21:32 UTC 2009
On Friday 23 October 2009 17:27:18 Vincent wrote:
> 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)?
Correct. I stick with ext3 because I want to be able to reach any
partition from any partition and the older partitions are ext3.
--
John Culleton
"Create Book Covers with Scribus"
http://www.booklocker.com/books/4055.html
More information about the xubuntu-users
mailing list