You are not logged in.
Hello together,
[SOLUTION]:
add in fstab x-systemd.after=zfs-mount.service eg
UUID=2817-ABD5 /boot/efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro,x-systemd.after=zfs-mount.service 0 2
I have some strange issues, /boot/efi and /boot/efis is not mounted during startup and can't be unmounted during shutdown (also, when I mount them manually). It's a fresh install followed the wiki, but it's root on ZFS setup (which is running fine beside this error)
Have checked the journal, this looks "okay", no errors:
journalctl | grep boot
[...]
Aug 22 11:32:31 polaris systemd[1]: Mounting /boot/efi...
Aug 22 11:32:31 polaris systemd[1]: Mounting /boot/efis/ata-TOSHIBA_THNSNH256GCST_X3SS107NTAWY-part1...
Aug 22 11:32:32 polaris systemd[1]: Mounted /boot/efi.
Aug 22 11:32:32 polaris systemd[1]: Mounted /boot/efis/ata-TOSHIBA_THNSNH256GCST_X3SS107NTAWY-part1.
[...]
When I check the folder, its empty, its not mounted?!
ls -alFhi /boot/efi
insgesamt 9,0K
128 drwxr-xr-x 2 root root 2 17. Aug 15:37 ./
34 drwxr-xr-x 5 root root 10 18. Aug 10:47 ../
ls -alFhi /boot/efis/ata-TOSHIBA_THNSNH256GCST_X3SS107NTAWY-part1
insgesamt 1,0K
3 drwxr-xr-x 2 root root 2 17. Aug 15:37 ./
2 drwxr-xr-x 3 root root 3 17. Aug 15:37 ../
However lsblk show something "mounted"
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 238,5G 0 disk
├─sda1 8:1 0 1022M 0 part /boot/efis/ata-TOSHIBA_THNSNH256GCST_X3SS107NTAWY-part1
│ /boot/efi
├─sda2 8:2 0 4G 0 part
├─sda3 8:3 0 220,5G 0 part
└─sda4 8:4 0 12G 0 part
zd0 230:0 0 10G 0 disk [SWAP]
fstab looks like this (ZFS filesystem datasets are not handled via fstab, thats the reason for not included here)
cat /etc/fstab
# Static information about the filesystems.
# See fstab(5) for details.
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda1 LABEL=EFI
UUID=2817-ABD5 /boot/efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 2
# /dev/sda1 LABEL=EFI
UUID=2817-ABD5 /boot/efis/ata-TOSHIBA_THNSNH256GCST_X3SS107NTAWY-part1 vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 2
# /dev/sda4 LABEL=SWAP
/dev/zvol/spool/SWAP/arch none swap defaults 0 0
So I am able to perform manual mount
mount /boot/efi
mount /boot/efis/ata-TOSHIBA_THNSNH256GCST_X3SS107NTAWY-part1
And then I have the content
ls -alFhi /boot/efi
insgesamt 21K
1 drwxr-xr-x 4 root root 4,0K 1. Jan 1970 ./
34 drwxr-xr-x 5 root root 10 18. Aug 10:47 ../
6 drwxr-xr-x 4 root root 4,0K 17. Aug 15:56 EFI/
5 drwxr-xr-x 3 root root 4,0K 17. Aug 15:56 archlinux/
ls -alFhi /boot/efis/ata-TOSHIBA_THNSNH256GCST_X3SS107NTAWY-part1
insgesamt 13K
1 drwxr-xr-x 4 root root 4,0K 1. Jan 1970 ./
2 drwxr-xr-x 3 root root 3 17. Aug 15:37 ../
6 drwxr-xr-x 4 root root 4,0K 17. Aug 15:56 EFI/
5 drwxr-xr-x 3 root root 4,0K 17. Aug 15:56 archlinux/
But now I have both devices doubled
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 238,5G 0 disk
├─sda1 8:1 0 1022M 0 part /boot/efis/ata-TOSHIBA_THNSNH256GCST_X3SS107NTAWY-part1
│ /boot/efi
│ /boot/efis/ata-TOSHIBA_THNSNH256GCST_X3SS107NTAWY-part1
│ /boot/efi
├─sda2 8:2 0 4G 0 part
├─sda3 8:3 0 220,5G 0 part
└─sda4 8:4 0 12G 0 part
zd0 230:0 0 10G 0 disk [SWAP]
In addition during shutdown I get errors for unmounting:
Failed unmounting /boot/efi
Failed unmounting /boot/efis/ata-TOSHIBA_THNSNH256GCST_X3SS107NTAWY-part1
Has anyone an idea or advice? Of course, during normal work I don't care about efi partitions, but for grub updates it does matter.
Thank you in advance
Last edited by korgan1983 (2023-08-22 12:32:33)
Learn the facts, and the origins behind the facts, and make up your own damn mind. That's why you have one.
Offline
I did some research, and I'm not shure if I'm going in the right direction...
But I have the feeling that the mount order is in the wrong order, in a first step local_fs will be mounted and in a second step then zfs, so zfs mount service overrides the already mounted /boot/* stuff:
ystemctl list-units --type=mount
UNIT LOAD ACTIVE SUB DESCRIPTION >
-.mount loaded active mounted Root Mount
boot-efi.mount loaded active mounted /boot/efi
boot-efis-ata\x2dTOSHIBA_THNSNH256GCST_X3SS107NTAWY\x2dpart1.mount loaded active mounted /boot/efis/ata-TOSHIBA_THNSNH256GCST_X3S>
boot.mount loaded active mounted /boot
dev-hugepages.mount loaded active mounted Huge Pages File System
dev-mqueue.mount loaded active mounted POSIX Message Queue File System
home.mount loaded active mounted home.mount
root.mount loaded active mounted /root
run-credentials-systemd\x2dresolved.service.mount loaded active mounted /run/credentials/systemd-resolved.service
run-credentials-systemd\x2dsysctl.service.mount loaded active mounted /run/credentials/systemd-sysctl.service
run-credentials-systemd\x2dtmpfiles\x2dsetup.service.mount loaded active mounted /run/credentials/systemd-tmpfiles-setup.>
run-credentials-systemd\x2dtmpfiles\x2dsetup\x2ddev.service.mount loaded active mounted /run/credentials/systemd-tmpfiles-setup->
run-user-1000-doc.mount loaded active mounted /run/user/1000/doc
run-user-1000-gvfs.mount loaded active mounted /run/user/1000/gvfs
run-user-1000.mount loaded active mounted /run/user/1000
srv.mount loaded active mounted /srv
sys-fs-fuse-connections.mount loaded active mounted FUSE Control File System
sys-kernel-config.mount loaded active mounted Kernel Configuration File System
sys-kernel-debug.mount loaded active mounted Kernel Debug File System
sys-kernel-tracing.mount loaded active mounted Kernel Trace File System
tmp.mount loaded active mounted Temporary Directory /tmp
usr-local.mount loaded active mounted /usr/local
var-log.mount loaded active mounted /var/log
Is there any change to give dependencies for /boot/efi file systems? I tried following without success (adding x-systemd.requires-mounts-for=/boot):
# /dev/sda1 LABEL=EFI
UUID=2817-ABD5 /boot/efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro,x-systemd.requires-mounts-for=/boot 0 2
Any idea? How can I sort sytemd mount order, that
zfs-mount.service
will be executed before
proc-sys-fs-binfmt_misc.mount
or better that both EFI partitions from fstap will be mounted after zfs?
Learn the facts, and the origins behind the facts, and make up your own damn mind. That's why you have one.
Offline
Sorry for bothering you all, found the solution, simply add x-systemd.after=zfs-mount.service to fstab, detailed solution in original post!
Learn the facts, and the origins behind the facts, and make up your own damn mind. That's why you have one.
Offline
Some background, for the more interested people:
I setup a Arch with root on ZFS, ENCRYPTED. During installation I only checked /boot itself for correct mount, so I'm not sure, since when the error occured. During installation I ran into issues with SWAP (seperated Pool), so I scipped that. After successful installation and first boot I fixed then the SWAP, which is ENCRYPTED with PASSKEY.file and added to fstab.
I think, because of this ZFS SWAP in fstab the mount order was changed by systemd. But this is only my thinking of the error, I'm totaly not shure.
Maybe someone has similar setup and can check / validate or someone is running in same issues :-)
Separate Pools for root, boot and swap
zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
bpool 3.75G 206M 3.55G - - 0% 5% 1.00x ONLINE -
rpool 220G 9.65G 210G - - 0% 4% 1.00x ONLINE -
spool 11.5G 1.31M 11.5G - - 0% 0% 1.00x ONLINE -
*arch are created for possible better snapshot management, ROOT and SWAP are encrypted
zfs list
NAME USED AVAIL REFER MOUNTPOINT
bpool 206M 3.42G 96K /boot
bpool/BOOT 205M 3.42G 96K none
bpool/BOOT/arch 205M 3.42G 112M /boot
rpool 9.65G 204G 192K /
rpool/ROOT 7.84G 204G 192K none
rpool/ROOT/arch 7.84G 204G 7.14G /
rpool/home 1.80G 204G 1.64G /home
rpool/home/root 1.07M 204G 576K /root
rpool/srv 400K 204G 208K /srv
rpool/usr 648K 204G 192K /usr
rpool/usr/local 456K 204G 264K /usr/local
rpool/var 1.22M 204G 192K /var
rpool/var/lib 192K 204G 192K /var/lib
rpool/var/log 864K 204G 448K /var/log
spool 10.6G 524M 192K /
spool/SWAP 10.6G 524M 192K none
spool/SWAP/arch 10.6G 11.1G 92K -
SWAP is "autoloaded with keypass.file
swapon
NAME TYPE SIZE USED PRIO
/dev/zd0 partition 10G 0B -2
Cheers!
Learn the facts, and the origins behind the facts, and make up your own damn mind. That's why you have one.
Offline