gonzobilbao
November 1st, 2019, 06:14 PM
Hi,
First of all, I am still digging around to solve this so sorry if there is something already. From what I have been searching, nothing so far addresses my problem so I am going ahead and posting a new thread. Any replies are highly appreciated.
I just upgraded from 16.04 to 18.04 via the upgrade tool that comes with ubuntu. I have a dual boot system, EFI, with W10 and Ubuntu. The upgrade went ok for the most part. I got a few grub error messages though. This is what I get when I run sudo dpkg --audit
$ sudo dpkg --audit
The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
grub-efi-amd64-signed GRand Unified Bootloader, version 2 (EFI-AMD64 version,
shim-signed Secure Boot chain-loading bootloader (Microsoft-signed bi
The following packages are only half configured, probably due to problems
configuring them the first time. The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
friendly-recovery Make recovery boot mode more user-friendly
grub-efi-amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 version)
The following packages are only half installed, due to problems during
installation. The installation can probably be completed by retrying it;
the packages can be removed using dselect or dpkg --remove:
linux-image-4.15.0-66-generic Signed kernel image generic
linux-image-4.4.0-165-generic Signed kernel image generic
linux-image-4.4.0-166-generic Signed kernel image generic
linux-image-4.4.0-78-generic Linux kernel image for version 4.4.0 on 64 bit x8
linux-image-extra-4.4.0-78-generic Linux kernel extra modules for version 4.4.
The following packages have been triggered, but the trigger processing
has not yet been done. Trigger processing can be requested using
dselect or dpkg --configure --pending (or dpkg --triggers-only):
initramfs-tools generic modular initramfs generator (automation)
Trying dist-upgrade throws the output:
sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED
linux-image-4.4.0-165-generic linux-image-4.4.0-166-generic
linux-image-4.4.0-78-generic linux-image-extra-4.4.0-78-generic
The following NEW packages will be installed
dwz linux-modules-4.15.0-66-generic
The following packages will be upgraded:
debhelper dh-autoreconf init init-system-helpers iproute2
5 to upgrade, 2 to newly install, 4 to remove and 0 not to upgrade.
9 not fully installed or removed.
Need to get 13.1 MB/22.9 MB of archives.
After this operation, 168 MB disk space will be freed.
Do you want to continue? [Y/n]
Get:1 http://ca.archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-modules-4.15.0-66-generic amd64 4.15.0-66.75 [13.1 MB]
Fetched 13.1 MB in 7s (1,794 kB/s)
Preconfiguring packages ...
(Reading database ... 279807 files and directories currently installed.)
Removing linux-image-4.4.0-165-generic (4.4.0-165.193) ...
W: Last kernel image has been removed, so removing the default symlinks
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.4.0-165-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found Windows Boot Manager on /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for EFI firmware configuration
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 287
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.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-4.4.0-165-generic (--remove):
installed linux-image-4.4.0-165-generic package post-removal script subprocess returned error exit status 1
Removing linux-image-4.4.0-166-generic (4.4.0-166.195) ...
W: Last kernel image has been removed, so removing the default symlinks
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.4.0-166-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found Windows Boot Manager on /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for EFI firmware configuration
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 287
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.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-4.4.0-166-generic (--remove):
installed linux-image-4.4.0-166-generic package post-removal script subprocess returned error exit status 1
Removing linux-image-extra-4.4.0-78-generic (4.4.0-78.99) ...
depmod: FATAL: could not load /boot/System.map-4.4.0-78-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
* dkms: running auto installation service for kernel 4.4.0-78-generic [ OK ]
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-78-generic
WARNING: missing /lib/modules/4.4.0-78-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.4.0-78-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_TIDhJw/lib/modules/4.4.0-78-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_TIDhJw/lib/modules/4.4.0-78-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found Windows Boot Manager on /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for EFI firmware configuration
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 287
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.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-78-generic (--remove):
installed linux-image-extra-4.4.0-78-generic package post-removal script subprocess returned error exit status 1
Removing linux-image-4.4.0-78-generic (4.4.0-78.99) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-78-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found Windows Boot Manager on /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for EFI firmware configuration
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 287
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.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.4.0-78-generic.postrm line 328.
dpkg: error processing package linux-image-4.4.0-78-generic (--remove):
installed linux-image-4.4.0-78-generic package post-removal script subprocess returned error exit status 1
No apport report written because MaxReports has already been reached
Errors were encountered while processing:
linux-image-4.4.0-165-generic
linux-image-4.4.0-166-generic
linux-image-extra-4.4.0-78-generic
linux-image-4.4.0-78-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
More details of my partition table:
sudo parted /dev/sda
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: ATA Crucial_CT750MX3 (scsi)
Disk /dev/sda: 750GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 473MB 472MB ntfs Basic data partition hidden, diag
2 473MB 578MB 105MB fat32 EFI system partition boot, esp
3 578MB 595MB 16.8MB Microsoft reserved partition msftres
4 595MB 104GB 103GB ntfs Basic data partition msftdata
5 104GB 105GB 890MB ntfs hidden, diag
6 105GB 140GB 35.3GB ext4
7 140GB 750GB 610GB ext4
The partition Number 4 is my windows 10 system.
As of now, my systems is not super functional, although I can log in, log out, etc, all that seems to be working fine. Usb devices are not recognized (I guess because they are handled by the kernel).
Any pointers are very welcome. I have tried a few solutions that have seemed to work for others with similar problems. But so far no luck.
Thank you!
First of all, I am still digging around to solve this so sorry if there is something already. From what I have been searching, nothing so far addresses my problem so I am going ahead and posting a new thread. Any replies are highly appreciated.
I just upgraded from 16.04 to 18.04 via the upgrade tool that comes with ubuntu. I have a dual boot system, EFI, with W10 and Ubuntu. The upgrade went ok for the most part. I got a few grub error messages though. This is what I get when I run sudo dpkg --audit
$ sudo dpkg --audit
The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
grub-efi-amd64-signed GRand Unified Bootloader, version 2 (EFI-AMD64 version,
shim-signed Secure Boot chain-loading bootloader (Microsoft-signed bi
The following packages are only half configured, probably due to problems
configuring them the first time. The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
friendly-recovery Make recovery boot mode more user-friendly
grub-efi-amd64 GRand Unified Bootloader, version 2 (EFI-AMD64 version)
The following packages are only half installed, due to problems during
installation. The installation can probably be completed by retrying it;
the packages can be removed using dselect or dpkg --remove:
linux-image-4.15.0-66-generic Signed kernel image generic
linux-image-4.4.0-165-generic Signed kernel image generic
linux-image-4.4.0-166-generic Signed kernel image generic
linux-image-4.4.0-78-generic Linux kernel image for version 4.4.0 on 64 bit x8
linux-image-extra-4.4.0-78-generic Linux kernel extra modules for version 4.4.
The following packages have been triggered, but the trigger processing
has not yet been done. Trigger processing can be requested using
dselect or dpkg --configure --pending (or dpkg --triggers-only):
initramfs-tools generic modular initramfs generator (automation)
Trying dist-upgrade throws the output:
sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED
linux-image-4.4.0-165-generic linux-image-4.4.0-166-generic
linux-image-4.4.0-78-generic linux-image-extra-4.4.0-78-generic
The following NEW packages will be installed
dwz linux-modules-4.15.0-66-generic
The following packages will be upgraded:
debhelper dh-autoreconf init init-system-helpers iproute2
5 to upgrade, 2 to newly install, 4 to remove and 0 not to upgrade.
9 not fully installed or removed.
Need to get 13.1 MB/22.9 MB of archives.
After this operation, 168 MB disk space will be freed.
Do you want to continue? [Y/n]
Get:1 http://ca.archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-modules-4.15.0-66-generic amd64 4.15.0-66.75 [13.1 MB]
Fetched 13.1 MB in 7s (1,794 kB/s)
Preconfiguring packages ...
(Reading database ... 279807 files and directories currently installed.)
Removing linux-image-4.4.0-165-generic (4.4.0-165.193) ...
W: Last kernel image has been removed, so removing the default symlinks
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.4.0-165-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found Windows Boot Manager on /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for EFI firmware configuration
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 287
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.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-4.4.0-165-generic (--remove):
installed linux-image-4.4.0-165-generic package post-removal script subprocess returned error exit status 1
Removing linux-image-4.4.0-166-generic (4.4.0-166.195) ...
W: Last kernel image has been removed, so removing the default symlinks
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.4.0-166-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found Windows Boot Manager on /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for EFI firmware configuration
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 287
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.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-4.4.0-166-generic (--remove):
installed linux-image-4.4.0-166-generic package post-removal script subprocess returned error exit status 1
Removing linux-image-extra-4.4.0-78-generic (4.4.0-78.99) ...
depmod: FATAL: could not load /boot/System.map-4.4.0-78-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
* dkms: running auto installation service for kernel 4.4.0-78-generic [ OK ]
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-78-generic
WARNING: missing /lib/modules/4.4.0-78-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.4.0-78-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_TIDhJw/lib/modules/4.4.0-78-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_TIDhJw/lib/modules/4.4.0-78-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found Windows Boot Manager on /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for EFI firmware configuration
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 287
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.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-78-generic (--remove):
installed linux-image-extra-4.4.0-78-generic package post-removal script subprocess returned error exit status 1
Removing linux-image-4.4.0-78-generic (4.4.0-78.99) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-78-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-78-generic /boot/vmlinuz-4.4.0-78-generic
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found Windows Boot Manager on /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for EFI firmware configuration
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 287
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.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.4.0-78-generic.postrm line 328.
dpkg: error processing package linux-image-4.4.0-78-generic (--remove):
installed linux-image-4.4.0-78-generic package post-removal script subprocess returned error exit status 1
No apport report written because MaxReports has already been reached
Errors were encountered while processing:
linux-image-4.4.0-165-generic
linux-image-4.4.0-166-generic
linux-image-extra-4.4.0-78-generic
linux-image-4.4.0-78-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
More details of my partition table:
sudo parted /dev/sda
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: ATA Crucial_CT750MX3 (scsi)
Disk /dev/sda: 750GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 473MB 472MB ntfs Basic data partition hidden, diag
2 473MB 578MB 105MB fat32 EFI system partition boot, esp
3 578MB 595MB 16.8MB Microsoft reserved partition msftres
4 595MB 104GB 103GB ntfs Basic data partition msftdata
5 104GB 105GB 890MB ntfs hidden, diag
6 105GB 140GB 35.3GB ext4
7 140GB 750GB 610GB ext4
The partition Number 4 is my windows 10 system.
As of now, my systems is not super functional, although I can log in, log out, etc, all that seems to be working fine. Usb devices are not recognized (I guess because they are handled by the kernel).
Any pointers are very welcome. I have tried a few solutions that have seemed to work for others with similar problems. But so far no luck.
Thank you!