Last active
July 31, 2020 12:54
-
-
Save ajeebkp23/867294cfb0ca108111b696bed9ccf9b0 to your computer and use it in GitHub Desktop.
LiveCdRecovery for apt install and other fixes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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