Ask Your Question

How to run `fsck` on fedora 18 ?

asked 2014-01-27 14:11:12 -0500

sacrac gravatar image

updated 2014-01-29 17:45:29 -0500

NickTux gravatar image


how to run fsck on fedora 18?, when my laptop ON enter my system, i need run when my root / not mounted, how can do that?


edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2014-01-27 14:14:28 -0500

mattdm gravatar image

This should happen automatically at boot if needed. You don't normally have to do anything manually.

If you need to force a check for some reason, boot with the kernel parameter fsck.mode=force.

edit flag offensive delete link more


how do I put these parameters to the kernel?

sacrac gravatar imagesacrac ( 2014-01-27 14:40:59 -0500 )edit

@sacrac: Get to the grub2 menu on boot and press e to edit the kernel parameters -- simply type the above on the end and boot.

mattdm gravatar imagemattdm ( 2014-01-27 15:09:42 -0500 )edit

This post shows how to edit the grub2 command line before booting:

FranciscoD_ gravatar imageFranciscoD_ ( 2014-01-28 05:28:04 -0500 )edit

answered 2014-01-29 17:15:05 -0500

sergiomb gravatar image

as root do :

 touch /forcefsck

and reboot

edit flag offensive delete link more


i try this ways but no working in fedora 18 i don't know why? i try other ways edit grub but not working :( i put this parameter --fsck.mode=force but negative XD

sacrac gravatar imagesacrac ( 2014-01-29 20:55:06 -0500 )edit

touch /forcefsck (as root) , check if / have the file , it worked here in my test machine with Fedora 20 , after reboot it checked filesystem and removed the file /forcefsck , or / is not ext2,3,4 ?

sergiomb gravatar imagesergiomb ( 2014-01-30 10:31:01 -0500 )edit

answered 2015-01-28 19:40:59 -0500

softlibre gravatar image

Hi there!

Well, I have a special problem, maybe the same as happens to you.

When I try to boot, fsck checks the root partition first as usual, but this time the partition has an error that cannot resolve automatically and I need to run fsck manually. Then, it won't work using fsck.mode = force or touch /forcefsck because it would start with the automated option (-a) and you cannot start it manually.

For that, I start Fedora using the rescue option in grub (systemctl rescue is the command for starting the rescue system if you're already using a Fedora console), and then I need to unmount the root. Well, as I readed at this Fedora Forum you only can run fsck on a mounted root file system if and only if is mounted read-only and you reboot inmediatly after checking. You cannot unmount the root file system!

Then, I discovered that the root file system mounts with read-write permissions (use mount and check for a "rw" symbol), and no matter the error, it continues mounting read-write.

So, I did this:

  • Start the rescue system.
  • Write your root password
  • Type dumpe2fs ROOTFS | grep 'Errors behavior:' where ROOTFS is the root device file, for example /dev/sda1 or /dev/mapper/fedora_MACHINENAME-root if encripted.
  • Check if the value is "Remount read-only" if not execute tune2fs -e remount-ro ROOTFS.
  • Reboot (systemctl reboot).
  • Start the rescue system again, if ROOTFS still has errors it will be remounted read-only
  • Write your root password
  • Check the filesystem: fsck -y ROOTFS.
  • As soon as fsck finish: reboot!!! systemctl reboot.
edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-01-27 14:11:12 -0500

Seen: 8,085 times

Last updated: Jan 28 '15