Preserving /Home Partition

Nils Kassube kassube at gmx.net
Sat Feb 14 20:04:06 UTC 2009


Leonard Chatagnier wrote:
> -- On Sat, 2/14/09, Nils Kassube <kassube at gmx.net> wrote:
> > Leonard Chatagnier wrote:
> > > I just finished reinstalling Hardy, up to date, on an
> > IBM 13 G
> > > drive that had the / Partition corrupted by fsck. Went
> > to some
> > > length to prove the drive was not faulty and the drive
> > has worked
> > > for several days since the reinstall. In doing so, I
> > used the Alt.
> > > CD, reformatting the / part and preserving the /Home
> > partition and
> > > also reformatting swap. Have done this on this same
> > machine on a
> > > replacement HDD successfully but this time I find
> > /home in my / part on
> > > the IBM drive. Is there a way to change things so that
> > the original
> > > preserved /home partition on the IBM HDD will be used
> > instead of the
> > > one in / part?
> >
> > You can mount the preserved /home partition at /home of the
> > new HD. Then
> > you can't access the files in the new /home any longer
> > but I suppose that
> > is no real problem.
>
> Thanks Nils. That sounds simple enough that I probably should
> have thought of it myself but didn't. Just to be sure I do
> understand let me recap:
>
> sudo mount -t ext3 /dev/sdb3 /home
>
> where ext3 is the formatted fs and /dev/sdb3 is the /home partition.

Yes, that's it - you could even leave away the "-t ext3" because mount is 
intelligent enough to determine that on its own.

> I understand that once I do this, I wont be able to use the /home
> dir in my / partition on /dev/sdb1(swap is /dev/sdb2). If the above
> is true, I have only one question:
> If for some reason the /home partition, /dev/sdb3, is corrupted all I
> have to do is to unmount /dev/sdb3 and upon rebooting I'll be using the
> /home dir in /dev/sdb1???  Does anything have to be put in fstab or is
> that done automagically with the mount command?

It will only be automatic if you have an entry in your fstab - something 
like this:

UUID=c1aa6372-bf97-4269-b6ae-0f2de85b0a52 /home ext3 defaults 0 2

And don't forget to replace the UUID with the one from your partition - I 
won't give you my disk from which I stole the fstab entry.

> Well, that's 2 
> questions actually-:))

I think you mean 4 - there are 3 '?' after the /dev/sdb1 :))


Nils




More information about the ubuntu-users mailing list