/sbin/installkernel doesn't work

Bug #16598 reported by Stephen Hemminger
10
Affects Status Importance Assigned to Milestone
debianutils (Ubuntu)
Invalid
Medium
Andy Whitcroft
Lucid
Won't Fix
Undecided
Unassigned
Precise
Fix Released
Undecided
Unassigned
Trusty
Invalid
Undecided
Unassigned
Utopic
Invalid
Undecided
Unassigned
Vivid
Invalid
Medium
Andy Whitcroft

Bug Description

If I build a kernel (from kernel.org) and do a 'make install'
it runs /sbin/installkernel which doesn't work right on my system (fresh install
from CD).
Because of a couple of problems. First, the script expects that /boot/vmlinuz is
a symlink to the existing kernel (ditto for initrd), this is not how Ubuntu with
GRUB
is installed. Making the symlink made the script run, but there was no entry in
/boot/grub/menu.lst for the new kernel.

Second problem is that installkernel doesn't make and install initrd, as it does
on other distro's (Suse, Redhat). Since the default config depends on ext3 and other
drivers being in initrd, this prevents the new kernel from booting.

The whole process of installing a new kernel does work out of the box on Suse,
and Fedora.
Suse uses one entry in grub/menu.lst but makes new symlinks.
Fedora adds new entries in grub/menu.lst for each kernel built.

Tags: patch
Revision history for this message
Charles Majola (chmj) wrote :

This has been fix as far as I know. If it still persists, please feel free to reopen the bug.

Changed in debianutils:
status: Confirmed → Fix Released
Revision history for this message
Jesse Barnes (jbarnes-virtuousgeek) wrote :

Still fails in the latest karmic beta. I added a local hack to work around the issue by appending
update-initramfs -k $ver -c
update-grub
to my /sbin/installkernel script (just before the exit 0)

Changed in debianutils (Ubuntu):
status: Fix Released → Confirmed
Andy Whitcroft (apw)
Changed in debianutils (Ubuntu):
assignee: Charles Majola (chmj) → nobody
assignee: nobody → Andy Whitcroft (apw)
Revision history for this message
rusivi2 (rusivi2-deactivatedaccount) wrote :

Thank you for posting this bug.

Does this occur in Lucid?

Changed in debianutils (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Stephen Hemminger (shemminger) wrote :

On lucid it installs kernel but doesn't do update-initramfs and update-grub

Revision history for this message
Maarten Bezemer (veger) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. We are sorry that we do not always have the capacity to look at all reported bugs in a timely manner. There have been many changes in Ubuntu since that time you reported the bug and your problem may have been fixed with some of the updates. It would help us a lot if you could test it on a currently supported Ubuntu version. When you test it and it is still an issue, kindly upload the updated logs by running apport-collect 16598 and any other logs that are relevant for this particular issue.

Revision history for this message
Janusz Dziedzic (janusz-dziedzic) wrote :

still exist under ubuntu 12.04. - is that expected?

- first of all
/sbin/installkernel: 30: [: /boot unexpected operator

Seems sh version we have on ubuntu (/bin/sh -> dash
) don't allow == during string comparation.

- seems we also don't need call new-kernel-pkg (if someone need package should/could use make-kpkg).
- lack of update-initramfs and update-grub in installkernel script

Seems Ubuntu still using orginal (RedHat) version of /sbin/installkernel script (??).
As I understand this should be Ubuntu specyfic code and someone from Ubuntu team should rewrite/change this.

Patch:
--- installkernel.orig 2012-08-22 13:35:30.202869387 +0200
+++ installkernel 2012-08-22 13:36:11.822872679 +0200
@@ -27,9 +27,9 @@

 cfgLoader=

-if [ -z "$INSTALL_PATH" -o "$INSTALL_PATH" == "/boot" ]; then
+if [ -z "$INSTALL_PATH" -o "$INSTALL_PATH" = "/boot" ]; then
     INSTALL_PATH=/boot
- cfgLoader=1
+# cfgLoader=1
 fi

 LINK_PATH=/boot
@@ -85,3 +85,7 @@
  fi
  new-kernel-pkg --rpmposttrans $KERNEL_VERSION
 fi
+
+update-initramfs -k $KERNEL_VERSION -c
+update-grub

BR
Janusz

Maarten Bezemer (veger)
Changed in debianutils (Ubuntu):
status: Incomplete → Confirmed
tags: added: patch
Revision history for this message
Andy Whitcroft (apw) wrote :

This was fixed in the 4.2 sync which hit Ubuntu in Precise. Closing out for there and later as it works there. We are not likely to fix Lucid at this late stage in its life.

Changed in debianutils (Ubuntu Vivid):
status: Confirmed → Invalid
Changed in debianutils (Ubuntu Utopic):
status: New → Invalid
Changed in debianutils (Ubuntu Trusty):
status: New → Invalid
Changed in debianutils (Ubuntu Precise):
status: New → Invalid
Changed in debianutils (Ubuntu Lucid):
status: New → Fix Released
status: Fix Released → Won't Fix
Changed in debianutils (Ubuntu Precise):
status: Invalid → Fix Released
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.