As summary. I have a root volume (containing /boot, not separate) which is mirrored over 2 physical disks with LVM. An initramfs created with 017-r1 refuses to boot it, complaining that mimage_0, mimage_1 and mlog devices couldn't be found. I forget the exact wording, I can't at the moment have the problem on screen and post the bug. I've tried activating only specific VGs and LVs using rd.lvm.vg=data and/or rd.lvm.lv=root kernel command line options. These work as expected, but the errors remain. --info and exact command line etc to follow shortly. I do believe this problem wasn't in 017, and doesn't exist in 014-r2 which I'm currently using.
BOOT_IMAGE=/boot/vmlinuz-3.2.11-gentoo root=/dev/mapper/data-root ro splash quiet rd.lvm.vg=data Portage 2.2.0_alpha90 (default/linux/x86/10.0/desktop/kde, gcc-4.5.3, glibc-2.14.1-r2, 3.2.11-gentoo i686) ================================================================= System uname: Linux-3.2.11-gentoo-i686-Intel-R-_Pentium-R-_4_CPU_3.20GHz-with-gentoo-2.1 Timestamp of tree: Sat, 17 Mar 2012 14:15:01 +0000 app-shells/bash: 4.2_p24 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.7.2-r3, 3.2.2 dev-util/cmake: 2.8.7-r5 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.1 sys-apps/openrc: 0.9.9.3 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.9.6-r3, 1.11.3 sys-devel/binutils: 2.22-r1 sys-devel/gcc: 4.5.3-r2 sys-devel/gcc-config: 1.5.1-r1 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r3 sys-kernel/linux-headers: 3.2-r1 (virtual/os-headers) sys-libs/glibc: 2.14.1-r2 Repositories: gentoo RandomLAN spring Installed sets: ACCEPT_KEYWORDS="x86 ~x86" ACCEPT_LICENSE="* -@EULA PUEL AdobeFlash-10.1 Oracle-BCLA-JavaSE" CBUILD="i686-pc-linux-gnu" CFLAGS="-Os -march=native -pipe -fno-stack-protector" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-Os -march=native -pipe -fno-stack-protector" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox xattr" FFLAGS="" GENTOO_MIRRORS="http://defiant.random.lan/portage http://firebrand.random.lan/portage http://riogrande.random.lan/portage http://sys.randomdan.homeip.net/" LANG="en_GB.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en en_GB" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="-e ssh" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --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="/var/lib/layman/RandomLAN /var/lib/layman/Spring" SYNC="rsync://portage@portage/gentoo-portage" USE="X a52 aac accessibility acl acpi additions aim alsa apm apng audiofile automount autoshutdown autoupdate bash-completion berkdb branding browserplugin bzip2 cairo caps cdb cdda cddb cdparanoia cdr cli consolekit cracklib cscope ctype curl curlwrappers custom-cflags custom-optimization cxx dbus declarative device-mapper dhcpcd dio disable-sound disable-torrent disk-partition divx dlloader docbook dpms dri dts dv dvb dvd dvdr dvdread dynagraph ebook effects emerald encode exif extensions extrafilters extras fam fame fastcgi ffmpeg firefox flac fontconfig frei0r frontendonly ftp fts3 fuse g3dvl gallium gdbm gif gimp git gles1 gles2 glib glitz glut glx gmail gmailtimestamps gmedia gnutls gtk gtk2 h323 hardenedphp hpn httpd iconv icq icu id3 id3tag imagemagick imap imlib imlib2 innodb inotify ipv6 ithreads javascript jpeg jpeg2k kde kdeenablefinal kipi kqemu lame lcms ldap libkms libnotify lightning lm_sensors logrotate lvm lvmboot lvmroot lzma lzo mad maildir melt messenger minimal minizip mmx mmxext modules mozcalendar mp3 mp4 mp4live mpeg mpeg2 mpeg4 mpm-prefork msn mudflap mysql mysqli mythtv ncurses network network-cron networkmanager nls no-old-linux nocardbus nocd nohardenedkernel nptl nptlonly nsplugin ntp nuv nvidia odbc offensive ogg openexr opengl openvg optimize oscar osmesa pam pango pch pcre pdf phonon plasma png policykit portage postgres ppds pppd python qt3support qt4 rdesktop rdp readline realmedia redland remote rtmp sblive screen secure-delete session sharedext shorten silc smp sndfile soap sockets spell sql sqlite sse sse-filters sse2 ssl startup-notification stats stencil-buffer stream subversion svg symlink sysfs syslog system-sqlite system-v8 tcpd themes theora threads thumbnail tidy tiff timidity transcode truetype udev underscores unicode unity-lobby unlock-notify upnp usb uuid v4l v4l2 vhosts vim vim-pager vim-syntax vim-with-x vlc vorbis win32codecs wmf wmp x264 x86 xattr xcb xcomposite xinerama xml xmms xorg xrandr xscreensaver xsl xslt xulrunner xv xvid xvmc yahoo yvl2 zip zlib" ALSA_CARDS="emu10k1x" 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="filter authz_host cgid mime_magic mime autoindex vhost_alias dav dir deflate log_config env rewrite" CALLIGRA_FEATURES="braindump flow karbon stage tables words" CAMERAS="sony_dscf1 sony_dscf55" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="syslog lvm plymouth" DVB_CARDS="none" 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 ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="none" LINGUAS="en en_GB" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" 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, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
First question: Do you have CONFIG_DEVTMPFS enabled in kernel? If yes, please try ebuild without patch dracut-017-crypt-simplify-rd.luks.uuid-testing.patch. To do so: 1) Create sys-kernel/dracut dir in your local overlay 2) Copy dracut-017-r1.ebuild to that directory and rename it to dracut-017-r9999.ebuild 3) Copy all files/dracut-017-* to files/ subdirectory. 4) Remove file files/dracut-017-crypt-simplify-rd.luks.uuid-testing.patch 5) Remove following line from dracut-017-r1.ebuild: epatch "${FILESDIR}/${P}-crypt-simplify-rd.luks.uuid-testing.patch" 6) Emerge dracut-017-r9999.ebuild 7) Rebuild image and try it.
~ $ zgrep -i devtmpfs /proc/config.gz CONFIG_DEVTMPFS=y Yes, I do. Removing the patch as suggest didn't have any noticeable effect, same errors messages I'm afraid.
(In reply to comment #1) > BOOT_IMAGE=/boot/vmlinuz-3.2.11-gentoo root=/dev/mapper/data-root ro splash > quiet rd.lvm.vg=data Could you try root=/dev/data/root instead?
I did notice that I actually had root= set twice in grub.cfg (once from /etc/defaults/grub and once [presumably] added by grub2-mkconfig) with each variation (/dev/data/root and /dev/mapper/data-root) I've now corrected that (by removing my entry in /etc/defaults/grub) and tried both versions manually. Same problem with the initramfs built by the version of dracut described in comment #2. Same problem with both variants of root=.. Cheers. D
Could you try latest development version of dracut? There's live ebuild in my overlay: layman -a aidecoe echo 'sys-kernel/dracut **' >> /etc/portage/package.keywords emerge -va =sys-kernel/dracut-9999 There are some fixes regarding lvm.
Sorry Amadeusz, no change. Same messages about /dev/data/root_mimage_0, mimage_1 and mlog not being found.
So we will need some logs. Please remove "splash" and "quiet" keywords and add "rd.debug" to kernel command line. When you will be dropped to shell, there should be /run/initramfs/init.log file - please attach this file. Please also attach log from building image with -L=6 appended to dracut invocation. And also final kernel command line arguments (grub2 does concatenate args from various places, doesn't it?).
Created attachment 306773 [details] rd.debug
Created attachment 306775 [details] dracut.log /usr/bin/dracut -H -f --lzma /boot/initramfs-3.2.12-gentoo.img.new 3.2.12-gentoo -L=6
Logs attached as requested. I have just noticed having had a quick dig around based on the logs, the following file: etc/cmdline.d/90lvm.conf Which contains: rd.lvm.lv=data/root rd.lvm.lv=data/root_mlog rd.lvm.lv=data/root_mimage_0 rd.lvm.lv=data/root_mimage_1 I'm not sure where that's come from. There's nothing in my dracut.conf like that, it's pretty standard.... I'll attach it, just to be sure.
Created attachment 306777 [details] /etc/dracut.conf
It seems the image and mlog devices are picked up in the /usr/bin/dracut line ~615 and passed via for_each_host_dev_fs into modules.d/90lvm/module-setup.sh's check function, which writes them into the previously mentioned file. Given these aren't real user facing devices, something along the way should probably filter them out (I'm guessing) I'll see if I can put together an image with that file manually modified and see what happens.
Thanks! Maybe you could just try generic initramfs? (Build without -H)
Just built an image without -H on the dracut command line, works just fine :) Certainly a viable workaround.
Nice. So you've almost debugged it yourself and narrowed down the problem. :-) I've poked dracut guru to look at this. Could you also attach your /etc/fstab (on the running system, not initramfs) and /proc/mounts?
Created attachment 306783 [details] fstab
Created attachment 306785 [details] /proc/mounts
Yeah... and that's why we love open source :-) ... and some free time :) Files attached.
And have you tried to to specify rd.lvm.lv on kernel command line? Please try: rd.lvm.vg=data rd.lvm.lv=data/root
(In reply to comment #20) > And have you tried to to specify rd.lvm.lv on kernel command line? Please > try: > > rd.lvm.vg=data rd.lvm.lv=data/root For hostonly image (build with -H)
I did try it a while ago with 0.17-r1, but I haven't tried it with the git version... I'll give it a go.
I see you've tried rd.lvm.lv=root, but not rd.lvm.lv=data/root variant.
I had tried before posting the bug... although my post didn't say so... my bad. And no, that still has the same problem as before.
Could you attach log from building image with --debug appended to dracut invocation?
Created attachment 307017 [details] debug.log /usr/bin/dracut -H -f --lzma /boot/initramfs-3.2.12-gentoo.img.new 3.2.12-gentoo --debug 2> debug.log
(In reply to comment #26) > Created attachment 307017 [details] > debug.log > > /usr/bin/dracut -H -f --lzma /boot/initramfs-3.2.12-gentoo.img.new > 3.2.12-gentoo --debug 2> debug.log Thanks. The log shows, that: - 254:3 is /dev/dm-3, which is your root device. DM_VG_NAME=data DM_LV_NAME=root so far so good. The odd thing is, that /sys/block/dm-3/slaves/ contains dm-0, dm-1 and dm-2 which are: dm-0: DM_VG_NAME=data DM_LV_NAME=root_mlog dm-1: DM_VG_NAME=data DM_LV_NAME=root_mimage_0 dm-2: DM_VG_NAME=data DM_LV_NAME=root_mimage_1 Can you tell what these are? What is the output of: # dmsetup ls --tree # vgdisplay # pvdisplay # lvdisplay
(In reply to comment #27) > Can you tell what these are? What is the output of: Ah, according to the subject, these are part of an LVM mirror.. oh my..
Allright, I pushed some fixes to upstream git. Care to test, if etc/cmdline.d/90lvm.conf now only contains: rd.lvm.lv=data/root You can check with: # lsinitrd <image> etc/cmdline.d/90lvm.conf
Installed the latest git version using the aidecoe overlay... akira ~ # /usr/bin/dracut -H -f --gzip /boot/initramfs-3.2.12-gentoo.img.new 3.2.12-gentoo ..... akira ~ # lsinitrd /boot/initramfs-3.2.12-gentoo.img.new etc/cmdline.d/90lvm.conf rd.lvm.lv=data/root rd.lvm.lv=data/root_mimage_0 rd.lvm.lv=data/root_mimage_1 That's better, it's removed root_mlog, but the root_mimages are still there.
I'm not sure this helps that much... but as request. None of the other commands show the underlying components. akira ~ # dmsetup ls --tree data-virtualbox--win7 (254:10) `- (8:17) data-portage (254:5) `- (8:17) data-postgresql91 (254:11) `- (8:17) data-virtualbox--ubuntu (254:8) `- (8:17) data-home (254:4) `- (8:17) data-virtualbox--dev (254:7) `- (8:1) data-swap (254:6) `- (8:17) data-root (254:3) |-data-root_mimage_1 (254:2) | `- (8:1) |-data-root_mimage_0 (254:1) | `- (8:17) `-data-root_mlog (254:0) `- (8:1) data-virtualbox--vbox2k3 (254:9) `- (8:17) akira ~ # lvs LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert home data -wi-ao-- 6.00g portage data -wi-ao-- 5.00g postgresql91 data -wi-ao-- 3.00g root data mwi-aom- 10.65g root_mlog 100.00 swap data -wi-ao-- 2.00g virtualbox-dev data -wi-a--- 8.50g virtualbox-ubuntu data -wi-a--- 8.50g virtualbox-vbox2k3 data -wi-a--- 8.50g virtualbox-win7 data -wi-a--- 15.00g akira ~ # vgs VG #PV #LV #SN Attr VSize VFree data 2 9 0 wz--n- 88.40g 10.59g akira ~ # pvs PV VG Fmt Attr PSize PFree /dev/sda1 data lvm2 a-- 19.16g 4.00m /dev/sdb1 data lvm2 a-- 69.24g 10.59g
Ok, pushed some more changes, please retest. Thanks!
That's spot on :) akira boot # cat /proc/cmdline BOOT_IMAGE=/boot/vmlinuz-3.2.12-gentoo root=/dev/mapper/data-root ro splash quiet Boots, no messing :) Thanks!
Dan, thank you for the report and great cooperation. Harald, thank you for fixes! These fixes actually are composed of few patches, so I'm not applying these to 017, because 018 will come soon.
018 committed to the tree. Thank you all again!