Installed 15.1 from net on a machine in attempt to clear a printer problem. User didn’t recall password so Installed again and created user again with new p/w. Did not realize that old files for that user would be deleted. The home partition was not formatted.
Have scanned the unused portions of the home partition with photorec and searched the recovered files with grep–didn’t find the missing files.
Any hope? Suggestion?
We may need more details about what you actually did.
Is /home on a separate partition also on the new install? And is that the same partition that was mounted as /home on the previous install? Are you sure that you didn’t format that old /home partition?
Posting here the result of:
lsblk
may help (please include leading prompt, command, result, trailing prompt between CODE tags, the # button above the editing line).
If you actually reused the old /home partition and you re-created a new user with the old username, the installer should have found a /home/ folder and should have asked if you wanted to reuse that or not.
Did that happen? What did you answer?
Posting here the result of:
ls -l /home/
may help find out what you actually did.
If the files are still there, they should still be in a folder named /home/<oldusername> if the /home partition was actually not formatted as you wrote.
I did not intentionally format the /home partition. It’s worked many times in the past as I upgraded openSuse since 10.1.
dee@localhost:~> lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 1.5G 0 part
├─sda2 8:2 0 240G 0 part
├─sda3 8:3 0 11G 0 part
├─sda4 8:4 0 512B 0 part
├─sda5 8:5 0 50G 0 part /boot/grub2/i386-pc
├─sda6 8:6 0 6G 0 part [SWAP]
└─sda7 8:7 0 500G 0 part
sr0 11:0 1 125M 0 rom
What jumps out to me is that sda7 is not mounted at /home. Checking with GParted shows the same, and also that swap is not mounted. These reports on another machine show both /home and /swap are mounted. I’ve not seen this before.
When I created an account with the same user name I was not asked if I wanted to reuse existing one.
dee@localhost:~> ls -l /home
total 0
drwxr-xr-x 1 dee users 3718 Mar 8 11:12 dee
dee@localhost:~>
Please also show
cat /etc/fstab
The mount point for sda5 is also very suspicious, was sda5 intended as your / (root)?
And is this an MBR (legacy) install with sda4 being an “Extended” partition?
Something went wrong during the install and posting /etc/fstab (as already asked for) might help.
The good news is that likely your files are still sitting in sda7 but hidden from the system until that partition is correctly mounted.
In Dolphin, I opened the 50 GB partition that contains the OS. Surprise, therein I see a /home directory. It seems partition sda7 might not have been marked to mount at /home during the installation.
dee@localhost:~> cat /etc/fstab
UUID=599365a3-02cb-418d-83e2-db02ac0619ba / btrfs defaults 0 0
UUID=599365a3-02cb-418d-83e2-db02ac0619ba /var btrfs subvol=/@/var 0 0
UUID=599365a3-02cb-418d-83e2-db02ac0619ba /usr/local btrfs subvol=/@/usr/local 0 0
UUID=599365a3-02cb-418d-83e2-db02ac0619ba /tmp btrfs subvol=/@/tmp 0 0
UUID=599365a3-02cb-418d-83e2-db02ac0619ba /srv btrfs subvol=/@/srv 0 0
UUID=599365a3-02cb-418d-83e2-db02ac0619ba /root btrfs subvol=/@/root 0 0
UUID=599365a3-02cb-418d-83e2-db02ac0619ba /opt btrfs subvol=/@/opt 0 0
UUID=599365a3-02cb-418d-83e2-db02ac0619ba /home btrfs subvol=/@/home 0 0
UUID=599365a3-02cb-418d-83e2-db02ac0619ba /boot/grub2/x86_64-efi btrfs subvol=/@/boot/grub2/x86_64-efi 0 0
UUID=599365a3-02cb-418d-83e2-db02ac0619ba /boot/grub2/i386-pc btrfs subvol=/@/boot/grub2/i386-pc 0 0
UUID=deefe0ed-96e7-4c4b-bf2a-9154a975a6bd swap swap defaults 0 0
dee@localhost:~>
If I can lose everything associated with the new user account in the subvol /home, can I edit fstab to put sda7 on /home? Or do I have to do a fresh install? What about mounting the current subvol /home on a new directory someplace out of the way like /srv/newdee , to preserve its files? Might be easier to copy the current /home to /srv/newdee?
And would this failure to mount sda7 cause printing to fail? The inability to reach a printer is what started this process.
That looks like a “default” install when the installer is pointed to a single partition (like sda5).
It should be possible to edit the system config so that the old /home is recovered, but that is likely not as simple as mounting the current /home elsewhere, since that is now a btrfs subvolume with snapshots etc.
Not a regular btrfs user here, so I’ll let other more experienced members to comment on that.
Meanwhile you can still temporarily mount sda7 somewhere else and confirm that files are still sitting there.
In Dolphin scroll down to “Devices” and you should see a 500 GB device that can be mounted and inspected (but still not be used as /home).
AFAIK by default /home is not included in the snapshots. So, it should be possible to simply change the mountpoint, by adding a line to /etc/fstab mounting /dev/sda7 on /home.
Thank you all. Editing /etc/fstab to mount the sda7 partition at /home restored everything. I must not have checked that box to mount the partition when using the parted during install. My bacon is saved