I recently started using FreeBSD.
I chose UFS.
On my laptop I have two drives.
On ada0 I use OpenBSD.
On ada1 I installed FreeBSD.
I partitioned the drive like this:
ada1p4 is my encrypted partition.
I mount it like this:
I dislike the hardcoded "ada1p4" in my script.
How can I use another identifier?
I would like to be able to remove a drive, put it
elsewhere and I would like my script to work?
On OpenBSD I have UUIDs instead of "raw" device names,
how to do the same in FreeBSD?
I tried something with labeling the UFS partition,
but it did not work - what is the correct way do
to it?
Thanks.
I chose UFS.
On my laptop I have two drives.
On ada0 I use OpenBSD.
On ada1 I installed FreeBSD.
I partitioned the drive like this:
Code:
gpart show ada1
=> 40 250069600 ada1 GPT (119G)
40 1024 1 freebsd-boot (512K)
1064 104857600 2 freebsd-ufs (50G)
104858664 136313848 4 freebsd-ufs (65G)
241172512 8388608 3 freebsd-swap (4.0G)
249561120 508520 - free - (248M)
ada1p4 is my encrypted partition.
I mount it like this:
Code:
mount_encrypted_partition.sh
#!/bin/sh
doas geli attach -k /root/geli/ada1p4.key /dev/ada1p4
doas mount /dev/ada1p4.eli /home/MYUSER/usr
I dislike the hardcoded "ada1p4" in my script.
How can I use another identifier?
I would like to be able to remove a drive, put it
elsewhere and I would like my script to work?
On OpenBSD I have UUIDs instead of "raw" device names,
how to do the same in FreeBSD?
I tried something with labeling the UFS partition,
but it did not work - what is the correct way do
to it?
Thanks.
Last edited by a moderator: