Hi all, I’m new here
first of all I’m Italian and I don’t know English very well, so I apologize if write bad, I’m using Google translate for more complicated
it’s my first time to use community help this forum, I hope don’t do something wrong
My problem is
I’ve installed a community edition vers. 25.10.3 and then updated to 25.10.4 on a m.2 sata SSD in a HP Microserver Gen8
it was everything good for some months, but a week ago I notice that I can’t access to iLO4 of server, to try to restore iLO I don’t know what I can do wrong but at the restart TrueNAS don’t boot more, I try to mount the installation disk on a laptop with Zorin OS but the command “zpool import” inform me the pool it’s UNAVAIL
the real problem is I don’t have a TrueNAS backup, and the pool of data, (3 disk on raid 5) is encrypted and I don’t find anywhere the encryption key, I was convinced that was saved on a usb drive but he don’t, I’ve a backup of pool but unfortunately it’s encrypted too and I don’t have key
Searching on internet and speaking with AI I used UFS Explorer to restore from original m.2 SSD the file “freenas-v1.db” and reinstalled in a new install (vers. 25.10.5) on a different SSD to preserve data on the original, at the restart the system detects the pool but is “Locked”
so the point is, where can I found the Encryption Key of my pool to restore, considered that I set the automatic unlocked of the pool at the start?
AI said me that the Encryption Key is on the disk in some file but every path it suggest isn’t correct or I don’t find in the original disk, so I asked you
I’m really on panic I was saved everything on data pool, mostly the photo of my child when was baby, I know that my operated was the bad I can do
Thanks to all of you that can help me
One thing at a time.
Are you certain that you cannot locate an exported config + secret seed or the dataset encryption key? Yes or No
Did you format or reuse the original m.2 SSD boot drive? Yes or No
Are you able to boot into a live Ubuntu Linux ISO (bootable USB) on your HP Microserver Gen8? Yes or No
If you are able to boot into a live Ubuntu Linux ISO (bootable USB) on your HP Microserver Gen8, can you paste the output of the command sudo zpool import? Yes or No
If you can run the sudo zpool import command, please paste the output in here.
I think this post might help. You can also try searching for ‘recover encryption’ on the forums.
Many thanks to both of you for the very quick replies.
I’m not at home right now and can’t run all the checks; if I can, I’ll try later this evening—or tomorrow at the latest—and keep you updated. Thanks a lot.
1
Unfortunately YES, I had made a backup on my desktop, but I must have deleted it by mistake, I can’t find it, and I’m trying to recover it by running a scan with UFS Explorer
2
NO, I unplugged it when it wouldn’t start up
3
YES
4
YES
5
ubuntu@ubuntu:\~$ sudo zpool import
pool: boot-pool
id: 7036104060776217262
state: UNAVAIL
status: One or more devices contains corrupted data.
action: The pool cannot be imported due to damaged devices or data.
see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-5E
config:
boot-pool UNAVAIL insufficient replicas
sda UNAVAIL invalid label
sda? ![]()
How did you create this ZFS boot-pool? It should not use the whole disk. It should use a partition. TrueNAS does not use the whole disk for ZFS members.
You should see sda2 or a long string of numbers for the PARTUUID, not sda.
Are you using a virtualized TrueNAS?
What is the output for this:
lsblk -o NAME,PARTUUID,SIZE,MODEL,PTTYPE,TYPE,PARTTYPENAME
I do not know Italian and I am not sure how accurate a translation will be. I am trying to use the simplest English.
@donsantuzzo I am having difficulty understanding your first post. Can you ask in Italian? Someone who understands Italian might be able to explain what you’ve tried and what you want to try.
When I read your post, I am not sure if you want to try something or already tried it.
NAME PARTUUID SIZE MODEL PTTYPE TYPE PARTTYPENAME
sda 111.8G WDC W disk
sdb 7.5G USB D gpt disk
├─sdb1
│ 2fdf80be-e145-40c5-aa52-61a53ab5282e 6.1G gpt part Microsoft basic data
├─sdb2
│ 2fdf80be-e145-40c5-aa51-61a53ab5282e 5M gpt part EFI System
├─sdb3
│ 2fdf80be-e145-40c5-aa50-61a53ab5282e 300K gpt part Microsoft basic data
└─sdb4
9cb6263b-e7dd-430d-a7f2-e1f27cdf243e 1.4G gpt part Linux filesystem
this is the result of command
To create the boot pool, I followed the installation wizard and selected only this disk.
I had installed TrueNAS on a virtual machine before getting the HP Microserver, but I had only exported the pool encryption key from the VM in order to connect the disks later.
Don’t worry about the translation, it’s perfectly understandable. In fact, thanks again for the lightning-fast reply; it feels more like a helpdesk than a forum.
No partitions. ![]()
This might be related.
@HoneyBadger would you know how a previous installation of TrueNAS in a VM would end up with a boot SSD without any partitions? Besides using a recovery tool like UFS Explorer or Klennet, is there a way to “restore” the ZFS label?
My gut tells me that the OP’s boot-pool was improperly formatted when they first created this TrueNAS setup under a VM. Now (outside of the original VM) they’re left with an unusable boot-pool. This SSD might be the only device that has the required config + secret seed needed to unlock the encrypted datasets.
@donsantuzzo I suggest you try searching for it again. Search for all files that end with the extension .tar or .db. Search your USB sticks, HDDs, external HDDs. Search everywhere possible.
I had written what I had already tried.
Anyway, here is the Italian translation of my first post.
Ciao a tutti, sono nuovo qui.
Innanzitutto sono italiano e non conosco bene l’inglese, quindi mi scuso se scrivo in modo impreciso; uso Google Translate per le parti più complesse.
È la prima volta che chiedo aiuto in questo forum e spero di non sbagliare nulla.
Il mio problema è questo:
Ho installato la Community Edition (versione 25.10.3) e poi l’ho aggiornata alla 25.10.4 su un SSD M.2 SATA all’interno di un HP Microserver Gen8.
Tutto ha funzionato bene per alcuni mesi, ma una settimana fa ho notato di non riuscire più ad accedere all’iLO4 del server. Nel tentativo di ripristinare l’iLO — non so bene cosa sia andato storto — al riavvio TrueNAS non si è più avviato. Ho provato a collegare il disco di installazione a un portatile con Zorin OS, ma il comando “zpool import” mi segnala che il pool è nello stato “UNAVAIL” (non disponibile).
Il problema reale è che non ho un backup di TrueNAS e il pool di dati (3 dischi in RAID 5) è crittografato; non riesco a trovare da nessuna parte la chiave di crittografia. Ero convinto di averla salvata su una chiavetta USB, ma non c’è. Ho un backup del pool, ma purtroppo anch’esso è crittografato e non possiedo la chiave.
Facendo ricerche online e consultando un’IA, ho usato UFS Explorer per recuperare il file “freenas-v1.db” dall’SSD M.2 originale e l’ho importato in una nuova installazione (versione 25.10.5) su un SSD diverso, per preservare i dati su quello originale; al riavvio, il sistema rileva il pool ma lo segnala come “Locked” (bloccato).
Quindi la domanda è: dove posso trovare la chiave di crittografia del mio pool per ripristinarlo, considerando che avevo impostato lo sblocco automatico del pool all’avvio? L’IA mi ha detto che la chiave di cifratura si trova in un file sul disco, ma nessuno dei percorsi suggeriti è corretto o riesco a trovarlo sul disco originale; per questo mi rivolgo a voi.
Sono nel panico più totale: avevo salvato tutto nel data pool, soprattutto le foto di mio figlio da piccolo. So di aver commesso un grave errore.
Grazie a chiunque possa aiutarmi.
I’d like to clarify one thing:
The initial VM installation used a virtual disk.
The installation I performed on the HP Microserver using the 120GB M.2 SSD was created from scratch.
I only imported the data pool encryption key from the old VM.
I keep looking everywhere to see if I can recover the backup or the file containing the encryption key.
Your 120GB M.2 SSD has no partitions. This is not what TrueNAS does for a new installation.
I’ve taken a closer look at what you recommended.
I think it will really help, because in the freenas-v1.db file I managed to restore, I can see the key for the “NAS” pool I’m interested in.
I believe I created the decode_key.py file correctly, but it tells me the command isn’t found—what am I doing wrong?
Okay, I understand.
But what could I have done wrong during the installation?
As I said, I followed the installation wizard, and when it came time to choose the installation drive, I selected the drive.
This is not enough. You also need the file pwenc_secret.
You need both freenas-v1.db + pwenc_secret.
Using UFS Explorer, I found the pwenc_secret file on the original disk.
Is it enough to just copy it into the /ROOT/data folder, or is there a way to import it?
You need all 3 files in the same folder.
decode.pyfreenas-v1.dbpwenc_secret
Go to a folder. It can be any folder. You can make a new folder with mkdir. It can be under Ubuntu or TrueNAS. It doesn’t matter.
Copy freenas-v1.db and pwenc_secret to this folder.
Download the modified script to this folder:
wget "https://pastebin.com/raw/uGWGw6Tp" -O decode.py
In the folder with all 3 files, you run the modified script with the command python3 decode.py.
It will output the key string.
It gives me this error message.
don@dontop:\~/truenas$ python3 decode.py
Traceback (most recent call last):
File “/home/don/truenas/decode.py”, line 7, in
from Cryptodome.Cipher import AES
ModuleNotFoundError: No module named ‘Cryptodome’
resolve with sudo apt install python3-pycryptodome
Update us if you were able to unlock your datasets!
Make a backup of your config + secret seed. Keep it somewhere safe.
This is something to consider doing. I wrote that resource for these types of emergencies.
They finally managed to unlock the pool.
Thank you so much for all the help and support.
Especially to @SmallBarky for immediately grasping the situation and sharing the link to retrieve the plaintext key and @winnielinnie for the great responsiveness and quick replies, and for expertly modifying the file to decode the key
I really don’t know how to thank you.
It was keeping me up at night.
Thank you so much.
I’ll go ahead and save the keys and perform a full backup of the TrueNAS configuration right away.
Thanks again.