8.4. Making the LFS System Bootable

Wolfgang Messingschlager w.mess at freenet.de
Tue Oct 28 12:56:32 PDT 2008

Hi all,

before I overwrite my MBR I want to test the new generated kernel on the
my Debian host system (which uses grub as well).
The Debian host system has the following EXT3 partitions:

- /dev/hdb20: /
- /dev/hdb23: /boot
- /dev/hdb14: /mnt/lfs

The new LFS partition is on /dev/hdb14 and /boot is a subdirectory.

The part from /boot/grub/menu.lst where I boot the host system contains
the lines
title           Debian GNU/Linux, kernel 2.6.18-6-486
root            (hd0,22)
kernel          /vmlinuz-2.6.18-6-486 root=/dev/hdb20 ro
initrd          /initrd.img-2.6.18-6-486

I downloaded from www.kernel.org the kernel and I did

- make mrproper
- make menuconfig
- make
- make modules_install
- cp -v arch/i386/boot/bzImage /boot/vmlinuz-
- cp -v .config /boot/config-
- cp -v System.map /boot/System.map-

I did the following trials

1.) I added the lines

title           LFS kernel
root            (hd0,22)
kernel          /vmlinuz- root=/dev/hdb20 ro

to /boot/grub/menu.lst

This caused the following errors during boot

VFS: cannot open root device "hdb20" or unknown block (0,0)
Please append a correct "root=" boot option; here are the available
Kernal panic - not syncing: VFS: Unable to mount rootfs on unknown -
block (0,0)

2.) So I assumed that I need a initrd file and did
cd /boot
mkinitrd -o /boot/initrd-

b) I added the lines

title           LFS kernel
root            (hd0,22)
kernel          /vmlinuz- root=/dev/hdb20 ro
initrd          /initrd-2.6.26

to /boot/grub/menu.lst. This enabled a successful boot.

However when I in the LFS chroot-environment I have no mkinitrd. How can
I get it?

Or is the problem that I have compiled the kernel with the following
(EXT2 / EXT3) options:

egrep '(EXT2|EXT3)' config-
# CONFIG_EXT2_FS_XIP is not set

Perhaps the problem is that EXT2 and EXT3 drivers should be in the 
kernel and compiled as modules, isn't it?

Thanks in advance for your help

Wolfgang Messingschlager

More information about the lfs-support mailing list