how do you run a filesystem check?
in fedora how do you run a filesystem check? Is this done from the terminal? This is something related to a answer I got for a shutdown error.
in fedora how do you run a filesystem check? Is this done from the terminal? This is something related to a answer I got for a shutdown error.
To perform a filesystem check, you have to use the tool fsck
.
# fsck /dev/sda2Keep in mind, the partition must be unmounted. Use
# umount /dev/sda2to unmount the partition. However, in some cases, such as if you want to check your `/` partition (your root partition), you have to either use a Live CD of Fedora or perform the fsck at boot. To achieve that, execute
# cat /etc/fstabThe output of that should be close to:
# # /etc/fstab # Created by anaconda on Mon Apr 14 19:56:10 2014 # # Accessible filesystems, by reference, are maintained under '/dev/disk' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info # #UUID=6b266543-a497-44de-981f-ee460b85590a / ext4 defaults 1 0 UUID=48ce0f9f-eee1-4f72-b90e-1a28e6a83c8e /boot ext4 defaults 1 0 UUID=D58E-1C9A /boot/efi vfat umask=0077,shortname=winnt 0 0 UUID=448774a1-05f9-47e6-9fad-ac5ac4e10b64 /home ext4 defaults 1 1 #Note the last 1 UUID=a60856f9-2247-4d13-b4a8-a9e2ecd91aa4 /var ext4 defaults 1 0 UUID=0a0ff8de-5395-469d-8e51-a7982d4a3645 swap swap defaults 0 0
The last 1
on the line mounting /home
signifies that it will be checked during boot. After it is done, I suggest you keep checking the partition, but if wanted, change to a 0
. Honesly, I am not performing important tasks on this machine, so I don't fsck any of my partitions.
HTH.
Note: All of this is done from a terminal
Yes, you can use fsck
command in a shell to run a filesystem check. However, notice that the filesystem you want to check should not be mounted; e.g. if you want to check /
, you shouldn't do it when you are running the OS. You should either run it from a Live disk or installation disk, or go to initrd shell
when you want to boot the OS. For the latter, when you boot your system normally, in the Grub menu, you should edit the Fedora menu entry and add an rdshell
option at the end of kernel boot command line (the line started with linux
), and press F10
to boot into initrd shell. Then you should be able to run fsck.
@hedayat- accept this as correct? its better than mine :)
Fixed! @hedayat - can you delete comments? And can you accept my answer. I can't seem to accept it. It says I can only do that after two days (?!).
Asked: 2014-08-12 19:17:09 -0600
Seen: 7,923 times
Last updated: Aug 13 '14
KWin failure message at shutdown
Fedora 20 stuck in Emergency Mode
Lenovo notebook can not shutdown, suspend or hibernate properly. Reboot works. What can cause this?
Fedora 29 doesn't shut all the way down
Fedora showing input/output error after 10-20mins of use
Tasks performed during shutdown
No UMS support in radeon module
computer shutdown error [closed]
how to stop the "install pending software updates" infernal loop?