Ubuntu Unleashed 2019 Edition: Covering 18.04, 18.10, 19.04

(singke) #1

There will come a time when you need to engage in system rescue efforts.
This need arises when the system will not even start Linux so that you can
recover any files. This problem is most frequently associated with the boot
loader program or partition table, but it could be that critical system files have
been inadvertently deleted or corrupted. If you have been making backups
properly, these kinds of system failures are easily, though not quickly,
recoverable through a full restore. Still, valuable current data might not have
been backed up since the last scheduled backup, and the backup archives may
be found to be corrupt, incomplete, or missing. A full restore also takes time
you might not have. If the problem causing the system failure is simply a
damaged boot loader, a damaged partition table, a missing library, or
misconfiguration, a quick fix can get the system up and running, and the data
can then be easily retrieved.


In this section, you learn a couple of quick things to try to restore a broken
boot loader or recover your data when your system fails to boot.


The Ubuntu Rescue Disc


The Ubuntu installation DVD (or an installation USB drive) works quite well
as a live DVD. To use it, insert the disc and reboot the computer, booting
from the DVD just as you did when you installed Ubuntu originally and ran it
from the DVD.


Restoring the GRUB2 Boot Loader


The easiest way to restore a broken system’s GRUB2 files is simply to replace
them. Your best bet is to use installation media from the same release as what
you have installed on the hard drive.


To get started, boot using the live DVD and open a terminal. Then determine
which of the hard drive’s partitions holds the Ubuntu installation, which you
can discover by using the following:


Click here to view code image
matthew@seymour:~$ sudo fdisk –l


You may find this block ID command useful, as it tends to return a bit more
information:


Click here to view code image
matthew@seymour:~$ sudo blkid


Unless you customized your installation—in which case you probably already

Free download pdf