sudo apt purge grub-pc grub-common
dpkg: warning: files list file for package 'xserver-xorg-video-ati' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libtotem-plparser18:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'network-manager-pptp-gnome' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libpcap0.8:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'fwupdate' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'gir1.2-totem-plparser-1.0:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libwayland-server0:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'netbase' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libwebp6:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libxklavier16:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libunity-protocol-private0:amd64' missing; assuming package has no files currently installed
(Reading database ... 56174 files and directories currently installed.)
Purging configuration files for grub-pc (2.02~beta3-4ubuntu7.2) ...
dpkg: warning: while removing grub-pc, directory '/etc/kernel/postrm.d' not empty so not removed
dpkg: warning: while removing grub-pc, directory '/etc/kernel/postinst.d' not empty so not removed
Purging configuration files for grub-common (2.02~beta3-4ubuntu7.2) ...
dpkg: warning: while removing grub-common, directory '/etc/pm/sleep.d' not empty so not removed
dpkg: warning: while removing grub-common, directory '/etc/grub.d' not empty so not removed
dpkg: warning: while removing grub-common, directory '/etc/bash_completion.d' not empty so not removed
sudo apt install grub-pc grub-common
Selecting previously unselected package grub-pc.
Preparing to unpack .../4-grub-pc_2.02~beta3-4ubuntu7.2_amd64.deb ...
Unpacking grub-pc (2.02~beta3-4ubuntu7.2) ...
Selecting previously unselected package os-prober.
Preparing to unpack .../5-os-prober_1.74ubuntu1_amd64.deb ...
Unpacking os-prober (1.74ubuntu1) ...
Setting up grub-common (2.02~beta3-4ubuntu7.2) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Setting up grub-pc-bin (2.02~beta3-4ubuntu7.2) ...
Setting up grub2-common (2.02~beta3-4ubuntu7.2) ...
Setting up os-prober (1.74ubuntu1) ...
Setting up grub-pc (2.02~beta3-4ubuntu7.2) ...
dpkg: error processing package grub-pc (--configure):
subprocess installed post-installation script returned error exit status 10
dpkg: dependency problems prevent configuration of grub-gfxpayload-lists:
grub-gfxpayload-lists depends on grub-pc (>= 1.99~20101210-1ubuntu2); however:
Package grub-pc is not configured yet.
dpkg: error processing package grub-gfxpayload-lists (--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
grub-gfxpayload-lists
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo grub-install /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
sudo update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.13.0-36-generic
Found initrd image: /boot/initrd.img-4.13.0-36-generic
Found linux image: /boot/vmlinuz-4.13.0-21-generic
Found initrd image: /boot/initrd.img-4.13.0-21-generic
done
sudo apt update
Hit:1 http://archive.ubuntu.com/ubuntu artful InRelease
Get:2 http://archive.ubuntu.com/ubuntu artful-updates InRelease [78.6 kB]
Hit:3 http://ppa.launchpad.net/dani.behzi/traktor/ubuntu artful InRelease
Hit:4 http://ppa.launchpad.net/rvm/smplayer-qt4/ubuntu artful InRelease
Hit:5 http://archive.ubuntu.com/ubuntu artful-backports InRelease
Get:6 http://archive.ubuntu.com/ubuntu artful-security InRelease [78.6 kB]
Get:7 http://archive.ubuntu.com/ubuntu artful-updates/main amd64 Packages [222 kB]
Get:8 http://archive.ubuntu.com/ubuntu artful-updates/main Translation-en [98.4 kB]
Get:9 http://archive.ubuntu.com/ubuntu artful-updates/universe amd64 Packages [90.6 kB]
Get:10 http://archive.ubuntu.com/ubuntu artful-updates/universe Translation-en [51.9 kB]
Get:11 http://archive.ubuntu.com/ubuntu artful-security/main amd64 Packages [136 kB]
Get:12 http://archive.ubuntu.com/ubuntu artful-security/universe amd64 Packages [46.1 kB]
Fetched 802 kB in 2s (329 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.