Moriah Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/5229545064dad0ea85f50b.gif)
Joined: 27 Mar 2004 Posts: 2383 Location: Kentucky
|
Posted: Sat Nov 19, 2005 6:12 am Post subject: 2.6.14-gentoo-r2 with initrd want /linuxrc *MODULE* ?!?! |
|
|
I am having a goofy problem with booting a 2.6.14-gentoo-r2 kernel using an initrd to let me have my root filesystem mounted under lvm2. The kernel works fine when it is booted without an initrd on /dev/hda3, but when I try to boot it with my home-brew initrd and root under lvm, it gets very confused.
Here is the excerpt from /boot/grub/grub.conf Code: | title=Gentoo Linux 2.6.14-r2_lvm-rootfs
root (hd0,0)
kernel /kernel-2.6.14-gentoo-r2_lvm ramdisk=8192 root=/dev/boot_drive/rootfs init=/linuxrc udev
initrd /initrd_lvm-2.6.14-gentoo-r2 |
And here is what my initrd ramdisk image looks like: Code: | samuel initrd # ls -laR
.:
total 23
drwx------ 10 root root 1024 Nov 18 03:19 .
drwx------ 11 root root 544 Nov 18 06:32 ..
drwxr-xr-x 2 root root 1024 Oct 26 04:32 bin
drwxr-xr-x 2 root root 1024 Oct 26 00:37 dev
drwxr-xr-x 2 root root 1024 Oct 26 00:37 etc
drwxr-xr-x 3 root root 1024 Nov 18 03:52 lib
-rwxr-xr-x 1 root root 697 Nov 18 03:19 linuxrc
-rwxr-xr-x 1 root root 690 Nov 18 2005 linuxrc~
drwxr-xr-x 2 root root 1024 Oct 26 00:37 loopfs
drwx------ 2 root root 12288 Oct 26 01:03 lost+found
drwxr-xr-x 2 root root 1024 Oct 26 00:37 proc
lrwxrwxrwx 1 root root 3 Oct 26 01:05 sbin -> bin
drwxr-xr-x 2 root root 1024 Oct 26 00:37 sysroot
./bin:
total 1831
drwxr-xr-x 2 root root 1024 Oct 26 04:32 .
drwx------ 10 root root 1024 Nov 18 03:19 ..
-rwxr-xr-x 1 root root 646764 Nov 18 2005 bash
-rwxr-xr-x 1 root root 8324 Nov 18 2005 blockdev
-rwxr-xr-x 1 root root 14104 Nov 18 2005 chroot
-rwxr-xr-x 1 root root 1028 Oct 26 01:19 devmap_mknod.sh
-rwxr-xr-x 1 root root 6252 Nov 18 2005 insmod
-r-xr-xr-x 1 root root 980960 Nov 18 2005 lvm
-rwxr-xr-x 1 root root 21812 Nov 18 2005 mkdir
-rwxr-xr-x 1 root root 20076 Nov 18 2005 mknod
lrwxrwxrwx 1 root root 10 Oct 26 01:05 modprobe -> /sbin/nash
-rwxr-xr-x 1 root root 63732 Nov 18 2005 nash
-rwxr-xr-x 1 root root 89184 Nov 18 2005 sed
./dev:
total 2
drwxr-xr-x 2 root root 1024 Oct 26 00:37 .
drwx------ 10 root root 1024 Nov 18 03:19 ..
crw-r--r-- 1 root root 5, 1 Oct 26 00:37 console
brw-r--r-- 1 root root 9, 0 Oct 23 17:52 md0
brw-r--r-- 1 root root 9, 1 Oct 23 17:52 md1
crw-r--r-- 1 root root 1, 3 Oct 26 00:37 null
brw-r--r-- 1 root root 1, 1 Oct 26 00:37 ram
crw-r--r-- 1 root root 4, 0 Oct 26 00:37 systty
crw-r--r-- 1 root root 4, 1 Oct 26 00:37 tty1
crw-r--r-- 1 root root 4, 2 Oct 26 00:37 tty2
crw-r--r-- 1 root root 4, 3 Oct 26 00:37 tty3
crw-r--r-- 1 root root 4, 4 Oct 26 00:37 tty4
./etc:
total 2
drwxr-xr-x 2 root root 1024 Oct 26 00:37 .
drwx------ 10 root root 1024 Nov 18 03:19 ..
./lib:
total 1184
drwxr-xr-x 3 root root 1024 Nov 18 03:52 .
drwx------ 10 root root 1024 Nov 18 03:19 ..
-rwxr-xr-x 1 root root 91693 Nov 18 2005 ld-linux.so.2
-rwxr-xr-x 1 root root 1097952 Nov 18 2005 libc.so.6
-rwxr-xr-x 1 root root 10440 Nov 18 2005 libdl.so.2
drwxr-xr-x 3 root root 1024 Nov 18 03:53 modules
./lib/modules:
total 3
drwxr-xr-x 3 root root 1024 Nov 18 03:53 .
drwxr-xr-x 3 root root 1024 Nov 18 03:52 ..
drwxr-xr-x 2 root root 1024 Nov 18 03:54 2.6.14-gentoo-r2
./lib/modules/2.6.14-gentoo-r2:
total 4
drwxr-xr-x 2 root root 1024 Nov 18 03:54 .
drwxr-xr-x 3 root root 1024 Nov 18 03:53 ..
-rw-r--r-- 1 root root 1095 Nov 18 03:54 modules.dep
./loopfs:
total 2
drwxr-xr-x 2 root root 1024 Oct 26 00:37 .
drwx------ 10 root root 1024 Nov 18 03:19 ..
./lost+found:
total 13
drwx------ 2 root root 12288 Oct 26 01:03 .
drwx------ 10 root root 1024 Nov 18 03:19 ..
./proc:
total 2
drwxr-xr-x 2 root root 1024 Oct 26 00:37 .
drwx------ 10 root root 1024 Nov 18 03:19 ..
./sysroot:
total 2
drwxr-xr-x 2 root root 1024 Oct 26 00:37 .
drwx------ 10 root root 1024 Nov 18 03:19 .. |
Here is the linuxrc file: Code: | #!/bin/nash
set -vx
echo Mounting /proc filesystem
mount -t proc /proc /proc
#raidautorun /dev/md0
#raidautorun /dev/md1
echo Creating block devices
mkdevices /dev
echo Creating root device
mkrootdev /dev/root
echo 0x0100 > /proc/sys/kernel/real-root-dev
echo "Making Device Mapper Nodes."
devmap_mknod.sh
echo "Scanning for volume groups."
lvm vgscan
lvm vgchange -ay
echo Mounting root filesystem
mount -o noatime --rw -t reiserfs /dev/mapper/boot_drive-rootfs /sysroot
mkdir -p /sysroot/initrd
pivot_root /sysroot /sysroot/initrd
exec chroot . bin/bash -c 'umount initrd/proc ; umount initrd ; blockdev --flushbufs /dev/ram0 ; sleep 10 ; exec /sbin/init' < dev/console > dev/console 2>&1 |
And here is what I get when I try to boot it: Code: | RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).
FATAL: Module /linuxrc not found.
VFS: Cannot open root device "boot_drive/rootfs" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) |
I originally did not have the lib/modules/2.6.14-gentoo-r2/modules.dep in the initrd image, but it was complaining that it could not find that file, so I added it in. That is when I saw what "module" it was looking for. But /linuxrc is not a module; it is a script! Thiis kernel does not use any modules; everything is compiled right into the kernel image.
What is going on here?
I am using this same initrd setup with another system and it works fine. In fact, the other system is actually more complicated. It has a Duron with pair of 250 GB IDE drives in a RAID-1 that it boots from with the root filesystem on the RAID under LVM2, and this current problem system is P2 Celeron with a single 80 GB IDE drive.
Did I just make a stupid typo somewhere that I just can't see, or is there something more fundamental wrong here?
Please help, as I do not have much hair left to pull out! ![Wink :wink:](images/smiles/icon_wink.gif) |
|