Results 1 to 8 of 8

Thread: Run fsck on root filesystem

  1. #1
    Join Date
    Oct 2020
    Beans
    4

    Run fsck on root filesystem

    I am running Ubuntu Server 18.04.5 as a VM using VMWare 6.2. At login I get the following message - "/dev/sda2 should be checked for errors". This is my root filesystem. I'm not great with Linux so the solutions I have tried I found via Google search. Here's what I've tried so far..


    • Run 'sudo touch /forcefsck', nothing happened on reboot
    • Run fsck from the recovery menu, get the following error - "/lib/recovery-mode/recovery-menu: line 80: /etc/default/rcs: no such file or directory fsck from util-linux 2.31.1"
    • Booted into ubuntu-18.04.5-live-server-amd64.iso, but no option to enter terminal and 'CTRL ALT T' does not respond using VMWare Remote Console


    Google results isn't giving me anymore options so any advice offered would be greatly appreciated.

  2. #2
    Join Date
    Nov 2012
    Location
    Halloween Town
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Run fsck on root filesystem

    Thread moved to Virtualisation for a better fit

  3. #3
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    21,654
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Run fsck on root filesystem

    Quote Originally Posted by pitchshift View Post
    • Run 'sudo touch /forcefsck', nothing happened on reboot
    • Run fsck from the recovery menu, get the following error - "/lib/recovery-mode/recovery-menu: line 80: /etc/default/rcs: no such file or directory fsck from util-linux 2.31.1"
    • Booted into ubuntu-18.04.5-live-server-amd64.iso, but no option to enter terminal and 'CTRL ALT T' does not respond using VMWare Remote Console


    Google results isn't giving me anymore options so any advice offered would be greatly appreciated.
    Well, crap.
    Is the storage encrypted or using LVM or ZFS or btrfs? Those shouldn't break using the "Recovery" menu method, but if that is the situation, ouch.

    The sudo touch /forcefsck method stopped working when systemd was introduced.

    Which means the only possible answer is to boot from alternate media, manually determine the correct device file, and run the fsck against that device file. Any Desktop Ubuntu flavor for the same release number (18.04 is close enough) can be used, just go into the "Try Ubuntu" option. Then you have a GUI and multiple terminals to get the lsblk output, handle any LUKS commands or LVM commands to get the storage seen, and can run fsck in another terminal.

    So, the first step is to say which file systems, encryption, ZFS, LVM, etc ... are used so we don't go down the 50,000 options.

    I think there is a grub command option to force an FSCK, but since systemd took over, I've not used it and before then, I just used the touch /forcefsck method. https://www.linuxuprising.com/2019/0...ilesystem.html option 2. Not that the fstab has to be correctly setup too. Lots of people have fsck checking disabled in their fstabs for some reason. Use sudoedit /etc/default/grub to modify the grub boot command as the link says. All the examples in this link assume you are not using encryption or LVM. If you are, all the device names are different.

  4. #4
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: Run fsck on root filesystem

    I don't know vmware but when I used VBox I just inserted an iso of a lubuntu live system into the virtual CD drive of that VM, quickly pressed F12 when booting the VM to select boot device, chose to boot the iso and used that live Lubuntu system to run fsck on the VM.

    It worked just as it would if I was doing the same on a bare metal install.
    Does vmware have such a facility?

  5. #5
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    21,654
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Run fsck on root filesystem

    I took the exact error message and googled it:
    https://askubuntu.com/questions/1149...5-after-update
    That points to something related to using Wayland for gdm. Some people have X11 enabled, but gdm was still using Wayland. A few different fix options are offered.
    Last edited by TheFu; 4 Weeks Ago at 02:41 AM.

  6. #6
    Join Date
    Oct 2020
    Beans
    4

    Re: Run fsck on root filesystem

    No encryption is enabled, I will try mount a desktop Ubuntu ISO and see if I can get to terminal that way.

  7. #7
    Join Date
    Oct 2020
    Beans
    4

    Re: Run fsck on root filesystem

    I booted into Ubuntu desktop ISO and was able to run fsck on the root partition successfully and is now showing as clean.

    I still get the error message on boot. I ran fsck again and it's still showing as clean. How do I manually remove this message?

  8. #8
    Join Date
    Oct 2020
    Beans
    4

    Re: Run fsck on root filesystem

    Found a fix https://www.linuxuprising.com/2019/0...ilesystem.html

    I probably could have done this rather than booting into Ubuntu desktop. Learnt something new I guess. Thanks for the support.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •