SOLVED Where are /root files saved?

TempleHasFallen

Dabbler
Joined
Jan 27, 2022
Messages
34
Hello All,

I had to recently re-install onto new boot devices.
In the process, I obviously lost all data that was located in the /root directory, mainly scripts.

The question is, where is the data that is namely in /root stored when the system is not booted? Is it on the boot-pool? Is it in the system dataset?
If it is in the system dataset, in the event of a new installation with config restore, does it get overwritten?

I still have access to the degraded old boot device, which looks like this, but I cannot for the life of me figure out where the data should be located:
image.png



Any suggestions?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Try e.g.:
Code:
mkdir /mnt/foo
mount -t zfs freenas-boot/ROOT/22.12.0 /mnt/foo
cd /mnt/foo
ls -l
 

TempleHasFallen

Dabbler
Joined
Jan 27, 2022
Messages
34
Try e.g.:
Code:
mkdir /mnt/foo
mount -t zfs freenas-boot/ROOT/22.12.0 /mnt/foo
cd /mnt/foo
ls -l
Thank you, I've done this before and did now just again.

The directory is just empty/defaults sadly:

1689578359408.png


Timestamps however match, I can confirm last ssh/term access to that system with that boot-drive was on Apr 10.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
The directory is to my knowledge erased with every update. So you will probably need to try all previous boot environments in turn until you find the one that contains whatever you are looking for. To continue:
Code:
cd
umount /mnt/foo
mount -t zfs freenas-boot/ROOT/<bootenv> /mnt/foo
cd /mnt/foo
ls -l


etc.
 

TempleHasFallen

Dabbler
Joined
Jan 27, 2022
Messages
34
The directory is to my knowledge erased with every update. So you will probably need to try all previous boot environments in turn until you find the one that contains whatever you are looking for. To continue:
Code:
cd
umount /mnt/foo
mount -t zfs freenas-boot/ROOT/<bootenv> /mnt/foo
cd /mnt/foo
ls -l


etc.

Indeed, all the files were contained in a previous version (version in which they were created). Thank you very much for your assistance :smile:
:smile:
 
Top