openSUSE Forums > Archives > SF Archives > ARCHIVES - Tips, Tricks & Tweaks » Copy Over/make A New /home Partition

Go Back   openSUSE Forums > Archives > SF Archives > ARCHIVES - Tips, Tricks & Tweaks
Forums FAQ Members List Search Today's Posts Mark Forums Read


ARCHIVES - Tips, Tricks & Tweaks Tips and Solutions for SUSE Linux
(Please do not post questions here)

 
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-Mar-2008, 12:45
Snakedriver
Guest
 
Posts: n/a
Default

Let's say you have a new HDD; the one you installed on is about to fail; or you screwed up the installed version (as I did), there may come a time when you want to make a duplicate of your /home partition -- retaining all the file & system attributes.
In my case, I tried Portable Suse & did a Sled kernel update & it's all acting rather strange.

Here's how:

Reference:
http://www.redhat.com/archives/fedora-list...r/msg00774.html
http://www-128.ibm.com/developerworks/linu...l-partplan.html

Let's say I have my running 10.3 install with root "/" on /dev/sda1 and /home on /dev/sda2 to start.

With a new drive (sic) & using Parted Magic, I created & formatted (with ext3) /dev/sdb1 for "/" & /dev/sdb2 for my new /home <--(is where I want to put my 10.3 running /home). The partition sizes were the same as
the original partitions.

In my running 10.3, I created a working directory "test" in /mnt
in a terminal as root
Code:
mkdir /mnt/test
in the next step, we are going to mount /dev/sdb2 there so 10.3 can see it and do it in a reboot to runlevel 1.

So now, we want to reboot the running 10.3 into runlevel "1" which is command line & copy over the "contents" of the running /home (not /home itself).

boot your 10.3 install & at the bootsplash, type "1" <--boots 10.3 to runlevel 1 <--We don't want anything like a daemon to mess this up.

login as root

type:
Code:
mount /dev/sdb2 /mnt/test
then to be safe
Code:
cd /home
Now copy over 10.3's /home to /mnt/test (which is our /dev/sdb2)
Code:
cp -ax /home/* /mnt/test
In a terminal, do "man cp" to see what "-a" & "-x" do for you.

wait until it's done which may take awhile


unmount /mnt/test
Code:
umount /mnt/test
"reboot"

Now you should be able to install 10.3 to /dev/sdb1 (don't format /dev/sdb2) and have a working copy of your old /home partition.
Edit: During the install, use the custom partitioner & assign /dev/sdb2 the mount point "/home". One of the last config windows will ask if this is to be the /home to be utilized; answer "yes".

You may have to rename /dev/sdb1 & /dev/sdb2 to match your own partition scheme; but, the scheme should work.

Worked for me
Many things like Kmail, with all my mail intact , work as before out of the box;
a few apps like Virtualbox need to be installed, but, once installed, I still have my winxp setup;
fewer desktop apps like Gantt Project had to have the link-to-application redone.

Have fun...
  #2 (permalink)  
Old 07-Mar-2008, 21:28
AndrewTheArt
Guest
 
Posts: n/a
Default

Definitely useful, perhaps be a little more detailed in your explanation. Please do so, actually, because I have a feeling I'm going to need to do this in the future.
(You explain everything but not thoroughly enough for my tastes)
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2