Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 130792 - Bind mount old /dev to /lib/udev/dev in udev-start.sh
Summary: Bind mount old /dev to /lib/udev/dev in udev-start.sh
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Greg Kroah-Hartman (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-21 18:04 UTC by Christopher Byrne
Modified: 2006-04-21 23:45 UTC (History)
1 user (show)

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


Attachments
Patch ls /lib/rcscripts/addons/udev-start.sh to bind-mount old /dev (binddevmount.patch,528 bytes, patch)
2006-04-21 18:07 UTC, Christopher Byrne
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Byrne 2006-04-21 18:04:59 UTC
When udev starts, it creates a tmpfs or ramfs over the /dev. That means the orginial contents of /dev are inaccessible (other than bind --move /dev elsewhere, but that would be unsafe on a running system!). It is useful to have the old /dev accessible for various reasons: for example, one could do something like this (perhaps on shutdown in /etc/conf.d/local.stop):

rsync -a --delete /dev /lib/udev

So that if the system is broken and the user does something like "init=/bin/bb" to reapir it, all the device nodes are still there. Other uses exist, like to keep it pruned of everything but "null" and "console" or ehance/modify/replace RC_DEVICE_TARBALL.

One possible bug with the patch is "bind --mount" only exsists as of 2.4.0; however the udev homepage says it requires at least 2.6.0 anyway. The udev ebuild itself does not seem to directly depend on kernel >= 2.6.0, although it may do so indirectly.
Comment 1 Christopher Byrne 2006-04-21 18:07:49 UTC
Created attachment 85154 [details, diff]
Patch ls /lib/rcscripts/addons/udev-start.sh to bind-mount old /dev

Note: /lib/rcscripts/addons/udev-stop.sh is not patched to unbind-mount it; as /lib/rcscripts/addons/udev-stop.sh does not seems to unmount the temporary storage
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-04-21 23:18:19 UTC
I really don't see why everyone should have irrelevant old /dev tree bind-mounted somewhere. If you need it, then do it yourself.
Comment 3 Greg Kroah-Hartman (RETIRED) gentoo-dev 2006-04-21 23:45:00 UTC
No, we do not need to show the old static /dev anywhere in the tree.

So closing this, sorry.