lalebarde Guru
Joined: 03 Sep 2006 Posts: 464 Location: France, Haute-Garonne
|
Posted: Wed Jul 04, 2012 5:24 pm Post subject: [SOLVED] dracut warning : can't mount root filesystem |
|
|
Hi all,
I am installing a new PC and am pleased to fight for the first time with kernel 3.x and /usr requirements at boot time via an initramfs .
First battle from dracut : Code: | FATAL: Could not load /lib/modules/3.3.8/modules.dep: No such file or directory | The point is that I have a single DVD player, that my other PC is out of order and back to guarranty. So I used the 2010 live DVD. The point is that under chroot, uname returns the kernel version of the DVD instead of the one from the chroot : 3.3.8 .
I could work around that by setting a simlink to the modules : Code: | ln -s /lib/modules/3.3.8-gentoo /lib/modules/2.6.30-gentoo-r5 | I had also to add : Code: | ln -s /lib/modules/3.3.8-gentoo /lib/modules/3.3.8 | as some process seems to deduce a name instead of peeking the one from the grub configuration.
Then dracut could not install the ext4 module, I had : Code: | F: Failed to install ext4 | I thought that since it is in the kernel, there is no need for it ! Why not, I rebuilt the kernel with the fs drivers as modules : ext2, ext3, ext4. Of course, I rebuilt also external modules with module-rebuild populate & rebuild, which are solely the nvidia drivers, did a depmod -a for the case, and Code: | dracut --force '' 3.3.8 |
Code: | D: Listing sizes of included files:
D: 4 /var/tmp/initramfs.5j8HxW/dev
D: 4 /var/tmp/initramfs.5j8HxW/etc/cmdline.d
D: 4 /var/tmp/initramfs.5j8HxW/lib64/dracut/hooks/cleanup
D: 4 /var/tmp/initramfs.5j8HxW/lib64/dracut/hooks/emergency
D: 4 /var/tmp/initramfs.5j8HxW/lib64/dracut/hooks/initqueue/finished
D: 4 /var/tmp/initramfs.5j8HxW/lib64/dracut/hooks/initqueue/online
D: 4 /var/tmp/initramfs.5j8HxW/lib64/dracut/hooks/initqueue/settled
D: 4 /var/tmp/initramfs.5j8HxW/lib64/dracut/hooks/initqueue/timeout
D: 4 /var/tmp/initramfs.5j8HxW/lib64/dracut/hooks/netroot
D: 4 /var/tmp/initramfs.5j8HxW/lib64/dracut/hooks/pre-mount
D: 4 /var/tmp/initramfs.5j8HxW/lib64/dracut/hooks/pre-trigger
D: 4 /var/tmp/initramfs.5j8HxW/lib64/dracut/hooks/shutdown
D: 4 /var/tmp/initramfs.5j8HxW/lib64/dracut/hooks/shutdown-emergency
D: 4 /var/tmp/initramfs.5j8HxW/lib64/systemd
D: 4 /var/tmp/initramfs.5j8HxW/proc
D: 4 /var/tmp/initramfs.5j8HxW/root
D: 4 /var/tmp/initramfs.5j8HxW/run/initramfs
D: 4 /var/tmp/initramfs.5j8HxW/run/lock
D: 4 /var/tmp/initramfs.5j8HxW/run/udev/rules.d
D: 4 /var/tmp/initramfs.5j8HxW/sys
D: 4 /var/tmp/initramfs.5j8HxW/sysroot
D: 4 /var/tmp/initramfs.5j8HxW/tmp
D: 4 /var/tmp/initramfs.5j8HxW/usr/lib64
D: 4 /var/tmp/initramfs.5j8HxW/usr/sbin
D: 4 /var/tmp/initramfs.5j8HxW/var/log
D: 8 /var/tmp/initramfs.5j8HxW/etc/terminfo/a
D: 8 /var/tmp/initramfs.5j8HxW/etc/terminfo/d
D: 8 /var/tmp/initramfs.5j8HxW/etc/terminfo/l
D: 8 /var/tmp/initramfs.5j8HxW/lib64/dracut/hooks/pre-pivot
D: 8 /var/tmp/initramfs.5j8HxW/run/udev
D: 8 /var/tmp/initramfs.5j8HxW/var
D: 12 /var/tmp/initramfs.5j8HxW/etc/ld.so.conf.d
D: 12 /var/tmp/initramfs.5j8HxW/etc/terminfo/r
D: 12 /var/tmp/initramfs.5j8HxW/etc/terminfo/s
D: 12 /var/tmp/initramfs.5j8HxW/lib64/dracut/hooks/mount
D: 12 /var/tmp/initramfs.5j8HxW/lib64/dracut/hooks/pre-udev
D: 16 /var/tmp/initramfs.5j8HxW/etc/terminfo/x
D: 16 /var/tmp/initramfs.5j8HxW/etc/udev/rules.d
D: 16 /var/tmp/initramfs.5j8HxW/usr/share/consolefonts
D: 16 /var/tmp/initramfs.5j8HxW/usr/share/keymaps/i386/include
D: 20 /var/tmp/initramfs.5j8HxW/lib64/dracut/hooks/initqueue
D: 20 /var/tmp/initramfs.5j8HxW/run
D: 24 /var/tmp/initramfs.5j8HxW/etc/terminfo/v
D: 24 /var/tmp/initramfs.5j8HxW/etc/udev
D: 24 /var/tmp/initramfs.5j8HxW/lib64/dracut/hooks/cmdline
D: 24 /var/tmp/initramfs.5j8HxW/usr/share/keymaps/i386/azerty
D: 28 /var/tmp/initramfs.5j8HxW/lib64/modules/3.3.8-gentoo/kernel/drivers/hid
D: 28 /var/tmp/initramfs.5j8HxW/lib64/udev/rules.d
D: 32 /var/tmp/initramfs.5j8HxW/etc/modprobe.d
D: 32 /var/tmp/initramfs.5j8HxW/lib64/modules/3.3.8-gentoo/kernel/drivers
D: 44 /var/tmp/initramfs.5j8HxW/usr/share/keymaps/i386
D: 48 /var/tmp/initramfs.5j8HxW/usr/share/keymaps
D: 68 /var/tmp/initramfs.5j8HxW/usr/share
D: 92 /var/tmp/initramfs.5j8HxW/etc/terminfo
D: 92 /var/tmp/initramfs.5j8HxW/lib64/modules/3.3.8-gentoo/kernel/fs/ext2
D: 108 /var/tmp/initramfs.5j8HxW/lib64/dracut/hooks
D: 120 /var/tmp/initramfs.5j8HxW/lib64/dracut
D: 140 /var/tmp/initramfs.5j8HxW/lib64/modules/3.3.8-gentoo/kernel/fs/jbd2
D: 200 /var/tmp/initramfs.5j8HxW/etc
D: 240 /var/tmp/initramfs.5j8HxW/lib64/udev
D: 352 /var/tmp/initramfs.5j8HxW/usr/bin
D: 432 /var/tmp/initramfs.5j8HxW/usr
D: 652 /var/tmp/initramfs.5j8HxW/sbin
D: 684 /var/tmp/initramfs.5j8HxW/lib64/modules/3.3.8-gentoo/kernel/fs/ext4
D: 936 /var/tmp/initramfs.5j8HxW/lib64/modules/3.3.8-gentoo/kernel/fs
D: 972 /var/tmp/initramfs.5j8HxW/lib64/modules/3.3.8-gentoo/kernel
D: 1072 /var/tmp/initramfs.5j8HxW/lib64/modules/3.3.8-gentoo
D: 1076 /var/tmp/initramfs.5j8HxW/lib64/modules
D: 1204 /var/tmp/initramfs.5j8HxW/bin
D: 4464 /var/tmp/initramfs.5j8HxW/lib64
D: 7024 total
D: 7024 /var/tmp/initramfs.5j8HxW
I: Wrote /boot/initramfs-3.3.8.img:
I: -rw-r--r-- 1 root root 2652085 4 juil. 18:27 /boot/initramfs-3.3.8.img |
ext4 is here .
But..... My system still does not boot :
Code: | Dracut Warning : Can't mount root filesystem |
Here are some more information :
Code: | # uname -a
Linux livecd 2.6.30-gentoo-r5 #1 SMP Fri Oct 9 19:28:18 UTC 2009 x86_64 Intel(R) Core(TM) i7 CPU 870 @ 2.93GHz GenuineIntel GNU/Linux
# ls -l /usr/src/linux
lrwxrwxrwx 1 root root 18 3 juil. 12:02 /usr/src/linux -> linux-3.3.8-gentoo |
This is stupid from uname, like I said earlier because this is information from the "host" live DVD.
Code: | # cat /etc/dracut.conf | nocomment
logfile=/var/log/dracut.log
fileloglvl=6
hostonly="yes" |
Code: | # cat /etc/dracut.conf.d/udev.conf | nocomment
add_dracutmodules+="usrmount"
filesystems+="ext4"
hostonly="yes" |
Code: | # cat /boot/grub/grub.conf | nocomment
default 0
timeout 5
splashimage=(hd0,4)/grub/splash.xpm.gz
title Gentoo Linux 3.3.8
root (hd0,4)
kernel /boot/kernel-gentoo-sources-3.3.8 root=/dev/ram0 real_root=/dev/sda6
initrd /boot/initramfs-3.3.8.img |
Code: | # ls -l /boot/
total 7128
lrwxrwxrwx 1 root root 1 3 juil. 23:17 boot -> .
drwxr-xr-x 2 root root 1024 4 juil. 18:28 grub
-rw-r--r-- 1 root root 2652085 4 juil. 18:27 initramfs-3.3.8.img
-rw-r--r-- 1 root root 4600960 4 juil. 18:26 kernel-gentoo-sources-3.3.8
drwx------ 2 root root 12288 3 juil. 10:57 lost+found |
Code: | # cat /etc/fstab | nocomment
/dev/sda5 /boot ext2 noauto,noatime 1 2
/dev/sda6 / ext4 noatime 0 1
/dev/sda9 none swap sw 0 0
/dev/sr0 /mnt/cdrom auto noauto,ro 0 0
/dev/sda7 /usr ext4 noatime 0 2
/dev/sda8 /var ext4 noatime,nosuid,noexe 0 2
/dev/sda2 /home ext4 noatime,nosuid,noexe 0 2 |
I also tried the genkernel solution to build the initramfs, but it fails : Code: | # genkernel --install --no-ramdisk-modules initramfs
* Gentoo Linux Genkernel; Version 3.4.24_p1
* Running with options: --install --no-ramdisk-modules initramfs
* Linux Kernel 3.3.8-gentoo for x86_64...
* e2fsprogs: >> Applying patches...
* - e2fsprogs-1.41.12-getpagesize.patch
* e2fsprogs: >> Configuring...
* e2fsprogs: >> Compiling...
* blkid: >> Copying to cache...
* busybox: >> Applying patches...
* - 1.18.1-openvt.diff
* - busybox-1.19.3-mdstart.patch
* - busybox-1.7.4-signal-hack.patch
* busybox: >> Configuring...
* busybox: >> Compiling...
* ERROR: Failed to compile the "all" target...
* -- Grepping log... --
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/gmsgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for ranlib... ranlib
checking for strerror in -lcposix... no
--
checking size of int... 4
checking size of long... 8
checking size of long long... 8
checking whether byte ordering is bigendian... no
asm_types.c: In function 'main':
asm_types.c:16:10: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
asm_types.c:25:10: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
asm_types.c:34:10: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
asm_types.c:43:10: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
asm_types.c:53:10: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
asm_types.c:62:10: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
asm_types.c:72:10: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
asm_types.c:81:10: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
--
CC unused.c
CC e2freefrag.o
CC filefrag.c
LD debugfs
../lib/libss.a(get_readline.o): In function `ss_get_readline':
/var/tmp/genkernel/22332.20292.3059.17057/e2fsprogs-1.42/lib/ss/get_readline.c:70: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
../lib/libe2p.a(ls.o): In function `print_group':
/var/tmp/genkernel/22332.20292.3059.17057/e2fsprogs-1.42/lib/e2p/ls.c:44: warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
../lib/libe2p.a(ls.o): In function `print_user':
/var/tmp/genkernel/22332.20292.3059.17057/e2fsprogs-1.42/lib/e2p/ls.c:32: warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
--
CC badblocks.c
LD badblocks
CC tune2fs.c
LD tune2fs
../lib/libe2p.a(ls.o): In function `print_group':
/var/tmp/genkernel/22332.20292.3059.17057/e2fsprogs-1.42/lib/e2p/ls.c:44: warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
tune2fs.o: In function `parse_tune2fs_options':
/var/tmp/genkernel/22332.20292.3059.17057/e2fsprogs-1.42/misc/tune2fs.c:916: warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/var/tmp/genkernel/22332.20292.3059.17057/e2fsprogs-1.42/misc/tune2fs.c:1046: warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
../lib/libe2p.a(ls.o): In function `print_user':
/var/tmp/genkernel/22332.20292.3059.17057/e2fsprogs-1.42/lib/e2p/ls.c:32: warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
CC dumpe2fs.c
LD dumpe2fs
../lib/libe2p.a(ls.o): In function `print_group':
/var/tmp/genkernel/22332.20292.3059.17057/e2fsprogs-1.42/lib/e2p/ls.c:44: warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
../lib/libe2p.a(ls.o): In function `print_user':
/var/tmp/genkernel/22332.20292.3059.17057/e2fsprogs-1.42/lib/e2p/ls.c:32: warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
--
Additional CFLAGS (EXTRA_CFLAGS) []
*
* Debugging Options
*
Build BusyBox with extra Debugging symbols (DEBUG) [N/y/?] n
Abort compilation on any warning (WERROR) [N/y/?] n
--
Tab completion (FEATURE_TAB_COMPLETION) [Y/n/?] y
Username completion (FEATURE_USERNAME_COMPLETION) [N/y/?] n
Fancy shell prompts (FEATURE_EDITING_FANCY_PROMPT) [N/y/?] n
Query cursor position from terminal (FEATURE_EDITING_ASK_TERMINAL) [N/y/?] n
Non-POSIX, but safer, copying to special nodes (FEATURE_NON_POSIX_CP) [Y/n/?] y
Give more precise messages when copy fails (cp, mv etc) (FEATURE_VERBOSE_CP_MESSAGE) [N/y/?] n
Copy buffer size, in kilobytes (FEATURE_COPYBUF_KB) [4] 4
Skip rootfs in mount table (FEATURE_SKIP_ROOTFS) [Y/n/?] y
Use clock_gettime(CLOCK_MONOTONIC) syscall (MONOTONIC_SYSCALL) [Y/n/?] y
Use ioctl names rather than hex values in error messages (IOCTL_HEX2STR_ERROR) [Y/n/?] y
--
bbconfig (BBCONFIG) [N/y/?] n
beep (BEEP) [Y/n/?] y
default frequency (FEATURE_BEEP_FREQ) [4000] 4000
default length (FEATURE_BEEP_LENGTH_MS) [30] 30
chat (CHAT) [Y/n/?] y
Enable NOFAIL expect strings (FEATURE_CHAT_NOFAIL) [Y/n/?] y
--
CC util-linux/volume_id/xfs.o
AR util-linux/volume_id/lib.a
* Gentoo Linux Genkernel; Version 3.4.24_p1
* Running with options: --install --no-ramdisk-modules initramfs
* ERROR: Failed to compile the "all" target...
* -- End log... --
* Please consult /var/log/genkernel.log for more information and any
* errors that were reported above.
* Report any genkernel bugs to bugs.gentoo.org and
* assign your bug to genkernel@gentoo.org. Please include
* as much information as you can in your bug report; attaching
* /var/log/genkernel.log so that your issue can be dealt with effectively.
*
* Please do *not* report compilation failures as genkernel bugs!
* |
EDIT : Code: | util-linux/mkfs_ext2.c:51:27: erreur fatale: linux/ext2_fs.h : Aucun fichier ou dossier de ce type
compilation termin��e. | : fatal error: linux/ext2_fs.h : no file or folder of this type. Compilation terminated.
So I am going to retry with the fs drivers in the kernel, not as modules.
But, ext2_fs.h is here : Code: | # equery belongs ext2_fs.h
--- Invalid atom in /etc/portage/package.accept_keywords: media-gfx/imagemagick-6.7.7.5
* Searching for ext2_fs.h ...
sys-fs/e2fsprogs-1.42 (/usr/include/ext2fs/ext2_fs.h)
sys-kernel/gentoo-sources-3.3.8 (/usr/src/linux-3.3.8-gentoo/include/linux/ext2_fs.h) |
EDIT : same error with fs support compiled in the kernel : missing ext2_fs.h
Any idea please ?
EDIT : sorry, it is a known problem, at least with genkernel. cf
So the solution is to edit /etc/genkernel.conf and to change :
Code: | BUSYBOX_VER="1.20.1" |
I have also added rootfstype=ext4 into the option of the kernel command in grub.conf :
Code: | default 0
timeout 5
splashimage=(hd0,4)/grub/splash.xpm.gz
title Gentoo Linux 3.3.8
root (hd0,4)
kernel /boot/kernel-gentoo-sources-3.3.8 root=/dev/ram0 real_root=/dev/sda6 rootfstype=ext4
initrd /boot/initramfs-genkernel-x86_64-3.3.8-gentoo |
Let's see.....
EDIT : it's alright |
|