Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 190093 - sys-apps/baselayout-2 does not create all device nodes within OpenVZ VPS
Summary: sys-apps/baselayout-2 does not create all device nodes within OpenVZ VPS
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: Gentoo VPS Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-24 21:34 UTC by geek
Modified: 2007-10-20 16:03 UTC (History)
0 users

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 geek 2007-08-24 21:34:00 UTC
I am trying out the new baselayout-2 within a VPS running on OpenVZ.  I have created my own stage4 template for this which includes baselayout-2.0.0_rc3-r1.

I am running into an issue where it does not seem to be creating all the device nodes that a normal VPS should have.  I looked into the problem more and udev seems to be functioning fine, it's just that the /sys/class tree is not being populated with all the necessary devices.

From what I can tell, this problem is specific to gentoo (and i think specific to baselayout/makedev) because I have tried using a Debian 3.1 template and it populates all the device nodes just fine.

Reproducible: Always

Steps to Reproduce:
Boot into a gentoo VPS template which includes baselayout-2 using OpenVZ, then check /dev to see if it has required devices.
Actual Results:  
Creates only these devices:
crw-r--r-- 1 root root 5, 1 Aug 24 19:18 console
lrwxrwxrwx 1 root root   13 Aug 24 19:18 fd -> /proc/self/fd
prw------- 1 root root    0 Aug 24 19:18 initctl
srw-rw-rw- 1 root root    0 Aug 24 19:18 log
crw-r--r-- 1 root root 1, 3 Aug 24 19:18 null
crw-rw-rw- 1 root tty  5, 2 Aug 24 21:30 ptmx
drwxr-xr-x 2 root root    0 Aug 24 19:18 pts
drwxrwxrwt 2 root root   40 Aug 24 19:18 shm
lrwxrwxrwx 1 root root    4 Aug 24 19:18 stderr -> fd/2
lrwxrwxrwx 1 root root    4 Aug 24 19:18 stdin -> fd/0
lrwxrwxrwx 1 root root    4 Aug 24 19:18 stdout -> fd/1
crw-r--r-- 1 root root 4, 1 Aug 24 19:18 tty1
-rw------- 1 root root 1898 Aug 24 21:30 tty12


Expected Results:  
Should create a lot more device nodes such as random, urandom, pty*, etc.

Portage 2.1.2.12 (default-linux/amd64/2007.0/no-multilib, gcc-4.1.2, glibc-2.5-r4, 2.6.18-028stab039 x86_64)
=================================================================
System uname: 2.6.18-028stab039 x86_64 Dual-Core AMD Opteron(tm) Processor 2210
Gentoo Base System release 2.0.0_rc3
Timestamp of tree: Fri, 24 Aug 2007 14:30:01 +0000
ccache version 2.4 [disabled]
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.61
sys-devel/automake:  1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 apache2 bash-completion berkdb bitmap-fonts cli cracklib crypt cups dri fortran iconv isdnlog midi mmx mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl sse sse2 ssl tcpd truetype-fonts type1-fonts unicode xorg zlib" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i810 mach64 mga neomagic nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-08-24 21:39:41 UTC
This doesn't use udev, or??? Don't see how's baselayout related to creating device nodes.
Comment 2 geek 2007-08-24 22:23:37 UTC
Yes this is using udev, but I do not think udev is the problem because udev relies on having the right items in /sys to create the device nodes.  In this case the /sys tree is missing a lot.

Now I thought that the kernel created and populated /sys, but I must be wrong because I am running the same kernel in the Debian virtual env and /sys is fine there, so it must be something in Gentoo that is causing this.  I am not sure if it is baselayout and/or makedev, but this is my prime suspect at the moment.

Here is my small /sys tree in the virtual env:


# ls -l /sys
total 0
drwxr-xr-x 4 root root 0 Aug 24 19:18 class

# ls -l /sys/class/
total 0
drwxr-xr-x 4 root root 0 Aug 24 19:18 net
drwxr-xr-x 3 root root 0 Aug 24 19:18 tty

# ls -l /sys/class/net/
total 0
drwxr-xr-x 2 root root 0 Aug 24 22:16 lo
drwxr-xr-x 3 root root 0 Aug 24 22:16 venet0

# ls -l /sys/class/tty/
total 0
drwxr-xr-x 2 root root 0 Aug 24 22:16 ptmx
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-08-24 23:30:36 UTC
(In reply to comment #2)
> Yes this is using udev, but I do not think udev is the problem because udev
> relies on having the right items in /sys to create the device nodes.  In this
> case the /sys tree is missing a lot.

Well, then that's a kernel issue, not baselayout :)
Comment 4 geek 2007-08-25 01:48:08 UTC
(In reply to comment #3)
> Well, then that's a kernel issue, not baselayout :)

It may not be baselayout, but I don't think it's a kernel issue either.  If I install the template from http://download.openvz.org/template/precreated/gentoo-20060317-amd64-stage3.tar.gz (which is the current "official" gentoo openvz template), then I get a much better /dev lifting as follows:

# ls -l /dev
total 8
lrwxrwxrwx  1 root root   15 Aug 25 01:18 MAKEDEV -> ../sbin/MAKEDEV
lrwxrwxrwx  1 root root   13 Aug 25 01:18 fd -> /proc/self/fd
crw-rw-rw-  1 root root 1, 7 Mar 17  2006 full
prw-------  1 root root    0 Aug 25 01:19 initctl
crw-rw-rw-  1 root root 1, 3 Mar 17  2006 null
crw-rw-rw-  1 root tty  5, 2 Mar 17  2006 ptmx
drwxr-xr-x  2 root root 4096 Mar 17  2006 pts
crw-rw-rw-  1 root tty  2, 0 Aug 25 01:19 ptyp0
crw-rw-rw-  1 root tty  2, 1 Mar 17  2006 ptyp1
crw-rw-rw-  1 root tty  2, 2 Mar 17  2006 ptyp2
crw-rw-rw-  1 root tty  2, 3 Mar 17  2006 ptyp3
crw-rw-rw-  1 root tty  2, 4 Mar 17  2006 ptyp4
crw-rw-rw-  1 root tty  2, 5 Mar 17  2006 ptyp5
crw-rw-rw-  1 root root 1, 8 Mar 17  2006 random
drwxr-xr-x  2 root root 4096 Mar 17  2006 shm
lrwxrwxrwx  1 root root    4 Aug 25 01:17 stderr -> fd/2
lrwxrwxrwx  1 root root    4 Aug 25 01:17 stdin -> fd/0
lrwxrwxrwx  1 root root    4 Aug 25 01:17 stdout -> fd/1
crw-rw-rw-  1 root tty  5, 0 Mar 17  2006 tty
crw--w----  1 root tty  3, 0 Aug 25 01:19 ttyp0
crw-rw-rw-  1 root tty  3, 1 Mar 17  2006 ttyp1
crw-rw-rw-  1 root tty  3, 2 Mar 17  2006 ttyp2
crw-rw-rw-  1 root tty  3, 3 Mar 17  2006 ttyp3
crw-rw-rw-  1 root tty  3, 4 Mar 17  2006 ttyp4
crw-rw-rw-  1 root tty  3, 5 Mar 17  2006 ttyp5
cr--r--r--  1 root root 1, 9 Mar 17  2006 urandom
crw-rw-rw-  1 root root 1, 5 Mar 17  2006 zero

This seems to include all of the things that are missing from the template that I am having the problem with.  As far as I understand, OpenVZ shares it's kernel amongst all of it's virtual environments.  So I just don't see how it can work in one gentoo environment and not in another.  Does this still seem like a kernel issue?
Comment 5 Benedikt Böhm (RETIRED) gentoo-dev 2007-08-25 07:14:02 UTC
you are not even allowed to create device nodes inside, you have to create them from outside
Comment 6 geek 2007-08-25 14:31:12 UTC
(In reply to comment #5)
> you are not even allowed to create device nodes inside, you have to create them
> from outside

Yeah, looks like my problem is fixed when I set RC_DEVICES="static".  Now it is bringing in all the devices I have set up in my /vz/private/101/dev area.

I guess I was hoping that because baselayout-2 supports VPS environments that it would take care of this automatically.  If not then this bug is just a configuration error and can be closed.