Two days ago I stupidly deleted something in my usr directory on my laptop by accident. I panicked and then after a bit of googling I used testdisk to try and bring my files back (I’m not sure if this worked to be honest). Then I rebooted and found out I can’t boot into my file system. When I turn on my computer I just get the Lenovo boot menu but I can’t actually boot into anything unless I use my EOS live USB.
I tried to follow the “repair non-booting GRUB” tutorial on Discovery which led me to the arch chroot tutorial, but I can’t mount the ESP (“can’t read superblock on /dev/sda1”).
I Google this and run dosfsck and fsck. I get “Both FATs appear to be corrupt”. I haven’t done anything beyond this because I don’t exactly know what I’m doing and I’m scared of messing up my system. Anyone can help? I can provide screenshots etc. I don’t want to do a complete reinstall because I think the ext4 system is fine and don’t want to lose my files, but I don’t know what to do with my files if I can’t boot normally.
Since we don’t know what you did either, best advise is to reinstall and stop doing things as root
Obviously it’s not the best thing but see above (about not knowing what you did).
Edit: I did think of something…you could boot off alternate media, arch-chroot, and reinstall the base packages manually (someone else will have to provide the package names), at least the advantage of this approach wouldn’t end up losing your home directory files unless you fried them too.
I actually think this is my best course of action right now and was thinking about it last night. The issue is that I don’t know exactly how this works (how am I going to reinstall when the partition I’m going to install over is currently filled with the files I want to keep??)
I actually don’t know what the difference is. How can I tell which one I was using? Will edit this post soon with screenshots from my laptop.
To arch-chroot you just need to be booted on the live ISO. You have to mount the / partition first and then mount the /efi partition. If any one of these commands fails please stop there and let me know.
sudo mount /dev/sda2 /mnt
sudo mount /dev/sda1 /mnt/boot/efi
sudo arch-chroot /mnt
Edit: All commands work then check
Edit: You didn’t answer my question is it installed with grub or systemd boot?
I’m still getting the same message. I know that /dev/sda1 is pretty corrupted according to the partition manager. arch-chroot works fine. If you don’t have any more suggestions then I may try to reinstall. Thanks for working with me