From: Matt Miller on
Under etch I'm trying to use "dpkg -i" to install a .deb I built using
make-kpkg. I'm passing "--initrd" to make-kpkg, since I'm booting
off a software RAID device. I've done this before on this same
machine without a problem, but this one is giving me:

....
Using mkinitramfs-kpkg to build the ramdisk.
mkinitramfs-kpkg failed to create initrd image.
Failed to create initrd image.
dpkg: error processing linux-image-2.6.18-xpc2-4-jan-2007 (--install):
subprocess post-installation script returned error exit status 9

I'm trying to build a stripped-down kernel, without loadable module
support, so maybe I left something important out during
"make menuconfig." The kernel seemed to compile fine, though.

How can I tell why mkinitramfs-kpkg failed to create initrd image?


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
From: Andrew Sackville-West on
On Thu, Jan 04, 2007 at 07:35:02PM +0100, Matt Miller wrote:
> Under etch I'm trying to use "dpkg -i" to install a .deb I built using
> make-kpkg. I'm passing "--initrd" to make-kpkg, since I'm booting
> off a software RAID device. I've done this before on this same
> machine without a problem, but this one is giving me:
>
> ...
> Using mkinitramfs-kpkg to build the ramdisk.
> mkinitramfs-kpkg failed to create initrd image.
> Failed to create initrd image.
> dpkg: error processing linux-image-2.6.18-xpc2-4-jan-2007 (--install):
> subprocess post-installation script returned error exit status 9
>
> I'm trying to build a stripped-down kernel, without loadable module
> support, so maybe I left something important out during
> "make menuconfig." The kernel seemed to compile fine, though.
>
> How can I tell why mkinitramfs-kpkg failed to create initrd image?

I've only just started to learn about this stuff my self, but two
things come to mind. there is an initrd support option in menuconfig
and what happens if you try to build the initrd manually with

mkinitrd -o blah [version]

A
From: Matt Miller on
> > Using mkinitramfs-kpkg to build the ramdisk.
> > mkinitramfs-kpkg failed to create initrd image.
>
> there is an initrd support option in menuconfig

I think I selected the necessary options:

mmiller(a)xpc1:/usr/src/linux-source-2.6.18$ grep -i ram .config
CONFIG_INITRAMFS_SOURCE=""
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
# CONFIG_NVRAM is not set
CONFIG_RAMFS=y
# CONFIG_CRAMFS is not set

> what happens if you try to build the initrd manually with
>
> mkinitrd -o blah [version]

I don't have mkinitrd, but these all worked for various
kernel versions that are installed on the machine:

$ sudo mkinitramfs -o blah
$ sudo mkinitramfs -o blah 2.6.18-23-dec-2006
$ sudo mkinitramfs -o blah 2.6.18-3-amd6

I can't get this to work for the new kernel version I'm
trying to build, since make-kpkg blows before it creates
the /lib/modules/<version> directory.

I'm guessing that I'm missing something else in menuconfig.


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
From: Matt Miller on
> Using mkinitramfs-kpkg to build the ramdisk.
> mkinitramfs-kpkg failed to create initrd image.
> ...
> I'm guessing that I'm missing something else in
> menuconfig.

Loadable module support. If I exclude it then
mkinitramfs-kpkg fails, and if I include it then
mkinitramfs-kpkg succeeds. This is annoying, since
one of my intentions here is to build a kernel without
loadable module support.


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
From: Andrew Sackville-West on
On Thu, Jan 04, 2007 at 10:33:20PM +0100, Matt Miller wrote:
> > Using mkinitramfs-kpkg to build the ramdisk.
> > mkinitramfs-kpkg failed to create initrd image.
> > ...
> > I'm guessing that I'm missing something else in
> > menuconfig.
>
> Loadable module support. If I exclude it then
> mkinitramfs-kpkg fails, and if I include it then
> mkinitramfs-kpkg succeeds. This is annoying, since
> one of my intentions here is to build a kernel without
> loadable module support.

I wondered about that. If you don't need loadable modules, then you
are compiling everything you need into the kernel. Therefore, you
don't need an init* because all the stuff you need is already in the
kernel. Or am I misunderstanding what you're doing?

A