Score:0

Is it possible to recover ubuntu 20.04?

dk flag

Somehow I ended with an unbootable system. I traced the problem to my /lib folder and possibly to other system folders

I currently have this ls -lsha lib lib32 lib64 libx32 usr/lib32/ usr/lib64 usr/libx32/

ubuntu@ubuntu:/media/ubuntu/8e5c9899-7541-4ab3-9577-27efa7337808$ ls -lsha lib lib32 lib64 libx32 usr/lib32/ usr/lib64 usr/libx32/
   0 lrwxrwxrwx 1 root root    9 Jun  4  2020 lib32 -> usr/lib32
   0 lrwxrwxrwx 1 root root    9 Jun  4  2020 lib64 -> usr/lib64
   0 lrwxrwxrwx 1 root root   10 Jun  4  2020 libx32 -> usr/libx32

lib:
total 12K
4.0K drwxr-xr-x  3 root root 4.0K May 14 16:22 .
4.0K drwxr-xr-x 22 root root 4.0K Jul  6 23:26 ..
4.0K drwxr-xr-x  3 root root 4.0K Feb 26  2020 terminfo

usr/lib32/:
total 8.0K
4.0K drwxr-xr-x  2 root root 4.0K Apr 23  2020 .
4.0K drwxr-xr-x 14 root root 4.0K Apr 23  2020 ..

usr/lib64:
total 8.0K
4.0K drwxr-xr-x  2 root root 4.0K Jan 27 16:29 .
4.0K drwxr-xr-x 14 root root 4.0K Apr 23  2020 ..
   0 lrwxrwxrwx  1 root root   32 Dec 16  2020 ld-linux-x86-64.so.2 -> /lib/x86_64-linux-gnu/ld-2.31.so

usr/libx32/:
total 8.0K
4.0K drwxr-xr-x  2 root root 4.0K Apr 23  2020 .
4.0K drwxr-xr-x 14 root root 4.0K Apr 23  2020 ..

My libs folders are empty.

When I try to boot I get this end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100

I'm guessing the only solution is to reinstall the system. Am I correct?

My system partition is OK, I think. As well as my home partition. I ran fsck with no problem.

ubuntu@ubuntu:~$ sudo fsck -f /dev/sda5
fsck from util-linux 2.34
e2fsck 1.45.5 (07-Jan-2020)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda5: 781569/3751936 files (0.3% non-contiguous), 9781643/15000064 blocks
ubuntu@ubuntu:~$ sudo fsck -f /dev/sda6
fsck from util-linux 2.34
e2fsck 1.45.5 (07-Jan-2020)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda6: 628676/3751936 files (0.6% non-contiguous), 9520496/15000064 blocks

I also executed boot-repair and I got this link https://paste.ubuntu.com/p/4CG9s4R9Dr/

Any help will be appreciated.

Is there any way to recover the missing system files?


FWIW I think the culprit was a bad Debian package I built myself or the checkinstall program for that matter when I was compiling emacs.

ubuntu@ubuntu:/media/ubuntu/8e5c9899-7541-4ab3-9577-27efa7337808/usr/local/emacs$ ls -lsha backup-070620211826-pre-emacs-27.2-custom.tgz 
30M -rw-r--r-- 1 root root 30M Jul  6 23:26 backup-070620211826-pre-emacs-27.2-custom.tgz

It has the same contents I have in my /lib folder.

cc flag
lib32 and libx32 are empty (usually), lib64 just has a link (like you have but probably linked to your running system, with a good /lib). /lib is missing everything except the one terminfo directory. Backup your files and reinstall is probably the easy way out.
Score:0
cn flag

The first thing that came to mind was to: Install a 2nd OS on the same partition, so it overwrites the bootloader, but that was right after I read that the sys is unbootable.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.