make-kpkg does not create an initrd image

Bug #592927 reported by Delan Azabani
38
This bug affects 6 people
Affects Status Importance Assigned to Milestone
kernel-package (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When using make-kpkg to build the Ubuntu-distributed kernel sources, no initrd.img is created which causes the computer to kernel panic on boot being unable to mount the root filesystem. Running mkinitramfs is not optimal as make-kpkg should do this, and if I manually create an initrd, any further update-grub action will cause my initrd line to disappear.

Here's the sequence of commands I have used:

sudo -i
cd /usr/src
tar xvjf linux-source-2.6.35.tar.bz2
cd linux-source-2.6.35
make menuconfig
< during this, the only thing I changed was the arch, from generic x86-64 to Core 2 >
make-kpkg --append-to-version=-delan --jobs 16 --initrd kernel_image kernel_headers modules
dpkg -i ../*.deb

For creating the initrd image:

mkinitramfs -o /boot/grub/initrd.img-2.6.35-rc1-delan

Revision history for this message
Javier López (javier-lopez) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Judging from your description, I am going to assign this bug to the “kernel-package” package in hopes that it will have a faster response. If you believe that I have chosen the wrong package, please change your bug to the correct one. Good luck on getting it fixed!

affects: ubuntu → kernel-package (Ubuntu)
Revision history for this message
DarkJavi (darkjavi) wrote :

Same problem here!

Used "make-kpkg --initrd --append-to-version=-amd-preempt-1000hz --revision=1 kernel-image kernel-headers" to build the kernel, then installed with dpkg, after reboot there is no initrd image so kernel panics because is unable to mount root filesystem.
then "mkinitramfs -k -o /boot/initrd.img-2.6.32.15+drm33.5-amd-preempt-1000hz 2.6.32.15+drm33.5-amd-preempt-1000hz" solved the problem

Changed in kernel-package (Ubuntu):
status: New → Confirmed
Revision history for this message
Giorgio Vazzana (mywing) wrote :

You can try this:

sudo cp /usr/share/doc/kernel-package/examples/etc/kernel/postinst.d/initramfs /etc/kernel/postinst.d/initramfs
sudo mkdir -p /etc/kernel/postrm.d/
sudo cp /usr/share/doc/kernel-package/examples/etc/kernel/postrm.d/initramfs /etc/kernel/postrm.d/initramfs

it solved the problem for me.

Revision history for this message
Anders Ossowicki (aowi) wrote :

I think the "real" bug here, is that the postinst-script (usr/share/kernel-package/pkg/image/postinst) from newer versions of kernel-package stopped building initrds but the version of initramfs-tools in lucid doesn't install the necessary files in /etc/kernel/post{inst,rm}.d/ to pick up the slack. Newer versions of initramfs-tools (in maverick) does this correctly:

aowi@otto ~ $ diff -Naur <(ssh bonnie dpkg -L initramfs-tools) <(dpkg -L initramfs-tools)|grep /etc/kernel
+/etc/kernel
+/etc/kernel/postinst.d
+/etc/kernel/postinst.d/initramfs-tools
+/etc/kernel/postrm.d
+/etc/kernel/postrm.d/initramfs-tools

(otto is maverick, bonnie is lucid).

Backporting the newer initramfs-tools to lucid would solve this problem for those of us desperately clinging to a long-term support release :-)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.