Discussion:
fsck from grub menu, no longer working
Udvarias Ur
2018-11-19 20:09:27 UTC
Permalink
Folks,

I've been using the 'Advanced options for Ubuntu' to select the
'(recovery mode)' of the current kernel in order to run 'fsck,' 'dpkg,'
and 'clean.'

The last two work fine. However, 'fsck' has been returning this error
message of late.

            fsck from util-linux 2.27.1
            /dev/sda6 is mounted
            e2fsck: Cannot continue, aborting.

            Finished, please press ENTER


I tried running 'sudo update-grub,' it returned the following output.
***@Merry:~$ sudo update-grub
        [sudo] password for udvarias:
        Generating grub configuration file ...
        Found linux image: /boot/vmlinuz-4.4.0-139-generic
        Found initrd image: /boot/initrd.img-4.4.0-139-generic
        Found linux image: /boot/vmlinuz-4.4.0-138-generic
        Found initrd image: /boot/initrd.img-4.4.0-138-generic
        Found memtest86+ image: /boot/memtest86+.elf
        Found memtest86+ image: /boot/memtest86+.bin
        Found Microsoft Windows XP Professional on /dev/sda1
        done
***@Merry:~$

I then ran 'sudo fsck' from the command-line, it returned
fsck from util-linux 2.27.1
        e2fsck 1.42.13 (17-May-2015)
        /dev/sda6 is mounted.
        e2fsck: Cannot continue, aborting.

I then restarted the system to run 'fsck' in recovery mode and got
exactly the same output as above.
1. Why is the grub script mounting my root filesystem before running fsck?
2. How can I change it?
--
Udvarias Ur

This letter was generated and sent from Thunderbird 52.7.0 on Ubuntu Linux 16.04.5 LTS.

Cette lettre a été générée et envoyée à partir de Thunderbird 52.7.0 sur Ubuntu Linux 16.04.5 LTS.
--
ubuntu-users mailing list
ubuntu-***@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-user
Ian Bruntlett
2018-11-19 20:52:22 UTC
Permalink
Hi There,
Post by Udvarias Ur
Folks,
I've been using the 'Advanced options for Ubuntu' to select the
'(recovery mode)' of the current kernel in order to run 'fsck,' 'dpkg,'
and 'clean.'
The last two work fine. However, 'fsck' has been returning this error
message of late.
fsck from util-linux 2.27.1
/dev/sda6 is mounted
e2fsck: Cannot continue, aborting.
Finished, please press ENTER
This suggests that /dev/sda6 is mounted. To find that out, try this
command:-
mount | grep -i sd

And let people know what the output is.

HTH,


Ian
Udvarias Ur
2018-11-19 23:08:21 UTC
Permalink
Ian,

The output from 'mount | grep -i sd' in a terminal on the desktop is …

***@Merry:~$ mount | grep -i sd
/dev/sda6 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse
(rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/sdb1 on /media/udvarias/Data Drive (DELL) type fuseblk
(rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
***@Merry:~$


The output from 'mount | grep -i sd' in root option of recovery mode is …

/dev/sda6 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)

This output indicates that the root filesystem is automatically mounted
in 'recovery mode' exactly the same way that it is mounted with a normal
boot.
Post by Udvarias Ur
Folks,
I've been using the 'Advanced options for Ubuntu' to select the
'(recovery mode)' of the current kernel in order to run 'fsck,' 'dpkg,'
and 'clean.'
The last two work fine. However, 'fsck' has been returning this error
message of late.
             fsck from util-linux 2.27.1
             /dev/sda6 is mounted
             e2fsck: Cannot continue, aborting.
             Finished, please press ENTER
This suggests that /dev/sda6 is mounted. To find that out, try this
command:-
mount | grep -i sd
And let people know what the output is.
--
Udvarias Ur

This letter was generated and sent from Thunderbird 52.7.0 on Ubuntu Linux 16.04.5 LTS.

Cette lettre a été générée et envoyée à partir de Thunderbird 52.7.0 sur Ubuntu Linux 16.04.5 LTS.
--
ubuntu-users mailing list
ubuntu-***@lists.ubuntu.com
Modify settings or unsubscribe at: https://list
Ian Bruntlett
2018-11-20 09:57:54 UTC
Permalink
Hi There,
The output from 'mount | grep -i sd' in root option of recovery mode is 

/dev/sda6 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
This output indicates that the root filesystem is automatically mounted
in 'recovery mode' exactly the same way that it is mounted with a normal
boot.
From what I can see, it appears:-
* You are running Linux with a root partition on /dev/sda6
* This means /dev/sda6 is mounted

My understanding is you can't run fsck on a mounted partition.

My approach to this would be to boot Linux from a live CD / USB Ubuntu
media. This should mean that /dev/sda6 will mounted at that time and you
should be able to fsck /dev/sda6

What do other people think?

Also, there is a package called smartmontools that contains the smartctl
program that can be used to monitor the health of hard drives. If that is
installed then "man smartctl" should give you sufficient information.

HTH,


Ian
--
-- ACCU - Professionalism in programming - http://www.accu.org
-- My writing - https://sites.google.com/site/ianbruntlett/
-- Free Software page -
https://sites.google.com/site/ianbruntlett/home/free-software
Colin Law
2018-11-20 10:35:11 UTC
Permalink
Post by Ian Bruntlett
My understanding is you can't run fsck on a mounted partition.
I believe that to force an fsck on a mounted partition then, assuming
the '/' is the root of that partition, run
sudo touch /forcefsck
and reboot. That will do the fsck before mounting it and will then
delete the file.

Colin
--
ubuntu-users mailing list
ubuntu-***@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubu
Tom H
2018-11-20 11:26:21 UTC
Permalink
Post by Colin Law
Post by Ian Bruntlett
My understanding is you can't run fsck on a mounted partition.
I believe that to force an fsck on a mounted partition then, assuming
the '/' is the root of that partition, run sudo touch /forcefsck and
reboot. That will do the fsck before mounting it and will then delete
the file.
1) "touch /forcefsck" then rebooting isn't the same as running fsck on
a mounted partition. And it also only works for "/".

2) "touch /forcefsck" is superceded on systemd by passing
"fsck.mode=force [fsck.repair=...]" on the kernel cmdline.

3) _IF_ "fsck from grub menu" means selecting to fsck "/" from the
friendly-recovery menu that's displayed in single-user mode fails
because "/" is mounted, then there's a bug in that package. (I don't
use it so I can't check.)
--
ubuntu-users mailing list
ubuntu-***@lists.ubuntu.com
Modify settings or unsubscribe at: https://li
Liam Proven
2018-11-20 11:00:13 UTC
Permalink
Post by Udvarias Ur
2. How can I change it?
Don't. To fsck a partition that is in normal use, boot off some other media.
--
Liam Proven - Profile: https://about.me/liamproven
Email: ***@cix.co.uk - Google Mail/Hangouts/Plus: ***@gmail.com
Twitter/Facebook/Flickr: lproven - Skype/LinkedIn: liamproven
UK: +44 7939-087884 - ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053
--
ubuntu-users mailing list
ubuntu-***@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/li
Udvarias Ur
2018-11-20 23:49:41 UTC
Permalink
Folks,

First, thank you for the suggestions and attention to this issue.

I may have gotten caught up in the details, so here's the crux of the
matter.

In the past I ran 'fsck,' 'dpkg,' and 'clean' (in that order) in
'recovery mode.' (From the menu I mention below.)

I had to run 'fsck' first because 'dpkg,' and 'clean' both mounted the
root partition. (So I concluded that the root partition is NOT mounted
when the system is booted into 'recovery mode.')

Now, suddenly, I can no longer run 'fsck' from 'recovery mode.'

Have things changed such that this no longer works?
Post by Tom H
3) _IF_ "fsck from grub menu" means selecting to fsck "/" from the
friendly-recovery menu that's displayed in single-user mode fails
because "/" is mounted, then there's a bug in that package. (I don't
use it so I can't check.)
Folks,
I've been using the 'Advanced options for Ubuntu' to select the
'(recovery mode)' of the current kernel in order to run 'fsck,'
'dpkg,' and 'clean.'
{snip}
--
Udvarias Ur

This letter was generated and sent from Thunderbird 52.7.0 on Ubuntu Linux 16.04.5 LTS.

Cette lettre a été générée et envoyée à partir de Thunderbird 52.7.0 sur Ubuntu Linux 16.04.5 LTS.
--
ubuntu-users mailing list
ubuntu-***@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/ma
Liam Proven
2018-11-21 10:15:44 UTC
Permalink
Post by Udvarias Ur
Folks,
First, thank you for the suggestions and attention to this issue.
I may have gotten caught up in the details, so here's the crux of the
matter.
In the past I ran 'fsck,' 'dpkg,' and 'clean' (in that order) in
'recovery mode.' (From the menu I mention below.)
I had to run 'fsck' first because 'dpkg,' and 'clean' both mounted the
root partition. (So I concluded that the root partition is NOT mounted
when the system is booted into 'recovery mode.')
Now, suddenly, I can no longer run 'fsck' from 'recovery mode.'
Have things changed such that this no longer works?
For a Unix system to be functioning, it must have a mounted root file system.

Always. This has been the case since Unix was developed at the end of
the 1960s.

Which root FS can change -- the ``chroot'' command can do this, for instance.

However, it need not be mounted read-write. It can be mounted
read-only. You can fsck a filesystem which is mounted RO. This is
normal in maintenance mode.

``dpkg'' on its own does nothing useful.

``clean'' is not a Unix command, TTBOMK.

Finally: please bottom-post on mailing lists.
--
Liam Proven - Profile: https://about.me/liamproven
Email: ***@cix.co.uk - Google Mail/Hangouts/Plus: ***@gmail.com
Twitter/Facebook/Flickr: lproven - Skype/LinkedIn: liamproven
UK: +44 7939-087884 - ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053
--
ubuntu-users mailing list
ubuntu-***@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mail
Tom H
2018-11-21 11:19:59 UTC
Permalink
Post by Liam Proven
Post by Udvarias Ur
In the past I ran 'fsck,' 'dpkg,' and 'clean' (in that order) in
'recovery mode.' (From the menu I mention below.)
``dpkg'' on its own does nothing useful.
``clean'' is not a Unix command, TTBOMK.
IIRC, these are whiptail menu choices that are presented when you
select single-user mode.

IIRC, again, "dpkg" launches some package-repair commands and "clean"
clears out the package cache either completely or of
no-longer-downloadable packages.
--
ubuntu-users mailing list
ubuntu-***@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/list
Liam Proven
2018-11-21 12:15:56 UTC
Permalink
Post by Tom H
IIRC, these are whiptail menu choices that are presented when you
select single-user mode.
*Googles*

Ah, so the OP is not distinguishing between commands and menu-based
operation? I think this is maybe the point at which I opt out.
Post by Tom H
IIRC, again, "dpkg" launches some package-repair commands and "clean"
clears out the package cache either completely or of
no-longer-downloadable packages.
So the latter is just "apt clean", which can be run even on a
fully-running system from a terminal window?

Nothing special in that.
--
Liam Proven - Profile: https://about.me/liamproven
Email: ***@cix.co.uk - Google Mail/Hangouts/Plus: ***@gmail.com
Twitter/Facebook/Flickr: lproven - Skype/LinkedIn: liamproven
UK: +44 7939-087884 - ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053
--
ubuntu-users mailing list
ubuntu-***@lists.ubuntu.com
Modify settings or unsubscribe at: https://lis
Tom H
2018-11-21 12:43:59 UTC
Permalink
Post by Liam Proven
Post by Tom H
IIRC, these are whiptail menu choices that are presented when you
select single-user mode.
*Googles*
Ah, so the OP is not distinguishing between commands and menu-based
operation? I think this is maybe the point at which I opt out.
Post by Tom H
IIRC, again, "dpkg" launches some package-repair commands and "clean"
clears out the package cache either completely or of
no-longer-downloadable packages.
So the latter is just "apt clean", which can be run even on a
fully-running system from a terminal window?
Nothing special in that.
Well. It's Ubuntu being friendly to the users who want it.

You choose the "recovery" item in the grub menu and you get a friendly
menu of actions.

It's on of the first things that I uninstall but it's clearly being
used by some; like the OP.

"clean" might run "apt-get clean" or "apt-get autoclean". I'd have to
download the .dpkg to find out.
--
ubuntu-users mailing list
ubuntu-***@lists.ubuntu.com
Modify settings or unsubscribe at:
Tom H
2018-11-21 11:10:52 UTC
Permalink
Post by Udvarias Ur
First, thank you for the suggestions and attention to this issue.
I may have gotten caught up in the details, so here's the crux of the
matter.
In the past I ran 'fsck,' 'dpkg,' and 'clean' (in that order) in
'recovery mode.' (From the menu I mention below.)
I had to run 'fsck' first because 'dpkg,' and 'clean' both mounted the
root partition.
(So I concluded that the root partition is NOT mounted when the system
is booted into 'recovery mode.')
Please bottom-post.

Unless "friendly-recovery" now runs from the initramfs, "/" is mounted
when it runs, probably read-only.
Post by Udvarias Ur
Now, suddenly, I can no longer run 'fsck' from 'recovery mode.'
Have things changed such that this no longer works?
You should file a bug report against "friendly-recovery" to remount
"/" read-only before checking its filesystem.
--
ubuntu-users mailing list
ubuntu-***@lists.ubuntu.com
Modify settings or unsubscribe at: https://list
Loading...