Mailing List Archive


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

Re: [tlug] SUSE wipeout! (Add /home partition in Ubuntu)



On Fri, Jun 17, 2011 at 11:08:07AM -0400, Romeo Theriault wrote:
> 2011/6/17 Raedwolf Summoner <rarooam@example.com>
> 
> >
> > I neglected to create a separate /home partition as I
> > have always done before and don't really want to
> > reinstall to do it. (I had one until openSUSE wiped out
> > all my data and partitioning setup.) I have an empty
> > partition on sda7 that I'd like to mount as /home. I
> > really thought I had done this during the install, but
> > it isn't mounted.
> >
> > I've been looking on the net and am very confused
> > about what I can and can't do here. How do I make
> > it become my /home partition instead of the /home in
> > the root partition? I can mount it with no problem,
> > but what I really want to do is make it recognized as
> > /home. Is that simple or something that if I screw up
> > the line in /etc/fstab will it keep me from being
> > able to log in? Would it be simpler to reinstall?
> >
> 
> You should simple be able to mount /dev/sda7 somewhere temporary, then rsync
> over your /home directory from the root partition into the sda7 filesystem.
> Then set it up in the fstab file like you mentioned. You shouldn't even need
> to reboot into it if you don't have any processes running under /home. 

Yes, I think it's this, taking /dev/sdb1 as encrypted partition:

# cryptsetup create sdb1crypt /dev/sdb1
# mkfs.ext4 /dev/mapper/sdb1crypt
# mount /dev/mapper/sdb1crypt /mnt/tmp
# rsync -arv /home/* /mnt/tmp/
# echo '/dev/mapper/sdb1crypt /home ext4 defaults 1 2' >>/etc/fstab
# echo 'sdb1crypt /dev/sdb1 none' >>/etc/crypttab
# mount /home

If all of this works, also after reboots, as an important last
step a backup should be created and the clear unencrypted data
on the / volume below /home should be removed.


Christian


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links