3

New problem in >18.04...

I just discovered that the way I've always used fsck at the root access in recovery mode no longer works. It used to be:

fsck -f /

But now it tells me that the disk is mounted r/w, and it won't run. Sure enough the disk IS mounted r/w. This is new behavior. Trying to remount the disk as ro doesn't work either.

mount -o remount,ro /

And, running fsck from the recovery mode menus doesn't work either.

Running fsck while booted to a Ubuntu Live USB works of course.

Anybody got an idea why I can't fsck in recovery mode, and what's changed that causes the disk to be mounted r/w?

6
  • possible duplicate of askubuntu.com/questions/98559/… – s1mmel Jan 23 '19 at 9:11
  • @s1mmel Thanks for your comment, however, the link goes to a question from 2012, and it doesn't address my problem in 18.10, whereas something has changed in 18.xx that causes the disk to be mounted r/w, and thus, you can't run fsck in recovery mode like you could in 17.xx. – heynnema Jan 23 '19 at 15:46
  • SNIP --> I read online that I shouldn't mount the root file system if I want to run fsck, so I chose the option "do not use a root file system". <-- SNIP. Did you see such an option? – s1mmel Jan 23 '19 at 15:57
  • @s1mmel Where are you seeing "do not use root file system"? Is this in 18.xx? In 17.xx recovery mode had the disk mounted r/o, and you could run fsck. In 18.xx this isn't the case, and not only can you not run fsck from the recovery menu, but you can't run it from the root prompt, without an error about / being mounted r/w. – heynnema Jan 23 '19 at 16:06
  • It was written in the question itself. – s1mmel Jan 24 '19 at 11:09
1

For 18.04 or newer... you MUST do it this way...

  • boot to a Ubuntu Live DVD/USB
  • open a terminal window by pressing Ctrl+Alt+T
  • type sudo fdisk -l
  • identify the /dev/sdXX device name for your "Linux Filesystem"
  • type sudo fsck -f /dev/sdXX, replacing sdXX with the number you found earlier
  • repeat the fsck command if there were errors
  • type reboot
4
  • For systems that lack a DVD or USB drive, this is not an acceptable solution. – GregD May 26 '20 at 17:30
  • @GregD For systems >= 18.04, you must use either DVD or USB. And who doesn't have at least a USB port? – heynnema May 26 '20 at 18:23
  • I have servers that lack such ports for security reasons. There are also machines that cannot boot from USB. In such cases, netboot can be an option, or doing from the initial ramdisk. – GregD May 28 '20 at 3:14
  • @GregD Please write an answer that describes how to do this from netboot, or from ramdisk... and make it applicable to the average home user... – heynnema May 28 '20 at 3:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.