Cleaning Partition on Restart

When I restart, it hangs showing this.

Starting version arch 246.4-1-arch
/dev/nvm0n1p5: clean, 442632/3874816 files, 4156570/15494400

I’ve enbaled TRIM for SSD cause I thought that was the problem but it still happens

(Recently switched from Manjaro)

1 Like


As per Arch wiki it is recommended to remove discard options (if applicable) from fstab and enable fstrim.timer.

If you want to make sure the ssd is not experiencing latency due to missing discard you can run fstim manually.

sudo fstrim -a

fstrim only works on mounted partitions so you can’t do it in chroot.

Thank You this is this command I used

sudo systemctl enable fstrim.timer

After doing what you said, reboot is faster. It still shows the problem but if just happens a lot quicker. Is there anything else I can do?
EDIT: it also now happens on boot.

I think - you are mistaking the message which occurs at boot - filesystem check.

Note the message Starting version … which is the systemd starting displaying the installed version.

Unfortunately, I’m not. It is the same message with the `clean’ action but different numbers

Post your fstab and the output of:

sudo blkid


systemd-analyze blame

:edit: I also think that message is just stuck in the video buffer from the last restart and is meaningless.

sudo bklid

/dev/nvme0n1p1: LABEL="SYSTEM_DRV" UUID="68E5-B32E" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="2b6ece47-0ab8-42a9-b58c-f5da98285369"
/dev/nvme0n1p2: PARTLABEL="Microsoft reserved partition" PARTUUID="ca00a86d-4608-4edf-ab6e-c4936d23652c"
/dev/nvme0n1p3: LABEL="Windows" BLOCK_SIZE="512" UUID="5E3AE6543AE628AB" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="a8d2df62-7288-4f7b-85a4-54e8eb677e3c"
/dev/nvme0n1p4: LABEL="WINRE_DRV" BLOCK_SIZE="512" UUID="403CE72B3CE71B24" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="b37c430a-b009-4e73-9f1f-ef934ec47e50"
/dev/nvme0n1p5: UUID="9e7ca395-6117-495e-90de-7e16ef13c0fd" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="00c04d72-b5e1-bf41-8da5-09558111dd13"

systemd-analyze blame

22.006s NetworkManager-wait-online.service                   
20.991s systemd-networkd-wait-online.service                 
 1.538s systemd-logind.service                               
 1.525s systemd-random-seed.service                          
 1.501s lvm2-monitor.service                                 
 1.366s dev-nvme0n1p5.device                                 
  999ms systemd-networkd.service                             
  979ms systemd-timesyncd.service                            
  750ms upower.service                                       
  647ms systemd-udevd.service                                
  642ms systemd-journald.service                             
  633ms snapd.service                                        
  363ms tlp.service                                          
  249ms udisks2.service                                      
  207ms ldconfig.service                                     
  157ms user@1000.service                                    
  123ms systemd-udev-trigger.service                         
lines 1-17

# /etc/fstab: static file system information.
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=68E5-B32E                            /boot/efi      vfat    umask=0077 0 2
UUID=9e7ca395-6117-495e-90de-7e16ef13c0fd /              ext4    defaults,noatime 0 1


I believe that message is related to fsck (as mentioned by @Root) being run on the root partition and has nothing to do with fstrim.

See this article (scroll down to the “Sixth Field”):

Try disabling the two above.

1 Like

any idea what they do?

OK so it is not your UUID’s.

Wait until you are on-line. disable:

sudo systemctl disable NetworkManager-wait-online.service     
sudo systemctl disable systemd-networkd-wait-online.service 

Change disable to enable to re-enable.

Right This seems to be the problem but I’m scared to change them. Would anything happen.
The value of 1 must always be used for the root filesystem; for all the others we can use 2
*(mine aren’t)
Edit: Nevemind I can’t read

UUID=68E5-B32E /boot/efi vfat umask=0077 0 2 :arrow_left: ESP
UUID=9e7ca395-6117-495e-90de-7e16ef13c0fd / ext4 defaults,noatime 0 1 :arrow_left: ROOT

The values are just fine. You can leave it as is.

The “hang” is probably due to the size of the root partition, if you have a large one.

Ok, so the line still appers on both boot and restart but the hang is gone.

So thank you very much.

You may need to mask the services, replace disable with mask. But glad it is fixed :smiley: