FSCK repair of EFI partition

The place to discuss Linux and Unix Operating Systems
Forum rules
Behave
Post Reply
User avatar
Grogan
Your Host
Posts: 2050
Joined: Sat Aug 21, 2021 10:04 am
Location: Ontario, Canada

FSCK repair of EFI partition

Post by Grogan »

I've had warnings about improperly unmounted filesystem in my kernel logs (dmesg buffer) but didn't really care too much because there's nothing really wrong with it. Still, I don't like disorderliness, so I figured I might as well fix it. I'm looking around my system for a dos fsck utility... WTF, I don't have one? I forgot to even install msdostools (the package in Arch) as I just never created any FAT filesystems on this setup... I created this one while booted with the Arch ISO.

So the utility "dosfsck" is really dosfsck -> fsck.fat. If you type "man dosfsck" you get the man page for fsck.fat. Anyway, it's just this:

Code: Select all

[nicetry ~]# umount /boot
[nicetry ~]# dosfsck -w -r /dev/nvme1n1p1
fsck.fat 4.2 (2021-01-31)
There are differences between boot sector and its backup.
This is mostly harmless. Differences: (offset:original/backup)
  65:01/00
1) Copy original to backup
2) Copy backup to original
3) No action
[123?q]? 1
Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
1) Remove dirty bit
2) No action
[12?q]? 1
/dev/nvme1n1p1: 370 files, 6114/261628 clusters
[nicetry ~]#
-w is "write changes to disk immediately". That looked like something I want to happen

-r is to prompt for repair operations. The default is to repair automatically (and choose the least destructive solution if more than one exists). I don't like the sounds of that.

Yes, I want the existing boot sector copied to backup if there is a discrepancy.

Yes, I want to clear the dirty bit.

As I suspected, there were no real "errors" here, the dirty bit just needed to be cleared.
Post Reply