I have problems with the main OS partition, but seems that i can't run fsck on mounted partitions?
Is there a way to diagnose mounted partition (i'm having problems lately) and if there isn't what is the best way to check it when not mounted?
I have problems with the main OS partition, but seems that i can't run fsck on mounted partitions?
Is there a way to diagnose mounted partition (i'm having problems lately) and if there isn't what is the best way to check it when not mounted?
You can perform a fsck
on your root partition during the next reboot by creating a file named forcefsck
in your root directory:
sudo touch /forcefsck
reboot
fsck
, you could mount the partition from a live system and remove it from there. But as you'd have to do the fsck
from a live system anyway if it doesn't work this way, I don't see a real problem with just trying this method.
– Byte Commander
May 17 '17 at 08:25
I suggest running it in "Initramfs".
dracut
is a low-level tool for generating an "initramfs" images with a lot of capabilities.
Let's install it:
sudo apt install dracut
After installation is finished a new "initramfs" will be generated and GRUB will be updated automatically; It also removes initramfs-tools
.
Now reboot the system, hold the Shift to make the GRUB appear (if it won't by itself), press e to edit the default menu. There is a line which starts with linux
at the end of that line add rd.break=pre-mount
then press Ctrl+x to continue boot process.
it means that drop me into initramfs before mounting the filesystem, Now we are in a sh
shell and we can simply run fsck
:
$ fsch /dev/sda1
/dev/sda1: clean, xxx/xxx files, yyy/yyy blocks