update-grub fails on custom kernel

Bug #644879 reported by Don Porter
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
grub (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: grub

Hi,

I am trying to build a custom 2.6.34 kernel on 10.04.1, and I cannot get it to interoperate with the automatic grub updating scripts. I am using grub 1.

When I try to install the make-kpkg'd kernel package (called -unmod here), I get this output:

porterde@yorke:/boot/grub$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up linux-image-2.6.34-unmod (1) ...
Running depmod.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs 2.6.34-unmod /boot/vmlinuz-2.6.34-unmod
Running postinst hook script update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.34-unmod
Found kernel: /boot/vmlinuz-2.6.32-24-server
Found kernel: /boot/vmlinuz-2.6.32-21-server
Found GRUB 2: /boot/grub/core.img
Found kernel: /boot/memtest86+.bin
User postinst hook script [update-grub] exited with value 20
dpkg: error processing linux-image-2.6.34-unmod (--configure):
 subprocess installed post-installation script returned error exit status 128
Errors were encountered while processing:
 linux-image-2.6.34-unmod
E: Sub-process /usr/bin/dpkg returned an error code (1)

I spent a fair bit of time searching similar bug reports, and I came up empty handed.

I can work-around the problem by manually running update-grub, but I'd like to be able to automatically update my menu.lst.

Any advice on how to resolve this problem would be much appreciated.

Thanks,
Don

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: grub 0.97-29ubuntu60
ProcVersionSignature: Ubuntu 2.6.32-24.43-server 2.6.32.15+drm33.5
Uname: Linux 2.6.32-24-server x86_64
Architecture: amd64
Date: Tue Sep 21 21:40:29 2010
InstallationMedia: Ubuntu-Server 10.04 LTS "Lucid Lynx" - Release amd64 (20100427)
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_US.UTF-8
 LC_CTYPE=POSIX
SourcePackage: grub

Revision history for this message
Don Porter (porterde) wrote :
Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 644879] [NEW] update-grub fails on custom kernel

On Wed, Sep 22, 2010 at 03:47:59AM -0000, Don Porter wrote:
> I am trying to build a custom 2.6.34 kernel on 10.04.1, and I cannot get
> it to interoperate with the automatic grub updating scripts. I am using
> grub 1.
>
> When I try to install the make-kpkg'd kernel package (called -unmod
> here), I get this output:
[...]
> User postinst hook script [update-grub] exited with value 20

Can you try this with:

  sudo DEBCONF_DEBUG=developer apt-get -f install

Revision history for this message
Don Porter (porterde) wrote :

On 09/22/2010 08:22 AM, Colin Watson wrote:
> On Wed, Sep 22, 2010 at 03:47:59AM -0000, Don Porter wrote:
>
>> I am trying to build a custom 2.6.34 kernel on 10.04.1, and I cannot get
>> it to interoperate with the automatic grub updating scripts. I am using
>> grub 1.
>>
>> When I try to install the make-kpkg'd kernel package (called -unmod
>> here), I get this output:
>>
> [...]
>
>> User postinst hook script [update-grub] exited with value 20
>>
> Can you try this with:
>
> sudo DEBCONF_DEBUG=developer apt-get -f install
>
>
Sure: Here's the relevant portion of the output:

Setting up linux-image-2.6.34-unmod (1) ...
debconf (developer): frontend started
debconf (developer): frontend running, package name is
linux-image-2.6.34-unmod
debconf (developer): starting
/var/lib/dpkg/info/linux-image-2.6.34-unmod.config configure 1
debconf (developer): <-- VERSION 2.0
debconf (developer): --> 0 2.0
debconf (developer): starting
/var/lib/dpkg/info/linux-image-2.6.34-unmod.postinst configure 1
debconf (developer): <-- VERSION 2.0
debconf (developer): --> 0 2.0
debconf (developer): <-- CAPB backup
debconf (developer): --> 0 multiselect escape backup
Running depmod.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs 2.6.34-unmod
/boot/vmlinuz-2.6.34-unmod
debconf (developer): <-- update-initramfs: Generating
/boot/initrd.img-2.6.34-unmod
Running postinst hook script update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.34-unmod
Found kernel: /boot/vmlinuz-2.6.34-olf
Found kernel: /boot/vmlinuz-2.6.32-24-server
Found kernel: /boot/vmlinuz-2.6.32-21-server
Found GRUB 2: /boot/grub/core.img
Found kernel: /boot/memtest86+.bin
debconf (developer): <-- X_LOADTEMPLATEFILE
/var/lib/dpkg/info/grub.templates grub
User postinst hook script [update-grub] exited with value 20
debconf (developer): --> 0
dpkg: error processing linux-image-2.6.34-unmod (--install):
  subprocess installed post-installation script returned error exit
status 128
Errors were encountered while processing:
  linux-image-2.6.34-unmod
porterde@yorke:~$

Thanks!
Don

Revision history for this message
Colin Watson (cjwatson) wrote :

On Wed, Sep 22, 2010 at 02:23:11PM -0000, Don Porter wrote:
> run-parts: executing /etc/kernel/postinst.d/initramfs 2.6.34-unmod
> /boot/vmlinuz-2.6.34-unmod
> debconf (developer): <-- update-initramfs: Generating
> /boot/initrd.img-2.6.34-unmod

The bug is here; this line should not be being sent to debconf. Could
you attach your copy of /etc/kernel/postinst.d/initramfs?

Revision history for this message
Don Porter (porterde) wrote :

Attached. I wanted my kernel package to generate an initramfs, which it
wasn't doing by default, so I copied

/usr/share/doc/kernel-package/examples/etc/kernel/postinst.d/initramfs

following some notes I found on the internet. The script is otherwise
unmodified.

Did I err in copying this, or perhaps the example script has a bug?

Thanks,
Don

On 09/22/2010 11:37 AM, Colin Watson wrote:
> On Wed, Sep 22, 2010 at 02:23:11PM -0000, Don Porter wrote:
>
>> run-parts: executing /etc/kernel/postinst.d/initramfs 2.6.34-unmod
>> /boot/vmlinuz-2.6.34-unmod
>> debconf (developer):<-- update-initramfs: Generating
>> /boot/initrd.img-2.6.34-unmod
>>
> The bug is here; this line should not be being sent to debconf. Could
> you attach your copy of /etc/kernel/postinst.d/initramfs?
>
>

Revision history for this message
Stengah (makhataev) wrote :

Sorry, did you solve this problem?
When i try "sudo DEBCONF_DEBUG=developer apt-get -f install", i get this output:

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up linux-image-2.6.38.6-candela (2.6.38.6-candela-10.00.Custom) ...
debconf (developer): frontend started
debconf (developer): frontend running, package name is linux-image-2.6.38.6-candela
debconf (developer): starting /var/lib/dpkg/info/linux-image-2.6.38.6-candela.config configure
debconf (developer): <-- VERSION 2.0
debconf (developer): --> 0 2.0
debconf (developer): starting /var/lib/dpkg/info/linux-image-2.6.38.6-candela.postinst configure
debconf (developer): <-- VERSION 2.0
debconf (developer): --> 0 2.0
debconf (developer): <-- CAPB backup
debconf (developer): --> 0 multiselect escape backup
Running depmod.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms 2.6.38.6-candela /boot/vmlinuz-2.6.38.6-candela
run-parts: executing /etc/kernel/postinst.d/force-build-link 2.6.38.6-candela /boot/vmlinuz-2.6.38.6-candela
run-parts: executing /etc/kernel/postinst.d/initramfs 2.6.38.6-candela /boot/vmlinuz-2.6.38.6-candela
debconf (developer): <-- update-initramfs: Generating /boot/initrd.img-2.6.38.6-candela
run-parts: executing /etc/kernel/postinst.d/pm-utils 2.6.38.6-candela /boot/vmlinuz-2.6.38.6-candela
run-parts: executing /etc/kernel/postinst.d/yaird 2.6.38.6-candela /boot/vmlinuz-2.6.38.6-candela
Running postinst hook script update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.38.6-candela
Found GRUB 2: /boot/grub/core.img
Found kernel: /boot/memtest86+.bin
debconf (developer): <-- X_LOADTEMPLATEFILE /var/lib/dpkg/info/grub.templates grub
User postinst hook script [update-grub] exited with value 20
debconf (developer): --> 0
dpkg: error processing linux-image-2.6.38.6-candela (--configure):
 subprocess installed post-installation script returned error exit status 128
Errors were encountered while processing:
 linux-image-2.6.38.6-candela
E: Sub-process /usr/bin/dpkg returned an error code (1)

p.s. sorry for my bad english=(

Revision history for this message
Don Porter (porterde) wrote : Re: [Bug 644879] Re: update-grub fails on custom kernel

I never solved this problem.

On 05/22/2011 02:16 PM, Stengah wrote:
> Sorry, did you solve this problem?
> When i try "sudo DEBCONF_DEBUG=developer apt-get -f install", i get this output:
>
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> 1 not fully installed or removed.
> After this operation, 0B of additional disk space will be used.
> Setting up linux-image-2.6.38.6-candela (2.6.38.6-candela-10.00.Custom) ...
> debconf (developer): frontend started
> debconf (developer): frontend running, package name is linux-image-2.6.38.6-candela
> debconf (developer): starting /var/lib/dpkg/info/linux-image-2.6.38.6-candela.config configure
> debconf (developer):<-- VERSION 2.0
> debconf (developer): --> 0 2.0
> debconf (developer): starting /var/lib/dpkg/info/linux-image-2.6.38.6-candela.postinst configure
> debconf (developer):<-- VERSION 2.0
> debconf (developer): --> 0 2.0
> debconf (developer):<-- CAPB backup
> debconf (developer): --> 0 multiselect escape backup
> Running depmod.
> Examining /etc/kernel/postinst.d.
> run-parts: executing /etc/kernel/postinst.d/dkms 2.6.38.6-candela /boot/vmlinuz-2.6.38.6-candela
> run-parts: executing /etc/kernel/postinst.d/force-build-link 2.6.38.6-candela /boot/vmlinuz-2.6.38.6-candela
> run-parts: executing /etc/kernel/postinst.d/initramfs 2.6.38.6-candela /boot/vmlinuz-2.6.38.6-candela
> debconf (developer):<-- update-initramfs: Generating /boot/initrd.img-2.6.38.6-candela
> run-parts: executing /etc/kernel/postinst.d/pm-utils 2.6.38.6-candela /boot/vmlinuz-2.6.38.6-candela
> run-parts: executing /etc/kernel/postinst.d/yaird 2.6.38.6-candela /boot/vmlinuz-2.6.38.6-candela
> Running postinst hook script update-grub.
> Searching for GRUB installation directory ... found: /boot/grub
> Searching for default file ... found: /boot/grub/default
> Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
> Searching for splash image ... none found, skipping ...
> Found kernel: /boot/vmlinuz-2.6.38.6-candela
> Found GRUB 2: /boot/grub/core.img
> Found kernel: /boot/memtest86+.bin
> debconf (developer):<-- X_LOADTEMPLATEFILE /var/lib/dpkg/info/grub.templates grub
> User postinst hook script [update-grub] exited with value 20
> debconf (developer): --> 0
> dpkg: error processing linux-image-2.6.38.6-candela (--configure):
> subprocess installed post-installation script returned error exit status 128
> Errors were encountered while processing:
> linux-image-2.6.38.6-candela
> E: Sub-process /usr/bin/dpkg returned an error code (1)
>
> p.s. sorry for my bad english=(
>

Revision history for this message
dino99 (9d9) wrote :

Lucid is no more a supported version; and grub legacy upstream is also stopped, only receiving possible random fixes locally

Changed in grub (Ubuntu):
status: New → Invalid
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.