Repairing a broken installation¶
There are a few options to recover data and attempt to recover the operating system.
Caution
These instructions are relatively technical in nature and should only be performed by someone comfortable with technical instructions.
Back up any files you need from your device. You can do this by booting Jumpdrive on the phone and copying your files to a Linux PC using the steps below:
Back up important files using Jumpdrive¶
Follow the steps to mount the Librem 5 storage device on another computer.
Try to repair your installation¶
Open a Terminal in the Librem 5 root¶
Use
lsblkto see where the root and boot partitions are mounted. We mounted root above, GNOME probably mounted boot automatically already. On PureOS/Debian, it’ll be something like/media/<user>/<uuid>cdto the root partition. If you list withlsyou should seebin,dev,boot,etcand other directories.
Mount the boot and system directories needed for chroot¶
Bind-mount the boot partition. Use the location found above, and don’t forget the
.in./boot.sudo mount -o bind /media/<user>/<uuid> ./boot sudo mount -o bind /dev ./dev sudo mount -o bind /sys ./sys sudo mount -o bind /proc ./proc
chroot into the installation¶
Install these PureOS/Debian packages if you don’t already have them:
qemu qemu-user-static binfmt-support
chrootinto the phone OS while still in the Librem 5 root directory:sudo chroot .
Check for common problems¶
Important
Execute the following commands inside the chroot.
Check if your boot partition is full. This will sometimes cause an update failure:
df -h /boot
If it has less than 100 MB free space, try to remove dpkg backup initrds:
rm /boot/initrd*.dpkg-bak
Check again:
`df -h /bootIf it still has less than 100 MB free space, try to remove any old kernels. This may remove other unreferenced packages if any exist.
apt autoremove
Try to repair any broken packages:
apt --fix-broken install
Clean up¶
Exit the chroot:
exitWhile still working from within the chroot directory, unmount partitions from the chroot:
sudo umount ./{boot,dev,proc,sys}
Close the terminal tab or window
Unmount the Librem 5 using the eject button in GNOME Files
Unplug the USB-C cable from the Librem 5
Hold the power button on the phone to power off
Try to power on the phone again