Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 353339 - sys-fs/udev - /etc/init.d/udev-mount should remount devtmpfs if /dev is already mounted
Summary: sys-fs/udev - /etc/init.d/udev-mount should remount devtmpfs if /dev is alrea...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-31 19:34 UTC by Xake
Modified: 2013-01-30 23:28 UTC (History)
1 user (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 Xake 2011-01-31 19:34:30 UTC
If you use a kernel or an initrd that mounts /dev on root before /etc/init.d/udev-mount then udev-mount just ignores the mounting.

I think that if udev-mount finds /dev already mounted and no /dev in fstab it should remount it with the default options.
Comment 1 Piotr Karbowski (RETIRED) gentoo-dev 2011-06-05 10:51:25 UTC
If you check https://bugs.gentoo.org/show_bug.cgi?id=359065 you will see why udev print that /dev is already mounted.

/dev is not in fstab, never will be I think. looks like proper way to handle initramfs is use mount --move from initramfs to real root filesystem. Also, if you have devtmpfs, udev will use it.
Comment 2 Xake 2011-06-05 20:37:25 UTC
> /dev is not in fstab, never will be I think.

Yes, it is. If your initramfs does not touch /dev (or your kerel has that options set that automouts /dev), then /etc/init.d/udev-mount either mounts /dev from a fstab-entry, and if no such exists it mounts /dev with pre-defined sane defaults.
So I think you misunderstood what this bug is about.


This bug is about the following scenario: what happends if your initramfs does not mount /dev with sane defaults? Take for example genkernel and/or dracut. Should they sync their mounting options against /etc/init.d/udev-mount when it is updated? That may leave you with a old/unsafe mounted /dev, absolutely if genkernel against like now has a really old version as latest stable. Or maybe options just not suitable for gentoo.
So why should not /etc/init.d/udev-mount do a "mount /dev -o remount,<sane options>" if /dev is already mounted, so all gentoo users do have the same options base, and if they want to change it udev-mount can do "mount /dev -o remount,<options-from-fstab>"
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2013-01-27 19:40:45 UTC
udev-mount has devtmpfs check and is fatal if it fails; and it has a method of remounting /dev if it's in /etc/fstab. 

if it's in /etc/fstab then that shouldn't be overridden in any scenario, it's what the user chose

news item was released for the devtmpfs requirement too; with a warning of checking fstab

surely this is an bug in the initramfs tools if they don't do it correctly for the new udev? last I checked, both genkernel and dracut worked for latest udev

if you still think we should do something more, please reopen
Comment 4 Xake 2013-01-30 23:28:07 UTC
(In reply to comment #3)
> surely this is an bug in the initramfs tools if they don't do it correctly
> for the new udev? last I checked, both genkernel and dracut worked for
> latest udev


I think my thought was the following, that genkernel currently mounts devtmpfs according to how udev did at the time that version of genkernel was tagged in upstream.
If a bug affecting sys-fs/udev depending on how devtmpfs was mounted on /dev would appear, and it is fixed in how sys-fs/udev mounts /dev then before a person using sys-kernel/genkernel will get this bug fixed the following needs to happend:

1. A genkernel dev needs to catch this change and change genkernel upstream too (which to be honest will take some time, as we do not really have the time catching up to those bugs for all packages genkernel touches unless the manager of said portage package remembers to send us a notice)
2. A new version/patch needs to be released/added to sys-fs/genkernel in portage
3. The user needs to regenerate their initramfs


This would be a zero-problem if udev remounted /dev with its own defaults unless something other is mentioned in fstab.
So, yeah. It would be a bug in how genkernel mounts /dev, but it could save both user ("things does not work correctly") and udev developers ("we thought we fixed that") from some frustrations.