Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 329887

Summary: sys-fs/udev-151-r4 does not create /dev/sda* nodes
Product: Gentoo Linux Reporter: ProTech <prot3ch>
Component: [OLD] Core systemAssignee: udev maintainers <udev-bugs>
Status: RESOLVED FIXED    
Severity: major CC: amne, azamat.hackimov, bass, gentoo.bugs, lubomir.krajcovic, nico.bonada, paddlaren
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info

Description ProTech 2010-07-26 08:52:39 UTC
I just updated my system after a long time (2-3 months), and after the update I got an unbootable system. During boot I got an error that my root filesystem has bad superblock and cannot be mounted. After supplying the root password I realized that the filesystem was mounted as readonly. So I checked under /dev and realized that no /dev/sda* devices was created for my disk. After switching back to the old udev version (149) everything is working fine again. I hope this bug is not because I didn't read something, as you cannot read all the messages after updating 300+ packages. I had to make the laptop in a working shape as soon as possible as it's my work laptop.

I use the "new" ATA drivers not the old /dev/hda ones. If needed I can attach the kernel config.

emerge --info:
Portage 2.1.8.3 (default/linux/x86/10.0/desktop/gnome, gcc-4.4.3, glibc-2.11.2-r0, 2.6.34-gentoo-r1 i686)
=================================================================
System uname: Linux-2.6.34-gentoo-r1-i686-Genuine_Intel-R-_CPU_T2300_@_1.66GHz-with-gentoo-1.12.13
Timestamp of tree: Sun, 25 Jul 2010 14:15:02 +0000
app-shells/bash:     4.0_p37
dev-java/java-config: 1.3.7-r1, 2.1.11
dev-lang/python:     2.6.5-r2, 3.1.2-r3
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.3.4, 4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA dlj-1.1 sun-bcla-java-vm sun-prerelease-jdk7 AdobeFlash-10.1"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium-m -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=pentium-m -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fech parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.fsn.hu/pub/linux/distributions/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="hu en de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/protech"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acpi alsa bash-completion berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus doc dri dts dv dvd dvdr eds emboss encode evo exif fam ffmpeg flac freetype gdbm gdu gif glitz gnome gnome-keyring gphoto2 gpm gstreamer gtk hal iconv ipv6 java javamail javascript jce jpeg kerberos lcms libnotify mad matroska mikmod mmx mng modules mono mp3 mp4 mpeg mudflap nautilus ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl png policykit ppds pppd python qt3support readline reflection rtc samba sdl session source spell spl sqlite sse sse2 ssl startup-notification svg symlink sysfs tcpd theora tiff truetype unicode usb vorbis win32codecs x264 x86 xcb xinerama xml xorg xprint xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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" CAMERAS="canon" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="hu en de" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel vesa" 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, FFLAGS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Richard Scott 2010-07-26 11:54:41 UTC
I've also had this happen too, downgrading was my fix also.
Comment 2 Azamat H. Hackimov 2010-07-30 09:22:44 UTC
Created attachment 240661 [details]
emerge --info

I hitted to this bug too. Temporary masked 151-r4. I guess this problem appear for users with baselayout-1, in my other computer with baselayout-2 all works fine.

Mini HOWTO to quick recover system:

After mount failure go into maintenance mode (type root password). Remount root FS in rw mode:

mount -n -o remount,rw /

If you need, initialize network system:

ifconfig eth0 192.168.0.100 netmask 255.255.255.0
# default route
route add default gw 192.168.0.1

And then emerge previos udev:

emerge -av =udev-149
etc-update

Now type exit or Ctrl-D. System restored.
Comment 3 F Garbsch 2010-08-02 21:37:01 UTC
> I hitted to this bug too. Temporary masked 151-r4. I guess this problem appear
> for users with baselayout-1, in my other computer with baselayout-2 all works
> fine.

It is not an issue that udev does not create the /dev/sd* device nodes anymore, but if you uptade to udev-151-r4 udev does not start anymore at all complaining about an baselayout2 init script starting a baselayout1 udevd. So the baselayout update might fix the issue with udevd but I think that udev-151-r4 should be masked as unstable again until an information message has been added that you might not be able to start your system anymore, if you install this version of udev.
Comment 4 F Garbsch 2010-08-02 21:43:46 UTC
> Mini HOWTO to quick recover system:

There is an other way to fix your system, if you do currently not have any access to a network connection as necessary services could not be started. Login to the emergency console and mount your filesystem in rw mode:

mount / -o remount,rw

Edit your /etc/init.d/checkroot init script and put the necessary mknod-command directly below the start() { line, for example:

mknod /dev/sda b 8 0
mknod /dev/sda1 b 8 1
mknod /dev/sda2 b 8 2
mknod /dev/sda3 b 8 3
...

Do not forget to remount your root filesystem read only again!
mount / -o remount,ro

And reboot your system. This allows you to run the basic init-scripts in a proper way and boot your system to fix the udev issue afterwards.
Comment 5 Lubomir Krajcovic 2010-08-07 08:51:22 UTC
This is critical blocker for _STABLE_ amd64 platform too. Since it's production machine, I can't afford longer downtimes for developing patch (it does not seem to be trivial issue in this case), but I'm willing to test.

In my case, udev-151-r4 starts, using --debug I can see it processes whole /sys/devices subtree, but corresponding device nodes (in /dev) are not created.

FYI: emerge --info

Portage 2.1.8.3 (default/linux/amd64/10.0, gcc-4.4.3, glibc-2.11.2-r0, 2.6.31-gentoo-r3-server1 x86_64)
=================================================================
System uname: Linux-2.6.31-gentoo-r3-server1-x86_64-AMD_Phenom-tm-_II_X3_705e_Processor-with-gentoo-1.12.13
Timestamp of tree: Sat, 07 Aug 2010 07:35:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r2, 3.1.2-r3
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.ynet.sk/pub"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en us en_US sk de cs"
MAKEOPTS="-j4 -s"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="7zip X acl amd64 apache2 berkdb bzip2 cdr cli consolekit cracklib crypt cxx dbm dbus dbx dri dvd ethereal fortran ftp gd gdbm gnome gpm gtk gtk2 iconv imap innodb ipv6 java ldap libwww maildir miltilib mmx modules mudflap multilib mysql ncurses nls nptl nptlonly odbc opengl openmp pam pcre perl php pppd python qt qt3 readline reflection samba sasl session sockets spl sse sse2 ssl sysfs tcpd tetex unicode urandom vda vhosts xorg xv 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 mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias auth_basic auth_digest authn_default authn_file authn_anon authn_dbd authn_dbm authz_default authz_groupfile authz_host authz_owner authz_user authz_dbm" APACHE2_MPMS="prefork" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en us en_US sk de cs" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vesa vga radeon radeonhd fglrx fbdev" 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, FFLAGS, INSTALL_MASK, LANG, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 6 Matthias Schwarzott gentoo-dev 2010-08-07 12:45:21 UTC
Well at the time of installing udev-151 I did use 2.6.32-tuxonice (and did not have this bug), and that kernel is older than your kernel (2.6.34-gentoo-r1 as in emerge --info), so it should not be a direct kernel-version problem.

In my qemu using kernel 2.6.29 (with CONFIG_SYSFS_DEPRECATED=y and CONFIG_SYSFS_DEPRECATED_V2=y), I also get no /dev/sda.
So it may be related to that deprecated-sysfs setting.

"emerge udev" does warn of that.
Maybe we should add some code to compare "udevadm trigger --dry-run -v" output before and after update and warn if there are greater differences.
Comment 7 Lubomir Krajcovic 2010-08-09 14:02:01 UTC
I've enabled (on working system with udev-239) in /etc/conf.d/rc:
RC_DEVICE_TARBALL="yes"

I've also recompiled kernel with
# CONFIG_SYSFS_DEPRECATED_V2 is not set
# CONFIG_IDE is not set

One of those (or lucky combination) helped.

This is IMO definitely not related to baselayout version.
Comment 8 Lubomir Krajcovic 2010-08-09 14:04:59 UTC
(In reply to comment #7)
> I've enabled (on working system with udev-239) in /etc/conf.d/rc:

Sorry, of course I meant udev-149
Comment 9 Alexander Bollaert 2010-08-11 08:25:26 UTC
Your kernel is probably compiled with the option CONFIG_SYSFS_DEPRECATED_V2 enabled. You can fix this permanently by reverting to udev-149 using the method outlined in comment #2 and then recompile the kernel. After a reboot with the new kernel you can upgrade udev to 151 again.

Comment 10 jonathan e. Snow 2010-08-12 21:47:12 UTC
Baselayout-2 is masked, whereas udev-151 cryptsetup-1.1.2 and lvm2-2.02-67-r2 are all the stable versions. They have to work with baselayout-1 or they shouldn't have been stabilized.
Comment 11 nico 2010-08-14 19:03:00 UTC
(In reply to comment #10)
> Baselayout-2 is masked, whereas udev-151 cryptsetup-1.1.2 and lvm2-2.02-67-r2
> are all the stable versions. They have to work with baselayout-1 or they
> shouldn't have been stabilized.
> 

I'm on baselayout-2 and udev-151-r4 broke /dev/(cdrom|cdrw|dvd|dvdrw)
Comment 12 ProTech 2010-08-15 08:55:55 UTC
After disabling CONFIG_SYSFS_DEPRECATED_V2 in the kernel configuration (unselect: General -> "enable deprecated sysfs features to support old userspace tools"), I was able to boot the system with the new udev version. So it solved the problem for me.
Comment 13 Matthias Schwarzott gentoo-dev 2010-08-19 12:01:25 UTC
(In reply to comment #12)
> After disabling CONFIG_SYSFS_DEPRECATED_V2 in the kernel configuration
> (unselect: General -> "enable deprecated sysfs features to support old
> userspace tools"), I was able to boot the system with the new udev version. So
> it solved the problem for me.
> 
Marking fixed, as the original issue is solved.

(In reply to comment #11)
> I'm on baselayout-2 and udev-151-r4 broke /dev/(cdrom|cdrw|dvd|dvdrw)
Please open a new bug for a new issue. Please also append /etc/udev/rules.d/70-persistent-cd.rules