2

I'm on Fedora 27 and I'm trying to fsck a SSD but the usual things like /forcefsck aren't working.

Also tried to set up my /etc/default/grub like so

GRUB_CMDLINE_LINUX="rd.lvm.lv=fedora/root rd.luks.uuid=luks-2ef8e9f4-a691-4007-91d1-04d34cb4dd4f rd.lvm.lv=fedora/swap rhgb quiet fsck.mode=force"
3
  • 1
    Is it too obvious to suggest running fsck on the decrypted layer that holds the filesystem? If so please clarify in your question. Dec 10, 2017 at 21:53
  • I'm having other issues that prevent me from livebooting from another drive/distro to attempt this. I assumed there wouldn't be any reason it couldn't be done in a similar way to fsck on a non-LVM partition.
    – warsong
    Dec 10, 2017 at 22:01
  • 1
    Under Ubuntu/Debian you are able to select a "rescue shell" to boot into in the boot menu. So I assume you should be able to do the same under Fedora - i.e. boot into a rescue shell and do the decrypting and fsck there. ? Dec 11, 2017 at 7:48

2 Answers 2

1

With Fedora 31 both ways seem to work. Since I haven't found the answer easily I post it here:

sudo touch /forcefsck

The logs state that you should use fsck.mode=force instead of creating the file /forcefsck

In GRUB press e Navigate with the arrow keys to the line starting with linux... and add

fsck.mode=force

Press Ctrl+x to boot.

1

Notice that the file /etc/default/grub is not used directly by the boot process. That file is used indirectly as input when running grub2-mkconfig (e.g. grub2-mkconfig -o /boot/grub2/grub.cfg), and its output is what will be used.

So if you only update /etc/default/grub then nothing will change until you run grub2-mkconfig.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .