11

I have upgraded the system from 19.10 to 20.04. The installation is dual boot. When I turn on the system every time it checks the filesystem using 80/90 seconds since it starts running Ubuntu from the Grub. Also compare the writing "press Ctrl-c to cancel the checks in progress on the filesystem" which lasts 45/50 seconds (of the 80/90 mentioned above). The Ctrl-c command has no effect, during the update there is no progress information and in the end no results. Tune2fs tells me that Ubuntu's 2 filesystems (/ and / home on two different partitions) are "clean". With 19.10 and even earlier with 18.04 this did not happen, there is no success with the other PCs to which I have yet to make progress. Anyone have any ideas? thank you all

  • I have just updated from 18.4 to 20.4. I have the same situation. If someone with the right knowledge can please put in a bug report would be very nice. Mettavihari – mettavihari Aug 27 '20 at 03:09
  • I found: https://askubuntu.com/questions/9939/what-do-the-last-two-fields-in-fstab-mean My fstab had pass 1 and 2 – Amanuel Nega Aug 16 '23 at 05:25

7 Answers7

10

Removing Disk Check From 20.04 Boot

The command line option fsck.mode=skip can be used to skip the disk check when booting Ubuntu 20.04.

The line Checking disks: 0% complete may still come up but fsck will not be run, nor will boot time be increased.

Add fsck.mode=skip to the linux line in grub.cfg just before quiet splash

It is recommended that we add the command to grub.cfg by editing /etc/default/grub thus: GRUB_CMDLINE_LINUX_DEFAULT="fsck.mode=skip quiet splash" and then run sudo update-grub.

I have had this problem with a Live USB but not with an installed system.

C.S.Cameron
  • 19,519
  • +1, This is implemented in some of the boot menu entries of persistent live drives made with mkusb. See this link and this link. – sudodus May 09 '20 at 11:12
  • @sudodus: I have not seen this FS check with an installed system before, have you? – C.S.Cameron May 09 '20 at 11:26
  • No, only with live systems made from Ubuntu 20.04 family iso files. But there used to be regular file system checks (once per 30 days) in installed systems. I think it was removed from default (made opt-in instead of opt-out) because it could be very time-consuming with the huge HDDs we have nowadays. – sudodus May 09 '20 at 11:31
  • 1
    You shouldn't be editing grub.cfg manually. The proper place to add that parameter is in /etc/default/grub and then sudo update-grub. – heynnema May 10 '20 at 15:33
  • @heynnema: Editing /etc/default/grub or /etc/grub.d/40_custom may be good ways to edit GRUB in an Installed System. What is your recommendation for editing GRUB in a Persistent USB System? – C.S.Cameron May 11 '20 at 04:22
  • If you're asking about a situation where somebody is running Ubuntu off of a flash drive with persistence... I don't know, because I don't have such configured here to test with... and because I'd never recommend someone to run Ubuntu that way. Sorry I don't have a better response for you. – heynnema May 11 '20 at 13:11
  • @heynnema: Persistent USB is the best way I can think of to introduce people to Linux. Not everyone wants a different operating system installed on their computer without testing it first. – C.S.Cameron May 11 '20 at 13:18
  • That's why there's a "Try Ubuntu" on Live DVD/USB. What happens when users run with a persistent flash drive, is they tend to stay on it, and never really install it. Then, months later, they log a question with "my /home is full", or something similar. – heynnema May 11 '20 at 13:34
  • @heynnema Is that a problem for you? If they are filling their home, they must be learning something. – C.S.Cameron May 11 '20 at 13:56
  • Other than the fact that is slow on a flash drive (so they never really get an idea of the performance), and they fill up /home, and they log questions here when something doesn't work (due to the media)... no, it's not a problem for me... they can do as they wish... I just don't encourage that configuration. – heynnema May 11 '20 at 14:05
  • @heynnema: Nowadays Ubuntu runs mostly in RAM if there is enough, which is faster than off HDD. Have you tried a persistent USB lately? There have been very few questions about Persistent USB drives filling up home on Ask Ubuntu, do a search. There are generally less than two questions a day logged here about Persistent USB's. Again do a search. Persistent drives are a great way to get familiar with Ubuntu. The whole point of Ask Ubuntu is a place to ask questions when something doesn't work, media or anything else, both Installed systems and Persistent. – C.S.Cameron May 12 '20 at 02:00
  • @C.S.Cameron but how can I edit grub.cfg? ubuntu doesn't boot because it hangs in the filesystem check – eddy147 Jun 12 '20 at 05:52
  • @eddy147: Can you get your hands a Ubuntu Live USB? It does not need to be 20.04. You can edit /boot/grub/grub.cfg on the internal drive directly using sudo -H nautilus on the Live USB. Best to backup grub.cfg before proceeding. – C.S.Cameron Jun 12 '20 at 06:59
  • @eddy147: It might be easiest to press "e", (for edit), at the grub menu when booting. You can then add fsck.mode=skip to the linux line as shown in my answer. This should skip the check on one boot only, but that will allow editing of /etc/default/grub and thus grub.cfg. – C.S.Cameron Jun 12 '20 at 07:15
  • @C.S.Cameron thx I can try that tomorrow, very much appreciated – eddy147 Jun 12 '20 at 12:04
  • Solved the filesystem check that was running every time. ty – Lyokolux Aug 06 '20 at 19:58
  • fsck.mode=skip did the trick for me - many thanks! – bogdan.rusu Oct 09 '21 at 15:32
3

It's fscking for a reason. Your / or /home may have problems. Perform a manual fsck on both.

  • boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode
  • open a terminal window by pressing Ctrl+Alt+T
  • type sudo fdisk -l
  • identify the /dev/sdXX device name for your "Linux Filesystem"(s)
  • type sudo fsck -f /dev/sdXX, replacing sdXX with the number(s) you found earlier
  • repeat the fsck command if there were errors
  • type reboot
heynnema
  • 70,711
  • a) **"The command line option fsck.mode=skip can be used to skip the disk check when booting Ubuntu 20.04": but in this way the system will never launch fsck? – mario_user28404 May 11 '20 at 08:13
  • b) fsck reveals no error – mario_user28404 May 11 '20 at 08:14
  • @mario_user28404 Did you fsck BOTH / AND /home? Two separate fscks. – heynnema May 11 '20 at 13:12
  • yes I have done fsck both / and /home, I also have run " systemd-analyze" " systemd-analyze critical-chain" Do you want to see te results? – mario_user28404 May 12 '20 at 09:24
  • @mario_user28404 Sure. Post them to paste.ubuntu.com. Use copy/paste, not a screenshot please. Also show me sudo blkid and cat /etc/fstab. Let me know when you got that done. – heynnema May 12 '20 at 12:42
  • for heynnema: I have done what you have asked me to do (sudo blkid and cat /etc/fstab) and pasted it in paste.ubuntu.com, I hope. If not, please help me how to do it – mario_user28404 May 13 '20 at 19:10
  • @mario_user28404 Once pasted in at paste.ubuntu.com, it should give you a URL which you should post here for me to review. – heynnema May 13 '20 at 19:28
  • 5
    There is definitely a bug in the fschk: first of all it takes forever (unplugged after 16 hours); secondly ctrl+c does not work, and thirdly there is no progress to be seen. There is definitely something wrong in 20.04 fschk. – eddy147 Jun 12 '20 at 05:54
  • @eddy147 Are you booting to an installed system on a SSD/HDD, or are you booting to a USB flash drive or Ubuntu Live DVD/USB? Was this a fresh install, or upgraded from a previous version? ps: There's no reason to down vote my answer. – heynnema Jun 12 '20 at 13:12
  • @heynnema On a mini pc so not a usb drive. Apparently it has something to do with hdmi connection: https://bugs.launchpad.net/bugs/1874194 – eddy147 Jun 13 '20 at 07:34
  • @eddy147 How does a HDMI problem relate to fscking? – heynnema Jun 13 '20 at 12:33
3

Checking /etc/fstab worked for me in 22.04.2 LTS. Turns out there was a swap listed there that was no longer connected or needed. Commented it out and the boot-up filesystem check went away.

2

I've been having this same problem in the last releases of Ubuntu. Right now, I have Ubuntu 21.10 installed and it still has it. But I managed to find some sort of solution. I have dual boot with Windows 10, and apparently Ubuntu does not like that. The partition it is always checking at boot is the ESP one. To fix that, I changed its 'pass' argument in fstab from 1 to 0. I would recommend keeping the other partitions with their original pass values, as it will make it possible for errors to be detected. I would also not recommend adding fsck.mode=skip in the command line for the same reason. Hope this helps.

1

For any poor souls that ran into this issue and none of the above worked - make sure that no old hard drives are listed in your /etc/fstab.

Run the tune2fs -l /dev/sdX command to check if the UID of the sdX matches the one in your /etc/fstab

If it does not, the long filesystem check will be triggered.

0

It should say which filesystem it's waiting for, listing its UUID. Make sure that your swap partition wasn't reformatted or changed as part of the upgrade, because this changes its UUID. If it was, update /etc/fstab and change the UUID to match the new one, or use mkswap -U {uuid} to update the UUID on the swap partition to match /etc/fstab.

0

Also make sure that the GRUB_CMDLINE_LINUX_DEFAULT settings in /etc/default/grub does not force fsck on every boot. Remove that and run update-grub in that case.