[Bug 1090768] Re: grub-pc.config prevents replacing with new config file contents

Marcus Tomlinson marcus.tomlinson at canonical.com
Thu Mar 5 13:02:50 UTC 2020


This release of Ubuntu is no longer receiving maintenance updates. If
this is still an issue on a maintained version of Ubuntu please let us
know.

** Changed in: grub2 (Ubuntu)
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1090768

Title:
  grub-pc.config prevents replacing with new config file contents

Status in grub2 package in Ubuntu:
  Incomplete

Bug description:
  A behavior of grub-pc.config does not allow to reach "replacing config
  file with new version", as shown below in a session listing:

  # echo grub-pc grub2/linux_cmdline     string  acpi=force elevator=deadline | debconf-set-selections
  # dpkg-reconfigure -f noninteractive grub-pc
  Replacing config file /etc/default/grub with new version
  Installation finished. No error reported.
  Generating grub.cfg ...
  ...

  The problematic code introduced in http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/precise/grub2/precise/revision/31/debian/grub-pc.config (lines 24-38)
  (where it overwrites preseeded values in debconf database with call to db_set):

  if test -e /etc/default/grub ; then                                                                                                                                                 
    . /etc/default/grub                                                                                     

    db_set grub2/linux_cmdline "$GRUB_CMDLINE_LINUX"                                                                                                                                  
     db_set grub2/linux_cmdline_default "$GRUB_CMDLINE_LINUX_DEFAULT"                                                                                                                  

     case grub-pc in                                                                                                                                                                   
     grub-pc)                                                                                                                                                                        
        if [ "${GRUB_TIMEOUT}" != "" ]; then                                                                                                                                          
          db_set grub-pc/timeout "$GRUB_TIMEOUT"                                                                                                                                      
        fi                                                                                                                                                                            
        if [ "${GRUB_HIDDEN_TIMEOUT}" != "" ]; then                                                                                                                                   
          db_set grub-pc/hidden_timeout true                                                                                                                                          
        elif egrep -q '^#?[[:space:]]*GRUB_HIDDEN_TIMEOUT=' /etc/default/grub; then                                                                                                   
          db_set grub-pc/hidden_timeout false                                                                                                                                         
        fi                                                                                                                                                                            
      ;;                                                                                                                                                                              
    esac                                                                                                                                                                              
  fi

  Commenting it out makes the above example in listing to work.

  I dont understand the purpose to update debconf preseed values with those from config file.
   (assuming db has these already calibrated before adding into db with 'interactive' backend)

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: grub-pc 1.99-21ubuntu3.7
  ProcVersionSignature: Ubuntu 3.2.0-35.55-generic 3.2.34
  Uname: Linux 3.2.0-35-generic x86_64
  ApportVersion: 2.0.1-0ubuntu17
  Architecture: amd64
  Date: Sat Dec 15 21:04:37 2012
  MarkForUpload: True
  ProcEnviron:
   LANGUAGE=ru_RU
   TERM=xterm
   PATH=(custom, user)
   LANG=ru_RU.UTF-8
   SHELL=/bin/bash
  SourcePackage: grub2
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1090768/+subscriptions



More information about the foundations-bugs mailing list