[Bug 1879466] [NEW] Purging grub-pc package deletes /etc/default/grub file owned by grub-efi-amd64

Daniel Richard G. skunk at iskunk.org
Tue May 19 09:41:08 UTC 2020


Public bug reported:

This concerns grub-pc 2.04-1ubuntu26 in Ubuntu focal.

I have the following packages installed. Note that grub-pc has been
removed but not yet purged:

root at xubuntu:/# dpkg -l | grep grub
ii  grub-common                           2.04-1ubuntu26                             amd64        GRand Unified Bootloader (common files)
ii  grub-efi-amd64                        2.04-1ubuntu26                             amd64        GRand Unified Bootloader, version 2 (EFI-AMD64 version)
ii  grub-efi-amd64-bin                    2.04-1ubuntu26                             amd64        GRand Unified Bootloader, version 2 (EFI-AMD64 modules)
ii  grub-efi-amd64-signed                 1.142+2.04-1ubuntu26                       amd64        GRand Unified Bootloader, version 2 (EFI-AMD64 version, signed)
rc  grub-pc                               2.04-1ubuntu26                             amd64        GRand Unified Bootloader, version 2 (PC/BIOS version)
ii  grub-pc-bin                           2.04-1ubuntu26                             amd64        GRand Unified Bootloader, version 2 (PC/BIOS modules)
ii  grub2-common                          2.04-1ubuntu26                             amd64        GRand Unified Bootloader (common files for version 2)


The /etc/default/grub file is owned by grub-efi-amd64, which is correct:

root at xubuntu:/# ucfq /etc/default/grub
Configuration file                            Package             Exists Changed
/etc/default/grub                             grub-efi-amd64      Yes    Yes


I then purge the grub-pc package, saying no to the "Remove GRUB 2 files?" debconf question:

root at xubuntu:/# apt-get purge grub-pc 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  grub-pc-bin
Use 'sudo apt autoremove' to remove it.
The following packages will be REMOVED:
  grub-pc*
0 upgraded, 0 newly installed, 1 to remove and 4 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
E: Can not write log (Is /dev/pts mounted?) - posix_openpt (19: No such device)
(Reading database ... 254919 files and directories currently installed.)
Purging configuration files for grub-pc (2.04-1ubuntu26) ...
ucfr: Association belongs to grub-efi-amd64, not grub-pc
ucfr: Aborting
ucfr: Association belongs to grub-efi-amd64, not grub-pc
ucfr: Aborting


And then...

root at xubuntu:/# ls -l /etc/default/grub
ls: cannot access '/etc/default/grub': No such file or directory


The purging of grub-pc deleted a config file belonging to a different package, which is not only incorrect behavior, it could potentially leave the system unbootable after the next update-grub(8) invocation.

** Affects: grub2 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: focal

-- 
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/1879466

Title:
  Purging grub-pc package deletes /etc/default/grub file owned by grub-
  efi-amd64

Status in grub2 package in Ubuntu:
  New

Bug description:
  This concerns grub-pc 2.04-1ubuntu26 in Ubuntu focal.

  I have the following packages installed. Note that grub-pc has been
  removed but not yet purged:

  root at xubuntu:/# dpkg -l | grep grub
  ii  grub-common                           2.04-1ubuntu26                             amd64        GRand Unified Bootloader (common files)
  ii  grub-efi-amd64                        2.04-1ubuntu26                             amd64        GRand Unified Bootloader, version 2 (EFI-AMD64 version)
  ii  grub-efi-amd64-bin                    2.04-1ubuntu26                             amd64        GRand Unified Bootloader, version 2 (EFI-AMD64 modules)
  ii  grub-efi-amd64-signed                 1.142+2.04-1ubuntu26                       amd64        GRand Unified Bootloader, version 2 (EFI-AMD64 version, signed)
  rc  grub-pc                               2.04-1ubuntu26                             amd64        GRand Unified Bootloader, version 2 (PC/BIOS version)
  ii  grub-pc-bin                           2.04-1ubuntu26                             amd64        GRand Unified Bootloader, version 2 (PC/BIOS modules)
  ii  grub2-common                          2.04-1ubuntu26                             amd64        GRand Unified Bootloader (common files for version 2)

  
  The /etc/default/grub file is owned by grub-efi-amd64, which is correct:

  root at xubuntu:/# ucfq /etc/default/grub
  Configuration file                            Package             Exists Changed
  /etc/default/grub                             grub-efi-amd64      Yes    Yes

  
  I then purge the grub-pc package, saying no to the "Remove GRUB 2 files?" debconf question:

  root at xubuntu:/# apt-get purge grub-pc 
  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  The following package was automatically installed and is no longer required:
    grub-pc-bin
  Use 'sudo apt autoremove' to remove it.
  The following packages will be REMOVED:
    grub-pc*
  0 upgraded, 0 newly installed, 1 to remove and 4 not upgraded.
  After this operation, 0 B of additional disk space will be used.
  Do you want to continue? [Y/n] 
  E: Can not write log (Is /dev/pts mounted?) - posix_openpt (19: No such device)
  (Reading database ... 254919 files and directories currently installed.)
  Purging configuration files for grub-pc (2.04-1ubuntu26) ...
  ucfr: Association belongs to grub-efi-amd64, not grub-pc
  ucfr: Aborting
  ucfr: Association belongs to grub-efi-amd64, not grub-pc
  ucfr: Aborting

  
  And then...

  root at xubuntu:/# ls -l /etc/default/grub
  ls: cannot access '/etc/default/grub': No such file or directory

  
  The purging of grub-pc deleted a config file belonging to a different package, which is not only incorrect behavior, it could potentially leave the system unbootable after the next update-grub(8) invocation.

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



More information about the foundations-bugs mailing list