You are not logged in.
Hi all,
This has been bugging me for a while now. I have this output every time I update my workstation:
.......
:: Processing package changes...
(1/1) installing linux [#############################################] 100%
warning: directory permissions differ on /boot/
filesystem: 700 package: 755
.......
[user@pc ~]$ ls -ld /boot
drwxr-xr-x 2 root root 0 Apr 17 13:43 /boot
[user@pc ~]$ mount | grep boot
systed-1 on /boot type autofs (rw,relatime,fd=33,pgrp=1,timeout=120,minproto=5,maxproto=5,direct,pipe_ino=11067)
[user@pc ~]$ df /boot
df: cannot change to directory '/boot': Permission denied
df: no file systems processed
[user@pc ~]$ df /boot
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 511720 107536 404184 22% /boot
[user@pc ~]$ ls -ld /boot
drwx------ 4 root root 16384 Dec 31 1969 /boot
[user@pc ~]$ mount | grep boot
systemd-1 on /boot type autofs (rw,relatime,fd=33,pgrp=1,timeout=120,minproto=5,maxproto=5,direct,pipe_ino=11067)
/dev/sda1 on /boot type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
So you see what's going on here? there's a folder with 755, but as soon as I try to access it - sorry, perm denied; however next try - I can access it already, but suddenly perms changed to 700, and it's double-mounted now.
I understand autofs is a mechanism to automount smth on demand, but why it changes perms to 700? Bug in systemd or smth else? I'm sure I didn't set this up, all I did was install with /boot on a separate partition.
Let me know how I can fix this behavior or debug it further.
Offline
Hi all,
/dev/sda1 on /boot type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
You've formatted /boot as vfat instead of [for instance] ext4.
Also why are you using autofs for /boot - why not just use /etc/fstab ?
Last edited by paulkerry (2018-04-23 11:24:44)
Offline
You've formatted /boot as vfat instead of [for instance] ext4.
Also why are you using autofs for /boot - why not just use /etc/fstab ?
Hi paulkerry,
I use vfat because /boot is my EFI partition, it has to be vfat.
Regarding autofs - that's exactly the point - I'm not "using" it, that's something which came by default after installation. I'm not sure where it's set!
Offline
Plenty of things look wrong there with the mounts. What does fstab look like?
Offline
https://bbs.archlinux.org/viewtopic.php … 8#p1780728
https://github.com/systemd/systemd/blob … NEWS#L3285
https://github.com/systemd/systemd/blob … NEWS#L3061
See also `man 1 man systemd-gpt-auto-generator`
Last edited by loqs (2018-04-23 17:54:40)
Offline
https://bbs.archlinux.org/viewtopic.php … 8#p1780728
https://github.com/systemd/systemd/blob … NEWS#L3285
https://github.com/systemd/systemd/blob … NEWS#L3061
See also `man 1 man systemd-gpt-auto-generator`
That makes it a bit clearer, but still the question remains - how do I fix this?
According to @Maniaxx comment in the other thread, "putting the /boot files on ESP is a completely unnecessary step".
However there are a few issues with this statement:
1. https://wiki.archlinux.org/index.php/Systemd-boot - "To keep the kernel updated, it is simpler and therefore recommended to mount the ESP to /boot.", also "If the ESP is not mounted to /boot, the kernel and initramfs files must be copied onto that ESP.".
2. there's no instruction mentioned anywhere for alternative options.
So by default for UEFI the Arch installation (https://wiki.archlinux.org/index.php/installation_guide#Mount_the_file_system - mounting a separate partition to /mnt/boot) will look the same as mine and will show the same symptom, as long as systemd-boot is used as bootlader.
Therefore I'd say this is a glitch which needs some fix.
I see that the autogenerated unit /run/systemd/generator.late/boot.mount has "Options=umask=0077,noauto,rw" and "Where=/boot". Here it gets a bit confusing, the unit is supposed to be used for ESP only, but it so happens that by default /boot folder gets other data as well, the usual stuff - kernel images etc, and it's even recommended by the wiki.
Let's for a moment consider that wiki needs correction. Then how should the automated unit generator determine that ESP should be mounted under /boot/efi and not /boot? If it's possible then I can move the /boot files into primary partition, and just leave /boot/EFI there as an empty folder, and on ESP partition I will move EFI folder contents to top level and remove EFI folder.
Again here - https://wiki.archlinux.org/index.php/EF … _partition the doc says that /boot/efi should be used with bootloader, I consider systemd-boot a bootloader? Then https://wiki.archlinux.org/index.php/Systemd-boot needs correction.
I will try the trick of moving the /boot content to the main partition and remounting ESP to /boot/efi and then using "bootctl install" or "bootctl update", not sure if that will help, fingers crossed I will be able to boot into my system after reboot
Offline
So, I did this and it worked:
1. use a trick to disable automount - https://unix.stackexchange.com/a/405604
2. create folder /efi # not /boot/efi, systemd-boot expects /efi or /boot even though wiki says it also checks /boot/efi
3. copy all content of /boot to /efi
4. umount /boot
5. copy all but "EFI" and "loader" from /efi to /boot (now on root partition)
6. reboot
But now future kernel updates will not automatically become active, as the files will get updated in /boot but not in /efi. So I have to use some of these options - https://wiki.archlinux.org/index.php/EF … unt_points
Conclusion I can make is that systemd-boot does not integrate well with default Arch Linux kernel update process and/or systemd-gpt-auto-generator.
Offline
Also, on systems where the units are explicitly configured
(for example, listed in fstab(5)), the units this generator creates are
overridden, but additional implicit dependencies might be created.
Would not adding an entry to the fstab for /boot been simpler and cleaner?
Offline
Added a warning to not use autofs for efi - https://wiki.archlinux.org/index.php/Sy … ot_manager
Ran into this issue 2 times in a row, now changing my setup to use /etc/fstab and moving to a default "/boot" mount for EFI without copy hooks.
Offline