Ask Your Question
0

Is there a way to force fsck to run at boot on an encrypted LVM drive?

asked 2018-02-20 09:06:38 -0600

wrsg gravatar image

The usual methods aren't working, such as adding a file named forcefsck to the root.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-02-20 10:59:29 -0600

fcomida gravatar image

Add fsck.mode=force to grub commandline.

edit flag offensive delete link more

Comments

Could you please confirm if the correct way to do this is to add that option to the end of the line starting with 'linuxefi' after selecting the kernel and pressing 'e'? Because I am trying that and it doesn't do anything.

wrsg gravatar imagewrsg ( 2018-02-24 07:19:00 -0600 )edit

Yes, add it at the end of the line starting with linuxefi. It does work here, luks encrypted root.

fcomida gravatar imagefcomida ( 2018-02-24 08:45:37 -0600 )edit

This is the output from dmesg | grep 'fsck'

[ 0.000000] Command line: BOOTIMAGE=/vmlinuz-4.15.4-300.fc27.x8664 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rd.luks.uuid=luks-2ef8e9f4-a691-4007-91d1-04d34cb4dd4f rd.lvm.lv=fedora/swap rhgb quiet LANG=enGB.UTF-8 fsck.mode=force [ 0.000000] Kernel command line: BOOTIMAGE=/vmlinuz-4.15.4-300.fc27.x8664 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rd.luks.uuid=luks-2ef8e9f4-a691-4007-91d1-04d34cb4dd4f rd.lvm.lv=fedora/swap rhgb quiet LANG=enGB.UTF-8 fsck.mode=force

wrsg gravatar imagewrsg ( 2018-02-24 11:40:08 -0600 )edit

[ 29.607230] audit: type=1130 audit(1519478361.606:19): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=systemd-fsck-root comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

wrsg gravatar imagewrsg ( 2018-02-24 11:40:28 -0600 )edit

Does that mean fsck took place? Nothing else obvious shows in the dmesg log

wrsg gravatar imagewrsg ( 2018-02-24 11:41:08 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-02-20 09:06:38 -0600

Seen: 389 times

Last updated: Feb 20 '18