fsck from grub menu, no longer working

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

fsck from grub menu, no longer working

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


I tried running 'sudo update-grub,' it returned the following output.
udvarias@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
udvarias@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
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: fsck from grub menu, no longer working

Ian Bruntlett
Hi There,

On Mon, 19 Nov 2018 at 20:11, Udvarias Ur <[hidden email]> wrote:
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

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: fsck from grub menu, no longer working

Udvarias Ur
Ian,

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

udvarias@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)
udvarias@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.

On 2018-11-19 3:52 p.m., Ian Bruntlett wrote:

> On Mon, 19 Nov 2018 at 20:11, Udvarias Ur <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     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
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: fsck from grub menu, no longer working

Ian Bruntlett
Hi There,

On Mon, 19 Nov 2018 at 23:09, Udvarias Ur <[hidden email]> wrote:
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/


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: fsck from grub menu, no longer working

Colin Law
On Tue, 20 Nov 2018 at 09:59, Ian Bruntlett <[hidden email]> wrote:
>
> 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
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: fsck from grub menu, no longer working

Liam Proven
In reply to this post by Udvarias Ur
On Mon, 19 Nov 2018 at 21:11, Udvarias Ur <[hidden email]> wrote:

> 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: [hidden email] - Google Mail/Hangouts/Plus: [hidden email]
Twitter/Facebook/Flickr: lproven - Skype/LinkedIn: liamproven
UK: +44 7939-087884 - ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: fsck from grub menu, no longer working

Tom H-4
In reply to this post by Colin Law
On Tue, Nov 20, 2018 at 11:37 AM Colin Law <[hidden email]> wrote:
> On Tue, 20 Nov 2018 at 09:59, Ian Bruntlett <[hidden email]> wrote:
>>
>> 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
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: fsck from grub menu, no longer working

Udvarias Ur
In reply to this 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?



On 2018-11-20 6:26 a.m., Tom H wrote:

> 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.)
>
On 2018-11-19 3:09 p.m., Udvarias Ur wrote:

> 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
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: fsck from grub menu, no longer working

Liam Proven
On Wed, 21 Nov 2018 at 00:51, Udvarias Ur <[hidden email]> wrote:

>
> 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: [hidden email] - Google Mail/Hangouts/Plus: [hidden email]
Twitter/Facebook/Flickr: lproven - Skype/LinkedIn: liamproven
UK: +44 7939-087884 - ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: fsck from grub menu, no longer working

Tom H-4
In reply to this post by Udvarias Ur
On Wed, Nov 21, 2018 at 12:51 AM Udvarias Ur <[hidden email]> wrote:


> 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.


> 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
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: fsck from grub menu, no longer working

Tom H-4
In reply to this post by Liam Proven
On Wed, Nov 21, 2018 at 11:17 AM Liam Proven <[hidden email]> wrote:
> On Wed, 21 Nov 2018 at 00:51, Udvarias Ur <[hidden email]> wrote:
>>
>> 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
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: fsck from grub menu, no longer working

Liam Proven
On Wed, 21 Nov 2018 at 12:21, Tom H <[hidden email]> wrote:

> 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.

> 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: [hidden email] - Google Mail/Hangouts/Plus: [hidden email]
Twitter/Facebook/Flickr: lproven - Skype/LinkedIn: liamproven
UK: +44 7939-087884 - ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: fsck from grub menu, no longer working

Tom H-4
On Wed, Nov 21, 2018 at 1:17 PM Liam Proven <[hidden email]> wrote:

> On Wed, 21 Nov 2018 at 12:21, Tom H <[hidden email]> wrote:
>>
>> 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.
>
>> 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
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users