Ext4 Installing updates causes dirty partition recovery prompt during boot

Most times after updates are installed on my ext4 partition it fails to boot the second reboot after updates because the partition is marked as dirty. Then I have to manually run fschk to continue to boot. It seems when installing updates, it doesn’t unmount the partition cleanly before rebooting.

This is strange. All my Tumbleweed/Leap machines use ext4 for / and /home and never hit such an problem. Maybe this is due to some fstab settings. Maybe share more informations about your system. Partition layout, fstab content, non standard services that you use/run and more…

I haven’t made any changes fromt he default Network Install. But here are my settings:

UUID=232a6335-b6ba-4f0a-9f73-2b409a5bd2a3  swap       swap  defaults  0  0
UUID=84c95580-604f-4df2-99ec-680d1808fa71  /          ext4  defaults  0  1
UUID=C099-397E                             /boot/efi  vfat  utf8      0  2

Hardware info:

localhost.localdomain       
    description: Notebook
    product: Victus by HP Laptop 16-e1xxx (697R5EA#ACQ)
    vendor: HP
    version: Chassis Version
    serial: 5CD2275GRW
    width: 64 bits
    capabilities: smbios-3.4.0 dmi-3.4.0 smp vsyscall32
    configuration: boot=normal chassis=notebook family=103C_5335M7 HP VICTUS sku=697R5EA#ACQ uuid=32444335-3732-4735-5257-5c60ba610c24
  *-core
       description: Motherboard
       product: 8A22
       vendor: HP
       physical id: 0
       version: 19.75
       serial: PPVWB018JGU05P
       slot: Base Board Chassis Location
     *-firmware
          description: BIOS
          vendor: AMI
          physical id: 0
          version: F.19
          date: 07/14/2023
          size: 64KiB
          capacity: 16MiB
          capabilities: pci upgrade shadowing cdboot bootselect edd smartbattery biosbootspecification netboot uefi
     *-cache:0
          description: L1 cache
          physical id: d
          slot: L1 - Cache
          size: 512KiB
          capacity: 512KiB
          clock: 1GHz (1.0ns)
          capabilities: pipeline-burst internal write-back unified
          configuration: level=1
     *-cache:1
          description: L2 cache
          physical id: e
          slot: L2 - Cache
          size: 4MiB
          capacity: 4MiB
          clock: 1GHz (1.0ns)
          capabilities: pipeline-burst internal write-back unified
          configuration: level=2
     *-cache:2
          description: L3 cache
          physical id: f
          slot: L3 - Cache
          size: 16MiB
          capacity: 16MiB
          clock: 1GHz (1.0ns)
          capabilities: pipeline-burst internal write-back unified
          configuration: level=3
     *-cpu
          description: CPU
          product: AMD Ryzen 7 6800H with Radeon Graphics
          vendor: Advanced Micro Devices [AMD]
          physical id: 10
          bus info: cpu@0
          version: 25.68.1
          serial: Unknown
          slot: FP7
          size: 1680MHz
          capacity: 4785MHz
          width: 64 bits
          clock: 100MHz
          capabilities: lm fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp x86-64 constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca fsrm debug_swap cpufreq
          configuration: cores=8 enabledcores=8 microcode=171983106 threads=16
     *-memory
          description: System Memory
          physical id: 12
          slot: System board or motherboard
          size: 64GiB
        *-bank:0
             description: SODIMM Synchronous Unbuffered (Unregistered) 5600 MHz (0.2 ns)
             product: CT32G56C46S5.M16B2
             vendor: Unknown
             physical id: 0
             serial: E79FF03A
             slot: Bottom - Slot 1 (left)
             size: 32GiB
             width: 64 bits
             clock: 1305MHz (0.8ns)
        *-bank:1
             description: SODIMM Synchronous Unbuffered (Unregistered) 5600 MHz (0.2 ns)
             product: CT32G56C46S5.M16B2
             vendor: Unknown
             physical id: 1
             serial: E79FF28A
             slot: Bottom - Slot 2 (right)
             size: 32GiB
             width: 64 bits
             clock: 1305MHz (0.8ns)
     *-pci:0
          description: Host bridge
          product: Family 17h-19h PCIe Root Complex
          vendor: Advanced Micro Devices, Inc. [AMD]
          physical id: 100
          bus info: pci@0000:00:00.0
          version: 01
          width: 32 bits
          clock: 33MHz
        *-generic UNCLAIMED
             description: IOMMU
             product: Family 17h-19h IOMMU
             vendor: Advanced Micro Devices, Inc. [AMD]
             physical id: 0.2
             bus info: pci@0000:00:00.2
             version: 00
             width: 32 bits
             clock: 33MHz
             capabilities: msi ht bus_master cap_list
             configuration: latency=0
        *-pci:0
             description: PCI bridge
             product: Family 17h-19h PCIe GPP Bridge
             vendor: Advanced Micro Devices, Inc. [AMD]
             physical id: 1.1
             bus info: pci@0000:00:01.1
             version: 00
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi ht normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:36 ioport:f000(size=4096) memory:fb000000-fc0fffff ioport:fb00000000(size=4328521728)
           *-display
                description: VGA compatible controller
                product: GA107M [GeForce RTX 3050 Ti Mobile]
                vendor: NVIDIA Corporation
                physical id: 0
                bus info: pci@0000:01:00.0
                logical name: /dev/fb0
                version: a1
                width: 64 bits
                clock: 33MHz
                capabilities: pm msi pciexpress vga_controller bus_master cap_list rom fb
                configuration: depth=32 driver=nvidia latency=0 mode=1920x1080 visual=truecolor xres=1920 yres=1080
                resources: iomemory:fb0-faf iomemory:fc0-fbf irq:99 memory:fb000000-fbffffff memory:fb00000000-fbffffffff memory:fc00000000-fc01ffffff ioport:f000(size=128) memory:fc000000-fc07ffff
        *-pci:1
             description: PCI bridge
             product: Family 17h-19h PCIe GPP Bridge
             vendor: Advanced Micro Devices, Inc. [AMD]
             physical id: 1.2
             bus info: pci@0000:00:01.2
             version: 00
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm pciexpress msi ht normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:37 memory:fcc00000-fccfffff
           *-nvme
                description: NVMe device
                product: MTFDKBA512TFH-1BC1AABHA
                vendor: Micron Technology Inc
                physical id: 0
                bus info: pci@0000:02:00.0
                logical name: /dev/nvme0
                version: HPS0043
                serial: UMDMC01SCGHY20
                width: 64 bits
                clock: 33MHz
                capabilities: nvme pm msix pciexpress nvm_express bus_master cap_list
                configuration: driver=nvme latency=0 nqn=nqn.2014.08.org.nvmexpress:13441344UMDMC01SCGHY20      MTFDKBA512TFH-1BC1AABHA state=live
                resources: irq:52 memory:fcc00000-fcc03fff
              *-namespace:0
                   description: NVMe disk
                   physical id: 0
                   logical name: hwmon1
              *-namespace:1
                   description: NVMe disk
                   physical id: 2
                   logical name: /dev/ng0n1
              *-namespace:2
                   description: NVMe disk
                   physical id: 1
                   bus info: nvme@0:1
                   logical name: /dev/nvme0n1
                   size: 476GiB (512GB)
                   capabilities: gpt-1.00 partitioned partitioned:gpt
                   configuration: guid=404ce755-6ae0-412b-be35-2b46f9b2ea55 logicalsectorsize=512 sectorsize=512 wwid=eui.000000000000000100a075223741ccc6
                 *-volume:0 UNCLAIMED
                      description: Windows FAT volume
                      vendor: mkfs.fat
                      physical id: 1
                      bus info: nvme@0:1,1
                      version: FAT32
                      serial: c099-397e
                      size: 510MiB
                      capacity: 511MiB
                      capabilities: boot fat initialized
                      configuration: FATs=2 filesystem=fat
                 *-volume:1
                      description: EXT4 volume
                      vendor: Linux
                      physical id: 2
                      bus info: nvme@0:1,2
                      logical name: /dev/nvme0n1p2
                      logical name: /
                      version: 1.0
                      serial: 84c95580-604f-4df2-99ec-680d1808fa71
                      size: 474GiB
                      capabilities: journaled extended_attributes large_files huge_files dir_nlink recover 64bit extents ext4 ext2 initialized
                      configuration: created=2024-01-19 20:22:48 filesystem=ext4 lastmountpoint=/ modified=2024-02-13 10:32:12 mount.fstype=ext4 mount.options=rw,relatime mounted=2024-02-13 10:32:41 state=mounted
                 *-volume:2
                      description: Linux swap volume
                      vendor: Linux
                      physical id: 3
                      bus info: nvme@0:1,3
                      logical name: /dev/nvme0n1p3
                      version: 1
                      serial: 232a6335-b6ba-4f0a-9f73-2b409a5bd2a3
                      size: 2GiB
                      capacity: 2GiB
                      capabilities: nofs swap initialized
                      configuration: filesystem=swap pagesize=4096

This isn’t particularly helpful but I switched to btrfs after having same issues on both fedora and tumbleweed on an nvme and even going so far as re-installing on a spare ssd with same result. It just became too infuriating to troubleshoot further.

Similar here. I’ve always used ext4 for / and /home as well. Both with spinning-rust and now ssd. This is with Tumbleweed since 2018 and Leap before that. Maybe it’s not ext4 but something is causing an unclean shutdown, like a GPU driver or such, or something during shutdown causing writes without a final sync.

If this problem is reproducible it seems to It would help the list the details on what fsck is finding.

Ideally you would like to run fsck on the driver after the update before the reboot but it looks that is not possible at least on ext4. I am running with XFS and learned, searching for this that XFS has xfs_check for this.

It happens randomly but the next time it happens, I’ll be prepared with an usb stick to save the logs as well as the command output.

Did not detect my usb stick for some reason but I took pictures:

You did not explain how you got from the first to the second screen.

The errror means that filesystem was not cleanly unmounted (which is not surprising for a root filesystem). The problem is that dracut attempts to initially mount root as read-only and that is not possible in this case. Try adding rw kernel option - it should force read-write mount and bypass this issue.

Sorry the photos are out of sequence. The second screen is a screenshot of the rdsoreport .txt. Then I ran fschk on the nvme drive to repair the issue to continue booting. To get into situation, it happens sometimes when installing updates when it reboots the second time. The update sequence is not always unmounting the volume cleanly when using ext4. I would prefer solve the issue than forcing mounting it when it’s not unmounted cleanly.

Thanks for the screenshot, clear.

I would check the journal if the shutdown was clean.

https://bbs.archlinux.org/viewtopic.php?id=274652

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.