Pop! - Use The Recovery Partition Edit on GitHub

The recovery partition on this operating system is a full copy of the Pop!_OS installation disk. It can be used exactly the same as if a live disk copy of Pop!_OS was booted from a USB drive. The existing operating system can be repaired or reinstalled from the recovery mode. This feature is only available on fresh install of Pop!_OS 18.04 and later.

To boot into recovery mode, bring up the systemd-boot menu by holding down SPACE or the ESC key while the system is booting. On the menu, choose Recovery Mode.

systemd-boot

Reinstall

Once the recovery operating system has opened, the Pop Installer will start automatically. If the system needs reinstalled, go ahead and continue the installation steps as demonstrated here.

If files need copied off before reinstall, open the Files program to get access to the existing install. If the existing install is encrypted, please see the encrypted disk instructions below.

Repair

If the existing system needs repaired, then click the Install Pop!_OS in the top left, and choose quit.

To get access to the existing drive to run package manager repair commands, the following commands will need run:

First, press /+T to open a terminal, then type this command:

lsblk

This will show what the main internal drive is named, which will have 4 partitions on it. We will be working with the 3rd partition. If the main drive is an NVMe drive, it will be called /dev/nvme0n1p3 and if the drive is a SATA or regular M.2 drive, it will be called /dev/sda3.

Next, run this command:

sudo mount /dev/sda3 /mnt

If the command fails and says mount: /mnt: unknown filesystem type 'crypto_LUKS', then the hard drive has been encrypted, and additional commands are needed to unlock it.

Encrypted Disk

To get access to an encrypted disk, these additional commands need run to unlock the disk. Please use the lsblk command described above to determine the correct drive and partition.

sudo cryptsetup luksOpen /dev/sda3 volume
sudo lvscan
sudo vgchange -ay

And take note as to what the volume group is called. Substitute the correct info into this next command. Make sure that -root is on the end:

sudo mount /dev/mapper/data-root /mnt

And now the existing hard drive can be accessed by going to the /mnt folder. To use the Files program, go to ‘+ Other Locations’ -> ‘Computer’ and then click on the /mnt folder.

Chroot

chroot is the way to run commands as if the existing operating system had been booted. Once these commands are run, then package manager (apt) and other system level commands can be run.

The EFI partition is usually around 512MB so that would be the partition that we replace in the next command. The Recovery Partition is around 4GB as well.

sudo mount /dev/sda1 /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt

To exit from the chroot and reboot the computer, run these commands:

exit
reboot