noauto option ignored in /etc/fstab?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
42 messages Options
123
Reply | Threaded
Open this post in threaded view
|

noauto option ignored in /etc/fstab?

Josef Wolf
Hello,

I have the following line in /etc/fstab:

  UUID=XXXX-XXXX-XXXX-XXXX /boot ext4 noauto,relatime 0 2

The noauto option should prevent the fs to be mounted during boot.

That worked great in every distro I have touched in the last 20 years.

But since I reinstalled this box with 16.04 LTS, this FS is mounted during
boot.

Any ideas what causes this FS to be mounted during boot?

--
Josef Wolf
[hidden email]

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

Re: noauto option ignored in /etc/fstab?

Xen
Josef Wolf schreef op 01-12-2017 8:50:

> Hello,
>
> I have the following line in /etc/fstab:
>
>   UUID=XXXX-XXXX-XXXX-XXXX /boot ext4 noauto,relatime 0 2
>
> The noauto option should prevent the fs to be mounted during boot.
>
> That worked great in every distro I have touched in the last 20 years.
>
> But since I reinstalled this box with 16.04 LTS, this FS is mounted
> during
> boot.
>
> Any ideas what causes this FS to be mounted during boot?

It's most likely that systemd pulls in this target in some way.

Here are the services that require boot.mount on my system:

         "unattended-upgrades.service"->"boot.mount" [color="green"];
         "unattended-upgrades.service"->"boot.mount" [color="black"];

         "local-fs.target"->"boot.mount" [color="green"];
         "local-fs.target"->"boot.mount" [color="black"];

Local-fs.target should derive from fstab.

But unattended-upgrades may pull this mount in regardless.

--
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: noauto option ignored in /etc/fstab?

Josef Wolf
On Fri, Dec 01, 2017 at 09:09:36AM +0100, Xen wrote:
> Josef Wolf schreef op 01-12-2017 8:50:

> >I have the following line in /etc/fstab:
> >  UUID=XXXX-XXXX-XXXX-XXXX /boot ext4 noauto,relatime 0 2
> >The noauto option should prevent the fs to be mounted during boot.
> >Any ideas what causes this FS to be mounted during boot?
>
> It's most likely that systemd pulls in this target in some way.
>
> Here are the services that require boot.mount on my system:
>
>         "unattended-upgrades.service"->"boot.mount" [color="green"];
>         "unattended-upgrades.service"->"boot.mount" [color="black"];
>
>         "local-fs.target"->"boot.mount" [color="green"];
>         "local-fs.target"->"boot.mount" [color="black"];
>
> Local-fs.target should derive from fstab.

I can see that there may be many reasons to pull boot.mount.

But boot.mount should pass the -a option to mount, which in turn should
honor the noauto keyword.

> But unattended-upgrades may pull this mount in regardless.

For many years, I have the following two lines  in apt.conf:

  $ grep boot /etc/apt/*
  /etc/apt/apt.conf:DPkg::Pre-Invoke {"/bin/mount -o remount,exec /tmp; /bin/mount /boot";};
  /etc/apt/apt.conf:DPkg::Post-Invoke {"/bin/mount -o remount /tmp; /bin/umount /boot";};
  $

This worked great for many years. But it will fail when the noauto keyword is ignored.

--
Josef Wolf
[hidden email]

--
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: noauto option ignored in /etc/fstab?

Tom H-4
In reply to this post by Josef Wolf
On Fri, Dec 1, 2017 at 2:50 AM, Josef Wolf <[hidden email]> wrote:

>
> I have the following line in /etc/fstab:
>
> UUID=XXXX-XXXX-XXXX-XXXX /boot ext4 noauto,relatime 0 2
>
> The noauto option should prevent the fs to be mounted during boot.
>
> That worked great in every distro I have touched in the last 20 years.
>
> But since I reinstalled this box with 16.04 LTS, this FS is mounted during
> boot.
>
> Any ideas what causes this FS to be mounted during boot?

Is this an EFI system?

If it is, you'll have to set "/boot/efi" as "noauto" too.

--
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: noauto option ignored in /etc/fstab?

Josef Wolf
On Fri, Dec 01, 2017 at 05:12:58AM -0500, Tom H wrote:

> On Fri, Dec 1, 2017 at 2:50 AM, Josef Wolf <[hidden email]> wrote:
> >
> > I have the following line in /etc/fstab:
> >
> > UUID=XXXX-XXXX-XXXX-XXXX /boot ext4 noauto,relatime 0 2
> >
> > The noauto option should prevent the fs to be mounted during boot.
> >
> > That worked great in every distro I have touched in the last 20 years.
> >
> > But since I reinstalled this box with 16.04 LTS, this FS is mounted during
> > boot.
> >
> > Any ideas what causes this FS to be mounted during boot?
>
> Is this an EFI system?
>
> If it is, you'll have to set "/boot/efi" as "noauto" too.

Before the reinstall, I had 14.04 with EFI and everything worked fine.

The the disk failed. I reinstalled 16.04 WITHOUT EFI.

Thus, no. There's no /boot/efi anymore on this system.

--
Josef Wolf
[hidden email]

--
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: noauto option ignored in /etc/fstab?

Tom H-4
On Fri, Dec 1, 2017 at 5:36 AM, Josef Wolf <[hidden email]> wrote:

> On Fri, Dec 01, 2017 at 05:12:58AM -0500, Tom H wrote:
>> On Fri, Dec 1, 2017 at 2:50 AM, Josef Wolf <[hidden email]> wrote:
>>>
>>> I have the following line in /etc/fstab:
>>>
>>> UUID=XXXX-XXXX-XXXX-XXXX /boot ext4 noauto,relatime 0 2
>>>
>>> The noauto option should prevent the fs to be mounted during boot.
>>>
>>> That worked great in every distro I have touched in the last 20 years.
>>>
>>> But since I reinstalled this box with 16.04 LTS, this FS is mounted
>>> during boot.
>>>
>>> Any ideas what causes this FS to be mounted during boot?
>>
>> Is this an EFI system?
>>
>> If it is, you'll have to set "/boot/efi" as "noauto" too.
>
> Before the reinstall, I had 14.04 with EFI and everything worked fine.
>
> The the disk failed. I reinstalled 16.04 WITHOUT EFI.
>
> Thus, no. There's no /boot/efi anymore on this system.

Here's the output from my laptop before and after adding "noauto" to
the "/boot" line in "/etc/fstab" ("/boot" is my EFI partition). It
works. You must have misconfigured something or hit a bug.


# findmnt /boot
TARGET SOURCE FSTYPE OPTIONS
/boot /dev/sda1 vfat
rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro


# find /run/systemd -name "*boot*"
/run/systemd/generator/boot.mount
/run/systemd/generator/local-fs.target.requires/boot.mount


# egrep -v '^$|^#' /run/systemd/generator/boot.mount
[Unit]
SourcePath=/etc/fstab
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
Before=local-fs.target
Requires=systemd-fsck@dev-disk-by\x2duuid-B27F\x2d50A4.service
After=systemd-fsck@dev-disk-by\x2duuid-B27F\x2d50A4.service
[Mount]
Where=/boot
What=/dev/disk/by-uuid/B27F-50A4
Type=vfat
Options=umask=0077


# diff -u /run/systemd/generator/local-fs.target.requires/boot.mount
/run/systemd/generator/boot.mount


# vi /etc/fstab


# grep boot /etc/fstab
UUID=B27F-50A4 /boot vfat noauto,umask=0077 0 1


# reboot


...


# findmnt /boot


# find /run/systemd -name "*boot*"
/run/systemd/generator/boot.mount


# egrep -v '^$|^#' /run/systemd/generator/boot.mount
[Unit]
SourcePath=/etc/fstab
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
Before=local-fs.target
Requires=systemd-fsck@dev-disk-by\x2duuid-B27F\x2d50A4.service
After=systemd-fsck@dev-disk-by\x2duuid-B27F\x2d50A4.service
[Mount]
Where=/boot
What=/dev/disk/by-uuid/B27F-50A4
Type=vfat
Options=noauto,umask=0077


# findmnt /boot


#

--
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: noauto option ignored in /etc/fstab?

Josef Wolf
On Fri, Dec 01, 2017 at 10:14:18AM -0500, Tom H wrote:

> On Fri, Dec 1, 2017 at 5:36 AM, Josef Wolf <[hidden email]> wrote:
> > On Fri, Dec 01, 2017 at 05:12:58AM -0500, Tom H wrote:
> >> On Fri, Dec 1, 2017 at 2:50 AM, Josef Wolf <[hidden email]> wrote:
> >>>
> >>> I have the following line in /etc/fstab:
> >>>
> >>> UUID=XXXX-XXXX-XXXX-XXXX /boot ext4 noauto,relatime 0 2
> >>>
> >>> The noauto option should prevent the fs to be mounted during boot.
> >>>
> >>> That worked great in every distro I have touched in the last 20 years.
> >>>
> >>> But since I reinstalled this box with 16.04 LTS, this FS is mounted
> >>> during boot.
> >>>
> >>> Any ideas what causes this FS to be mounted during boot?
> >>
> >> Is this an EFI system?
> >>
> >> If it is, you'll have to set "/boot/efi" as "noauto" too.
> >
> > Before the reinstall, I had 14.04 with EFI and everything worked fine.
> >
> > The the disk failed. I reinstalled 16.04 WITHOUT EFI.
> >
> > Thus, no. There's no /boot/efi anymore on this system.
>
> Here's the output from my laptop before and after adding "noauto" to
> the "/boot" line in "/etc/fstab" ("/boot" is my EFI partition). It
> works. You must have misconfigured something or hit a bug.

Well, it might work for you, but it doesn't work for me...

So, how do I find out what's the cause?

--
Josef Wolf
[hidden email]

--
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: noauto option ignored in /etc/fstab?

Liam Proven
In reply to this post by Josef Wolf
On 1 December 2017 at 11:36, Josef Wolf <[hidden email]> wrote:

>
> Before the reinstall, I had 14.04 with EFI and everything worked fine.
>
> The the disk failed. I reinstalled 16.04 WITHOUT EFI.
>
> Thus, no. There's no /boot/efi anymore on this system.

No no no -- hang on -- that is not how this works.

EFI is the type of system firmware. It is the modern replacement for a
BIOS. Either your motherboard has EFI or it does not. It has nothing
to do with installation options. What you are saying is like saying "I
reinstalled without PS/2 support and the little round socket on the
back disappeared". It doesn't work like that.

--
Liam Proven • Profile: https://about.me/liamproven
Email: [hidden email] • Google Mail/Talk/Plus: [hidden email]
Twitter/Facebook/Flickr: lproven • Skype/LinkedIn/AIM/Yahoo: 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
Xen
Reply | Threaded
Open this post in threaded view
|

Re: noauto option ignored in /etc/fstab?

Xen
In reply to this post by Josef Wolf
Josef Wolf schreef op 04-12-2017 17:13:

> On Fri, Dec 01, 2017 at 10:14:18AM -0500, Tom H wrote:
>> On Fri, Dec 1, 2017 at 5:36 AM, Josef Wolf <[hidden email]> wrote:
>> > On Fri, Dec 01, 2017 at 05:12:58AM -0500, Tom H wrote:
>> >> On Fri, Dec 1, 2017 at 2:50 AM, Josef Wolf <[hidden email]> wrote:
>> >>>
>> >>> I have the following line in /etc/fstab:
>> >>>
>> >>> UUID=XXXX-XXXX-XXXX-XXXX /boot ext4 noauto,relatime 0 2
>> >>>
>> >>> The noauto option should prevent the fs to be mounted during boot.
>> >>>
>> >>> That worked great in every distro I have touched in the last 20 years.
>> >>>
>> >>> But since I reinstalled this box with 16.04 LTS, this FS is mounted
>> >>> during boot.
>> >>>
>> >>> Any ideas what causes this FS to be mounted during boot?
>> >>
>> >> Is this an EFI system?
>> >>
>> >> If it is, you'll have to set "/boot/efi" as "noauto" too.
>> >
>> > Before the reinstall, I had 14.04 with EFI and everything worked fine.
>> >
>> > The the disk failed. I reinstalled 16.04 WITHOUT EFI.
>> >
>> > Thus, no. There's no /boot/efi anymore on this system.
>>
>> Here's the output from my laptop before and after adding "noauto" to
>> the "/boot" line in "/etc/fstab" ("/boot" is my EFI partition). It
>> works. You must have misconfigured something or hit a bug.
>
> Well, it might work for you, but it doesn't work for me...
>
> So, how do I find out what's the cause?

Have you tried disabling automatic updates already?

sudo vi /etc/apt/apt.conf.d/10periodic

and

sudo vi /etc/apt/apt.conf.d/20auto-upgrades

and/or

systemctl stop unattended-upgrades.service

and/or

systemctl disable unattended-upgrades.service

I don't know exactly how it works.

You can also remove /boot from /etc/fstab and create your own mount
command.

Systemd will not touch what it does not know about.

But I would try the former first.













Also if your system if different:

systemd-analyze dot | grep boot.mount

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

Re: noauto option ignored in /etc/fstab?

Xen
In reply to this post by Liam Proven
Liam Proven schreef op 04-12-2017 17:29:

> No no no -- hang on -- that is not how this works.
>
> EFI is the type of system firmware.

EFI firmware can also boot in legacy mode.

--
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: noauto option ignored in /etc/fstab?

Liam Proven
On 4 December 2017 at 17:45, Xen <[hidden email]> wrote:
>
> EFI firmware can also boot in legacy mode.

Yes, I know, or so I have read. I have no EFI machines except my Mac
and I do not run Linux on that.

But AIUI, you still need an EFI system partition on the 1st hard disk
to boot a machine which has EFI.


--
Liam Proven • Profile: https://about.me/liamproven
Email: [hidden email] • Google Mail/Talk/Plus: [hidden email]
Twitter/Facebook/Flickr: lproven • Skype/LinkedIn/AIM/Yahoo: 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: noauto option ignored in /etc/fstab?

Tom H-4
In reply to this post by Josef Wolf
On Mon, Dec 4, 2017 at 11:13 AM, Josef Wolf <[hidden email]> wrote:

> On Fri, Dec 01, 2017 at 10:14:18AM -0500, Tom H wrote:
>> On Fri, Dec 1, 2017 at 5:36 AM, Josef Wolf <[hidden email]> wrote:
>>> On Fri, Dec 01, 2017 at 05:12:58AM -0500, Tom H wrote:
>>>> On Fri, Dec 1, 2017 at 2:50 AM, Josef Wolf <[hidden email]> wrote:
>>>>>
>>>>> I have the following line in /etc/fstab:
>>>>>
>>>>> UUID=XXXX-XXXX-XXXX-XXXX /boot ext4 noauto,relatime 0 2
>>>>>
>>>>> The noauto option should prevent the fs to be mounted during boot.
>>>>>
>>>>> That worked great in every distro I have touched in the last 20 years.
>>>>>
>>>>> But since I reinstalled this box with 16.04 LTS, this FS is mounted
>>>>> during boot.
>>>>>
>>>>> Any ideas what causes this FS to be mounted during boot?
>>>>
>>>> Is this an EFI system?
>>>>
>>>> If it is, you'll have to set "/boot/efi" as "noauto" too.
>>>
>>> Before the reinstall, I had 14.04 with EFI and everything worked fine.
>>>
>>> The the disk failed. I reinstalled 16.04 WITHOUT EFI.
>>>
>>> Thus, no. There's no /boot/efi anymore on this system.
>>
>> Here's the output from my laptop before and after adding "noauto" to
>> the "/boot" line in "/etc/fstab" ("/boot" is my EFI partition). It
>> works. You must have misconfigured something or hit a bug.
>
> Well, it might work for you, but it doesn't work for me...

We know. I was simply pointing out that it's not broken for everyone.

> So, how do I find out what's the cause?

What does systemd think your mount is? What's the output of "cat
/run/systemd/generator/boot.mount"?

--
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: noauto option ignored in /etc/fstab?

Tom H-4
In reply to this post by Liam Proven
On Mon, Dec 4, 2017 at 12:06 PM, Liam Proven <[hidden email]> wrote:
> On 4 December 2017 at 17:45, Xen <[hidden email]> wrote:
>>
>> EFI firmware can also boot in legacy mode.
>
> Yes, I know, or so I have read. I have no EFI machines except my Mac
> and I do not run Linux on that.
>
> But AIUI, you still need an EFI system partition on the 1st hard disk
> to boot a machine which has EFI.

Are you sure? What would be the difference between "regular mode" and
legacy mode?

If your disk is gpt-formatted, you need a bios_boot partition (gdisk
name; parted calls is bios_grub).

--
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: noauto option ignored in /etc/fstab?

Tom H-4
In reply to this post by Tom H-4
On Mon, Dec 4, 2017 at 12:20 PM, Tom H <[hidden email]> wrote:

> On Mon, Dec 4, 2017 at 11:13 AM, Josef Wolf <[hidden email]> wrote:
>> On Fri, Dec 01, 2017 at 10:14:18AM -0500, Tom H wrote:
>>> On Fri, Dec 1, 2017 at 5:36 AM, Josef Wolf <[hidden email]> wrote:
>>>> On Fri, Dec 01, 2017 at 05:12:58AM -0500, Tom H wrote:
>>>>> On Fri, Dec 1, 2017 at 2:50 AM, Josef Wolf <[hidden email]> wrote:
>>>>>>
>>>>>> I have the following line in /etc/fstab:
>>>>>>
>>>>>> UUID=XXXX-XXXX-XXXX-XXXX /boot ext4 noauto,relatime 0 2
>>>>>>
>>>>>> The noauto option should prevent the fs to be mounted during boot.
>>>>>>
>>>>>> That worked great in every distro I have touched in the last 20 years.
>>>>>>
>>>>>> But since I reinstalled this box with 16.04 LTS, this FS is mounted
>>>>>> during boot.
>>>>>>
>>>>>> Any ideas what causes this FS to be mounted during boot?
>>>>>
>>>>> Is this an EFI system?
>>>>>
>>>>> If it is, you'll have to set "/boot/efi" as "noauto" too.
>>>>
>>>> Before the reinstall, I had 14.04 with EFI and everything worked fine.
>>>>
>>>> The the disk failed. I reinstalled 16.04 WITHOUT EFI.
>>>>
>>>> Thus, no. There's no /boot/efi anymore on this system.
>>>
>>> Here's the output from my laptop before and after adding "noauto" to
>>> the "/boot" line in "/etc/fstab" ("/boot" is my EFI partition). It
>>> works. You must have misconfigured something or hit a bug.
>>
>> Well, it might work for you, but it doesn't work for me...
>
> We know. I was simply pointing out that it's not broken for everyone.
>
>> So, how do I find out what's the cause?
>
> What does systemd think your mount is? What's the output of "cat
> /run/systemd/generator/boot.mount"?

This seems to be a systemd bug.

I set up a BIOS VM and "cat /run/systemd/generator/boot.mount" doesn't
help. I expected "noauto" not to have "Before=local-fs.target" but my
laptop has it too.

root@jwolf:~# egrep -v '^$|^#' /run/systemd/generator/boot.mount
[Unit]
SourcePath=/etc/fstab
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
Before=local-fs.target
Requires=systemd-fsck@dev-disk-by\x2duuid-7657da8f\x2d9398\x2d4171\x2db298\x2d5415bffbe22a.service
After=systemd-fsck@dev-disk-by\x2duuid-7657da8f\x2d9398\x2d4171\x2db298\x2d5415bffbe22a.service
[Mount]
Where=/boot
What=/dev/disk/by-uuid/7657da8f-9398-4171-b298-5415bffbe22a
Type=ext4
Options=noauto
root@jwolf:~#

--
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: noauto option ignored in /etc/fstab?

Josef Wolf
In reply to this post by Tom H-4
On Mon, Dec 04, 2017 at 12:20:49PM -0500, Tom H wrote:
> What does systemd think your mount is? What's the output of "cat
> /run/systemd/generator/boot.mount"?

It seems to know about the "noauto" option:

  # Automatically generated by systemd-fstab-generator
 
  [Unit]
  SourcePath=/etc/fstab
  Documentation=man:fstab(5) man:systemd-fstab-generator(8)
  Requires=systemd-fsck@dev-disk-by\x2duuid-2b61601c\x2d84d6\x2d47a5\x2d80eb\x2d9149ce116be8.service
  After=systemd-fsck@dev-disk-by\x2duuid-2b61601c\x2d84d6\x2d47a5\x2d80eb\x2d9149ce116be8.service
 
  [Mount]
  What=/dev/disk/by-uuid/2b61601c-84d6-47a5-80eb-9149ce116be8
  Where=/boot
  Type=ext4
  Options=noauto,relatime

Maybe there's some sort of debug-mode or something?

--
Josef Wolf
[hidden email]

--
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: noauto option ignored in /etc/fstab?

Josef Wolf
In reply to this post by Tom H-4
On Mon, Dec 04, 2017 at 01:12:07PM -0500, Tom H wrote:
> I set up a BIOS VM and "cat /run/systemd/generator/boot.mount" doesn't
> help. I expected "noauto" not to have "Before=local-fs.target" but my
> laptop has it too.

There seems to be no "Before" stanza in my boot.mount. Should I try to add
one?


--
Josef Wolf
[hidden email]

--
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: noauto option ignored in /etc/fstab?

Josef Wolf
In reply to this post by Liam Proven
On Mon, Dec 04, 2017 at 05:29:33PM +0100, Liam Proven wrote:

> > The the disk failed. I reinstalled 16.04 WITHOUT EFI.
> >
> > Thus, no. There's no /boot/efi anymore on this system.
>
> No no no -- hang on -- that is not how this works.
>
> EFI is the type of system firmware. It is the modern replacement for a
> BIOS. Either your motherboard has EFI or it does not. It has nothing
> to do with installation options. What you are saying is like saying "I
> reinstalled without PS/2 support and the little round socket on the
> back disappeared". It doesn't work like that.

Well, the Efi firmware might be there. But there's no /boot/efi partition
anymore. Therefore the mount of the /boot partition can't be forced by the
/boot/efi partition.

--
Josef Wolf
[hidden email]

--
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: noauto option ignored in /etc/fstab?

Liam Proven
On 4 December 2017 at 21:06, Josef Wolf <[hidden email]> wrote:

> Well, the Efi firmware might be there. But there's no /boot/efi partition
> anymore. Therefore the mount of the /boot partition can't be forced by the
> /boot/efi partition.

That's the place where a partition is mounted, not an identifier of
the partition itself.

How big is your hard disk?
What partitioning system is it using? (MBR or GUID)
How did you partition it? Can you take a screenshot of a maximised
Gparted window and put it on Imgur or Photobucket or something?


--
Liam Proven • Profile: https://about.me/liamproven
Email: [hidden email] • Google Mail/Talk/Plus: [hidden email]
Twitter/Facebook/Flickr: lproven • Skype/LinkedIn/AIM/Yahoo: 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: noauto option ignored in /etc/fstab?

Tom H-4
In reply to this post by Josef Wolf
On Mon, Dec 4, 2017 at 2:45 PM, Josef Wolf <[hidden email]> wrote:
> On Mon, Dec 04, 2017 at 01:12:07PM -0500, Tom H wrote:
>>
>> I set up a BIOS VM and "cat /run/systemd/generator/boot.mount"
>> doesn't help. I expected "noauto" not to have
>> "Before=local-fs.target" but my laptop has it too.
>
> There seems to be no "Before" stanza in my boot.mount. Should I try to
> add one?

No. I thought that it was the culprit (and I don't understand how/why
it's present on my laptop).

"/etc/init.d/grub-common" has a "case" statement with

start|restart|force-reload)
log_action_msg "Recording successful boot for GRUB"
[ -s /boot/grub/grubenv ] || rm -f /boot/grub/grubenv
mkdir -p /boot/grub
grub-editenv /boot/grub/grubenv unset recordfail
log_end_msg $?

so "/boot" is being mounted in spite of the "noauto" :(

root@jwolf:~# systemctl status boot.mount
● boot.mount - /boot
Loaded: loaded (/etc/fstab; generated; vendor preset: enabled)
Active: inactive (dead)
Where: /boot
What: /dev/disk/by-uuid/7657da8f-9398-4171-b298-5415bffbe22a
Docs: man:fstab(5)
man:systemd-fstab-generator(8)

root@jwolf:~# systemctl status grub-common.service
● grub-common.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)

root@jwolf:~# findmnt /boot

root@jwolf:~#

[You might want to add "x-systemd.auto" to the "/boot" line in
?etc/fstab". "/boot" will be automounted when it's needed.]

--
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: noauto option ignored in /etc/fstab?

Josef Wolf
On Mon, Dec 04, 2017 at 05:18:56PM -0500, Tom H wrote:

> "/etc/init.d/grub-common" has a "case" statement with
>
> start|restart|force-reload)
> log_action_msg "Recording successful boot for GRUB"
> [ -s /boot/grub/grubenv ] || rm -f /boot/grub/grubenv
> mkdir -p /boot/grub
> grub-editenv /boot/grub/grubenv unset recordfail
> log_end_msg $?
>
> so "/boot" is being mounted in spite of the "noauto" :(
>
> root@jwolf:~# systemctl status boot.mount

Seems that we're getting closer here:

   # systemctl status boot.mount
   ● boot.mount - /boot
      Loaded: loaded (/etc/fstab; bad; vendor preset: enabled)
      Active: inactive (dead)
       Where: /boot
        What: /dev/disk/by-uuid/2b61601c-84d6-47a5-80eb-9149ce116be8
        Docs: man:fstab(5)
              man:systemd-fstab-generator(8)
   
   Dez 04 10:56:52 bu201 systemd[1]: Mounting /boot...
   Dez 04 10:56:52 bu201 systemd[1]: Mounted /boot.

Note the time stamp: that was the time the system was booted.

I understand that grub wants to remember that the last boot was successful.

But:
1. It stores only an empty /boot/grub/grubenv (1024 bytes of '#' characters)
2. shouldn't it undo what it have done? When it needs to mount an unmounted
   partition, it should umount this partition again when done.


> [You might want to add "x-systemd.auto" to the "/boot" line in
> ?etc/fstab". "/boot" will be automounted when it's needed.]

Will this umount the partition again when it's no longer needed?

--
Josef Wolf
[hidden email]

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
123