Skip to content

Instantly share code, notes, and snippets.

@ajeebkp23
Last active July 31, 2020 12:54
Show Gist options
  • Save ajeebkp23/867294cfb0ca108111b696bed9ccf9b0 to your computer and use it in GitHub Desktop.
Save ajeebkp23/867294cfb0ca108111b696bed9ccf9b0 to your computer and use it in GitHub Desktop.
LiveCdRecovery for apt install and other fixes
# Boot the Ubuntu Live CD.
# https://help.ubuntu.com/community/LiveCdRecovery
# Press Ctrl-Alt-F1
chr=/mnt/
sudo mount /dev/sda1 $chr
sudo mount --bind /dev $chr/dev
sudo mount --bind /proc $chr/proc
sudo mount --bind /sys $chr/sys
# This is needed for connecting to internet.
# If below command fails due to existing files, one should fix by moving/deleting the file.
sudo cp /etc/resolv.conf $chr/etc/resolv.conf
sudo chroot $chr
# >> Inside chroont
apt update
apt upgrade
# << End Inside chroot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment