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.