Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 492694 - =sys-apps/openrc-0.12.4 - devfs & tmpfiles.dev deadlock when using mdev as dev provider
Summary: =sys-apps/openrc-0.12.4 - devfs & tmpfiles.dev deadlock when using mdev as de...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 481182
  Show dependency tree
 
Reported: 2013-11-27 12:28 UTC by Amadeusz Sławiński
Modified: 2014-01-16 16:46 UTC (History)
2 users (show)

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


Attachments
mdev-mount separated from mdev (mdev-mount,1.55 KB, text/plain)
2013-11-28 20:53 UTC, Amadeusz Sławiński
Details
mdev without mount stuff (mdev,890 bytes, text/plain)
2013-11-28 20:55 UTC, Amadeusz Sławiński
Details
0001-create-devmount-service.patch (0001-create-devmount-service.patch,4.63 KB, patch)
2013-12-01 22:38 UTC, William Hubbs
Details | Diff
updated mdev init script without mount stuff (mdev,1.13 KB, text/plain)
2013-12-09 15:35 UTC, Amadeusz Sławiński
Details
0001-devfs-add-code-to-mount-dev.patch (0001-devfs-add-code-to-mount-dev.patch,3.73 KB, patch)
2013-12-30 18:59 UTC, William Hubbs
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Amadeusz Sławiński 2013-11-27 12:28:19 UTC
tmpfiles.d and devfs have
depend()
{
        use dev-mount
        before dev
        keywords ...
}


while mdev (=sys-apps/busybox-1.21.1) has
depend()
{
        provide dev dev-mount
        need sysfs
}

It leads to deadlock during boot, for now I commented "before dev" part in both tmpfiles.d and devfs


Reproducible: Always




Portage 2.2.7 (hardened/linux/amd64/no-multilib, gcc-4.7.3, glibc-2.17, 3.11.9-hardened x86_64)
=================================================================
System uname: Linux-3.11.9-hardened-x86_64-Intel-R-_Core-TM-_i3_CPU_M_350_@_2.27GHz-with-gentoo-2.2
KiB Mem:     2997008 total,   2166316 free
KiB Swap:    3145724 total,   3145724 free
Timestamp of tree: Tue, 26 Nov 2013 00:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5-r4, 3.2.5-r3, 3.3.3
dev-util/cmake:           2.8.12.1-r1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.13.4, 1.14
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.7.3-r1, 4.8.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           4.0
sys-kernel/linux-headers: 3.11 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo local-overlay
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA AdobeFlash-11.x"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/amade/overlay"
SYNC=""
USE="X aac acl acpi alsa amd64 bash-completion berkdb bzip2 cli cracklib crypt cxx dbus dri dvd flac gdbm gif gnutls gold gpg hardened iconv icu ipv6 jpeg jpeg2k justify mmx mmxext mng modules mp3 mudflap ncurses nls nptl opengl openmp pam pax_kernel pcre png readline session sse sse2 sse4_1 sse4_2 ssl ssse3 tcpd threads tiff unicode urandom usb v4l vim-syntax xattr xcb xft xinerama zlib zsh-completion" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB pl" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="x86_64 ppc" RUBY_TARGETS="ruby20" USERLAND="GNU" VIDEO_CARDS="nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Amadeusz Sławiński 2013-11-28 20:20:45 UTC
So I've started using mdev init script from https://github.com/slashbeast/mdev-like-a-boss (mdev.init file)
It seems to not have  provide dev-mount  and works fine
Comment 2 Amadeusz Sławiński 2013-11-28 20:42:49 UTC
Ok, I checked with busybox's mdev script as expected it doesn't lock when dev-mount is removed. Though there seems to be no devpts mounted.

I'm starting to think that there should be mdev-mount script added just like udev does it, so there is /dev mountpoint before devfs starts.
Comment 3 Amadeusz Sławiński 2013-11-28 20:53:51 UTC
Created attachment 364156 [details]
mdev-mount separated from mdev
Comment 4 Amadeusz Sławiński 2013-11-28 20:55:12 UTC
Created attachment 364158 [details]
mdev without mount stuff

With these and previous script added to sysinit it boots nicely and devpts is mounted correctly.
Comment 5 William Hubbs gentoo-dev 2013-12-01 02:47:56 UTC
Yes, you are correct, /dev needs to be mounted within OpenRC. I'm
thinking about either adding a dev-mount script, or just adding the code
to mount /dev to devfs.
Comment 6 Piotr Karbowski (RETIRED) gentoo-dev 2013-12-01 07:52:30 UTC
current gentoo's mdev init script is kind of proof-of-concept than proper solution, why don't you rework mdev.init or take the one from mdev-like-a-boss as-is as a solution to this very issue?
Comment 7 Amadeusz Sławiński 2013-12-01 17:40:16 UTC
(In reply to William Hubbs from comment #5)
> Yes, you are correct, /dev needs to be mounted within OpenRC. I'm
> thinking about either adding a dev-mount script, or just adding the code
> to mount /dev to devfs.

Putting it into devfs would make sense to me, as it already deals with mounting filesystems onto /dev.

(In reply to Piotr Karbowski from comment #6)
> current gentoo's mdev init script is kind of proof-of-concept than proper
> solution, why don't you rework mdev.init or take the one from
> mdev-like-a-boss as-is as a solution to this very issue?

The thing I don't like about it is that it umounts and mounts stuff again, so having mounts properly done in separate script certainly makes sense to me.
Comment 8 Piotr Karbowski (RETIRED) gentoo-dev 2013-12-01 17:55:01 UTC
The very reason why my mdev.init umount pts and friends prior to mouting them is issue with overlaping mounts, pts mounted on initramfs level after switch_root is still reported as /dev/pts, thus checking if /dev/pts is mounted report that yes it is and in fact current /dev (devtmpfs or tmpfs) overlap it.

In my honest opinion the separated script for /dev/pts and /dev/shm is broken by design, if its used in pair with udev then udev's init script should do it, that already mount /dev, and if mdev, then mdev should take care of it.

I see not a single reason why devfs init should exist. If you decide to go with hotplug2 or another /dev manager then you need to deal with something that already mounted /dev/shm and /dev/pts, either over lap it, mount-move twice or umount and mount after you mount devtmpfs or tmpfs on /dev. This is crazy.

@William: can you comment on this? What you think about merging devfs into mdev and udev init scripts?
Comment 9 William Hubbs gentoo-dev 2013-12-01 22:38:04 UTC
Created attachment 364402 [details, diff]
0001-create-devmount-service.patch

All,

I would like some folks to review this.

Apply this patch to OpenRC, add devmount to your sysinit runlevel, then
reboot. Let me know if /dev is mounted successfully.

Thanks much,

William
Comment 10 Amadeusz Sławiński 2013-12-01 23:16:19 UTC
Seems to work ok for me (for mdev script I used one from comment 4)

rootfs / rootfs rw 0 0
/dev/mapper/root / ext4 rw,noatime,data=ordered 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /run tmpfs rw,nosuid,nodev,relatime,size=299704k,mode=755 0 0
dev /dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=373833,mode=755 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0
cgroup_root /sys/fs/cgroup tmpfs rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755 0 0
fusectl /sys/fs/fuse/connections fusectl rw,nosuid,nodev,noexec,relatime 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620 0 0
openrc /sys/fs/cgroup/openrc cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/lib64/rc/sh/cgroup-release-agent.sh,name=openrc 0 0
cpu /sys/fs/cgroup/cpu cgroup rw,nosuid,nodev,noexec,relatime,cpu 0 0
shm /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime 0 0
/dev/sda1 /boot ext4 rw,noatime,data=ordered 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime 0 0

            alsasound | boot                         
             bootmisc | boot                         
                devfs |                       sysinit
             devmount |                       sysinit
               dhcpcd |      default                 
                dmesg |                       sysinit
              dnsmasq |      default                 
             hostname | boot                         
              hwclock | boot                         
             iptables |      default                 
              keymaps | boot                         
            killprocs |              shutdown        
                local |      default                 
           localmount | boot                         
             loopback | boot                         
                 mdev |                       sysinit
             mount-ro |              shutdown        
                 mtab | boot                         
              network | boot                         
               procfs | boot                         
                 root | boot                         
            savecache |              shutdown        
            swapfiles |      default                 
               sysctl | boot                         
                sysfs | boot                         
            syslog-ng |      default                 
         tmpfiles.dev |                       sysinit
       tmpfiles.setup | boot                         
              urandom | boot                         
           vixie-cron |      default                 
       wpa_supplicant |      default                 
                  xdm |      default
Comment 11 Piotr Karbowski (RETIRED) gentoo-dev 2013-12-02 07:16:32 UTC
So we have devmount to mount /dev, devfs to mount /dev/pts and /dev/shm and udev-init-scripts to actually take care of /dev. This is so wrong.

Why not make it as simple as only possible and merge devfs+devmount into udev-init scripts and similar magic into mdev script?
Comment 12 Andrew Savchenko gentoo-dev 2013-12-09 02:21:02 UTC
Hi,

I user mdev on one of my remotely(!!) controlled servers(!) so I have a hard time with this bug...

(In reply to William Hubbs from comment #9)
> Created attachment 364402 [details, diff] [details, diff]
> 0001-create-devmount-service.patch
> 
> All,
> 
> I would like some folks to review this.
> 
> Apply this patch to OpenRC, add devmount to your sysinit runlevel, then
> reboot. Let me know if /dev is mounted successfully.

Cyclic dependency is solved, but /dev is not properly mounted: with this patch /dev is mounted twice: mdev is on top of previous devtmpfs /dev/ with /dev/{pts,shm,mqueue} mounted beneath:

$ findmnt
TARGET                                                                      SOURCE               FSTYPE     OPTIONS
/                                                                           822                  ext4       rw,noatime,jqfmt=vfsv1,usrjquota=aquota.user
├─/dev                                                                      devtmpfs             devtmpfs   rw,nosuid,relatime,size=10240k,nr_inodes=127378,mode=755
│ ├─/dev/mqueue                                                             mqueue               mqueue     rw,nosuid,nodev,noexec,relatime
│ ├─/dev/pts                                                                devpts               devpts     rw,nosuid,noexec,relatime,gid=5,mode=620
│ ├─/dev/shm                                                                shm                  tmpfs      rw,nosuid,nodev,noexec,relatime
│ └─/dev                                                                    mdev                 tmpfs      rw,nosuid,relatime,size=10240k,mode=755
[...]

This leads to broken application relying on /dev/{pts,shm,mqueue}. In particular ssh is still broken:

$ ssh hostname
PTY allocation request failed on channel 1
Last login: Mon Dec  9 06:06:29 MSK 2013 from ip on ssh

That's a real pain since it is impossible to su/sudo without PTY to fix a problem...
Comment 13 Andrew Savchenko gentoo-dev 2013-12-09 03:00:31 UTC
I fixed the latest issue the following way:

--- mdev.orig   2013-12-09 06:58:50.000000000 +0400
+++ mdev        2013-12-09 06:59:12.000000000 +0400
@@ -65,6 +65,8 @@
 
 mount_it()
 {
+        grep " /dev " /etc/mtab && return 0
+
        if fstabinfo --quiet /dev ; then
                mount -n /dev
        else

No need to mount what is already mounted.
Anyway udev doesn't set exec option on /dev these days.
Comment 14 Amadeusz Sławiński 2013-12-09 15:35:18 UTC
Created attachment 365014 [details]
updated mdev init script without mount stuff

portage seems to need /dev/fd entries (at least it was the only application which was verbose about it)


In the meantime I also did run for a bit using eudev and devmount patched openrc which also seemed to work without problems.
Comment 15 William Hubbs gentoo-dev 2013-12-30 17:06:26 UTC
I'll next take a look at merging devmount and devfs. I may be able to make those into one script.
Comment 16 William Hubbs gentoo-dev 2013-12-30 18:59:11 UTC
Created attachment 366586 [details, diff]
0001-devfs-add-code-to-mount-dev.patch

All,

forget about my previous patch entirely and let me know if this one
works. This patch adds the devmount function to devfs instead of
creating a separate service.
Comment 17 Piotr Karbowski (RETIRED) gentoo-dev 2013-12-30 19:21:50 UTC
I don't really like the idea to choose devtmpfs if available, for mdev I better create all nodes via mdev.

Udev want devtmpfs, mdev should be on tmpfs to make sure all nodes created there were created with mdev config policy (so the permissions match and no doubled device nodes are present with different permissions) and for static you do nothing.

I really think /dev mount logic should be separated into udev init script, another into mdev init script and the devfs for static just to mount /dev/shm and maybe pts, but again thats controllable with static_dev variable.
Comment 18 William Hubbs gentoo-dev 2013-12-30 19:55:44 UTC
(In reply to Piotr Karbowski from comment #17)
> I don't really like the idea to choose devtmpfs if available, for mdev I
> better create all nodes via mdev.
> 
> Udev want devtmpfs, mdev should be on tmpfs to make sure all nodes created
> there were created with mdev config policy (so the permissions match and no
> doubled device nodes are present with different permissions) and for static
> you do nothing.
> 
> I really think /dev mount logic should be separated into udev init script,
> another into mdev init script and the devfs for static just to mount
> /dev/shm and maybe pts, but again thats controllable with static_dev
> variable.

The seed_dev function in this patch has to be called regardless of whether /dev is mounted or static, and it has to be called after we try to mount /dev.

If I let udev-mount and mdev handle mounting /dev, they both have to add this function.

Are you saying that you want a way to mount a tmpfs on /dev even if devtmpfs is in the kernel? If so, this script allows that by adding a line to fstab for /dev, but make it a tmpfs.
Comment 19 Piotr Karbowski (RETIRED) gentoo-dev 2013-12-30 20:06:28 UTC
If you go with mdev, then tmpfs instead of devtmpfs.

And the fstab ia a bit hacky or even a workaround just to have more than one init script for /dev.

seed_dev is not that critical as you think. Udev depends on devtmpfs, it will not work without it and devtmpfs provide basic nodes like null or console.

If you let /dev to be controlled by udev, then I really think that mquene, shm pts and friends should be mounted by udev init script. So you have one init script that allow you to switch /dev manager at will, if you want to.

There is no much harm with overlaping mounts too, so in borderline cause mdev init script can mount over mounted /dev with its tmpfs.

and for static dev I would just create staticdev init script, with 'provide dev' or whatever you find suitable. Then we have a one script for each dev manager, independent from each other, whatever I choose to use udev, hotplug2, mdev or maybe static dev, each of them may 'provide dev' so openrc will be happy.

Spliting it into multiple scripts does not really make sense to me.
Comment 20 William Hubbs gentoo-dev 2013-12-30 21:55:22 UTC
I think we aren't understanding each other, so let me try to answer you.
(In reply to Piotr Karbowski from comment #19)
> If you go with mdev, then tmpfs instead of devtmpfs.
> 
> And the fstab ia a bit hacky or even a workaround just to have more than one
> init script for /dev.

I don't want more than one init script to handle the /dev filesystem. We need to separate the /dev filesystem from the device manager and let OpenRC set up the filesystem.

> seed_dev is not that critical as you think. Udev depends on devtmpfs, it
> will not work without it and devtmpfs provide basic nodes like null or
> console.

You are correct about devtmpfs, but tmpfs provides nothing, and. The seed_dev function checks to see what exists and only creates the nodes if they do not exist.

> If you let /dev to be controlled by udev, then I really think that mquene,
> shm pts and friends should be mounted by udev init script. So you have one
> init script that allow you to switch /dev manager at will, if you want to.

shm, pts, etc must be mounted, regardless of the type of the /dev file system. Devtmpfs does not even create the directories.

> There is no much harm with overlaping mounts too, so in borderline cause
> mdev init script can mount over mounted /dev with its tmpfs.

No, it can't, because if it does, /dev/shm and /dev/pts would no longer be available.

> 
> and for static dev I would just create staticdev init script, with 'provide
> dev' or whatever you find suitable. Then we have a one script for each dev
> manager, independent from each other, whatever I choose to use udev,
> hotplug2, mdev or maybe static dev, each of them may 'provide dev' so openrc
> will be happy.
> 
> Spliting it into multiple scripts does not really make sense to me.

I'm not splitting something into multiple scripts; I am combining functionality of parts of three scripts into one. I am combining udev-mount, the mounting portion of mdev and devfs into a single script which will be part of OpenRC.

Does this make sense?
Comment 21 Oleh 2013-12-31 17:42:15 UTC
it makes perfect sense. But what are use cases, if user wants udev or mdev or systemd or static dev? For example, if newer OpenRC have unified /dev managing script and user wants mdev as dev manager?
Comment 22 Piotr Karbowski (RETIRED) gentoo-dev 2013-12-31 17:49:46 UTC
as spoke with William on irc, my idea is to choose devtmpfs vs tmpfs based on whatever mdev or udev or neither is in runlevels. The code to detect it is really simple for loop that works in posix sh. Default-enabled autodetect mechanism to mount devtmpfs for udev, tmpfs for mdev or nothing with option to pre-set filesystem/dev type via conf.d.
Comment 23 William Hubbs gentoo-dev 2013-12-31 18:40:40 UTC
(In reply to Oleg from comment #21)
> it makes perfect sense. But what are use cases, if user wants udev or mdev
> or systemd or static dev? For example, if newer OpenRC have unified /dev
> managing script and user wants mdev as dev manager?

This is the process the script uses currently. It tries these in order until it succeeds.

1. if static_dev is set to yes in /etc/conf.d/devfs, /dev is not mounted.
2. If fstab has an entry for /dev, it is mounted/remounted from there.
3. If devtmpfs is in the kernel, /dev will be devtmpfs.
4. if tmpfs is in the kernel, /dev will be tmpfs.
5. If neither one is in the kernel, we leave /dev alone and complain.

After this, we mount /dev/pts, /dev/shm, etc.

Am I missing any cases?

(In reply to Piotr Karbowski from comment #22)
> as spoke with William on irc, my idea is to choose devtmpfs vs tmpfs based
> on whatever mdev or udev or neither is in runlevels. The code to detect it
> is really simple for loop that works in posix sh. Default-enabled autodetect
> mechanism to mount devtmpfs for udev, tmpfs for mdev or nothing with option
> to pre-set filesystem/dev type via conf.d.

The more I think about this, I don't really want to try to autodetect specific services that are not part of OpenRC inside services that are part of OpenRC. That is fragile, because OpenRC would be reacting based on names of external services that could change without our knowledge.
Comment 24 Piotr Karbowski (RETIRED) gentoo-dev 2014-01-01 18:56:31 UTC
You're right. The devfs changes you provided are fine.
Comment 25 Amadeusz Sławiński 2014-01-05 15:23:03 UTC
(In reply to William Hubbs from comment #16)
> Created attachment 366586 [details, diff] [details, diff]
> 0001-devfs-add-code-to-mount-dev.patch
> 
> All,
> 
> forget about my previous patch entirely and let me know if this one
> works. This patch adds the devmount function to devfs instead of
> creating a separate service.

in seed_dev there is
mkdir -m $3 -p $2 >/dev/null 2>&1 || \

before creating /dev/null, is this right?


Anyway my system boots with this patch. I've removed devtmpfs support from kernel and use tmpfs, so mdev can create device files on it's own.
Comment 26 Amadeusz Sławiński 2014-01-05 15:29:33 UTC
> in seed_dev there is
> mkdir -m $3 -p $2 >/dev/null 2>&1 || \
> 
> before creating /dev/null, is this right?

And to reply to myself it's totally wrong.
Now I know why I got mknod warning that /dev/null exists during boot and why xdm wouldn't start.
After moving mknod /dev/null to beginning of seed_dev it works properly.
Comment 27 William Hubbs gentoo-dev 2014-01-06 03:53:29 UTC
I have updated the devfs script in commit 8352082.
I also took into account the comment about making the devices before
the directories. Thanks for the information.

This will be included in OpenRC-0.13.