Hello guys,
I'm discovering FreeBSD and ZFS, I recently installed FreeBSD-RELEASE-14.2 on my home server.
It may be a stupid question, but i dont understand why I have a /zroot directory, a quick search lead me to https://forums.freebsd.org/threads/question-about-partition-zroot.74370/ and if I understand well, /zroot should not be mounted.
But it is.
I have 1 disk, I let the pool name on default value "zroot" and used AutoZFS option during the install process.
Its almost a fresh install : I only updated it to FreeBSD-RELEASE-14.2-p2, created an encrypted dataset /zroot/myuser/safe and installed sysutils/iocage.
And there is the bsdinstall_log (It was not my first installation attempt, as you can see)
To be sure I have not done any mistake, I tried a fresh install on a VM, and there's also that /zroot directory, and zroot is mounted on /zroot.
Is it normal ? Is it a new freebsd installer's behavior ?
Should I unmount /zroot ?
Sorry for my poor knowledge,
Thanks.
I'm discovering FreeBSD and ZFS, I recently installed FreeBSD-RELEASE-14.2 on my home server.
It may be a stupid question, but i dont understand why I have a /zroot directory, a quick search lead me to https://forums.freebsd.org/threads/question-about-partition-zroot.74370/ and if I understand well, /zroot should not be mounted.
But it is.
I have 1 disk, I let the pool name on default value "zroot" and used AutoZFS option during the install process.
Its almost a fresh install : I only updated it to FreeBSD-RELEASE-14.2-p2, created an encrypted dataset /zroot/myuser/safe and installed sysutils/iocage.
Code:
# ls -l /
total 100
-rw-r--r-- 2 root wheel 1011 Nov 29 10:58 .cshrc
-rw-r--r-- 2 root wheel 495 Nov 29 10:58 .profile
-r--r--r-- 1 root wheel 6109 Nov 29 11:42 COPYRIGHT
drwxr-xr-x 2 root wheel 49 Mar 29 18:16 bin
drwxr-xr-x 15 root wheel 71 Mar 29 18:18 boot
dr-xr-xr-x 10 root wheel 512 Mar 30 21:10 dev
-rw------- 1 root wheel 4096 Mar 30 21:11 entropy
drwxr-xr-x 30 root wheel 111 Mar 30 20:23 etc
drwxr-xr-x 3 root wheel 3 Mar 29 18:10 home
drwxr-xr-x 4 root wheel 78 Nov 29 11:20 lib
drwxr-xr-x 3 root wheel 5 Nov 29 10:57 libexec
drwxr-xr-x 2 root wheel 2 Nov 29 10:54 media
drwxr-xr-x 3 root wheel 3 Mar 29 18:10 mnt
drwxr-xr-x 2 root wheel 2 Nov 29 10:54 net
dr-xr-xr-x 2 root wheel 2 Nov 29 10:54 proc
drwxr-xr-x 2 root wheel 150 Nov 29 11:15 rescue
drwxr-x--- 2 root wheel 8 Mar 31 23:00 root
drwxr-xr-x 2 root wheel 150 Nov 29 11:23 sbin
lrwxr-xr-x 1 root wheel 11 Nov 29 10:54 sys -> usr/src/sys
drwxrwxrwt 6 root wheel 6 Mar 31 14:43 tmp
drwxr-xr-x 16 root wheel 16 Nov 29 10:54 usr
drwxr-xr-x 24 root wheel 24 Mar 30 21:10 var
drwxr-xr-x 2 root wheel 2 Mar 29 17:56 zroot
Code:
# mount
zroot/ROOT/default on / (zfs, local, noatime, nfsv4acls)
devfs on /dev (devfs)
/dev/gpt/efiboot0 on /boot/efi (msdosfs, local)
zroot/tmp on /tmp (zfs, local, noatime, nosuid, nfsv4acls)
zroot/home on /home (zfs, local, noatime, nfsv4acls)
zroot on /zroot (zfs, local, noatime, nfsv4acls)
zroot/var/log on /var/log (zfs, local, noatime, noexec, nosuid, nfsv4acls)
zroot/var/audit on /var/audit (zfs, local, noatime, noexec, nosuid, nfsv4acls)
zroot/usr/ports on /usr/ports (zfs, local, noatime, nosuid, nfsv4acls)
zroot/var/mail on /var/mail (zfs, local, nfsv4acls)
zroot/var/crash on /var/crash (zfs, local, noatime, noexec, nosuid, nfsv4acls)
zroot/usr/src on /usr/src (zfs, local, noatime, nfsv4acls)
zroot/home/myuser on /home/myuser (zfs, local, noatime, nfsv4acls)
zroot/var/tmp on /var/tmp (zfs, local, noatime, nosuid, nfsv4acls)
Code:
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
zroot 2.24G 1.75T 96K /zroot
zroot/ROOT 1.41G 1.75T 96K none
zroot/ROOT/14.2-RELEASE_2025-03-29_181624 8K 1.75T 1.02G /
zroot/ROOT/default 1.41G 1.75T 1.40G /
zroot/home 472K 1.75T 96K /home
zroot/home/myuser 376K 1.75T 172K /home/myuser
zroot/home/myuser/safe 204K 1.75T 204K /home/myuser/safe
zroot/tmp 96K 1.75T 96K /tmp
zroot/usr 852M 1.75T 96K /usr
zroot/usr/ports 96K 1.75T 96K /usr/ports
zroot/usr/src 852M 1.75T 852M /usr/src
zroot/var 1008K 1.75T 96K /var
zroot/var/audit 96K 1.75T 96K /var/audit
zroot/var/crash 96K 1.75T 96K /var/crash
zroot/var/log 404K 1.75T 404K /var/log
zroot/var/mail 220K 1.75T 220K /var/mail
zroot/var/tmp 96K 1.75T 96K /var/tmp
And there is the bsdinstall_log (It was not my first installation attempt, as you can see)
Code:
# cat /var/log/bsdinstall_log | grep zroot
DEBUG: Checking zroot against zroot
DEBUG: Pool zroot already taken
DEBUG: zfs_create_boot: poolname=[zroot] vdev_type=[]
DEBUG: zfs_create_boot: zpool destroy "zroot"
cannot open 'zroot': no such pool
DEBUG: zfs_create_boot: zpool create -o altroot=/mnt -O compress=lz4 -O atime=off -m none -f "zroot" nda0p4
DEBUG: zfs_create_boot: zfs create -o mountpoint=none "zroot/ROOT"
DEBUG: zfs_create_boot: zfs create -o mountpoint=/ "zroot/ROOT/default"
DEBUG: zfs_create_boot: zfs create -o mountpoint=/home "zroot/home"
DEBUG: zfs_create_boot: zfs create -o mountpoint=/tmp -o exec=on -o setuid=off "zroot/tmp"
DEBUG: zfs_create_boot: zfs create -o mountpoint=/usr -o canmount=off "zroot/usr"
DEBUG: zfs_create_boot: zfs create -o setuid=off "zroot/usr/ports"
DEBUG: zfs_create_boot: zfs create "zroot/usr/src"
DEBUG: zfs_create_boot: zfs create -o mountpoint=/var -o canmount=off "zroot/var"
DEBUG: zfs_create_boot: zfs create -o exec=off -o setuid=off "zroot/var/audit"
DEBUG: zfs_create_boot: zfs create -o exec=off -o setuid=off "zroot/var/crash"
DEBUG: zfs_create_boot: zfs create -o exec=off -o setuid=off "zroot/var/log"
DEBUG: zfs_create_boot: zfs create -o atime=on "zroot/var/mail"
DEBUG: zfs_create_boot: zfs create -o setuid=off "zroot/var/tmp"
DEBUG: zfs_create_boot: zfs set "mountpoint=/zroot" "zroot"
DEBUG: zfs_create_boot: zpool set bootfs="zroot/ROOT/default" "zroot"
DEBUG: zfs_create_boot: Configuring zpool.cache for zroot...
DEBUG: zfs_create_boot: zpool set cachefile="/mnt/boot/zfs/zpool.cache" "zroot"
DEBUG: zfs_create_boot: zfs set "canmount=noauto" "zroot/ROOT/default"
To be sure I have not done any mistake, I tried a fresh install on a VM, and there's also that /zroot directory, and zroot is mounted on /zroot.
Is it normal ? Is it a new freebsd installer's behavior ?
Should I unmount /zroot ?
Sorry for my poor knowledge,
Thanks.