All general purpose OSes (Windows, MacOS, Linux) can be changed so that the system will no longer boot completely or will behave strangely. A corrupt or full system disk, broken software packages, misconfiguration, and many other situations can cause this. Read on to find how you can use FocusRx
and other tools to recover a system.
Please read the disclaimer before proceeding. We review and update guided solutions regularly. If you have suggestions or requests, please write support@kfocus.org.
Before you proceed, first determine if this is actually a system issue. If your system boots fine, this is likely an application issue. We recommend you first visit the Focus Support page and search for a topic using the list or the search box. These are almost always more current and correct for your hardware than HOWTOs or forum posts you might find on the web. You should continue here only if your system does not completely boot or if you are getting warnings about missing dependencies or libraries.
Recovering an installation may be preferable because applications, settings, and other data will not need to be restored. However, like with all OSes, a badly broken system can take hours to recover and still be problematic. While a Clean Install requires recovery of data, it usually takes well under 30 minutes and can solve issues you do not have time to research or understand. For these reasons, we recommend you always keep a clean installation as an alternative and limit the time you dedicate to recovery efforts.
Any system work always has inherent risks. Mistakes happen, and in this context, that can mean data loss. It is important, therefore, to keep your data safe using a backup solution on an external disk. See the Backup Guided Solution to save your data before proceeding if possible.
System Rollback is available on 24.04 LTS (Noble) systems with BTRFS. It may be used to restore system files from a previously saved snapshot. This is particularly useful for recovering from failed software installation or updates. See the Rollback Tool to learn how to create snapshots.
System Rollback may be launched in one of two ways - either through Start Menu > Kubuntu Focus Tools > System Rollback
, or by clicking the System Rollback icon in the system tray. If neither of these items exist, the system does not support System Rollback.
1. Open the drop-down menu of the System Rollback window, and select RESTORE Snapshot
. Then click [OK]
.
2. Select the snapshot you wish to restore and click [OK]
.
3. Ensure all open work on the system has been saved, then click [OK]
to restore the snapshot. You will be prompted for your password. Once you have authenticated, the system will reboot.
4. You will be shown confirmation that the rollback was successful once you are logged in again. Click [OK]
to dismiss the notice, or click [More Info]
for guidance on how to compare the system's restored state to its previous state.
Sometimes the latest version of package has a bug or missing feature that you find unacceptable. When this happens, one may specify a package version, or install a debian package from the archive.
We can use apt-cache policy
to find an older version of a package:
We can use this knowledge to install and hold the earlier version. Notice how we included filezilla-common too, as we discovered this dependency also needed a rollback:
Not all older versions of packages are retained in the repository. For example, google-chrome-stable
does not always show as having an earlier available version. However, you can find and downgrade to an earlier version using the local archives.
Make sure to regularly check and remove holds. Out-of-date packages can cause incompatibilities and even prevent other packages from installing correctly, so do this with care.
Sometimes you just want get rid of all packages and dependencies that come from a repository. ppa-purge
is excellent for this purpose:
ppa-purge
downgrades packages to their version before the repository was added, if possible. Although it was design for PPA repositories, it can also be used for most commercial 3rd-party repositories. See ppa-purge -h
for the switches used in the examples below:
You can learn more with this Linuxize article.
Sometimes the system will boot but drop to a BusyBox Shell as shown below.
This frequently results from a corrupt filesystem, as detailed by this Ask Ubuntu ticket. The solution is to enter the command exit
into the shell to report the corrupt filesystem. You may then repair it using fsck <device-file>
as shown below.
After the filesystem repair is complete, type in reboot
or exit
to reboot the system. If the repair was good (which it usually is), the system should now boot normally.
Focus systems have a recovery tool called FocusRx
which can identify and resolve many issues:
/boot
partition is too full and fix itYou can run FocusRx as shown below.
Advanced Options
to select a different kernel if available.Start Menu > Kubuntu Focus Tools > FocusRx System Repair
.[Ctrl][Alt][F2]
to get a virtual terminal. Sign in as your user and then enter focusrx -f
.If you forget your user password, you can reset it using Recovery Mode if the following conditions are met:
1. If the system is already powered on, shut it down.
2a. Boot the system. If the root filesystem is BTRFS, which is the default in 24.04, you should see a GRUB menu appear shortly after pressing the power button.
2b. If the root filesystem is NOT BTRFS, you will need to make it appear: immediately after the boot logo (like the Kubuntu Focus logo) appears, press right-shift (all models except XE) or escape (XE models). If the boot proceeds to a disk decryption or user login screen, it has gone too far and you will need to reboot to try again. If you press and hold the power button to shut down during boot, this will likely cause the GRUB menu to appear on the next boot. Once you see the GRUB menu, proceed to the next step.
3. When the GRUB menu appears, promptly press the down arrow key to highlight "Advanced Options for Kubuntu" and press Enter.
4. In the next screen, press the down arrow key to highlight the first "(recovery mode)" option shown, then press Enter.
5. If your disk is encrypted, type your passphrase when prompted and press Enter. You cannot access the system if you do not have the disk passphrase.
6. You will see a grey box on a colored background with a list of options. Press the down arrow key to highlight the "root" option and press Enter. Directly below the grey box, you will be prompted to "Press Enter for maintenance". Press Enter.
7. You should now be able to type below the grey box as root. Type sudo mount -o remount,rw /
and then press Enter to enable the ability to change the system.
8. Next, type ls /home
and press Enter to list the users in the /home
directory. Find your username and remember it; it will be required below.
9. Next, type passwd username
, replacing username
with your username from above, and press Enter. You will be prompted to enter your new password twice. Enter the same password each time.
10. Type reboot
and press Enter to perform a normal reboot. After this, you should be able to use your new password to log in.
Again, this procedure only works if the root password is NOT set. In the event you DO have the root password set, things get messier. This method can provide some guidance.
Please Download the ISO Disk Image and create a bootable USB flash drive. Then return here to proceed.
Boot using the USB flash drive as shown below.
F7
to see the BIOS list of bootable disks. If this doesn't work, you might tap F2
or ESC
and select the boot drive in the BIOS. In either case, boot from the USB flash drive. The name of this drive will depend on the brand of drive you use.Start Kubuntu
option.[Try Kubuntu]
and [Install Kubuntu]
options. If this does not occur after 2 minutes, try again with the Start Kubuntu (safe graphics)
option.[Try Kubuntu]
.1. Use the live USB procedure (above) to boot into the Try Kubuntu mode. Then open a Konsole terminal and enter the lines as shown below.
2a. ENCRYPTED DRIVE ONLY: Decrypt the drive and mount the root filesystem.
2b. UNENCRYPTED DRIVE ONLY: Mount the root filesystem.
3. Back up your data.
If you haven’t yet backed up your data, please do so NOW! See Backup for Clean Install to save your important files to a separate drive. You can find your user data under /mnt/home/
. While each subsequent step below is usually safe, each brings additional risk because of an unknown system state or human error. Better safe than sorry.
4. Mount the boot
and boot/efi
filesystems.
5. Set up BTRFS mounts
6. Prepare and use chroot
.
7. Once the system has successfully switched to chroot
mode, you may run FocusRx
(above) to fix packages and other common issues.
8. Here are a few more steps you might try if FocusRx does not solve the problem:
sudo apt update && sudo apt full-upgrade
(this is also done by FocusRx).apt
or aptitude
to inspect, install, or uninstall packages that may have caused the problem. The aptitude
interface will run in a terminal and can be navigated using the keyboard.See this article for additional details on using chroot
.
9. When you are finished fixing the chroot environment, enter exit
into terminal. Close the terminal and restart. If the repairs worked, the system should start as normal.
1. Use the live USB procedure (above) to boot into the Try Kubuntu mode. Then open a Konsole terminal and enter the lines as shown below.
2a. ENCRYPTED DRIVE ONLY: Decrypt the drive and mount the root filesystem.
2b. UNENCRYPTED DRIVE ONLY: Mount the root filesystem.
3. Back up your data.
If you haven’t yet backed up your data, please do so NOW! See Backup for Clean Install to save your important files to a separate drive. You can find your user data under /mnt/home/
. While each subsequent step below is usually safe, each brings additional risk because of an unknown system state or human error. Better safe than sorry.
4a. ENCRYPTED DRIVE ONLY: Mount the boot
and boot/efi
filesystems.
4b. UNENCRYPTED DRIVE ONLY: Mount the boot/efi
filesystem.
5. Prepare and use chroot
.
6. Once the system has successfully switched to chroot
mode, you may run FocusRx
(above) to fix packages and other common issues.
7. Here are a few more steps you might try if FocusRx does not solve the problem:
sudo apt update && sudo apt full-upgrade
(this is also done by FocusRx).apt
or aptitude
to inspect, install, or uninstall packages that may have caused the problem. The aptitude
interface will run in a terminal and can be navigated using the keyboard.See this article for additional details on using chroot
.
8. When you are finished fixing the chroot environment, enter exit
into terminal. Close the terminal and restart. If the repairs worked, the system should start as normal.
Content will be added as needed.
This is a partial revision history. See the git
repository for all entries.
2024-06-05 461bd00f
Update for Noble2024-03-18 fb9b592d
Add syntax highlighting for codeblocks2023-11-18 e770b1c6
Add search and help bar2023-01-25 5a05a952
Content fixes2022-10-20 9fa483fa
Clarify chroot section2022-07-06 7c6e13f5
Update for 22.04 images2022-01-22 97da7ffe
Reference USB snapshot in backup article2021-10-10 5728326e
Reformat to 2-column2021-09-22 dc862884
Update link and headline colors2021-08-23 681261b4
Review and update codeblocks2021-08-22 c1974de6
Add CHROOT Recovery Steps2021-08-22 c1974de6
Add USB Drive Snapshot2021-08-19 20a66a1c
Add Busybox Shell Recovery2021-08-05 c25e459e
Fix Grammar Mistakes2021-07-23 9e6157ce
Add FocusRx Direction2021-05-17 c75588e9
First publicationWe try hard to provide a useful solution validated by professionals. However, we cannot anticipate every situation, and therefore cannot guarantee this procedure will work for your needs. Always backup your data and test the solution to determine the correct procedure for you.
THIS SOLUTION IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOLUTION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
HAVE QUESTIONS?Call 844-536-2871 or write
TellMeMore@kfocus.org | GET FOCUS MERCH