Installation Recovery

Installation Recovery

Recover a Kubuntu Focus Installation

All general purpose OSes (Windows, MacOS, Linux) can be changed so that the system will no longer boot completely or behaves strangely. A corrupt or full system disk, broken software packages, misconfiguration, and many other situations can cause this. Luckily, FocusRx recognizes and fixes many of these issues.

Please read the disclaimer before proceeding. This solution is updated regularly. If you have suggestions or requests, please share your thoughts on the Guided Solution Authorship Form.

Limitations

Before you begin proceed, you will first want to 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 Guided Solution 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 proceed 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.

Take a Snapshot with USB Drive

We encourage our customers back-up their data frequently to ensure it is safe. The best way to do this is to adjust the BackInTime settings to use an external disk. If you do this, make sure you adjust the backup filter to allow larger files and test your backups to ensure you capture all the data you need. Another handy technique is to copy your home directory to a USB drive which is described below.

Because of file permissions, you may not be able to copy all files. When this happens, it may be helpful to run Dolphin as root. One can add this capability like so: Click on [Hamburger Menu] > Configure Dolphin… > Services > Download New Services…. Then search for and install "Open Dolphin As Root".

Recover from BusyBox Shell

Sometimes the system will boot but drop to a BusyBox Shell as shown below.

BusyBox v1.30.1 (1:1.30.1-4ubuntu6.3) built-in shell (ash) Enter 'help' for a list of built-in commands. (initramfs) _

This frequently results from a corrupt file system, as detailed by this Ask Ubuntu ticket. The solution is to enter the command exit into the shell to report the corrupt file system. You may then repair it using fsck <device-file> as shown below.

BusyBox v1.30.1 (1:1.30.1-4ubuntu6.3) built-in shell (ash) Enter 'help' for a list of built-in commands. (initramfs) exit The root filesystem on /dev/mapper/vgkubuntu-root requires a manual fsck BusyBox v1.30.1 (1:1.30.1-4ubuntu6.3) built-in shell (ash) Enter 'help' for a list of built-in commands. (initramfs) fsck /dev/mapper/vgkubuntu-root -y fsck from util-linux 2.34 e2fsck 1.45.5 (07-Jan-2020) /dev/mapper/vgkubuntu-root contains a file system with errors, check forced.

After the file system 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.

Fix Your System Using FocusRx

Focus systems have a recovery tool called FocusRx. This can directly resolve many issues:

You can run FocusRx as shown below.

Use a Live USB for Recovery

Use a Live USB for Recovery

Please Download the ISO Disk Image and create a bootable, live USB. Then return here to proceed.

Boot using the USB stick as shown below.

Use chroot to Recover a System

Use chroot to Recover a System

1. Use the live USB to boot into the Try Kubuntu mode.

2. If you do NOT have an encrypted drive, skip to step 3. Otherwise, decrypt it now.

sudo su - # Most root drives will be on this disk, but not always. cryptsetup luksOpen /dev/nvme0n1p3 nvme0n1p3_crypt

3. Mount the partition on /mnt.

# Mount decrypted drive mount /dev/mapper/vgkubuntu-root /mnt # If you disk was not encrypted use this # mount /dev/nvme0n1p2 /mnt

If you haven’t yet backed up your data, please do so NOW! See the Take a Snapshot with USB Drive section above for guidance. You can find your user data under /mnt/home/. While each subsequent step below is usually safe, each brings additional risk because of unknown system state or human error. Better safe than sorry.

4. Mount /boot and efi paritions.

# These will typically be the correct drives, but be careful and test cd mnt mount /dev/nvme0n1p2 boot/ mount/dev/nvme0n1p1 boot/efi

5. Prepare and use chroot.

cd mnt mount -t proc /proc proc mount --rbind /sys sys mount --rbind /dev dev cp /etc/resolv.conf etc/resolv.conf chroot .

6. Once the system has successfully switch to chroot mode, run FocusRx. See the section on FocusRx above for what this fixes.

# Run FocusRx and force full check focusrx -f # IF NEEDED One may also repair /etc/default/grub and run update-grub

See this article for additional details on using chroot

Here are a few more steps you might try if FocusRx does not solve the problem:

If you are still seeing issues, we recommend you contact support@kfocus.org.

Troubleshooting

Content will be added as needed.

Revisions

This is a partial revision history. See the git repository for all entries.

Disclaimer

We 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.

KFocus Logo