Ubuntu Pastebin

Paste from jordan at Wed, 2 Aug 2017 01:39:43 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# Don't run this as a script, run each command on its own and don't continue if any fail

# Make a directory to store the packages we'll be re-installing in
mkdir packages_to_install

cd packages_to_install

# Download the two packages that have configuration files in /etc/grub.d/
apt download grub-common
apt download memtest86+

# Rename /etc/grub.d/ as a reversible way to "delete" the files in /etc/grub.d/

sudo mv /etc/grub.d/ /etc/grub.d-backup/

# Re-install the packages passing --force-confmiss so that any missing configuration files (in this case everything in /etc/grub.d/ ) will be replaced with their defaults.

sudo dpkg --force-confmiss -i grub-common*.deb memtest*.deb

# After testing that everything is working fine, you can "rm -ri packages_to_install/" and "sudo rm -ri /etc/grub.d-backup/" to remove the clutter created in following these steps.
Download as text