Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

e2fsck: Cannot continue, aborting

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
banderas20
Posts: 111
Joined: 2016-11-10 15:30

e2fsck: Cannot continue, aborting

#1 Post by banderas20 »

Hello,

I'm trying to do a fsck on my primary partition with "sudo fsck /dev/sda1". It gives me the error:

Code: Select all

/dev/sda1 is mounted.
e2fsck: Cannot continue, aborting.
Which is normal, as I am working from that same filesystem. Therefore, ¿How should I proceed?

Thanks!

User avatar
Bloom
df -h | grep > 90TiB
df -h | grep > 90TiB
Posts: 504
Joined: 2017-11-11 12:23
Been thanked: 26 times

Re: e2fsck: Cannot continue, aborting

#2 Post by Bloom »

Boot from a live disk.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: e2fsck: Cannot continue, aborting

#3 Post by Head_on_a_Stick »

banderas20 wrote:I'm trying to do a fsck on my primary partition
Why?

It's actually quite difficult to stop systemd from doing that automatically on every boot :mrgreen:
deadbang

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: e2fsck: Cannot continue, aborting

#4 Post by bw123 »

Head_on_a_Stick wrote: It's actually quite difficult to stop systemd from doing that automatically on every boot
sysytemd is not doing this for me, I have been using fsck.mode=force kernel param occasionally to get it to actually fsck all fs. I have played with passno in fstab, and have tried with and without the periodic interval/maxcount settings.

The man page says the checker has some kind of way of deciding whether or not to actually check the fs, depending on clean dismount, dirty flags, etc. but doesn't really say exactly what it needs to see.

Code: Select all

# man systemd-fsck@.service
# mount | grep  " / "
/dev/sda5 on / type ext4 (rw,noatime,discard,errors=remount-ro,commit=360,data=ordered)
# tune2fs -l /dev/sda5 | grep -A 5 "nt t"
Last mount time:          Thu Jul 19 14:32:45 2018
Last write time:          Thu Jul 19 14:32:45 2018
Mount count:              14
Maximum mount count:      -1
Last checked:             Mon Jun 18 06:41:08 2018
Check interval:           0 (<none>)
#
resigned by AI ChatGPT

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: e2fsck: Cannot continue, aborting

#5 Post by Head_on_a_Stick »

bw123 wrote:sysytemd is not doing this for me
Yes, sorry: fs_passno should be set to a non-zero value in /etc/fstab otherwise the device will not be checked, thanks for the correction.
deadbang

banderas20
Posts: 111
Joined: 2016-11-10 15:30

Re: e2fsck: Cannot continue, aborting

#6 Post by banderas20 »

Head_on_a_Stick wrote:
banderas20 wrote:I'm trying to do a fsck on my primary partition
Why?
Because it's the only partition I have. The other is swap. ¿Can't I schedule to do it upon next boot, like windows says sometimes?

Thanks!

arzgi
Posts: 1194
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: e2fsck: Cannot continue, aborting

#7 Post by arzgi »

banderas20 wrote:
Head_on_a_Stick wrote:
banderas20 wrote:I'm trying to do a fsck on my primary partition
Why?
Because it's the only partition I have. The other is swap. ¿Can't I schedule to do it upon next boot, like windows says sometimes?

Thanks!
Why cant you use live cd, what was already suggested? I always have a live-cd burned, for example situations like this.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: e2fsck: Cannot continue, aborting

#8 Post by bw123 »

After reading some man page closer I think this is the reason root fs isn't checked?

Code: Select all

$ systemctl status systemd-fsck-root.service
● systemd-fsck-root.service - File System Check on Root Device
   Loaded: loaded (/lib/systemd/system/systemd-fsck-root.service; static; vendor
   Active: inactive (dead)
Condition: start condition failed at Thu 2018-07-19 14:32:48 EDT; 2 days ago
           └─ ConditionPathExists=!/run/initramfs/fsck-root was not met
     Docs: man:systemd-fsck-root.service(8)
resigned by AI ChatGPT

banderas20
Posts: 111
Joined: 2016-11-10 15:30

Re: e2fsck: Cannot continue, aborting

#9 Post by banderas20 »

arzgi wrote: Why cant you use live cd, what was already suggested? I always have a live-cd burned, for example situations like this.
Yes. I know I can use it. I was just asking if there was another way to do it. For curiosity.

Thanks!

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: e2fsck: Cannot continue, aborting

#10 Post by Head_on_a_Stick »

banderas20 wrote:if there was another way to do it
You can try setting fs_passno to a non-zero value, this should start a check if it is needed (according to the rather cryptic man page) but bw123's experience seems to suggest that the fsck.mode=force kernel parameter may be needed.
deadbang

User avatar
kingocounty
Posts: 12
Joined: 2018-03-14 13:11

Re: e2fsck: Cannot continue, aborting

#11 Post by kingocounty »

This might not be what you're asking, but you can force a file system check on reboot by dropping a blank file called 'forcefsck' in your root folder:

Code: Select all

# touch /forcefsck
# shutdown -r now
The file will be automagically removed after the fsck is performed.

banderas20
Posts: 111
Joined: 2016-11-10 15:30

Re: e2fsck: Cannot continue, aborting

#12 Post by banderas20 »

Thank you all!

arzgi
Posts: 1194
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: e2fsck: Cannot continue, aborting

#13 Post by arzgi »

banderas20 wrote:Thank you all!
If the case if solved, please edit the first post of this thread, and add [SOLVED] to front of header.

banderas20
Posts: 111
Joined: 2016-11-10 15:30

Re: e2fsck: Cannot continue, aborting

#14 Post by banderas20 »

kingocounty wrote:This might not be what you're asking, but you can force a file system check on reboot by dropping a blank file called 'forcefsck' in your root folder:

Code: Select all

# touch /forcefsck
# shutdown -r now
The file will be automagically removed after the fsck is performed.
I have done so, and the file now is missing. However, I haven't seen anything that indicates fsck has been performed. ¿How can I see the results?
Anyway, fstab has the last flag to 1.
The theory says that linux checks the filesystem automatically each reboot.
I have rebooted, issued "dumpe2fs" and it says

Code: Select all

Last checked:             Mon Jun 18 20:22:43 2018
(which is not today)

I don't understand... :(

Thanks!

User avatar
kingocounty
Posts: 12
Joined: 2018-03-14 13:11

Re: e2fsck: Cannot continue, aborting

#15 Post by kingocounty »

Have a look at /run/initramfs/fsck.log

An example from my system:

Code: Select all

me@my-pc:~$ cat /run/initramfs/fsck.log 
Log of fsck -C -a -T -t ext4 /dev/sda1 
Mon Jul 23 13:07:06 2018

/dev/sda1: clean, 180885/15114240 files, 5754337/60449792 blocks

Mon Jul 23 13:07:06 2018
----------------

banderas20
Posts: 111
Joined: 2016-11-10 15:30

Re: e2fsck: Cannot continue, aborting

#16 Post by banderas20 »

Mine as well:

Code: Select all

me@my-pc:~$ cat /run/initramfs/fsck.log
Log of fsck -C -a -T -t ext4 /dev/sda1 
Mon Jul 23 16:03:46 2018

/dev/sda1: clean, 182986/1245184 files, 1559599/4980480 blocks

Mon Jul 23 16:03:46 2018
¿Why doesn't it match with "Last checked" from "dumpe2fs /dev/sda1"? :(

User avatar
kingocounty
Posts: 12
Joined: 2018-03-14 13:11

Re: e2fsck: Cannot continue, aborting

#17 Post by kingocounty »

The message in /run/initramfs/fsck.log is produced by e2fsck:

Code: Select all

/* Print the summary message when we're skipping a full check */
log_out(ctx, _("%s: clean, %u/%u files, %llu/%llu blocks"),
You'll see that message if the journal is clean and there aren't any orphaned inodes. It's not performing a full check so you're not seeing that listed in the dumpe2fs output.

To understand what triggers a full check, see here:

Code: Select all

man systemd-fsck

banderas20
Posts: 111
Joined: 2016-11-10 15:30

Re: e2fsck: Cannot continue, aborting

#18 Post by banderas20 »

I have gone to recovery mode, which allows me to "umount /dev/sda1"

Then "fsck /dev/sda1"
then i get

Code: Select all

/dev/sda1: clean, 182986/1245184 files, 1559599/4980480 blocks
But "dumpe2fs" still shows 18th as the last day checked.

No way to run a *****ng full system check. ¿is it really that hard? :twisted:

pendrachken
Posts: 1394
Joined: 2007-03-04 21:10
Location: U.S.A. - WI.

Re: e2fsck: Cannot continue, aborting

#19 Post by pendrachken »

systemd-fsck understands one kernel command line parameter:

fsck.mode=
One of “auto”, “force”, “skip”. Controls the mode of operation. The default is “auto”, and ensures that file system checks are done when the file system checker deems them necessary. “force” unconditionally results in full file system checks. “skip” skips any file system checks.

fsck.repair=
One of “preen”, “yes”, “no”. Controls the mode of operation. The default is ” preen”, and will automatically repair problems that can be safely fixed. “yes ” will answer yes to all questions by fsck and “no” will answer no to all questions.
Edit your grub kernel line on boot and add in both of these kernel parameters for that boot. I haven't had to force a fsck since this sytemd crap came out, and very rarely before that ( so not SysV fault or something systemd "fixed"), so take it with a grain of salt.
fortune -o
Your love life will be... interesting.
:twisted: How did it know?

The U.S. uses the metric system too, we have tenths, hundredths and thousandths of inches :-P

Post Reply