Search code examples
linuxbashvmwarevmware-toolsfsck

editing a file while in memory during a fresh provisioning?


I want to disable fsck from doing a file system checks (yes I am aware of it's purpose). Online it says to edit the 6th column in the /etc/fstab file.

sed -i 's/ [1-]$/ 0/g' /etc/fstab

I have tried putting it when the kickstarter files run but it doesn't actually edit the file since it is memory. Am I looking to disabling fsck incorrectly or how should I do it?


Solution

  • Finally figured it out. There are two things that you can do. For rhel 7 you want to fsck.mode=skip to your boot_opts line. Then to be able to enable fsck back up, you edit fsck.mode=skip from your grub files then commit those changes to your grub file. grub2-mkconfig > /boot/grub2/grub.cfg. This will reactivate the fsck.