Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 233423 - udev keeps renaming my hard drives
Summary: udev keeps renaming my hard drives
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-30 21:09 UTC by Aniruddha
Modified: 2009-02-25 13:40 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 Aniruddha 2008-07-30 21:09:47 UTC
My hard disks are renamed by udev with every boot. Normally my root partition is on /dev/sdc2 but each time I reboot it changes (last 3 boots it was /dev/sdg2, /dev/sdb2 /dev/df2). This make it almost impossible to boot. I tried UUID but even with UUID the id's kept changing.

Reproducible: Always

Steps to Reproduce:
1.Insert or remove a hard drive
2.
3.

Actual Results:  
System won't boot

Expected Results:  
A system that boots ;)
Comment 1 Carsten Lohrke (RETIRED) gentoo-dev 2008-07-30 21:33:49 UTC
Which ebuild do you actually refer to? Why "keeps"? Is there a corresponding bug already? Also provide `emerge --info` output, please.
Comment 2 Aniruddha 2008-07-30 21:50:55 UTC
(In reply to comment #1)
> Which ebuild do you actually refer to? Why "keeps"? Is there a corresponding
> bug already? Also provide `emerge --info` output, please.
> 

I suspect udev or gentoo-sources. With 'keeps' I mean that every reboot udev assigns another letter to the partitions making it impossible to boot.

# emerge --info
Portage 2.2_rc3 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r8 i686)
=================================================================
System uname: Linux-2.6.24-gentoo-r8-i686-Intel-R-_Core-TM-2_Duo_CPU_E8400_@_3.00GHz-with-glibc2.0
Timestamp of tree: Wed, 30 Jul 2008 08:07:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r5
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/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/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=prescott -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg distlocks fixpackages parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="C"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
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/portage/local/layman/ftd4linux /usr/portage/local/layman/sunrise"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="7zip X Xaw3d a52 aac acl acpi addbookmarks additions administrator aim alias alsa amr apache2 applet arj asm atm autoreplace avahi bash-completion battery berkdb bluetooth bonusscripts branding bzip2 cairo caps cdda cddb cdinstall cdparanoia cdr chipcard cli connectionstatus contactnotes cpudetection cpufreq cracklib crypt css cups daap dbus deskbar dga dhcp dialup divx djvu doc dri dv dvd dvdr dvdread eds emboss encode equalizer esd evo exif fam fat ffmpeg firefox flac foomaticdb fortran freeimage gadu gd gdbm gdl gif gimp gimpprint gmedia gnome gphoto2 gpm gs gsf gstreamer gtk gtk2 gtkhtml guionly hal hfs history hou htmlhandbook httpd icon iconv ieee1394 imagemagick imap imlib ipod ipv6 irc isdnlog jabber java jikes jingle joystick jpeg jpeg2k kerberos ldap lha libnotify live lm_sensors logitech-mouse mad madwifi magic maildir maps matroska mdnsresponder-compat midi mikmod mmxex modkit mono mp3 mp4 mpeg mpeg2 mplayer msn mudflap musepack music musicbrainz mysql nautilus ncurses net netmeeting networkmanager nfs njb nls nocd nowin nowlistening nptl nptlonly nsplugin ntfs offensive ofx ogg openal openexr opengl openmp opensslcrypt pam pcmcia pcre pda pdf perl php plugins png postgres ppds pppd profile python qt3 qt3support qt4 query-browser quicktime quotes rar rdesktop readline realmedia reflection roe rogue rt2400pci rt2500pci rt2500usb rt61pci rt73usb rtc samba sametime scanner sdl server session slang slp smp sms sou sound sounds speex spell spl sqlite ssl startup-notification statistics stream subtitles svg sysfs tagwriting tcpd texteffect themes theora threadsafe thumbnail tiff tk transcode translator trayicon truetype unicode usb utempter v4l v4l2 vcd videos visualization vorbis wavpack webpresence wifi win32codecs winpopup wma wmf wmp workbench wxwindows x264 x86 xatrix xcomposite xface xfs xine xinerama xml xorg xprint xscreensaver xulrunner xv xvid yahoo zip 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 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 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" ELIBC="glibc" INPUT_DEVICES="evdev joystick keyboard mouse acecad aiptek digitaledge elographics fpit hyperpen jamstudio magellan mutouch palmax spaceorb summa synaptics tek4957 ur98 vmmouse void wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nv vesa apm ark chips cirrus cyrix dummy epson fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Carsten Lohrke (RETIRED) gentoo-dev 2008-07-30 23:32:59 UTC
By "which ebuild" I meant which udev ebuild exactly (udev-x.y-rZ).
Comment 4 Aniruddha 2008-07-31 06:41:56 UTC
(In reply to comment #3)
> By "which ebuild" I meant which udev ebuild exactly (udev-x.y-rZ).
> 

I have udev 119 installed:

[I] sys-fs/udev
     Available versions:  114 115-r1 119 ~122 ~122-r1 ~124 {selinux}
     Installed versions:  119(02:56:11 07/27/08)(-selinux)
     Homepage:            http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
     Description:         Linux dynamic and persistent device naming support (aka userspace devfs)
Comment 5 Matthias Schwarzott gentoo-dev 2008-08-12 10:41:29 UTC
Well. You could update to udev-124-r1 (as that is/will be stable soon).
BUT: The sd* device names are not assigned by udev, but by the kernel. udev will just create the /dev/sd? device nodes using the name the kernel supplies.

This could be because of different (random) load order of some device drivers.
Are your drivers for scsi/sata or pata devices compiled as modules? (Unlikely but possible.)

Or you have some usb block devices attached on some boots.
The best is to use some names from the /dev/disk/by-* tree.

> I tried UUID but even with UUID the id's kept changing.

What does that mean?
Did you use device nodes from /dev/disk/by-uuid/ or what?

Do you use an initramfs already?
In case nothing works you need to use a initramfs (maybe created by genkernel) and add the parameter UUID=... or LABEL=.... for it to find the correct root partition.

> Actual Results:  
> System won't boot
Where does it stop? The point where kernel normally prints "mounting root filesystem"?
Comment 6 Matthias Schwarzott gentoo-dev 2009-02-25 13:40:40 UTC
We need more info on that one, else we cannot do anything more.