On Fri, 2006-06-16 at 13:11 +1000, Steffen Kluge wrote: > Bump! > > Any ideas anyone? > > Cheers > Steffen. > > On Thu, 2006-06-08 at 16:07 +1000, Steffen Kluge wrote: > > Hi all, > > I've built a custom kernel, based on the 2122 source. The distinctive > > feature of this kernel is the lack of support for loadable modules, all > > required drivers and features are compiled in. > > > > I'm also using LVM on that system, which leads to the issue that the > > machine won't boot: the kernel panics after failing to find the root > > device. In grub.conf it is listed as root=/dev/VolGroup00/LogVol00. > > > > I suspected that for booting with / on a logical volume some extra > > functionality would be required that needs to be put into the initrd. > > Unfortunately, I have been unable to make an initrd, mkinitrd insists on > > a module tree. > > > > If I "steal" the initrd from the stock 2122 kernel, the machine boots > > fine. How can I make an initrd for a kernel with no modules and no > > module support? One that just contains the functionality to boot an LVM > > system? What's the contents of the "init" script in your initrd? Mine, with / on LVM using regular modules is: #!/bin/nash mount -t proc /proc /proc setquiet echo Mounting proc filesystem echo Mounting sysfs filesystem mount -t sysfs /sys /sys echo Creating /dev mount -o mode=0755 -t tmpfs /dev /dev mkdir /dev/pts mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts mkdir /dev/shm mkdir /dev/mapper echo Creating initial device nodes mknod /dev/null c 1 3 mknod /dev/zero c 1 5 mknod /dev/systty c 4 0 mknod /dev/tty c 5 0 mknod /dev/console c 5 1 mknod /dev/ptmx c 5 2 mknod /dev/rtc c 10 135 mknod /dev/tty0 c 4 0 mknod /dev/tty1 c 4 1 mknod /dev/tty2 c 4 2 mknod /dev/tty3 c 4 3 mknod /dev/tty4 c 4 4 mknod /dev/tty5 c 4 5 mknod /dev/tty6 c 4 6 mknod /dev/tty7 c 4 7 mknod /dev/tty8 c 4 8 mknod /dev/tty9 c 4 9 mknod /dev/tty10 c 4 10 mknod /dev/tty11 c 4 11 mknod /dev/tty12 c 4 12 mknod /dev/ttyS0 c 4 64 mknod /dev/ttyS1 c 4 65 mknod /dev/ttyS2 c 4 66 mknod /dev/ttyS3 c 4 67 echo Setting up hotplug. hotplug echo Creating block device nodes. mkblkdevs echo "Loading jbd.ko module" insmod /lib/jbd.ko echo "Loading ext3.ko module" insmod /lib/ext3.ko echo "Loading raid1.ko module" insmod /lib/raid1.ko echo "Loading dm-mod.ko module" insmod /lib/dm-mod.ko echo "Loading dm-mirror.ko module" insmod /lib/dm-mirror.ko echo "Loading dm-zero.ko module" insmod /lib/dm-zero.ko echo "Loading dm-snapshot.ko module" insmod /lib/dm-snapshot.ko mkblkdevs raidautorun /dev/md3 resume /dev/hda7 echo Creating root device. mkrootdev -t ext3 -o defaults,ro md3 echo Mounting root filesystem. mount /sysroot echo Setting up other filesystems. setuproot echo Switching to new root and running init. switchroot Should make for an interesting comparison. Paul.