1

I have a weird problem with my new computer.

I have built a pc using new pieces, and a friend’s GPU. After installing successfully ubuntu 18.04.2 LTS on a 480GB SSD (with a UEFI partition), it worked fine for a few weeks. But two days ago, I had to shut down my computer after a freeze, and I pressed the physical button for 5 seconds (I know I shouldn’t have done that, should have used SysRq + s e i u b instead), but now, I can’t boot anymore. I can access GRUB, but both kernels 4.18.0-18-generic and 4.18.0-17-generic give this output (cf. image):

end Kernel panic – not syncing: Attempting to kill init! exitcode=0x00000004

But I was able to use my system from a live session by following this method but when I am using simple linux commands like “apt”, “apt-get”, “wget”, "vim", and others, I immediately get this error : Segmentation fault (core dumped).

I removed the last things I installed by using dpkg, but I have noticed a strange thing : the /var*/*lib/dpkg/status file is corrupt ! There are dozens of lines containing unreadable characters. Maybe some other system files are corrupt and as a result some commands are unusable. This may have appeared after the forced shutdown...

One more thing : the diks utility from the live-session says “Disk is OK, 370 bad sectors”, but as I’ve said, my SSD is brand new.

dmesg gives this output when I'm typing apt or vim :

[ 2018.144843] apt[5272]: segfault at 0 ip 00007f4681623940 sp 00007ffe60d5d308 error 6 in libapt-private.so.0.0.0[7f46815f0000+60000]

[ 2018.144853] Code: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <00> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

I think the only way to make it work is to reinstall Ubuntu, but I would like to know if there is another way to recover it, and why has this issue appeared after a forced shutdown.

This is the second time I'm getting problems after a forced shutdown, the first time was just after the first installation, and I had to install ubuntu one more time.

What I’ve done so far :

ran fsck from a live session (had to fix some errors)

managed (I don't know how) to boot in a command-line session, but not in a graphic session -> same Segmentation faults with basic commands

Here’s my hardware (I bought every piece few weeks ago, except the GPU) :

CPU : Intel core i5 8400

Motherboard : MSI Z390-A PRO

BIOS : 7B98v15

PSU : be quiet! System Power 9 400W

SSD : Kingston UV500 (480g, M.2 Connector 2280)

GPU : Gigabyte RX 460 4gb OC

Monitor : LG 24mp58vq

RAM : 2x8g Corsair Vengence 3000mHz (running at 2933) (I had to change it two weeks ago because my pc wouldn't turn on)

System : Ubuntu 18.04.2 LTS

Thank you

EDIT : after reinstalling libapt-pkg using dpkg and replacing the dpkg status file by an older copy of it, apt update works again but gives the error

E: Method http has died unexpectedly!
E: Sub-process http received a segmentation fault.
E: Method /usr/lib/apt/methods/http did not start correctly

Well I guess some files are still corrupt

Sim0mo
  • 29

1 Answers1

0

The reason this may have happend is that the is may have been running a process in the background that held up resources that meant your UI and other processes couldn't updated until that process had finished and when you did the forced shutdown what ever the process that caused the system to freeze had opened were made corrupt.

The best way I can suggest to attempt to fix this is to install Ubuntu onto a USB stick and boot in from that. Once you're on that you should be able to reinstall the ununtu-core on your SSD partition. It may not fix all your issues but should give you back full terminal access.

  • ok thank you for your answer... do you know how I can reinstall the ubuntu-core without losing data from the live-session ? apt and other commands are still broken when I do a chroot – Sim0mo May 04 '19 at 17:03