You are not logged in.

#1 2022-03-01 11:52

pametnix
Member
Registered: 2022-03-01
Posts: 9

How to access home after OS installation

Hi,

I had LMDE4 installed on one partition and home on another. Since I like Q4OS Trinity, I installed it over LMDE4 but used same home. The idea was to create the same user with same password and then to access home as with LMDE4. However, I cannot access files in home, I do not even see them. There is Access-Your-Private-Data.desktop, but it does not work - it has no type. I have tried through terminal the command from the README.txt file, but it prompts that such command does not exist. I hope the files are there. I can see that home partition has the files (20GB of them), but I do not know how to access them.

Thanks

Offline

#2 2022-03-02 07:42

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,300

Re: How to access home after OS installation

I think that during the install you used the Manual Partitioning option in the installer. You probably told it to format sda1 and mount as root / partition and ticked the 'boot' box. Not wanting to affect your old /home it is most likely that you just didn't touch it at all - presumably /dev/sda5 or similar - and then proceeded with the install. OR, you make have selected it, said 'Do not format' but then did not select a mount point from the drop down list.

Either way the result is that you have a new /home in the same ptn as the OS, your old files are still there on the other ptn and you cannot access them.

It is possible to get round this by identifying the partition UID for the old home and then editing fstab to reflect that. It depends on how confident you are with linux to do that.

The alternative would be to re-install, make sure you check 'Do not format' for the real old home ptn and check the list in the drop down 'Mount Point' box underneath to mount sda5 or whatever it shows as /home in the installer.

I have reinstalled countless times with this process and it does work as long as you are careful.

If it helps I put a short vid of that part of the install here http://u.pc.cd/mqJ - that's on pCloud. The full length URL is rather long but I will provide if you want.

Prior to this, consider that you can boot off the live media and then access the files in your old /home via My Computer>Storage Media and copy off to a backup if you don't have one.

Also be aware that Q4OS uses a slightly different structure for config file folders so applications installed in LMDE may not recognise a config folder in Q4OS until it is moved to the relevant config location which is ~/.configtde.

Last edited by bin (2022-03-02 08:40)

Offline

#3 2022-03-02 14:12

Midas
Member
Registered: 2017-12-15
Posts: 168

Re: How to access home after OS installation

/OT

Wow! Pretty detailed write up on this particular problem -- I wish answers to my queries would be as information rich and straightforward...

While it isn't my problem ATM, I had to express my appreciation of your continued knowledge sharing with the community here. Thank you! cool

Offline

#4 2022-03-04 12:07

pametnix
Member
Registered: 2022-03-01
Posts: 9

Re: How to access home after OS installation

bin wrote:

I think that during the install you used the Manual Partitioning option in the installer. You probably told it to format sda1 and mount as root / partition and ticked the 'boot' box.

I did exactly that.

bin wrote:

Not wanting to affect your old /home it is most likely that you just didn't touch it at all - presumably /dev/sda5 or similar - and then proceeded with the install. OR, you make have selected it, said 'Do not format' but then did not select a mount point from the drop down list. If it helps I put a short vid of that part of the install here http://u.pc.cd/mqJ - that's on pCloud. The full length URL is rather long but I will provide if you want. The alternative would be to re-install, make sure you check 'Do not format' for the real old home ptn and check the list in the drop down 'Mount Point' box underneath to mount sda5 or whatever it shows as /home in the installer.

I really did like you in the video. I did not format old home, and did select mount point /home. Just to be sure, I again installed Q4OS, this time Basic variant, my files are there, but I can't access them.

bin wrote:

Prior to this, consider that you can boot off the live media and then access the files in your old /home via My Computer>Storage Media and copy off to a backup if you don't have one.

Do you mean after I installed the Q4OS? Because I can't access files in my old home just through Live (before or after installation). I mean, I don't even see anywhere those files when I go to Storage Media. There is a home and inside three folders lost+found, pametnix, and timeshift. Those old files weren't in public folder, but video, documents, etc.

bin wrote:

Either way the result is that you have a new /home in the same ptn as the OS, your old files are still there on the other ptn and you cannot access them.

No, /home is not in the same path as OS, but I cannot access old files. User and password are the same.

bin wrote:

I have reinstalled countless times with this process and it does work as long as you are careful.

I believe you  and I believe that it works, that is why I tried to do it.

bin wrote:

Also be aware that Q4OS uses a slightly different structure for config file folders so applications installed in LMDE may not recognise a config folder in Q4OS until it is moved to the relevant config location which is ~/.configtde.

I intend to install applications again, because most of them are portable, but I don't understand what I have to move to ~/.configtde or where to find it.

bin wrote:

It is possible to get round this by identifying the partition UID for the old home and then editing fstab to reflect that. It depends on how confident you are with linux to do that.

I could try it, if there is step by step instructions.

Anyhow, it was easy switching from Windows to Linux and then you see all your files in the NTFS partitions. Now, when I had Q4OS Desktop and switched to Basic, what was in public and downloads folder I see. I just want to access to those old files. I thought that they are hidden. I do not know how to use Access-Your-Private-Data.desktop, maybe the files are there.

If I have to go through terminal to unlock something, it's not a problem. If there is some application that can show all partition content independently of the OS, also great.

Thanks for the patience and help.

Offline

#5 2022-03-04 13:03

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,300

Re: How to access home after OS installation

OK - lets see what you have got there.

Open konsole

sudo fdisk -l

  that's a lower case ell as in list - not number 1

This is what mine looks like.
Device     Boot    Start      End  Sectors  Size Id Type
/dev/sda1  *        2048 24426495 24424448 11.6G 83 Linux
/dev/sda2       24426496 31578111  7151616  3.4G  5 Extended
/dev/sda5       24428544 31578111  7149568  3.4G 83 Linux
and I guess is what yours should be like too.

Once we know the partition number of your old /home it can be mounted.

Open konqueror
Press f9
Click View>Show Hidden
Click Settings>Save View Profile "File Management">Save
That will just retain those settings.
You can see the various hidden folders which you may need - once we've found where your stuff is.

Because I can't access files in my old home just through Live (before or after installation). I mean, I don't even see anywhere those files when I go to Storage Media. There is a home and inside three folders lost+found, pametnix, and timeshift. Those old files weren't in public folder, but video, documents, etc.

Given what you say here your stuff should have been in 'pametnix'. I suggest you reboot with live and drill down a bit further. I'm beginning to wonder if what you've actually got is your old stuff nested in the new home.

The structure is normally:-
/home/username/Desktop, Documents,Downloads, Music, Public, Templates, Videos

I wonder if you've got
/home/username/Desktop, Documents,Downloads, Music, Public, Templates, Videos, pametnix (which contains your stuff)
Just a thought.

Offline

#6 2022-03-04 13:45

pametnix
Member
Registered: 2022-03-01
Posts: 9

Re: How to access home after OS installation

Ok, here it is:

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1            2048  24578047  24576000  11.7G 82 Linux swap / Solaris
/dev/sda2  *     24578048 229378047 204800000  97.7G 83 Linux
/dev/sda3       229378048 976773119 747395072 356.4G 83 Linux

I also did sudo blkid:
/dev/sda1: UUID="844d7bfb-848a-48cb-982d-d15e6302a373" TYPE="swap" PARTUUID="6fe2e2a9-01"
/dev/sda2: UUID="43bf62b9-cf9d-4d89-9cda-41256c14d01a" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="6fe2e2a9-02"
/dev/sda3: LABEL="home" UUID="9d3f65aa-6373-4c3a-947c-14d73d57a686" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="6fe2e2a9-03"

bin wrote:

The structure is normally:-
/home/username/Desktop, Documents,Downloads, Music, Public, Templates, Videos

It is like this.

I will try to drill down in Live, but there isn't anything, just empty folders. I did try hidden files.

Offline

#7 2022-03-04 14:44

bin
Member
From: U.K.
Registered: 2016-01-28
Posts: 1,300

Re: How to access home after OS installation

OK - so, on your installed system open My Computer>Storage Media

You should see 2 icons - sda2 and sda3. Both should have a little green dot underneath and a green and red vertical line.
That indicates they are mounted.
Next open konsole and type df
That will show - amongst other things sda2 and sda3 Used and Available
I would expect sda2 to be 3 - 6 gb used depending on what's installed
sda3 will depend on how much data you hope is on there.

If sda3 shows the amount of data you expect to be used then open Krusader from Programs>Accessories>System and use Tools>Search for a file you know should be there.
That will help locate your stuff.

Offline

#8 2022-03-07 10:54

pametnix
Member
Registered: 2022-03-01
Posts: 9

Re: How to access home after OS installation

Now, this was a very interesting experience.

I have managed to get my data, but it was a long and winding road.

bin wrote:

open Krusader from Programs>Accessories>System and use Tools>Search for a file you know should be there.

This did nothing for me, so I thought that maybe my data is encrypted, thus invisible to search. I know that Linux Mint provides you with an option to encrypt your home folder during its installation, but I really cannot remember did I choose that option - I think not. Yet, at my /home I had under hidden files and folders system:/media/sda3/.ecryptfs/pametnix. After reading a little bit, I thought that my data was under system:/media/sda3/.ecryptfs/pametnix/.Private folder. So, I have tried necessary terminal commands, and after few attempts I finally got access. Here are all the commands:

note: pametnix is my username, so just use yours instead

1. (this installs utils for decryption)
sudo apt-get install ecryptfs-utils

2. (this gets your mount passphrase which is different from login password)
/home/.ecryptfs/pametnix/.ecryptfs$ ecryptfs-unwrap-passphrase wrapped-passphrase
Passphrase:login password
(the result)
mount passphrase of 32 characters

3. (to get UUID of home partition)
sudo blkid

4. (this step was necessary for me, because step 6 failed with an error: mount(2) system call failed: No such file or directory)
(find the Filename Encryption Key)
sudo ecryptfs-add-passphrase --fnek
Passphrase:mount passphrase from step 2
Inserted auth tok with sig [d6ea782d173842c3] into the user session keyring
(this value in the second square brackets will be used in the following steps)
Inserted auth tok with sig [f61cd864bdb6f693] into the user session keyring

5. (mount your encrypted drive)
sudo mount -t ecryptfs /media/9d3f65aa-6373-4c3a-947c-14d73d57a686/home/.ecryptfs/pametnix/.Private /media/
Select key type to use for newly created files:
1) tspi
2) passphrase
Selection: 2
Passphrase:
Select cipher:
1) aes: blocksize = 16; min keysize = 16; max keysize = 32
2) blowfish: blocksize = 8; min keysize = 16; max keysize = 56
3) des3_ede: blocksize = 8; min keysize = 24; max keysize = 24
4) twofish: blocksize = 16; min keysize = 16; max keysize = 32
5) cast6: blocksize = 16; min keysize = 16; max keysize = 32
6) cast5: blocksize = 8; min keysize = 5; max keysize = 16
Selection [aes]: 1
Select key bytes:
1) 16
2) 32
3) 24
Selection [16]: 1
Enable plaintext passthrough (y/n) [n]: n
Enable filename encryption (y/n) [n]: y
(value from step 4)
Filename Encryption Key (FNEK) Signature [d6ea782d173842c3]: f61cd864bdb6f693
Attempting to mount with the following options:
  ecryptfs_unlink_sigs
  ecryptfs_fnek_sig=f61cd864bdb6f693
  ecryptfs_key_bytes=16
  ecryptfs_cipher=aes
  ecryptfs_sig=d6ea782d173842c3
WARNING: Based on the contents of [/root/.ecryptfs/sig-cache.txt],
it looks like you have never mounted with this key
before. This could mean that you have typed your
passphrase wrong.

Would you like to proceed with the mount (yes/no)? : y
Would you like to proceed with the mount (yes/no)? : yes
Would you like to append sig [d6ea782d173842c3] to
[/root/.ecryptfs/sig-cache.txt]
in order to avoid this warning in the future (yes/no)? : yes
Successfully appended new sig to user sig cache file
Error mounting eCryptfs: [-2] No such file or directory
Check your system logs; visit <http://ecryptfs.org/support.html>

6. (decrypt these home directories)
sudo ecryptfs-recover-private /media/UUID/home/.ecryptfs/USERNAME/.Private
or in my case  sudo ecryptfs-recover-private /media/9d3f65aa-6373-4c3a-947c-14d73d57a686/home/.ecryptfs/pametnix/.Private
INFO: Searching for encrypted private directories (this might take a while)...
INFO: Found [/home/.ecryptfs/pametnix/.Private].
Try to recover this directory? [Y/n]: Y
INFO: Found your wrapped-passphrase
Do you know your LOGIN passphrase? [Y/n] login password
INFO: To recover this directory, you MUST have your original MOUNT passphrase.
INFO: When you first setup your encrypted private directory, you were told to record
INFO: your MOUNT passphrase.
INFO: It should be 32 characters long, consisting of [0-9] and [a-f].

Enter your MOUNT passphrase: mount passphrase from step 2
INFO: Success!  Private data mounted at [/tmp/ecryptfs.UpjDrJPg].

Now, at the root path at /tmp/ecryptfs.UpjDrJPg I could finally see my data.

So that was it. I really do not know how it got so complicted, I guess, in the future, I shall put all my files under public.

Thanks for the help and patience.

Offline

Board footer

Powered by FluxBB