Added Old System Dataset Pool - cant access /ROOT/* to get to freenas-v1.db

madtulip

Explorer
Joined
Mar 28, 2015
Messages
64
Hello.

My old system which booted from legacy mode USB died. Bought a new system which doesnt boot from legacy mode USB. Installed a fresh TrueNas version on the new systems SSD in UEFI mode. booted the SSD. and am now triing to access the data on one of the 2 mirrored old System Dataset Pools in order to get to my old config (apparently in /data/freenas-v1.db).

1. try.:
  • Use zpool import to see the ID of the pool (you don't want to use the name to mount the pool as it's the same name than the current system pool)
  • Use zpool import -R /mnt the_ID_of_the_pool oldboot to import the pool which should be moutned as /mnt/oldboot
(source: https://www.truenas.com/community/threads/recover-configure-from-failing-boot-device.28032/)
did not mount under /mnt.
was listed as pool in the webgui. couldnt find the folder "oldboot" anywhere on the system using find.

2. try:
rebooted. used the webgui to import the old system dataset pool from one of the usb sticks via the "add" button named as "oldboot".
can see and access
/mnt/oldboot/grub
in CLI now
can see
/mnt/oldboot/ROOT/12.0-U8.1
via
zfs list
CLI command and under the webinterface storage->pools.
cant
cd /mnt/oldboot/ROOT
though and also cant list it with
ls-la
from
/mnt/oldboot/
it only shows the "grub" subfolder.
thought its an access permission problem and triied
setfacl -m everyone@:rxaRc::allow /mnt/oldboot
proposed here ( https://www.truenas.com/community/t...l-and-edit-acl-in-smb-share-greyed-out.82106/ )
failed with acl_get_file() failed: Operation not supported.

how do i access
/mnt/oldboot/ROOT/12.0-U8.1 in order to get to /data/freenas-v1.db now? help please
 

madtulip

Explorer
Joined
Mar 28, 2015
Messages
64
Untitled-2.jpg

This is what i see in the webgui under pool. The old system dataset was imported.

In the CLI however under /mnt/oldboot (where it was mounted) i can with
ls-la
only see the grub subfolder.

First i would like read access to the oldboot/ROOT/12.0.U8.1 dataset to make a backup of all the files.

Then i would try to
A) move that into the current (fresh install TrueNAS on SSD) which boots by UEFI and boot that dataset instead of the freshly installed one.

if i cant do that

B) extract the data/freenas-v1.db and try to reimport the config in the fresh install and see how that goes. Im a bit worried about all the jails and VMs i have set up in the old system. read somewhere that those might not get imported correctly.
 

madtulip

Explorer
Joined
Mar 28, 2015
Messages
64
aha. nothing under ROOT was mounted
zfs mount oldboot/ROOT/12.0-U8.1
did mount it. have CLI access now. NOICE!
 
Last edited:

madtulip

Explorer
Joined
Mar 28, 2015
Messages
64
hmm. ok now what i want to do is to move the "12.0-U8.1" dataset which i just mounted from my old legacy USB boot drive to the new UEFI SSDs boot pool and then "activate" that as the boot dataset to be booted from. how can that be done? webgui doesnt give me the options.

i mean i could just copy over the config, but i have the whole old boot dataset, just without a working boot sector. should be able to do that, no?
 

madtulip

Explorer
Joined
Mar 28, 2015
Messages
64
ok, ZFS can actually pretty neatly migrate datasets between pools.:

# get the name of the dattaset you want to move from this list.:
zfs list
# create a snapshot called "migrate" of the dataset located t in my case oldboot/ROOT/ called 12.0-U8.1
zfs snapshot oldboot/ROOT/12.0-U8.1@migrate
# send that snapshot from the one pool to the other pool called "SSD-boot-pool" in my case
zfs send -Rvw oldboot/ROOT/12.0-U8.1@migrate | zfs recv -d boot-pool
source: https://www.truenas.com/community/t...-from-one-zfs-pool-to-another-zfs-pool.75912/

so after installing 12.0-U8.1 brand new on the ssd i was able to migrate my old boot dataset (also from 12.0-U8.1) onto the new SSD boot pool and even boot from it.

Next problem: The webinterface isnt loading because the hardware changed and the new network card is not working with the old configuration.... tomorrow i guess.
 

madtulip

Explorer
Joined
Mar 28, 2015
Messages
64
So ... the network issue.

When installing 12.0-U8.1 fresh on the internal SSD it is booting from there and the ethernet card and network driver work as exspected. i can access the webgui. So its not an principle issue of the Intel C3000 SoC on the https://www.supermicro.com/en/products/motherboard/a2sdi-8c-hln4f .

After migrating a snapshot of my old boot-pool using 12.0-U8.1 (which ran on old and different hardware which died) to the same SSD on which i installed 12.0-U8.1 from scratch and after "activating" that old dataset as the one to be booted from and rebooting i get this.:

Untitled-4.jpg

So the 4 ethernet ports of the a2sdi-8c-hln4f seeem to be detected. Does that mean the drivers are installed and working? Restarting network returns "failed" however. I have no clue what the next steps should be. probably go into shell and try to find out whats wrong.

any help would be appreciated
 

madtulip

Explorer
Joined
Mar 28, 2015
Messages
64
Ok, i tried the official approach now.

Made a fresh install of 12.0-U8.1 (also tried the newest 13.0-U4). It booted, webgui working. Loaded my old freenas-v1.db from the backup via the webgui "system->general->upload config". reboot. "The network interface could not be accessed" - same as pictured above. Support please.
 

madtulip

Explorer
Joined
Mar 28, 2015
Messages
64
results of ifconfig.:
Untitled-6.jpg

the interface in use is "ix0". it shows "status: no carrier" meaning there is no signaling between the interface and the network switch. however it cant be a problem of the cable, as the same sable/switch/ethernet port worked just fine before uploading my old config. both LEDs on the RJ45 Port are on/blinking.
 
Last edited:

madtulip

Explorer
Joined
Mar 28, 2015
Messages
64
ifconfig ix0 up
results in
status:active
of ix0 interface. partial success i guess.

exiting the shell and triing to use "console setup" to 1) configure network interfaces just disables it again.
"restarting network:failed"
"restarting routing:failed"

my impression is that the network adapter is now active, but not configured in terrms of IP adress and such. i have no clue where i can configure the IP in truenas using CLI. browsing in /etc/rc.conf it doesnt look like its configured there as suggested by freebsd default network config. custom trueNAS configuration of stuff i guess.
 

madtulip

Explorer
Joined
Mar 28, 2015
Messages
64
ok, got this.

so if you have to get new hardware, say a motherboard, and that has a new name for the network interfaces, aand you want to load your old "system config" you will run into the problem of "The network interface could not be accessed" in console after boot as truenas tries to use the old network interface. you also cant delete the old network interfache directly from the CLI boot menue that shows the message, ass the old network interface doesnt show up there (to be changed or deleted).

going into shell, then starting up your new network interface using
ifconfig ix0 up
where "ix0" happens to be the name of my new network interface as found by
for me resulted in its "status" under ifconfig to change from "no carrier" to "active".

in a second step, to configure the IP and stuff of that interface using DHCP for now you can run
dhclient ix0
where ix0 is again the name of my interface only.

this will then assign an IP to the new interface which you can also review by another
ifconfig
. In my case the webgui was then available again under that temporary IP. i went there and found this in webgui->network->interfaces.:
Untitled-8.jpg

i deleted the old interface "re0" and configured the new ix0 interface to have a static IP adress (the same as the old one used in the picture above). that configuration will be temporary for 60s so you can log into the webgui at the new ip adress and have to confirm, that this config is working. afterwards that interface is permanent and lived through reboots.

hope this helps somebody who had to change theire hardware and wants to load his old configuration containing references to old network interfaces.

regarding "/etc/netcli.sh", the "console setup" command line interface that truenas presents to you after boot has compleeted, there should be an option to DELETE old (of type unknown) network interfaces, like you can do via the webgui. that would make all this mess unnecessary.
 
Top