LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 10-16-2011, 05:06 AM   #1
davidehm
LQ Newbie
 
Registered: Feb 2009
Location: Granada (Spain)
Posts: 18

Rep: Reputation: 0
recover my /home


Hello:

Well, I have a problem again.

I installed a new graphic card. After a hundreds or problems, finally I reinstalled my Mint. (All this troubles due to my mononeurone-brain)

I was 3 partitions in my HD.
/dev/sda1 for /
swap
/dev/sda4 for /home

But, when I was reinstalling, I forgot to choose /dev/sda4 for /home, and then, Mint installed all the system under /dev/sda1, including /home

Now, I have a /media/b616ec32-894e-442e-adee-ae0b07eb0422/ where there are my old /home

Then, how can I get that Mint uses /media/b616ec32-894e-442e-adee-ae0b07eb0422 like my /home ?

Well, I hope to explain well. My english and linux are not very well.

Thank you!
 
Old 10-16-2011, 05:14 AM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
You should just need to delete everything in the /home folder under /dev/sda1, and then edit /etc/fstab so that it has a line in it like this:

Code:
/dev/sda4 /home ext3 defaults 0 1
Changing ext3 to ext4 if appropriate this will then mount /dev/sda4 as /home for you automatically.

Hope this helps,
 
Old 10-16-2011, 05:14 AM   #3
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 190Reputation: 190
Code:
# vi /etc/passwd
to change the location of a users /home directory.

Or you can create an entry in fstab, and mount it to /home.
 
Old 10-16-2011, 05:18 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,533

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
Presuming you chose the same userid, and that Mint used the same gid/uid (both likely) you should be simply able to mount the partition at /home.
 
Old 10-16-2011, 05:32 AM   #5
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 190Reputation: 190
If not
Code:
sudo chown -R /home/username username:username
Will make easy work of that little hurdle..
 
Old 10-16-2011, 05:48 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,533

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
And if the gid:uid are different ?.
 
Old 10-16-2011, 06:09 AM   #7
davidehm
LQ Newbie
 
Registered: Feb 2009
Location: Granada (Spain)
Posts: 18

Original Poster
Rep: Reputation: 0
Thank you, but I still can't solved it.
If I type manually

mount /dev/sda4 /home

it works, but no automatically, when I restart the PC

Also

If I type mount, i get:
Quote:
/dev/sda4 on /media/b616ec32-894e-442e-adee-ae0b07eb0422 type ext4 (rw,nosuid,nodev,uhelper=udisks)
If I read mtab:

Quote:
/dev/sda4 /media/b616ec32-894e-442e-adee-ae0b07eb0422 ext4 rw,nosuid,nodev,uhelper=udisks 0 0
and if I read fstab:
Quote:
# /dev/sda4/ /home ext4 defaults 0 1
This entry has beed writed by me following yours advices.

Then. It works if I mount manually the partition, but no when I restart.
On the other hand, I have changed the owner yet.(I didn't know) Very thank you! :-)

Last edited by davidehm; 10-16-2011 at 06:10 AM.
 
Old 10-16-2011, 06:10 AM   #8
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 190Reputation: 190
Quote:
And if the gid:uid are different ?.

remove and recreate the user specifying the old uid/gid?

or with usermod, groupmod, and/or editing /etc/password and /etc/group?

Last edited by fukawi1; 10-16-2011 at 06:11 AM. Reason: added quote
 
Old 10-16-2011, 07:54 AM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,133
Blog Entries: 2

Rep: Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836Reputation: 4836
Code:
# /dev/sda4/ /home ext4 defaults 0 1
Remove the # in front of the line and try it again, the # is a comment sign.
 
Old 10-16-2011, 03:26 PM   #10
davidehm
LQ Newbie
 
Registered: Feb 2009
Location: Granada (Spain)
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TobiSGD View Post
Code:
# /dev/sda4/ /home ext4 defaults 0 1
Remove the # in front of the line and try it again, the # is a comment sign.
I feel really stupid, actually. I am more newbie I though :-)

Very thank you to everyone!
It works now ;-)
 
  


Reply


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
How to recover my encrypted Home directory pazzport Linux - Desktop 7 05-14-2012 11:30 PM
How to recover my home directory which I accidentally removed using rm -rf command? shikshit.hep Linux - Software 6 10-05-2010 03:12 AM
how to recover home data, got deleted with the profile manishgarg21 Linux - Newbie 5 05-28-2008 07:16 AM
recover home directory after userdel mr_sarge Linux - General 9 11-29-2007 08:43 AM
recover user and home dir powadha Linux - General 5 04-16-2004 09:08 AM


All times are GMT -5. The time now is 09:27 PM.

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