4 commands to use when exploring a FreeBSD file system:
Code:
camcontrol devlist
geom dev list
gpart status
gpart show -lp
gpart list
root@Ghost14-selfbuilt-rpi4B-nginx-tst1:/usr/local/etc # gpart status
Name Status Components
da0p1 OK da0
da0p2 OK da0
da0p3 OK da0
root@Ghost14-selfbuilt-rpi4B-nginx-tst1:/usr/local/etc # gpart show -lp
=> 40 1953525088 da0 GPT (932G)
40 2008 - free - (1.0M)
2048 6291456 da0p1 efibootarm (3.0G)
6293504 1761607680 da0p2 zfs (840G)
1767901184 16777216 da0p3 swap (8.0G)
1784678400 168846728 - free - (81G)
root@Ghost14-selfbuilt-rpi4B-nginx-tst1:/usr/local/etc # gpart list
Geom name: da0
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 1953525127
first: 40
entries: 128
scheme: GPT
Providers:
1. Name: da0p1
Mediasize: 3221225472 (3.0G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e1
efimedia: HD(1,GPT,a234812d-1862-11ee-8e93-dca632d53d76,0x800,0x600000)
rawuuid: a234812d-1862-11ee-8e93-dca632d53d76
rawtype: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
label: efibootarm
length: 3221225472
offset: 1048576
type: efi
index: 1
end: 6293503
start: 2048
2. Name: da0p2
Mediasize: 901943132160 (840G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e1
efimedia: HD(2,GPT,4bd2b728-1864-11ee-8e93-dca632d53d76,0x600800,0x69000000)
rawuuid: 4bd2b728-1864-11ee-8e93-dca632d53d76
rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
label: zfs
length: 901943132160
offset: 3222274048
type: freebsd-zfs
index: 2
end: 1767901183
start: 6293504
3. Name: da0p3
Mediasize: 8589934592 (8.0G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e1
efimedia: HD(3,GPT,7cccc4ed-1864-11ee-8e93-dca632d53d76,0x69600800,0x1000000)
rawuuid: 7cccc4ed-1864-11ee-8e93-dca632d53d76
rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
label: swap
length: 8589934592
offset: 905165406208
type: freebsd-swap
index: 3
end: 1784678399
start: 1767901184
Consumers:
1. Name: da0
Mediasize: 1000204886016 (932G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r3w3e6
MORE EXAMPLES:
root@Ghost14-selfbuilt-rpi4B-nginx-tst1:/usr/local/etc # camcontrol devlist
<Samsung SSD 870 QVO 1TB 4103> at scbus0 target 0 lun 0 (da0,pass0)
root@Ghost14-selfbuilt-rpi4B-nginx-tst1:/usr/local/etc # geom disk list
Geom name: da0
Providers:
1. Name: da0
Mediasize: 1000204886016 (932G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r3w3e6
descr: Samsung SSD 870 QVO 1TB
lunname: Samsung SSD 870 QVO 1TB 333457EBD0F2
lunid: 3033345752406200
ident: 333457EBD0F2
rotationrate: unknown
fwsectors: 63
fwheads: 255
root@Ghost14-selfbuilt-rpi4B-nginx-tst1:/usr/local/etc # gpart status
Name Status Components
da0p1 OK da0
da0p2 OK da0
da0p3 OK da0
Was already mounted at /mnt/esp on my raspberry pi 4b hardware:
root@Ghost14-selfbuilt-rpi4B-nginx-tst1:/usr/local/etc # mount -t msdosfs /dev/da0p1 /mnt/esp
mount_msdosfs: /dev/da0p1: Device busy
root@Ghost14-selfbuilt-rpi4B-nginx-tst1:/usr/local/etc # mount | grep da0
/dev/da0p1 on /mnt/esp (msdosfs, local)
root@Ghost14-selfbuilt-rpi4B-nginx-tst1:/usr/local/etc # cd /mnt/esp
root@Ghost14-selfbuilt-rpi4B-nginx-tst1:/mnt/esp # ls -l
total 23808
-rwxr-xr-x 1 root wheel 5888 Jun 22 2023 armstub8-gic.bin
-rwxr-xr-x 1 root wheel 5888 Jun 22 2023 armstub8.bin
-rwxr-xr-x 1 root wheel 26894 Mar 3 2021 bcm2710-rpi-2-b.dtb
-rwxr-xr-x 1 root wheel 29011 Mar 3 2021 bcm2710-rpi-3-b-plus.dtb
-rwxr-xr-x 1 root wheel 28392 Mar 3 2021 bcm2710-rpi-3-b.dtb
-rwxr-xr-x 1 root wheel 26890 Mar 3 2021 bcm2710-rpi-cm3.dtb
-rwxr-xr-x 1 root wheel 49090 Mar 3 2021 bcm2711-rpi-4-b.dtb
-rwxr-xr-x 1 root wheel 52456 Mar 3 2021 bootcode.bin
-rwxr-xr-x 1 root wheel 37 Feb 25 21:36 cmdline.txt
-rwxr-xr-x 1 root wheel 1746 Jul 3 2023 config_august12.txt
-rwxr-xr-x 1 root wheel 1851 Jan 19 05:48 config_feb24.txt
-rwxr-xr-x 1 root wheel 1867 Feb 19 03:57 config_February19.txt
-rwxr-xr-x 1 root wheel 221 Jul 3 2023 config_june22.txt
-rwxr-xr-x 1 root wheel 1912 Feb 27 02:16 config.txt
-rwxr-xr-x 1 root wheel 1746 Sep 19 2023 config.txt.orig
-rwxr-xr-x 1 root wheel 177 Jul 3 2023 config.txt.original
drwxr-xr-x 1 root wheel 32768 Jun 22 2023 dtb
drwxr-xr-x 1 root wheel 32768 Jun 22 2023 EFI
-rwxr-xr-x 1 root wheel 3187 Mar 3 2021 fixup_cd.dat
-rwxr-xr-x 1 root wheel 10298 Mar 3 2021 fixup_db.dat
-rwxr-xr-x 1 root wheel 10298 Mar 3 2021 fixup_x.dat
-rwxr-xr-x 1 root wheel 7314 Mar 3 2021 fixup.dat
-rwxr-xr-x 1 root wheel 5448 Mar 3 2021 fixup4.dat
-rwxr-xr-x 1 root wheel 3187 Mar 3 2021 fixup4cd.dat
-rwxr-xr-x 1 root wheel 8452 Mar 3 2021 fixup4db.dat
-rwxr-xr-x 1 root wheel 8454 Mar 3 2021 fixup4x.dat
-rwxr-xr-x 1 root wheel 1594 Mar 3 2021 LICENCE.broadcom
drwxr-xr-x 1 root wheel 32768 Jun 22 2023 overlays
-rwxr-xr-x 1 root wheel 240 Jun 22 2023 README
-rwxr-xr-x 1 root wheel 793116 Mar 3 2021 start_cd.elf
-rwxr-xr-x 1 root wheel 4794472 Mar 3 2021 start_db.elf
-rwxr-xr-x 1 root wheel 3704808 Mar 3 2021 start_x.elf
-rwxr-xr-x 1 root wheel 2952960 Mar 3 2021 start.elf
-rwxr-xr-x 1 root wheel 2228800 Mar 3 2021 start4.elf
-rwxr-xr-x 1 root wheel 793116 Mar 3 2021 start4cd.elf
-rwxr-xr-x 1 root wheel 3722504 Mar 3 2021 start4db.elf
-rwxr-xr-x 1 root wheel 2981192 Mar 3 2021 start4x.elf
-rwxr-xr-x 1 root wheel 568960 Oct 21 2021 u-boot.bin
-rwxr-xr-x 1 root wheel 602552 Jun 22 2023 u-bootJune22_broken.bin
root@Ghost14-selfbuilt-rpi4B-nginx-tst1:/mnt/esp #