LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 07-28-2014, 08:22 AM   #1
ravisingh1
Member
 
Registered: Apr 2013
Location: Mumbai
Distribution: Ubuntu13.10
Posts: 291

Rep: Reputation: Disabled
Not formatting a partition while installing Ubuntu but still data getting lost from that partition!


I'd Ubuntu 13.10 on my system with separate /home partition for my data. Now I reinstalled the same O.S. In the option while installing, I selected "something else" & there specified to format all partitions (/, /var, /tmp, /boot) except /home. Now when my system was installed, I found the data was lost on the home partition. I wondered as I had unchecked for formatting that partition while installation.

To test it again, I created a file in "/home". Then using my bootable usb flash drive, I reinstalled the O.S. This time also I unchecked "/home" for formatting. But still afterwards I found the file I created on the home partition was lost.

Where am I thinking wrong? I thought it was a good method of installation to preserve home data but it's not working!!

Last edited by ravisingh1; 07-28-2014 at 08:24 AM.
 
Old 07-28-2014, 08:39 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
That should work as you expected. I did likewise when I had Ubuntu systems - I recently did same for Mint, and it worked fine.
But when messing with your data, you must have backups - especially with installers, which always seem to have problems.
 
Old 07-28-2014, 09:19 AM   #3
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Did you verify that your separate partition was actually getting mounted on /home?
 
Old 07-28-2014, 10:35 AM   #4
ravisingh1
Member
 
Registered: Apr 2013
Location: Mumbai
Distribution: Ubuntu13.10
Posts: 291

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
Did you verify that your separate partition was actually getting mounted on /home?
Yes I got clue from your reply. The problem is something else. Yes it's mounting on /home, that's no problem.

See what has happened! In the 1st system (Ubuntu 13.10) I'd logged in with the name of "ravi". I'd much data in the subdirectories of /home/ravi.
Then I upgraded the system to 14.04 which didn't work, so I installed back the earlier O.S. (i.e. 13.10.) by keeping the same /home partition. This time while installing I changed the login name as "bholu". Now after getting installed & logging in as "bholu", I checked my home directory & subdirectories but didn't find any data.
Then to further test, I created a file in home directory & reinstalled the O.S. with the same /home. Now this time I changed the login name to "bholua". Again now I didn't find the file I created earlier. So, I'd that doubt that the data are getting lost.

Now after reading your reply, it striked my mind & I checked my /home folder. There all the 3 names were present.
Code:
bholua@bholua-Aspire-5315:/home$ ls
bholu  bholua  lost+found  ravi
bholua@bholua-Aspire-5315:/home$
Now when I move to one username "ravi" , I see the below contents there.
Code:
bholua@bholua-Aspire-5315:/home/ravi$ ll
total 12
dr-x------ 3 bholua bholua 4096 Jun 25 02:25 ./
drwxr-xr-x 7 root   root   4096 Jul 27 23:39 ../
lrwxrwxrwx 1 bholua bholua   56 Jun 25 02:04 Access-Your-Private-Data.desktop -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.desktop*
drwx------ 3 bholua bholua 4096 Jun 25 02:25 .cache/
lrwxrwxrwx 1 bholua bholua   30 Jun 25 02:04 .ecryptfs -> /home/.ecryptfs/ravi/.ecryptfs/
lrwxrwxrwx 1 bholua bholua   29 Jun 25 02:04 .Private -> /home/.ecryptfs/ravi/.Private/
lrwxrwxrwx 1 bholua bholua   52 Jun 25 02:04 README.txt -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.txt
Now see the content of the other username "bholu". It's the same here.
Code:
bholua@bholua-Aspire-5315:/home/ravi$ ll /home/bholu
total 12
dr-x------ 3 bholua bholua 4096 Jul 28 03:16 ./
drwxr-xr-x 7 root   root   4096 Jul 27 23:39 ../
lrwxrwxrwx 1 bholua bholua   56 Jul 28 03:13 Access-Your-Private-Data.desktop -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.desktop*
drwx------ 3 bholua bholua 4096 Jul 28 03:16 .cache/
lrwxrwxrwx 1 bholua bholua   31 Jul 28 03:13 .ecryptfs -> /home/.ecryptfs/bholu/.ecryptfs/
lrwxrwxrwx 1 bholua bholua   30 Jul 28 03:13 .Private -> /home/.ecryptfs/bholu/.Private/
lrwxrwxrwx 1 bholua bholua   52 Jul 28 03:13 README.txt -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.txt
Now the point is how to access those data created under username of "ravi" & "bholu"! It seems I'd earlier enabled encryption of my home directory.
 
Old 07-28-2014, 09:19 PM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Did you set it up so that the home directory is unlocked automatically when you log in? If so, then the key is derived from your password. I don't know whether you could use that same password to directly unlock the directories with ecryptfs. Probably not -- the password may just unlock a key ring somewhere, but that's the easiest thing to try.

The problem with trying to put things back the way they were is that you now have 3 different home directories all with the same numeric UID (probably 1000). What you would need to do is add those user old names to the system, but manually specifying the numeric UID and without creating a home directory. Use the same password that those users had before. Then you might be able to log in with those user names and access the home directories.

I'm not familiar enough with the Ubuntu tools to give exact instructions on how to do all that.
 
Old 07-29-2014, 01:44 AM   #6
ravisingh1
Member
 
Registered: Apr 2013
Location: Mumbai
Distribution: Ubuntu13.10
Posts: 291

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
I'm not familiar enough with the Ubuntu tools to give exact instructions on how to do all that.
That's no prob. I know how to do that. I will check & update. Thanks!
 
  


Reply

Tags
data-loss, system-installation



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
Lost fedora partition when installing ubuntu? $u$hil_k$ Linux - Newbie 14 03-30-2012 09:05 AM
Data recovery after formatting ext3 partition Jerblue Linux - Newbie 6 07-14-2009 12:53 PM
HDD partition lost. xandros DVD + me = lost data lein Linux - General 18 05-22-2007 05:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 11:34 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
Open Source Consulting | Domain Registration