upgrade error 16.04 ubuntu

Asked by Henry Folorunsho

tried to upgrade from terminal, but getting error message saying

henry@polaris:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 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 linux-image-4.4.0-24-generic (4.4.0-24.43) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
initrd.img(/boot/initrd.img-4.4.0-24-generic
) points to /boot/initrd.img-4.4.0-24-generic
 (/boot/initrd.img-4.4.0-24-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.4.0-24-generic.postinst line 491.
vmlinuz(/boot/vmlinuz-4.4.0-24-generic
) points to /boot/vmlinuz-4.4.0-24-generic
 (/boot/vmlinuz-4.4.0-24-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.4.0-24-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-24-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-24-generic /boot/vmlinuz-4.4.0-24-generic
Searching for GRUB installation directory ... found: /boot/grub
/etc/default/grub: line 20: syntax error near unexpected token `grub-pc'
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-24-generic.postinst line 1052.
dpkg: error processing package linux-image-4.4.0-24-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-24-generic:
 linux-image-extra-4.4.0-24-generic depends on linux-image-4.4.0-24-generic; however:
  Package linux-image-4.4.0-24-generic is not configured yet.

dpkg: error processing package linux-image-extra-4.4.0-24-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-4.4.0-24-generic; however:
  Package linux-image-4.4.0-24-generic is not configured yet.
 linux-image-generic depends on linux-image-extra-4.4.0-24-generic; however:
  Package linux-image-extra-4.4.0-24-generic is not configured yet.

dpkg: error processing package linux-image-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent cNo apport report written because the error message indicates its a followup error from a previous failure.
                                                             No apport report written because the error message indicates its a followup error from a previous failure.
       No apport report written because MaxReports is reached already
                                                                     onfiguration of linux-generic:
 linux-generic depends on linux-image-generic (= 4.4.0.24.25); however:
  Package linux-image-generic is not configured yet.

dpkg: error processing package linux-generic (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-4.4.0-24-generic
 linux-image-extra-4.4.0-24-generic
 linux-image-generic
 linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

Quote from your output:
Searching for GRUB installation directory ... found: /boot/grub
/etc/default/grub: line 20: syntax error near unexpected token `grub-pc'
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2

Please provide the output of

cat -n /etc/default/grub

Revision history for this message
Henry Folorunsho (henryxav) said :
#2

 1 # If you change this file, run 'update-grub' afterwards to update
     2 # /boot/grub/grub.cfg.
     3 # For full documentation of the options in this file, see:
     4 # info -f grub -n 'Simple configuration'
     5
     6 GRUB_DEFAULT=0
     7 GRUB_HIDDEN_TIMEOUT=0
     8 GRUB_HIDDEN_TIMEOUT_QUIET=true
     9 GRUB_TIMEOUT=10
    10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
    11 GRUB_CMDLINE_LINUX_DEFAULT="i8042 reset quiet splash"
    12 GRUB_CMDLINE_LINUX=""
    13
    14 # Uncomment to enable BadRAM filtering, modify to suit your needs
    15 # This works with Linux (no patch required) and with any kernel that obtains
    16 # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
    17 #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
    18
    19 # Uncomment to disable graphical t
    20 erminal (grub-pc only)
    21 #GRUB_TERMINAL=console
    22
    23 # The resolution used on graphical terminal
    24 # note that you can use only modes which your graphic card supports via VBE
    25 # you can see them in real GRUB with the command `vbeinfo'
    26 #GRUB_GFXMODE=640x480
    27
    28 # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
    29 #GRUB_DISABLE_LINUX_UUID=true
    30
    31 # Uncomment to disable generation of recovery mode menu entries
    32 #GRUB_DISABLE_RECOVERY="true"
    33
    34 # Uncomment to get a beep at grub start
    35 #GRUB_INIT_TUNE="480 440 1"

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#3

It seems that something went wrong when editing the grub configuration file.

Open a terminal window and issue the command

sudo gedit /etc/default/grub
You will be asked for your password as confirmation for an administrative action, and then an editor with the grub configuration file will be opened.

Scroll down to line 20 and join lines 19 and 20 into a single line, changing it from

# Uncomment to disable graphical t
erminal (grub-pc only)

into

# Uncomment to disable graphical terminal (grub-pc only)

Then save the file and close the editor.

Finally re-issue the upgrade command end report the result.

Revision history for this message
Henry Folorunsho (henryxav) said :
#4

Thank you
SOLVED