Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 223311 - Please revert switch logic of mount-boot eclass
Summary: Please revert switch logic of mount-boot eclass
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High major with 3 votes (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-23 08:36 UTC by Dirk Heinrichs
Modified: 2011-01-09 03:17 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Heinrichs 2008-05-23 08:36:27 UTC
In its current state, the mount-boot eclass mounts /boot or remounts it rw unless told not to do so. I mount /boot ro for a reason and I don't want anything to mess with mounts on my systems unless I explicitely allow it to do so. So please revert the logic of this eclass from "mounting unless forbidden" to "mount only if allowed" (i.e. DONT_MOUNT_BOOT => MOUNT_BOOT_ALLOWED).

Reproducible: Always

Steps to Reproduce:
Comment 1 Dirk Heinrichs 2008-05-24 14:50:32 UTC
The more I think about it, the more I get the impression that this should really be a USE flag (say "mountboot"), which defaults to "not set". This way the user _knows_ there's something she can switch on or off, instead of hiding such a thing in an undocumented env variable.
Comment 2 SpanKY gentoo-dev 2008-05-31 07:22:05 UTC
it really isnt hidden at all.  any package you emerge that uses this functionality quite clearly displays a banner:

einfo "To avoid automounting and autoinstalling with /boot,"
einfo "just export the DONT_MOUNT_BOOT variable."

the default behavior is desirable for the majority of people.  for those who do not like it, they can already export the relevant variable.

USE flags are not really any cleaner as those will trigger unnecessary rebuilds when its value changes, and it isnt really a per-package issue.
Comment 3 Dirk Heinrichs 2008-05-31 07:32:55 UTC
(In reply to comment #2)
> it really isnt hidden at all.  any package you emerge that uses this
> functionality quite clearly displays a banner:
> 
> einfo "To avoid automounting and autoinstalling with /boot,"
> einfo "just export the DONT_MOUNT_BOOT variable."

I'd bet most people don't see those messages. Especially not if they pass by in the middle of a big update containing several packages.

> the default behavior is desirable for the majority of people.  for those who do
> not like it, they can already export the relevant variable.

If they knew it exists! It's too easy to overlook. And there are better ways to accomplish this.

> USE flags are not really any cleaner as those will trigger unnecessary rebuilds
> when its value changes, and it isnt really a per-package issue.

But they are _visible_! And why would the value change, except if the _user_ changes it.

The other way would be to use "emerge --config".
Comment 4 SpanKY gentoo-dev 2008-05-31 07:48:36 UTC
as you point out yourself, people dont read.  that is why `emerge --config` is unacceptable.  the default behavior was to "just work" and that is what we have today: it just works for the *large* majority of people.
Comment 5 Dirk Heinrichs 2008-05-31 08:18:22 UTC
(In reply to comment #4)
> as you point out yourself, people dont read.  that is why `emerge --config` is
> unacceptable.  the default behavior was to "just work" and that is what we have
> today: it just works for the *large* majority of people.

That's the point: It doesn't "just work" there have been reports on gentoo-user that systems were not bootable anymore. Don't mess with users partitions, please, unless they explicitely allow to do so.
Comment 6 SpanKY gentoo-dev 2008-05-31 10:37:44 UTC
referring vaguely to mailing lists will literally solve nothing.  bug reports happen via bugzilla, not mailing lists.  if there's a problem, the person experiencing it should file a bug so that it can be resolved.  declaring it broken and getting it disabled does not fix anything.
Comment 7 Bo Ørsted Andresen (RETIRED) gentoo-dev 2008-06-02 13:48:25 UTC
(In reply to comment #2)
> it really isnt hidden at all.  any package you emerge that uses this
> functionality quite clearly displays a banner:
> 
> einfo "To avoid automounting and autoinstalling with /boot,"
> einfo "just export the DONT_MOUNT_BOOT variable."

Maybe those could be upgraded to elog messages?
Comment 8 Neil Bothwick 2008-06-02 14:49:48 UTC
Since emerge is supposed to be non-interactive, it is likely you will only see that message after your protected /boot has already been interfered with. A USE flag would make this much clearer since it would be shown in the output of "emerge -[ap]u world" BEFORE any action was taken.
Comment 9 SpanKY gentoo-dev 2008-06-02 15:39:12 UTC
thanks, ive converted to elog

http://sources.gentoo.org/eclass/mount-boot.eclass?r1=1.13&r2=1.14
Comment 10 SpanKY gentoo-dev 2008-06-02 15:39:33 UTC
erm, didnt mean to close
Comment 11 Joe Stroller 2009-05-25 10:43:39 UTC
SpanKY wrote on 2008-05-31 
> any package you emerge that uses this
> functionality quite clearly displays a banner:
> 
> einfo "To avoid automounting and autoinstalling with /boot,"
> einfo "just export the DONT_MOUNT_BOOT variable."

Um, I'm sorry, I don't know what that means. How do I "export a variable"?

Doing some Googling, it *looks like* I add a line to make.conf saying:
  DONT_MOUNT_BOOT="yes" 
but not one of the first half dozen Google results for DONT_MOUNT_BOOT is Gentoo documentation stating that.
Comment 12 Christoph Bussenius 2009-08-29 10:00:26 UTC
I agree with Dirk.  If the system administrator has mounted /boot read-only, he/she doesn't expect that anything writes to the partition.

> it just works for the *large* majority of people.

I don't think the majority of people has /boot mounted read-only.  Those who do know what they are doing.

Anyway, I don't think that "emerge grub" should touch /boot or the MBR at all (even if /boot is not read-only).  If the system has booted fine before, there's seldom a reason to mess with the setup.  So please don't overwrite the stage files and don't run grub.  I'd prefer elogging a message that tells the user how to install the new grub version (and I think this is what older ebuilds did).

It's really not the Gentoo way to do some automagic stuff to system-critical components unless explicitly told not to do so.
Comment 13 Dirk Heinrichs 2009-10-29 15:20:10 UTC
Spreading the information via elog is too late. Users only see this _after_ things have already happened ("Oh, btw, I just messed up your /boot and didn't care about your RO mount"). It should really be done in a way that the user get's a chance to decide _before_ installation happens.
Comment 14 Dirk Heinrichs 2009-12-16 09:07:12 UTC
Any news here?
Comment 15 SpanKY gentoo-dev 2011-01-09 03:17:10 UTC
no plans to change current behavior.  export the variable in question and be done with it.