How can I retreive document files from a broken installation?

I just tried to update. During the update, my screen went black. Tty didnt work; my system appeared unresponsive and after about 5 minutes of hoping it would magically fix itself I tried a hard reboot.

Now I get the grub menu, but it tells me that none of the kernals I have listed work. For example,
‘/boot/vmlibuz-5.8-x86_64’ not found

I tried chroot, following this guide, but it tells me the kernels are already there.

So now I think I may be better off doing a re-installation, but I really need to save my user files (documents, photos, etc.). Can someone please tell me (or direct me to where I can find) how to extract my documents file and save using chroot or some other method when I cannot boot successfully? I tried a search, but have not been able to find that info.

Thanks!

Do it live and mount your ext4 partition where your files are. If the partition wasn’t corrupted, then you should be able to grab whatever you need (I presume from /run/<device>/home/<user>) and nuke it after.

If you don’t have a live session media available (anything will do so long it can mount ext4) then you’ll need another machine or a rooted mobile device to create a USB-bootable copy of a system installation media.

2 Likes

Thank you, I will give this a try!

I did forget to mention something ­If the partition is encrypted, then you’ll have a harder time accessing that data. Not impossible by any means, just mentioning this in advance and praying somebody else with experience accessing encrypted partitions outside of normal operating conditions can cover my ass because I have zero experience with this.

No, I didn’t encrypt it. Thanks for the follow up!

If you use the Manjaro USB stick, mount the partitions and then access /home and write the needed data to an USB stick.

1 Like

Thanks to both of you, I’ve got the files I need!

Next time, have a separate home partition. Separate home means if system goes down, user effects aren’t destroyed and (in theory) you can reinstall the system and re-use that home partition to get back on your feet a bit more quickly.

My personal setup has a really tiny home part because I use ntfs and dual boot, all of my files are kept on an ntfs part and handled via symlinks on the ext4 part.

I feel like I should write a guide about that…

I would read that guide! I have a portable drive for backups but life has been crazy and I got complacent, since it’s been more than a year since my last major screw-up…

Do you just keep a copy of the home drive in that partition, or are you accessing that partition every time you need your home folder stuff?

I access that partition (mounted on startup) every time I want to retrieve a file from my big five. You don’t need that big a home part either if you don’t keep anything important there in the first place!

1 Like

Thanks for the tip!

This took way too long, but here you go — a compendium of the same advice I’ve beeen sharing for half a decade. Enjoy.

It might be a good practice to make a copy of the upgrade logs in your Terminal and save to a text file, so you can use that to fix any borkages (or someone here may be able to assist if you can’t). I routinely do that and it’s saved my bacon on a few occasions.

What I do (I always upgrade using the commandline) is to copy the whole output from e.g. sudo pacman -Syyu and save it to a .txt file in e.g. /DATA/LOGS/System_Upgrade_20200830.txt and then I can access that from a Live session if needed, to find out what went wrong & correct it.

I fixed complete DE borkage that way, by simply re-installing the stuff which the Oracle updater had removed (in 3 stages: core, deps, extras) to fixed a completely borked Plasma desktop environment. So, keeping decent logs is highly recommended.

Also have and maintain remote backups of important files. Good backup strategies (and utilities) are your friend in case of an emergency.

Edited to add:
Make sure you don’t save those logs in an encrypted partition or directory!

Thank you, I will start saving the logs,I appreciate the directions on how to do so!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.