DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 12th March 2022
hd77 hd77 is offline
Shell Scout
 
Join Date: Jan 2022
Posts: 102
Default openbsd encrypted data partition..lost?

Hi guys,

here after a long adventure under openbsd and a bios/efi update, I lost my grub2 windows/mint bootup utility. So I tried to reinstall, found back with refind the old grub and a linux not booting. So I tried to make it boot back by e2fsck -y /dev/all partitions. But in that bad mind I also did it on the openbsd area. And it killed a bit the system, for few seconds.

So I reinstalled openbsd, with the idea of not formatting the /home raid partition, created with a bioctl howto such as https://si3t.ch/Logiciel-libre/OpenB...frer-home.html

But it's very strange, at the end of the new installation, it was asking me the password, and recognized the right one : mean it was working..
but inside the /home directory, absolutely nothing, empty.. how could I get back my old data please?

I tried attempts with testdisk/photorec, but not with success..

I thank you vm
Reply With Quote
  #2   (View Single Post)  
Old 13th March 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

More information is needed about the environment
  1. Please post the output of $ df -h
  2. Please post the output of $ sysctl hw.disknames
  3. For each disk drive listed in the output of step 2, please post the output of # disklabel -p g disk
It is possible that you have overwritten your /home partition. Or it is possible you need only to provision it so it gets mounted. The information I am requesting will help make that determination.
Reply With Quote
  #3   (View Single Post)  
Old 13th March 2022
hd77 hd77 is offline
Shell Scout
 
Join Date: Jan 2022
Posts: 102
Default

Quote:
Originally Posted by jggimi View Post
More information is needed about the environment
  1. Please post the output of $ df -h
  2. Please post the output of $ sysctl hw.disknames
  3. For each disk drive listed in the output of step 2, please post the output of # disklabel -p g disk
It is possible that you have overwritten your /home partition. Or it is possible you need only to provision it so it gets mounted. The information I am requesting will help make that determination.

I thank you really for your reply
here are old logs found on teh forum, before reinstallation :
https://bsd-hardware.info/?probe=b77b926f9b
https://bsd-hardware.info/?probe=1e8904f4fc

https://www.3hg.fr/CHATONS/Pastebin/...J6papT5ZqvMska


for the others logs :
https://www.3hg.fr/CHATONS/Pastebin/...QHJcXzpdZG1DJk

https://www.3hg.fr/CHATONS/Pastebin/...M7meB9uSetNQ3F

https://www.3hg.fr/CHATONS/Pastebin/...q3jp9qMggekynT

https://www.3hg.fr/CHATONS/Pastebin/...U2k7zJYWnxwE3A

hw.disknames=sd0:1a911b225b394b33,cd0:,sd1:a26b20d a0c78dc72


thank you helping to recover my old data! vm
Reply With Quote
  #4   (View Single Post)  
Old 13th March 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

You have two drives, with these OpenBSD partitions and their approximate sizes: I have highlighted the partitions of interest.
  1. sd0a - root filesystem, "/" - 4GB
  2. sd0b - swap partition - 2GB
  3. sd0d - /usr filesystem - 18GB
  4. sd0e - softraid(4) backing store - 15GB
  5. sd1i - unmounted filesystem - 15GB
At this time, you do not have a /home filesystem mounted, but may have a usable filesystem in sd1i. If the sd1i partition is intended to be used for /home, first test to ensure you can successfully mount it: # mount /dev/sd1i /home and if successful, you can make this permanent by editing your /etc/fstab file, and adding the partition.

To edit /etc/fstab, use the fstab(5) man page. You can use either "/dev/sd1i" or "a26b20da0c78dc72.i" as the filesystem specification. The latter is preferred, as device numbers can sometimes change.
Reply With Quote
  #5   (View Single Post)  
Old 13th March 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

I neglected to note that the default mount options for /home are nodev and nosuid. Adjust the mount(8) command accordingly: # mount -o nodev,nosuid /dev/sd1i /home. See the mount(8) man page for more information.
Reply With Quote
  #6   (View Single Post)  
Old 14th March 2022
hd77 hd77 is offline
Shell Scout
 
Join Date: Jan 2022
Posts: 102
Default

Quote:
Originally Posted by jggimi View Post
You have two drives, with these OpenBSD partitions and their approximate sizes: I have highlighted the partitions of interest.
  1. sd0a - root filesystem, "/" - 4GB
  2. sd0b - swap partition - 2GB
  3. sd0d - /usr filesystem - 18GB
  4. sd0e - softraid(4) backing store - 15GB
  5. sd1i - unmounted filesystem - 15GB
At this time, you do not have a /home filesystem mounted, but may have a usable filesystem in sd1i. If the sd1i partition is intended to be used for /home, first test to ensure you can successfully mount it: # mount /dev/sd1i /home and if successful, you can make this permanent by editing your /etc/fstab file, and adding the partition.

To edit /etc/fstab, use the fstab(5) man page. You can use either "/dev/sd1i" or "a26b20da0c78dc72.i" as the filesystem specification. The latter is preferred, as device numbers can sometimes change.
Quote:
Originally Posted by jggimi View Post
I neglected to note that the default mount options for /home are nodev and nosuid. Adjust the mount(8) command accordingly: # mount -o nodev,nosuid /dev/sd1i /home. See the mount(8) man page for more information.


Hi, firstly I thank you vm for your answers
Secondly, I have few remarks whom makes me perplex regarding my situation :
a/ it's a bit strange that in my rclocal backup the duid of my old softraid partition (who is mbr, not gpt) is not the same that the one whom appeared in the new installation
b/ obviously by mounting back the encrypted partition of sd1/softraid, my data are not present, and disk looks totally empty (with few .hidden files)
c/ 053.a was I guess the old uid of my softraid partition. I dont remember the one of my sd0, but on the old rclocal I had for this computer, after reinstallation sd1/softraid have a dc72 duid. Does reinstalling affects duids even without formatting?
d/ does a standard insallation formats all openbsd space, even without marking a slice as a "/ mounted" point?
e/ the strange thing is taht I guess if sd0e was formatted, probably the softraid would be killed and disappear, with my password not working with bioctl? my bioctl works perfects but he sd1i shows a 2KB used space partition.. means empty
f/ could I recover it by using testdisk?

thank you one more time, hope I would be able to recover back my data..
Reply With Quote
  #7   (View Single Post)  
Old 14th March 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

Quote:
Originally Posted by harrollld View Post
a/ it's a bit strange that in my rclocal backup the duid of my old softraid partition (who is mbr, not gpt) is not the same that the one whom appeared in the new installation
DUIDs are replaced when new disklabels are installed, such as occurs with a fresh install. If you install onto sd0, you will replace any pre-existing disklabel. The same for any other disk where you create any new disklabel and OpenBSD partitions.
Quote:
b/ obviously by mounting back the encrypted partition of sd1/softraid, my data are not present, and disk looks totally empty (with few .hidden files)
From your brief description in this thread, I think you introduced an error when you reinstalled, and inadvertently caused your previous /home filesystem to have been reformatted.
Quote:
c/...Does reinstalling affects duids even without formatting?...d/ does a standard insallation formats all openbsd space, even without marking a slice as a "/ mounted" point?
Any OpenBSD filesystem you create during install will be formatted with newfs(8), whether or not you assign it to a mount point.
Quote:
e/ the strange thing is taht I guess if sd0e was formatted, probably the softraid would be killed and disappear, with my password not working with bioctl?
A RAID partition is not a filesystem, it is a backing storage location. No format operation occurs.
Quote:
f/ could I recover it by using testdisk?
You would have to experiment to determine what is possible. I don't know how much success you might have, as I have no experience with TestDisk.
Reply With Quote
  #8   (View Single Post)  
Old 14th March 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

I've tested TestDisk/PhotoRec. I could not recover anything after reformatting. I get the same negative results with the Sleuth Kit tools.
Reply With Quote
  #9   (View Single Post)  
Old 21st March 2022
hd77 hd77 is offline
Shell Scout
 
Join Date: Jan 2022
Posts: 102
Default

Quote:
Originally Posted by jggimi View Post
I've tested TestDisk/PhotoRec. I could not recover anything after reformatting. I get the same negative results with the Sleuth Kit tools.

thank you, I guessed it.. unfortunately I see no choice to get back my data. Just I dont use openbsd to see how recover data from formatted partitions under openbsd...
the rule number one is always to do not rewrite on it, so I don't until I find a solution..
Reply With Quote
Old 21st March 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

Once file system metadata is overwritten, there is no recovery of individual files. Individual blocks might be readable but there is no way to knit files back together.

Take backups.
Reply With Quote
Old 4th April 2022
hd77 hd77 is offline
Shell Scout
 
Join Date: Jan 2022
Posts: 102
Default

unfortunately, after weeks of thoughts plus discussion with various persons, I guess I will never find my data.
new lesson..
let's go ahead on a new side..
Reply With Quote
Reply


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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
iMac G3 - Lost access to CD and HD after OpenBSD installation mogue OpenBSD Installation and Upgrading 0 1st February 2019 04:59 AM
OpenBSD 6.4 lost X windows for user staus OpenBSD Installation and Upgrading 47 13th November 2018 11:11 AM
Help on getting WEP-Encrypted Network on OpenBSD chicago OpenBSD General 24 18th May 2011 05:15 AM
Xtracting Data after Fragmentation / Block Count / Partition Problems on Boot IronForge OpenBSD Installation and Upgrading 3 16th December 2010 01:09 AM
Tool for cracking encrypted session data J65nko News 0 9th June 2010 06:31 PM


All times are GMT. The time now is 05:37 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick