Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

touch /forcefsck [SOLVED]

Help for Current Versions of MX
Message
Author
turtlebay777
Forum Regular
Forum Regular
Posts: 237
Joined: Sat Apr 14, 2018 2:40 pm

Re: touch /forcefsck [SOLVED]

#11 Post by turtlebay777 » Mon Jul 02, 2018 3:22 pm

fehlix wrote:
Mon Jul 02, 2018 1:45 pm
turtlebay777 wrote:
Mon Jul 02, 2018 12:07 pm
..not wanting to bother you
..In fact it was not solved at all when I typed in the expression you gave, with this result
Don't worry. Just let us know the output of these commands, please.

Code: Select all

lsblk | grep /
and

Code: Select all

cat /etc/fstab  | grep -v '^#'
and

Code: Select all

 DEV="$(lsblk | sed -nE '\:/$:{s:.*([sh]d[a-z][0-9]).*:/dev/\1:;p;q}' )"; echo $DEV; LANG=C tune2fs -l $DEV | grep -iE "mount count|Check interval|Last|Next"
:puppy:
EDIT:
If the last command looks too long and ugly, here a slightly shorter variant:

Code: Select all

DEV="$(LANG=C mount| awk '/on \/ /{print $1}')"; echo $DEV; LANG=C tune2fs -l $DEV | grep -iE "mount count|Check interval|Last|Next"

Code: Select all

pete@mx1:~
$ lsblk | grep /
├─sda1   8:1    0 296.1G  0 part /
pete@mx1:~
$ 
pete@mx1:~
$ cat /etc/fstab  | grep -v '^#'


UUID=ab4b1228-d512-4d40-b832-7a44957cedab  /                                           ext4       defaults                        1 1
UUID=e548bcb8-cb1d-48b0-acc2-0efb67b1ef39  swap                                        swap       defaults                        0 0
pete@mx1:~
$ 
pete@mx1:~
$ DEV="$(lsblk | sed -nE '\:/$:{s:.*([sh]d[a-z][0-9]).*:/dev/\1:;p;q}' )"; echo $DEV; LANG=C tune2fs -l $DEV | grep -iE "mount count|Check interval|Last|Next"
/dev/sda1
tune2fs: Permission denied while trying to open /dev/sda1
Couldn't find valid filesystem superblock.
pete@mx1:~
$ 
pete@mx1:~
 

Code: Select all

DEV="$(LANG=C mount| awk '/on \/ /{print $1}')"; echo $DEV; LANG=C tune2fs -l $DEV | grep -iE "mount count|Check interval|Last|Next"
bash: ]DEV=/dev/sda1: No such file or directory
/dev/sda1
tune2fs: Permission denied while trying to open /dev/sda1
Couldn't find valid filesystem superblock.
[/code]

User avatar
fehlix
Forum Guide
Forum Guide
Posts: 2041
Joined: Wed Apr 11, 2018 5:09 pm

Re: touch /forcefsck [SOLVED]

#12 Post by fehlix » Mon Jul 02, 2018 3:32 pm

OK, now we know it's /dev/sda1:
Give us the output of this, please:

Code: Select all

sudo LANG=C tune2fs -l /dev/sda1 | grep -iE "mount count|Check interval|Last|Next"
EDIT : Just added "sudo" infront, due to permission issues,
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

turtlebay777
Forum Regular
Forum Regular
Posts: 237
Joined: Sat Apr 14, 2018 2:40 pm

Re: touch /forcefsck

#13 Post by turtlebay777 » Mon Jul 02, 2018 5:40 pm

Have to be tomorrow now, as I'm on a different laptop 'puter using Mint 17.3 Mate, different part of the property.

turtlebay777
Forum Regular
Forum Regular
Posts: 237
Joined: Sat Apr 14, 2018 2:40 pm

Re: touch /forcefsck [SOLVED]

#14 Post by turtlebay777 » Tue Jul 03, 2018 3:26 pm

fehlix wrote:
Mon Jul 02, 2018 3:32 pm
OK, now we know it's /dev/sda1:
Give us the output of this, please:

Code: Select all

sudo LANG=C tune2fs -l /dev/sda1 | grep -iE "mount count|Check interval|Last|Next"
EDIT : Just added "sudo" infront, due to permission issues,

Code: Select all

pete@mx1:~
$ sudo LANG=C tune2fs -l /dev/sda1 | grep -iE "mount count|Check interval|Last|Next"
[sudo] password for pete: 
Last mounted on:          /
Last mount time:          Tue Jul  3 18:50:28 2018
Last write time:          Tue Jul  3 18:50:20 2018
Mount count:              271
Maximum mount count:      -1
Last checked:             Sat Mar 24 17:25:10 2018
Check interval:           0 (<none>)
pete@mx1:~


User avatar
fehlix
Forum Guide
Forum Guide
Posts: 2041
Joined: Wed Apr 11, 2018 5:09 pm

Re: touch /forcefsck

#15 Post by fehlix » Tue Jul 03, 2018 3:41 pm

Ok. To get a fs-check at next boot and all max 60 boot's or all 30 days
do this , which is effectively a smart way of touch /forcefsck

Code: Select all

sudo tune2fs -c60 -C61 -i30d /dev/sda1
Reboot, watch the check on the screen and run this again to verify

Code: Select all

sudo LANG=C tune2fs -l /dev/sda1 | grep -iE "mount count|Check interval|Last|Next"
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

turtlebay777
Forum Regular
Forum Regular
Posts: 237
Joined: Sat Apr 14, 2018 2:40 pm

Re: touch /forcefsck

#16 Post by turtlebay777 » Wed Jul 04, 2018 5:20 pm

Isn't there a way to use forcefsck at the next boot but at only when I want to do it, not at specific fixed intervals?

In the latest results I posted this appears

Code: Select all

Last checked:             Sat Mar 24 17:25:10 2018
but I had already tried using sudo touch /forcefsck in late June of this year (several times), not March 2018.

Obviously that phrase didn't work in Xfce Terminal.

User avatar
fehlix
Forum Guide
Forum Guide
Posts: 2041
Joined: Wed Apr 11, 2018 5:09 pm

Re: touch /forcefsck

#17 Post by fehlix » Wed Jul 04, 2018 7:08 pm

turtlebay777 wrote:
Wed Jul 04, 2018 5:20 pm
...but I had already tried using sudo touch /forcefsck
and we would have verfied whether an alternative is working or not..
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

turtlebay777
Forum Regular
Forum Regular
Posts: 237
Joined: Sat Apr 14, 2018 2:40 pm

Re: touch /forcefsck

#18 Post by turtlebay777 » Thu Jul 05, 2018 8:45 am

but at the cost of having a monthly check which I don't want.

As I said thanks for trying to help but it's not a big issue so I'll not bother.

sudo touch /forcefsck is redundant on debian.

Just discovered this on the Ubuntu forums, https://ubuntuforums.org/showthread.php?t=2326230
post # 2 :

User avatar
oops
Forum Regular
Forum Regular
Posts: 420
Joined: Tue Apr 10, 2018 5:07 pm

Re: touch /forcefsck

#19 Post by oops » Thu Jul 05, 2018 9:12 am

turtlebay777 wrote:
Thu Jul 05, 2018 8:45 am
but at the cost of having a monthly check which I don't want.
As I said thanks for trying to help but it's not a big issue so I'll not bother. ...
FI: In certain circumstances this can be a very big issue (no boot at all)... already experimented here.
$ inxi -Fxxxz : System: Host:XEON ... Distro: MX-17.1_x64 Horizon

User avatar
HessenZone
Forum Novice
Forum  Novice
Posts: 81
Joined: Wed Jun 27, 2018 11:17 am

Re: touch /forcefsck

#20 Post by HessenZone » Thu Jul 05, 2018 9:19 am

I received the same superblock error (with sudo) on both variables of the long command, for me it was on sda2 which is my ssd drive with a triple boot setup. sda2 is my current MX installation from which I'm writing this response. It's not a problem at all, I was just browsing around here due to my curiosity. Just wanted to let the OP know that they're not alone, it's probably an error based on not being able to retrieve the desired information from the currently running session/mounted system?
.

MX Linux Rocks, in America, in Europa, in Australien, einfach ÜBERALL. :linuxlove:

Post Reply

Return to “MX Help”