-1

After updating to Ubuntu 23.10 the Grub Customizer stopped working and since I have heard bad things about it I decided to just remove it. I tried removing it and cleaning up duplicated menu items on Grub2 and now when I use sudo apt-get upgrade I receive the following error. I am still able to successfully boot into Ubuntu and Windows, but would like to get the error resolved and my bootloader cleaned up. Thanks in advance!

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  gir1.2-mutter-13 libmutter-13-0 libpulse-mainloop-glib0 libpulse0
  mutter-common mutter-common-bin snapd
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up grub-pc (2.12~rc1-10ubuntu4) ...
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Script `/boot/grub/grub.cfg.new' contains no commands and will do nothing
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
dpkg: error processing package grub-pc (--configure):
 installed grub-pc package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of grub2:
 grub2 depends on grub-pc (= 2.12~rc1-10ubuntu4); however:
  Package grub-pc is not configured yet.

dpkg: error processing package grub2 (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. Errors were encountered while processing: grub-pc grub2 E: Sub-process /usr/bin/dpkg returned an error code (1)

EDIT: I have tried the provided answers with apt-get clean and apt-get install -f and continue to receive the same error.

  • /boot/grub/grub.cfg.new says there is a typo some where, so grub-update is not completed. I forgot an closing } in 40_custom and it said error was on last line when actually in the middle. It also can be in /etc/default/grub or any of the scripts that customizer changed. If you have not done much editing of grub, you can just do a total reinstall to grub. You show grub-pc, that is for BIOS based systems, but since 2012 systems have been UEFI with gpt partitioning and grub-efi-amd64. So be sure to reinstall correct version of grub. sudo grub-install if in your install. – oldfred Mar 27 '24 at 14:25
  • Running the grub installer again completes successfully without providing an option to choose a version. I still receive the same error when running apt-get upgrade. – LastBucsfan Mar 27 '24 at 14:45
  • Comments here may be helpful https://askubuntu.com/q/1495675/243321 – Organic Marble Mar 27 '24 at 14:52
  • Some recovery instructions here (untested by me) https://forum.endeavouros.com/t/faq-why-you-should-not-use-grub-customizer/37844 – Organic Marble Mar 27 '24 at 14:59
  • Total reinstall of grub should have replaced everything. But do you still have proxy scripts in /etc/grub.d? This should show details. Please copy & paste the pastebin link to the BootInfo summary report ( do not post report), do not run the auto fix till reviewed. Use often updated ppa version with your USB installer or any working install over somewhat older ISO. https://help.ubuntu.com/community/Boot-Repair & https://sourceforge.net/p/boot-repair/home/Home/ If running Boot-Repair for fix only use Advanced mode and choose total reinstall & new kernel to reset everything. – oldfred Mar 27 '24 at 16:40
  • It's not that these comments are not helpful, but I'm not sure I have the time to go through it properly. Is there way to run the 23.10 upgrade again now that I've removed grub customizer?Or can someone give me a more step by step command to clean this up? – LastBucsfan Mar 27 '24 at 22:12

0 Answers0