I am currently pondering about migrating to FreeBSD on my desktop and NomadBSD as live-usb for the workplace. On my FreeBSD desktop, I want to access the encrypted live-usb. Now I have been looking at the geli manual, but I am a bit at a loss how nomad BSD is structured
Since I can’t attach the partitions with geli attach, I assume there is some kind of persistent image file that is being mounted?
I’d appreciate some starting directions for a spoiled linux kid that has not looked at the inner workings for over 10 years.
# geli attach /dev/label/nomaddata
# mount /dev/label/nomaddata.eli /mnt
works, while
# geli attach /dev/da0s3a
# mount /dev/da0s3a.eli /mnt
does not:
# root@freebsd:/usr/home/chris # geli attach /dev/da0s3a
# geli: Cannot read metadata from /dev/da0s3a: Invalid argument.
# geli: There was an error with at least one provider.
That being on an usb stick with a fresh nomad install, just the first reboot after setup.
Prior to your post I’ve spent quite some time on how to mount the encrypted zfs partition of FreeBSD in Nomad, that I’ve managed. I couldn’t get my head around why it would not work the other way around, since I already tried
glabel uses the last sector to store its label information. If you access the partition via its device name, say da0s3a, you can see that the last sector contains the GEOM label information. The label device, however, doesn’t contain da0s3a's last sector. This makes sense, because it protects the GEOM meta data from being destroyed when writing to the label device. If you now apply geli to /dev/label/nomaddata, the meta data is written to the last sector, which in case of da0s3a is last sector - 1.