Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-17-2007, 08:53 PM   #1
Registered: Apr 2007
Location: Utah
Distribution: BodhiLinux
Posts: 205

Rep: Reputation: 30
will this command mount my old "/home" for a new distro installed?

I was looking through these instructions, seeing if I understand them.

I already have a separate home directory that I created when installing my first Linux distro. What I would like to accomplish is use that same partition as my home for the new installation.

Will these instructions work for that, or is there a better way?

There is not enough data in the home directory of the new install to care about, but I would want to preserve what I have in the other home directory.

Thanks for any help.
Old 06-17-2007, 09:45 PM   #2
Registered: Nov 2003
Location: Texas, USA
Distribution: Ubuntu 7.04
Posts: 44

Rep: Reputation: 15
If you already have a separate partition for home then
all that should not be necessary.

All you need to do is mount that other partition on /home.

mount -t ext3 /dev/sda3 /home
substitute your own filesystem and disk device

that would mount the device as your /home partition temporarily

an edit to /etc/fstab would make it permanent
Old 06-18-2007, 04:15 AM   #3
Junior Hacker
Senior Member
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
This is how I did it:
1: #mkdir /mnt/newhome
2: #fdisk -l   <----to find device name of /home partition
3: #mount -t ext3 /dev/sdb3 /mnt/newhome  <-----change /dev/sdb3 to match your /home partition from the old installation, also change file system type from ext3 to the type the partition has if applicable.
4: #cd /home
5: #cp -ax * /mnt/newhome  <----this copies everything in old home to new home partition including links. Make sure not to have same user name as existing names in the home partition
6: #cd /
7: #rm -fr /home
8: #umount /mnt/newhome
9: #mv /mnt/newhome /home
10: #vim /etc/fstab   <---this uses vim editor, use the editor you are comfortable with and substitute it with the word vim
11: /dev/hdb3 /home ext3 defaults 1 2  <----this is the line to put in /etc/fstab, change /dev/hdb3 same as above
12: re-boot
Which is basically the same except a couple things are opposite but end up the same.

Last edited by Junior Hacker; 06-18-2007 at 04:35 AM.
Old 06-30-2007, 07:38 PM   #4
Registered: Apr 2007
Location: Utah
Distribution: BodhiLinux
Posts: 205

Original Poster
Rep: Reputation: 30
hosed most of my LinuxMint installation

Nothing ventured nothing gained.

Managed to hose most of my data trying to follow instructions above.

I got to step 7. When I used the command, I got the message:
can not remove directory, device or resource busy.

From that point on I was out of luck. By that time I could not use anything in LinuxMint except the one terminal I had open. I tried mounting my partition, a few thing like that, but all to no avail.

I wondered about starting up in safe mode, and continuing command from there. I could not even turn the PC off, I had to unplug it. Then started up LM again, only to find that I had lost all my application data. LM started up with my user name and password, and I still have my directory with Ubuntu and SOME of LM data, but all mail, all preferences of any sort were gone.

Nothing critical, but it will take some time to get back where I was again.

I will eventually have to try this again. Well, I guess I should try it first, before I do anything else, before I have anything to lose again.

Any suggestions from here? Maybe I should make a new post to try over again?

Old 07-01-2007, 02:00 PM   #5
Registered: Apr 2007
Location: Utah
Distribution: BodhiLinux
Posts: 205

Original Poster
Rep: Reputation: 30

After another crash will trying to mount ny old /home, I tried a third time. Remember I got part way through the instructions from junior hacker the time before last.

This time I used morphodone's command to mount, then used gedit to mount as junior hacker described. Everything is back! I am extremely happy.

So I guess I got everything copied properly thanks to jh, then somehow when I mounted all came out well.

I'm too new to understand it all, but I am back in business without having to reinstall and set up software.

I guess sometimes with enough help here I can get lucky

Thanks for the help.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Using external file devices in Linux: Climbing the "mount" command LXer Syndicated Linux News 0 04-02-2007 12:16 AM
"cp -p" fails with "cp: setting permissions for `/home/svbld/t': Invalid argument" mkhesin Red Hat 1 02-28-2007 12:57 AM
Problem with command "man" on a new installed kernel 2.6.9 Morz Slackware 2 01-16-2005 02:45 AM
At startup, Fedora won't mount /home ("label in use") Kropotkin Linux - Newbie 3 11-12-2004 11:25 AM
Samba 3.0.0 installed on RH WS3, but "net join" command not found chloevu Linux - Networking 0 07-13-2004 03:20 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:47 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration