Score:0

Unable to boot Ubuntu 18.04 , kernel panic, trying to upgrade nvidia drivers, recovery mode fails - how to get to terminal?

je flag

My desktop machine is unable to boot. I strongly suspect it is related to nvidia driver issues, I would love to get to a console so I can nuke it from the system and see if I can boot again.

This started when I was trying to upgrade my linux drivers by running command: sudo ubuntu-drivers autoinstall

After that, I was unable to login to my account, where I would constantly get directed back to the login screen after entering my password.

After failing to boot, I went to advanced mode and had the option of 4.15.0-96-generic or 4.15.0-91-generic. (see https://i.stack.imgur.com/4jGbe.jpg)

I booted into recovery mode with 4.15.0-91-generic, and after following another post was able to get the machine to boot with:

  • sudo apt-get remove --purge "nvidia-*"
  • update-initramfs -u -k 4.15.0-91-generic
  • update-grub

This let me login and get to my desktop, but it was running in resolution 1024X768 resolution on my 4k monitor, which wasn't usable. I rebooted, and now I can't get any of the options to work.

Working through them in order:

  • 4.15.0-96-generic (both) fail with: Kernel panic - not syncing: VFS: Unable to mount fs on unknown-block(0,0). (see https://i.stack.imgur.com/6Lqcl.jpg) From what I can tell, when you see this the best option is to try the other kernels listed.

  • 4.15.0-91-generic now gets stuck booting to recover mode at: "[ OK ]: AppArmor initialiation" or "[ OK ] Started Network Time Synchronization". (see https://i.stack.imgur.com/krjDV.jpg) This was how I was able to run the update-initramfs command earlier, and now it's not responding to Alt+Shift+F3 to bring me to console

  • 4.15.0-91-generic (recovery mode) lets me decrypt my drives, and then ends in a series of black flashing screens. I suspect this is nvidia related based on what I have read.

Does anyone have any thoughts?

As best as I can tell, I may want to update grub so that it uses 4.15.0-91-generic (currently initrd.img-4-15-0-96-generic, see https://i.stack.imgur.com/epXlv.jpg) and replacing quiet splash with nomodeset to try to get to a terminal.

I'm partially basing this on another post, but I'm not sure how to do this with kernel problems as I'm dealing with nvidia problems and I really don't want to make this worse.

Thank you!

oldfred avatar
cn flag
Do you have good backups. Critical with encrypted installs. If installing new or changed nVidia driver, you must purge first or you get conflicts. Are you not able to use recovery mode with all the available kernels? And then you may need to update all kernels. `sudo update-initramfs -k all -c` See also `man update-initramfs`
flanders9er avatar
je flag
Thanks! I don't have good backups, unfortunately. I was just setting up my NAS this week :( I can't get to recovery mode with any of them, I described above what I am seeing. The oldest kernel is stuck in a black screen loop.
oldfred avatar
cn flag
Priority needs to be backup. You can use live installer to mount, decrypt & load your volumes. Then at least copy all your data. Better to have included list of installed apps, but I am not sure that works from chroot. https://help.ubuntu.com/community/ManualFullSystemEncryption/Troubleshooting & For mounting encrypted see first few lines: https://askubuntu.com/questions/262211/how-do-i-resize-an-encrypted-lvm-to-install-another-copy-of-ubuntu & https://askubuntu.com/questions/63594/mount-encrypted-volumes-from-command-line
flanders9er avatar
je flag
That's fantastic, appreciate it. I'll give it a shot and report back, thank you.
flanders9er avatar
je flag
Sorry, dumb question. Does the live installer need to be the same version of Ubuntu? Can 22.04 live usb work to decrypt data from 18.04?
oldfred avatar
cn flag
It should. I always like to have a live installer of every version I have installed. But I directly boot ISO using grub2's loopmount. And now upgraded from one of my many flash drives to an SSD which it almost as fast as my internal drives.
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.