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: 192
Joined: Sat Apr 14, 2018 2:40 pm

touch /forcefsck [SOLVED]

#1 Post by turtlebay777 » Sun Jul 01, 2018 12:51 pm

I am trying to get sudo touch /forcefsck to run a check on my MX 17.1 system but I can't get it to work, so is this something that cannot be used with Debian?

I used to use (many yrs ago) Ubuntu Studio and it worked on that when you restarted the system. But try as I might using both sysint to sysint, and systemd to systemd I can't get it to check the system. With Uber Studio, before the system mounted a DOS style text message was printed on the screen as the computer did it's checks, but MX doesn't do anything.
Last edited by turtlebay777 on Fri Jul 06, 2018 6:11 am, edited 3 times in total.

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

Re: touch /forcefsck

#2 Post by fehlix » Sun Jul 01, 2018 1:15 pm

turtlebay777 wrote:
Sun Jul 01, 2018 12:51 pm
I am trying to get sudo touch /forcefsck to run a check on my MX 17.1 system but I can't get it to work, so is this something that cannot be used with Debian?

I used to use (many yrs ago) Ubuntu Studio and it worked on that when you restarted the system. But try as I might using both sysint to sysint, and systemd to systemd I can't get it to check the system. With Uber Studio, before the system mounted a DOS style text message was printed on the screen as the computer did it's checks, but MX doesn't do anything.
You verify last filesystem checks like this:

Code: Select all

# adjust sdXZ  accordingly
LANG=C tune2fs -l /dev/sdXZ | grep -iE "mount count|Check interval|Last|Next"
Here how mine look like:

Code: Select all

sudo LANG=C tune2fs -l /dev/sda6 | grep -iE "mount count|Check interval|Last|Next"
Last mounted on:          /
Last mount time:          Sun Jul  1 11:14:10 2018
Last write time:          Sun Jul  1 11:14:08 2018
Mount count:              33
Maximum mount count:      60
Last checked:             Wed Jun 13 23:51:21 2018
Check interval:           2592000 (1 month)
Next check after:         Fri Jul 13 23:51:21 2018
As you can see I have regular fs-check setup monthly for one of my MX root-partitions.
I have done also some manual fschk with /forcefschk also.
Will need to verify my data-partitions for having this turned on and do some manual forced ones.

EDIT: Just verfied my data partiton are als checked regularly:

Code: Select all

$ sudo LANG=C tune2fs -l /dev/sdb6 | grep -iE "mount count|Check interval|Last|Next"
Last mounted on:          /mnt/ext4_data
Last mount time:          Sun Jul  1 11:14:11 2018
Last write time:          Sun Jul  1 11:14:11 2018
Mount count:              27
Maximum mount count:      60
Last checked:             Mon Jun 18 10:39:45 2018
Check interval:           2592000 (1 month)
Next check after:         Wed Jul 18 10:39:45 2018

sudo LANG=C tune2fs -l /dev/sda3 | grep -iE "mount count|Check interval|Last|Next"
Last mounted on:          /mnt/ext4_ssd_data
Last mount time:          Sun Jul  1 11:14:11 2018
Last write time:          Sun Jul  1 11:14:11 2018
Mount count:              26
Maximum mount count:      60
Last checked:             Mon Jun 18 22:45:01 2018
Check interval:           2592000 (1 month)
Next check after:         Wed Jul 18 22:45:01 2018
And the /forcechk trigger on both data partitions are ignored too. Not sure why they are ignored.
On root partion the forcechk seems to be working... :snail:
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: 192
Joined: Sat Apr 14, 2018 2:40 pm

Re: touch /forcefsck

#3 Post by turtlebay777 » Sun Jul 01, 2018 1:34 pm

Didn't work on mine.

Code: Select all

pete@mx1:~
$ LANG=C tune2fs -l /dev/sd1 | grep -iE "mount count|Check interval|Last|Next"
tune2fs: No such file or directory while trying to open /dev/sd1
Couldn't find valid filesystem superblock.
pete@mx1:~
$ 

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

Re: touch /forcefsck

#4 Post by fehlix » Sun Jul 01, 2018 1:37 pm

turtlebay777 wrote:
Sun Jul 01, 2018 1:34 pm
Didn't work on mine.

Code: Select all

pete@mx1:~
$ LANG=C tune2fs -l /dev/sd1 | grep -iE "mount count|Check interval|Last|Next"
tune2fs: No such file or directory while trying to open /dev/sd1
Couldn't find valid filesystem superblock.
pete@mx1:~
$ 
find your device name "/dev/sd1" is certainly wrong

Code: Select all

lsblk
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: 192
Joined: Sat Apr 14, 2018 2:40 pm

Re: touch /forcefsck

#5 Post by turtlebay777 » Sun Jul 01, 2018 2:06 pm

Sorry typo caused that = my typo! Should have typed sda1.Thanks for your help.

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

Re: touch /forcefsck [SOLVED]

#6 Post by fehlix » Sun Jul 01, 2018 2:45 pm

Would you mind letting us know how you solved the original issue?
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: 192
Joined: Sat Apr 14, 2018 2:40 pm

Re: touch /forcefsck [SOLVED]

#7 Post by turtlebay777 » Mon Jul 02, 2018 12:07 pm

I typed [SOLVED] due to not wanting to bother you with something so trivial. In fact it was not solved at all when I typed in the expression you gave, with this result

Code: Select all

pete@mx1:~
$ sudo LANG=C tune2fs -l /dev/sd1 | grep -iE "mount count|Check interval|Last|Next"
tune2fs: No such file or directory while trying to open /dev/sd1
Couldn't find valid filesystem superblock.
pete@mx1:

User avatar
Adrian
Forum Veteran
Forum Veteran
Posts: 8877
Joined: Wed Jul 12, 2006 1:42 am

Re: touch /forcefsck [SOLVED]

#8 Post by Adrian » Mon Jul 02, 2018 12:26 pm

Code: Select all

/dev/sd1 
Still wrong drive identifier...

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

Re: touch /forcefsck [SOLVED]

#9 Post by fehlix » 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"
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: 192
Joined: Sat Apr 14, 2018 2:40 pm

Re: touch /forcefsck [SOLVED]

#10 Post by turtlebay777 » Mon Jul 02, 2018 3:17 pm

Adrian wrote:
Mon Jul 02, 2018 12:26 pm

Code: Select all

/dev/sd1 
Still wrong drive identifier...
Typo when writing out response to Fehlix, sda1

Post Reply

Return to “MX Help”