trouble getting fai to install a kernel image

Haakon Humberset humbe at interagon.com
Fri Dec 19 15:34:59 CET 2003


On Fri, 19 Dec 2003, Mike Horansky wrote:
> Hello again,
>
> Do kernels that are to be installed by FAI need to not have an initrd?

No.. At least I can't see any reason for this.

> You are attempting to install an initrd kernel image (version 2.4.20-grsec-1.9.9
> e)
> This will not work unless you have configured your boot loader to use
> initrd. (An initrd image is a kernel image that expects to use an INITial
> Ram Disk to mount a minimal root file system into RAM and use that for
> booting).
> As a reminder, in order to configure lilo, you need to
> add an 'initrd=/initrd.img' to the image=/vmlinuz
> stanza of your /etc/lilo.conf
> I repeat, You need to configure your boot loader. If you have already done
> so, and you wish to get rid of this message, please put
>   `do_initrd = Yes'
> in /etc/kernel-img.conf. Note that this is optional, but if you do not,
> you'll contitnue to see this message whenever you install a kernel
> image using initrd.
> Do you want to stop now? [Y/n]Ok, Aborting
> dpkg: error processing /fai/files/packages/kernel-image-2.4.20-grsec-1.9.9e_10.00.Custom_i386.deb (--unpack):
>  subprocess pre-installation script returned error exit status
> <><><>

When using fai.. You will automaticly answer yes to the stop message, thus
it wont work.. Do as it says.. Put do_initrd = Yes in /etc/kernel-img.conf
(Which should probably then be /tmp/target/etc/kernel-img.conf of course)
And make sure your lilo.conf on your installclient is correct of course..

> It also fails if I try it manually:
> <><><>
> dpkg  --root=/tmp/target -i kernel-image-2.4.20-grsec-1.9.9e_10.00.Custom_i386.deb
> (Reading database ... 10235 files and directories currently installed.)
> Preparing to replace kernel-image-2.4.20-grsec-1.9.9e 10.00.Custom (using kernel-image-2.4.20-grsec-1.9.9e_10.00.Custom_i386.deb) ...
> Unpacking replacement kernel-image-2.4.20-grsec-1.9.9e ...
> Setting up kernel-image-2.4.20-grsec-1.9.9e (10.00.Custom) ...
> awk: cannot open /proc/filesystems (No such file or directory)
> /usr/sbin/mkinitrd: Cannot determine root file system
> Failed to create initrd image.
> dpkg: error processing kernel-image-2.4.20-grsec-1.9.9e (--install):
>  subprocess post-installation script returned error exit status 29
> Errors were encountered while processing:
>  kernel-image-2.4.20-grsec-1.9.9e
> <><><>

When the kernel package want to configure itself it wants to write boot
sectors etc.. And needs stuff to be in filesystem. As you can see.. It
cannot open /proc/filesystems ... Thus you probably need to mount proc
filesystem in /tmp/target too.. I dunno what --root=/tmp/target does,
but if you instead uses chroot.. chroot /tmp/target /usr/bin/dpkg -i k...
you will ensure that no files outside of /tmp/target are used..
When running stuff manually on install client during install, use chroot
to get the disk to look like it will after you boot..

Regards..

Haakon

-----------------------------------------------------------------------
Haakon Humberset, Research Scientist, Interagon AS.       +47 982 03875
http://www.interagon.com                            humbe at interagon.com
-----------------------------------------------------------------------




More information about the linux-fai mailing list