Fedora 41 does not mount "/home" on startup

I installed Fedora 41 on my system a few days ago. I had Fedora 40 running previously.

I ran into some initial problems using my existing “/home” partition, but was able to resolve those with help from this board.

Starting today, when my computer boots, it does not mount “/home” at all. I can log in, but everything is default and I have to run “sudo mount -a” to get “/home” to mount.

This is very annoying because it resets all my configuration every time I reboot.

Added f41

Could you provide some more details? Given that there was F40 installed previously, how did you install F41: by upgrading the existing system or by reinstalling?

In case of reinstalling, did you preserve the existing /home directory?

Please provide the output from cat /etc/fstab/, from inxi -Fzxx and from journalctl -b | grep -B 5 -A 5 home (the latter one run right after a reboot).

Please also provide the link to the other thread where you’ve got help on fixing the previous issues with the /home partition.

1 Like

I found this block in the journal, looks suspicious but the permissions on /etc/fstab look fine to me:

Nov 10 18:23:27 fedora kernel: audit: type=1400 audit(1731281007.112:4): avc:  denied  { read } for  pid=761 comm="systemd-fstab-g" name="fstab" dev="nvme0n1p4" ino=2430 scontext=system_u:s>
Nov 10 18:23:27 fedora systemd-fstab-generator[761]: Failed to open /etc/fstab: Permission denied
Nov 10 18:23:27 fedora (sd-exec-[751]: /usr/lib/systemd/system-generators/systemd-fstab-generator failed with exit status 1.
Nov 10 18:23:27 fedora systemd-ssh-generator[769]: Binding SSH to AF_UNIX socket /run/ssh-unix-local/socket.
Nov 10 18:23:27 fedora systemd-ssh-generator[769]: → connect via 'ssh .host' locally
Nov 10 18:23:27 fedora kernel: audit: type=1400 audit(1731281007.123:5): avc:  denied  { read } for  pid=764 comm="systemd-gpt-aut" name="fstab" dev="nvme0n1p4" ino=2430 scontext=system_u:
rolf@localhost-live ~
$ ls -l /etc/fstab
-rw-r--r--. 1 root root 850 Nov  9 20:39 /etc/fstab
rolf@localhost-live ~
$ cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Fri Nov  8 19:51:12 2024
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
UUID=31034e3d-e401-452a-8c17-99111c2a643b /                       btrfs   defaults        0 0
UUID=ad6eef93-b597-46db-ba2c-f6387d7cfbb2 /boot                   ext4    defaults        1 2
UUID=E85A-87CB          /boot/efi               vfat    umask=0077,shortname=winnt 0 2
UUID=d0cbcb93-75c6-418b-81e9-dcbf265b084d /home                   btrfs   subvolid=5      0 0
192.168.253.14:/mnt/WEATHER /mnt/WEATHER nfs
192.168.253.14:/mnt/2019-03-16.4T /mnt/2019-03-16.4T nfs
192.168.253.14:/mnt/Media /home/rolf/Lisa nfs
rolf@localhost-live ~
$ inxi -Fzxx
System:
  Kernel: 6.11.6-300.fc41.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.43.1-2.fc41
  Desktop: GNOME v: 47.1 tk: GTK v: 3.24.43 wm: gnome-shell dm: GDM
    Distro: Fedora Linux 41 (Workstation Edition)
Machine:
  Type: Desktop System: ASUS product: N/A v: N/A serial: <superuser required>
  Mobo: ASUSTeK model: PRIME Z790-P WIFI v: Rev 1.xx
    serial: <superuser required> part-nu: SKU UEFI: American Megatrends v: 1604
    date: 12/15/2023
CPU:
  Info: 16-core (8-mt/8-st) model: 13th Gen Intel Core i7-13700 bits: 64
    type: MST AMCP arch: Raptor Lake rev: 1 cache: L1: 1.4 MiB L2: 24 MiB
    L3: 30 MiB
  Speed (MHz): avg: 1096 min/max: 800/5100:5200:4100 cores: 1: 1096 2: 1096
    3: 1096 4: 1096 5: 1096 6: 1096 7: 1096 8: 1096 9: 1096 10: 1096 11: 1096
    12: 1096 13: 1096 14: 1096 15: 1096 16: 1096 17: 1096 18: 1096 19: 1096
    20: 1096 21: 1096 22: 1096 23: 1096 24: 1096 bogomips: 101376
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel Raptor Lake-S GT1 [UHD Graphics 770] vendor: ASUSTeK
    driver: i915 v: kernel arch: Gen-13 ports: active: DP-1
    empty: HDMI-A-1,HDMI-A-2 bus-ID: 00:02.0 chip-ID: 8086:a780
  Display: wayland server: Xwayland v: 24.1.4 compositor: gnome-shell
    driver: X: loaded: modesetting unloaded: fbdev,vesa dri: iris gpu: i915
    display-ID: 0
  Monitor-1: DP-1 model: BenQ EW3280U res: 3840x2160 dpi: 139
    diag: 806mm (31.7")
  API: OpenGL v: 4.6 vendor: intel mesa v: 24.2.6 glx-v: 1.4 es-v: 3.2
    direct-render: yes renderer: Mesa Intel Graphics (RPL-S)
    device-ID: 8086:a780 display-ID: :0.0
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
Audio:
  Device-1: Intel Raptor Lake High Definition Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:7a50
  Device-2: C-Media Audio Adapter (Unitek Y-247A)
    driver: cmedia_hs100b,snd-usb-audio,usbhid type: USB rev: 1.1 speed: 12 Mb/s
    lanes: 1 bus-ID: 1-3.4:8 chip-ID: 0d8c:0014
  API: ALSA v: k6.11.6-300.fc41.x86_64 status: kernel-api
  Server-1: JACK v: 1.9.22 status: off
  Server-2: PipeWire v: 1.2.6 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
Network:
  Device-1: Intel Raptor Lake-S PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:7a70
  IF: wlp0s20f3 state: down mac: <filter>
  Device-2: Realtek RTL8125 2.5GbE vendor: ASUSTeK driver: r8169 v: kernel
    pcie: speed: 5 GT/s lanes: 1 port: 4000 bus-ID: 05:00.0 chip-ID: 10ec:8125
  IF: eno1 state: up speed: 1000 Mbps duplex: full mac: <filter>
Bluetooth:
  Device-1: Intel AX201 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 bus-ID: 1-14:9 chip-ID: 8087:0026
  Report: btmgmt ID: hci0 rfk-id: 0 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: <filter> bt-v: 5.2 lmp-v: 11
RAID:
  Hardware-1: Intel Volume Management Device NVMe RAID Controller Intel
    driver: vmd v: 0.6 bus-ID: 00:0e.0 chip-ID: 8086:a77f
Drives:
  Local Storage: total: 3.67 TiB used: 685.69 GiB (18.3%)
  ID-1: /dev/nvme0n1 vendor: Crucial model: CT4000P3PSSD8 size: 3.64 TiB
    speed: 63.2 Gb/s lanes: 4 serial: <filter> temp: 25.9 C
  ID-2: /dev/sda vendor: NorelSys model: 1081CS0 size: 29.89 GiB type: USB
    rev: 3.2 spd: 5 Gb/s lanes: 1 serial: <filter>
Partition:
  ID-1: / size: 97.66 GiB used: 8.32 GiB (8.5%) fs: btrfs dev: /dev/nvme0n1p4
  ID-2: /boot size: 973.4 MiB used: 309.8 MiB (31.8%) fs: ext4
    dev: /dev/nvme0n1p2
  ID-3: /boot/efi size: 598.8 MiB used: 24.4 MiB (4.1%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-4: /home size: 3.54 TiB used: 677.05 GiB (18.7%) fs: btrfs
    dev: /dev/nvme0n1p3
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 22.5 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 16 GiB note: est. available: 15.35 GiB used: 4.67 GiB (30.4%)
  Processes: 507 Power: uptime: 10h 20m wakeups: 1 Init: systemd v: 256
    target: graphical (5) default: graphical
  Packages: pm: rpm pkgs: N/A note: see --rpm Compilers: gcc: 14.2.1
    Shell: Bash v: 5.2.32 running-in: gnome-terminal inxi: 3.3.36

Please also post the output of lsblk -f.

rolf@localhost-live ~
$ lsblk -f
NAME        FSTYPE  FSVER            LABEL                 UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda         iso9660 Joliet Extension Fedora-WS-Live-41-1-4 2024-10-24-15-04-27-00                              
├─sda1      iso9660 Joliet Extension Fedora-WS-Live-41-1-4 2024-10-24-15-04-27-00                     0   100% /run/media/rolf/Fedora-WS-Live-41-1-4
├─sda2      vfat    FAT16            ANACONDA              1F44-A258                                           
└─sda3                                                                                                         
sdb                                                                                                            
zram0                                                                                                          [SWAP]
nvme0n1                                                                                                        
├─nvme0n1p1 vfat    FAT32                                  E85A-87CB                             574.4M     4% /boot/efi
├─nvme0n1p2 ext4    1.0               BOOT                 ad6eef93-b597-46db-ba2c-f6387d7cfbb2  596.4M    32% /boot
├─nvme0n1p3 btrfs                    fedora_endlisnis12    d0cbcb93-75c6-418b-81e9-dcbf265b084d    2.8T    19% /home
└─nvme0n1p4 btrfs                                          31034e3d-e401-452a-8c17-99111c2a643b   87.8G     9% /

Base on the journal log, could be some SELinux (context mislabeling) issue, not sure though.

Please also provide the output of ls -laZ /home.

rolf@localhost-live ~
$ ls -laZ /home
total 32
drwxr-xr-x. 1 root root system_u:object_r:home_root_t:s0           32 Nov  9 19:44 .
dr-xr-xr-x. 1 root root system_u:object_r:root_t:s0               158 Nov  8 22:11 ..
drwx--x---+ 1 rolf rolf unconfined_u:object_r:user_home_dir_t:s0 1294 Nov 10 21:42 rolf
drwxr-xr-x. 1 rolf rolf unconfined_u:object_r:user_home_dir_t:s0  200 Nov  9 19:34 rolf.new
drwx------. 1 1001 1001 unconfined_u:object_r:user_home_dir_t:s0  262 Nov  8 22:10 test

I did have SELinux disabled in F40 before I installed F41. I don’t really understand SELinux much, so I don’t know how to interpret that ls output.

I tried disabling SELinux and “/home” now auto-mounts correctly on startup.

sudo grubby --update-kernel ALL --args="selinux=0"

1 Like

Disabling SELinux can’t be the solution here. It’s a good test to isolate the problem but I would never leave it disabled.

3 Likes

I’d be happy to hear other recommendations, other than disabling SELinux.

I’ll be honest, I don’t really understand the value of SELinux, especially for single user systems.

It seems to cause a lot of other trouble for me. For example, podman can’t mount my home directory with SELinux enabled. I get permission denied, and when I use the :z option, it says it can’t relable it.

Disabling the SELinux module because you have an issue is the equivalent of turning off your firewall because you want to run permit inbound SSH traffic. It will work but it’s not really advisable.

You’d be better off learning a little about selinux, what the message means, finding the rule which prevents the systemd-fstab-generastor from reading /etc/fstab and amending it (or writing a new rule to permit that access.

You could always drop into SELinux permissive mode to make sure you have the right issue tracked down before applying the new rule.

I had to do a similar thing with F40 when I wanted to create a VPN to one of my servers and my certificate file was blocked from being read by an existing SELinux rule. Perfectly OK on my previous installation using a different distro but not on Fedora.

Given that the OP has freshly installed F41, it’s a fair expectation for the system to be working OOTB, without any SELinux adjustments. However, there are issues, possibly caused by the fact that during installation an existing /home subvolume has been reused, but not necessarily.

@endlisnis, the first thing you could try is to set SELinux to permissive mode (by using the kernel argument enforcing=0), and then autorelabeling the filesystem(s) (with fixfiles -F onboot and rebooting*).

If it works, than you can reset SELinux to enforcing mode. The sestatus command will tell you the current mode.

*EDIT: You might want to reboot twice, to be able to see if the solution is working (possibly needed in case /etc/fstab has a mislabling as well).

1 Like

I modified /etc/fstab after initial installation of F41 (to add in my network mounts). I did this by copying the file to my home directory, appending some data to it, and then copying it back. I’m assuming that I messed up the SELinux labelling of the file during that procedure. I doubt this is a “bug” in F41, probably just me not understanding SELinux.

That should be the issue then. It is always recommended to edit system files directly from the terminal.

The procedure above should solve it.

Another, possibly easier method would be to recreate fstab with the correct permissions:

sudo mv /etc/fstab /etc/fstab.bkp 
cat /etc/fstab.bkp | sudo tee /etc/fstab > /dev/null

With the latter approach there still might be a need to restore the default security contexts for the file:

sudo restorecon -v -F /etc/fstab

Then make sure the right context has been applied:

ls -laZ /etc/fstab

The context should read: system_u:object_r:etc_t:s0.