Bug#547649: grub-pc postinst exit status 128

Arno Schuring aelschuring at hotmail.com
Mon Sep 21 21:40:18 UTC 2009


Felix Zielcke wrote:
[...]

> And you added the x to the shebang of grub-pc.postinst?
> Maybe also add it in grub-pc.config.
> I only get the above output if I run it with `bash
> -x .../grub-pc.postinst' without adding a x in the shebang.
> 

With added -x in /var/lib/dpkg/info/grub-pc.config I get:

aschuring at neminis:~$ DEBCONF_DEBUG=developer sudo dpkg --configure -a
Setting up grub-pc (1.97~beta3-1) ...
+ case "$1" in
+ . /usr/share/debconf/confmodule
++ '[' '!' '' ']'
++ PERL_DL_NONLAZY=1
++ export PERL_DL_NONLAZY
++ '[' '' ']'
++ exec /usr/share/debconf/frontend /var/lib/dpkg/info/grub-pc.postinst
configure ''
+ dpkg --print-architecture
+ . /usr/share/debconf/confmodule
+ [ ! 1 ]
+ [ -z  ]
+ exec
+ [  ]
+ exec
+ DEBCONF_REDIR=1
+ export DEBCONF_REDIR
+ priority=high
+ test -e /boot/grub/stage2
+ test -e /boot/grub/menu.lst
+ test -e /boot/grub/core.img
+ db_input high grub-pc/chainload_from_menu.lst
+ _db_cmd INPUT high grub-pc/chainload_from_menu.lst
+ IFS=  printf %s\n INPUT high grub-pc/chainload_from_menu.lst
+ IFS=
 read -r _db_internal_line
+ RET=question will be asked
+ return 0
+ db_get grub-pc/kopt_extracted
+ _db_cmd GET grub-pc/kopt_extracted
+ IFS=  printf %s\n GET grub-pc/kopt_extracted
+ IFS=
 read -r _db_internal_line
+ RET=false
+ return 0
+ [ false = false ]
+ sed -ne s/^# kopt=//p /boot/grub/menu.lst
+ tr -s   \n
+ grep -vx \(ro\|root=[^ ]*\)
+ kopt=selinux=1
enforcing=0
+ db_set grub2/linux_cmdline selinux=1
enforcing=0
+ _db_cmd SET grub2/linux_cmdline selinux=1
enforcing=0
+ IFS=  printf %s\n SET grub2/linux_cmdline selinux=1
enforcing=0
+ IFS=
 read -r _db_internal_line
+ RET=value set
+ return 0
+ db_set grub-pc/kopt_extracted true
+ _db_cmd SET grub-pc/kopt_extracted true
+ IFS=  printf %s\n SET grub-pc/kopt_extracted true
+ IFS=
 read -r _db_internal_line
+ RET=20 Unsupported command "enforcing=0" (full line was "enforcing=0")
received from confmodule.
+ return 20
+ true
+ [ selinux=1
enforcing=0 =  ]
+ priority=medium
+ test -e /etc/default/grub
+ db_input medium grub2/linux_cmdline
+ _db_cmd INPUT medium grub2/linux_cmdline
+ IFS=  printf %s\n INPUT medium grub2/linux_cmdline
+ IFS=
 read -r _db_internal_line
+ RET=value set
+ return 0
+ db_input medium grub2/linux_cmdline_default
+ _db_cmd INPUT medium grub2/linux_cmdline_default
+ IFS=  printf %s\n INPUT medium grub2/linux_cmdline_default
+ IFS=
 read -r _db_internal_line
+ RET=30 question skipped
+ return 30
+ true
+ db_go
+ _db_cmd GO
+ IFS=  printf %s\n GO
+ IFS=
 read -r _db_internal_line
+ RET=30 question skipped
+ return 30
dpkg: error processing grub-pc (--configure):
 subprocess installed post-installation script returned error exit
status 128
dpkg: dependency problems prevent configuration of grub:
 grub depends on grub-pc; however:
  Package grub-pc is not configured yet.
dpkg: error processing grub (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 grub-pc
 grub


It seems something goes wrong when parsing the kopt line. My line is:
# kopt=root=UUID=6388def3-b3cd-4785-88c3-6b1ffbed6a9b ro selinux=1
enforcing=0

When I remove both SELinux arguments, the command no longer fails.





More information about the Pkg-grub-devel mailing list