fsck on reboot
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
fsck on reboot
I used:
tune2fs -C 2 -c 1 /dev/<boot partition>
to force a fsck on boot. However, it doesn't appear to do anything. Should I be expecting some sort of UI (textual or graphical) during the next boot to indicate the check in progress or is it completely silent?
tune2fs -C 2 -c 1 /dev/<boot partition>
to force a fsck on boot. However, it doesn't appear to do anything. Should I be expecting some sort of UI (textual or graphical) during the next boot to indicate the check in progress or is it completely silent?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: fsck on reboot
Use:
Upon reboot a filesystem check will be run.
Code: Select all
sudo touch /forcefsck
Re: fsck on reboot
you may have to goto a full shutdown, rather than a reboot,
- in order to get that to run, though.
- in order to get that to run, though.
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.
Re: fsck on reboot
I had already tried the forcefsck file, but I just tried it again with a full shutdown and it was no different. I get the grub menu then a black screen for a few seconds and then the login gui appears. There's no feedback that a file system check has occurred.
Re: fsck on reboot
Code: Select all
man tune2fs
Set the number of times the filesystem has been mounted. If set to a greater value than the max-mount-counts parameter set by the -c option, e2fsck(8) will check the filesystem at the next reboot.
So the first reboot wouldn't do a file check with -c2 -C2 (the next one would).
If you look in the logs, the kernel will have reported the boot activity.
The default setting for GRUB is quiet splash so you won't see the check when it happens...and if the journal is empty, a few seconds is all it takes, no test that the data is intact at all.
Re: fsck on reboot
Yeah, I was following the man page when I ran it. Probably just typed it out wrong on here.
ok, so what's the best way to turn off quiet splash temporarily?
How do I force it run a full FS check and disk integrity check? I'm seeing some odd system behaviour and I what to be sure that I've not got any disk corruption.
Which log and where?Mute Ant wrote:If you look in the logs, the kernel will have reported the boot activity.Code: Select all
man tune2fs
[/quote]Mute Ant wrote:The default setting for GRUB is quiet splash so you won't see the check when it happens...and if the journal is empty, a few seconds is all it takes, no test that the data is intact at all.Code: Select all
man tune2fs
ok, so what's the best way to turn off quiet splash temporarily?
[/quote]Mute Ant wrote:...and if the journal is empty, a few seconds is all it takes, no test that the data is intact at all.Code: Select all
man tune2fs
How do I force it run a full FS check and disk integrity check? I'm seeing some odd system behaviour and I what to be sure that I've not got any disk corruption.
Re: fsck on reboot
If you see the grub menu and the entry for your system is marked press e. This gives you an editor window. Remove further down the parameter quiet and splash, than press F 10 to boot. This is a one time change which doesn't get stored.Wheelspin wrote:so what's the best way to turn off quiet splash temporarily?
Re: fsck on reboot
If the file /forcefsck was removed that would confirm the filesystem check was performed. If you need to manually run fsck you can boot the usb installation flash drive and use gparted or the command line.
-
- Level 4
- Posts: 357
- Joined: Fri Sep 17, 2010 9:55 pm
Re: fsck on reboot
Hi Wheelspin,
Have you tried sudo tune2fs -l /dev/<boot partition> ?
This will show you some interesting things like "Last checked:"
Have you tried sudo tune2fs -l /dev/<boot partition> ?
This will show you some interesting things like "Last checked:"
In my experience you don't get feedback on smaller partitions because it happens so fast. I only get feedback on larger partitions.Should I be expecting some sort of UI (textual or graphical) during the next boot to indicate the check in progress or is it completely silent?
Re: fsck on reboot
Should this not readWheelspin wrote:I used:
tune2fs -C 2 -c 1 /dev/<boot partition>
to force a fsck on boot. However, it doesn't appear to do anything.
Code: Select all
sudo tune2fs -C 2 -c 1 /dev/<boot partition>
Second question: Is the boot partition the same partition that holds the root file system / which you want to check?
I use the commandline
Code: Select all
sudo tune2fs -C MountCount /dev/sdaNo
Note:
MountCount - mount count, usually set as interval between fsck's plus 1
No - number of partition on disk /dev/sda
--
P.S.:
I guess I will give the
Code: Select all
sudo touch /forcefsck
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 771 days now.
Lifeline
Re: fsck on reboot
Last Checked 11/02/2015. However, the forcefsck file is being removed.GeneBenson wrote:Have you tried sudo tune2fs -l /dev/<boot partition> ?
This will show you some interesting things like "Last checked:"
Re: fsck on reboot
Removing quiet splash from the boot options didn't reveal anything useful. Both of the log files:
/var/log/fsck/checkfs
/var/log/fsck/checkroot
contain the following:
(Nothing has been logged yet.)
/var/log/fsck/checkfs
/var/log/fsck/checkroot
contain the following:
(Nothing has been logged yet.)
Re: fsck on reboot
Probably this long standing bug.Wheelspin wrote:(Nothing has been logged yet.)
Re: fsck on reboot
Are you aware of any Mint plans to rectify it if Ubuntu can't be arsed?
-
- Level 4
- Posts: 357
- Joined: Fri Sep 17, 2010 9:55 pm
Re: fsck on reboot
Hi Wheelspin,
One more thing to try. Have a look at /etc/fstab. Find the entry for your boot partition. The very last number on the right needs to be a "1". If it is "0" fsck will skip checking it. If you have any other partitions you want to check, excluding "Swap", then their values should be set to "2". Like this:
One more thing to try. Have a look at /etc/fstab. Find the entry for your boot partition. The very last number on the right needs to be a "1". If it is "0" fsck will skip checking it. If you have any other partitions you want to check, excluding "Swap", then their values should be set to "2". Like this:
Code: Select all
UUID=0b361f58-db4b-4dd6-9ca0-fb84d0bdba33 / ext4 noatime,errors=remount-ro 0 1
UUID=bb1e1afb-a24e-4671-a3fa-b3be3fe193df /mnt/Backup ext4 defaults,noatime 0 2
I see the same on Debian so the problem not just a Ubuntu/Mint issue. Will it ever be fixed? Who knows.Are you aware of any Mint plans to rectify it if Ubuntu can't be arsed?
Re: fsck on reboot
The root partition is set to 1. The rest are 0. Since it's the root that I'm trying to check, I assume that that's not the problem.GeneBenson wrote:One more thing to try. Have a look at /etc/fstab. Find the entry for your boot partition. The very last number on the right needs to be a "1". If it is "0" fsck will skip checking it. If you have any other partitions you want to check, excluding "Swap", then their values should be set to "2