Ubuntu stuck on boot in after upgrade to 19.10 from 19.04 in VMware [end kernel panic not syncing: VFS: unable to mount root fs on block (0,0)]
Solution 1:
After a long struggle I have been able to fix this with the help of previous answers and trial and errors. I booted into Advanced mode while booting Ubuntu press F2 when you see grub2 bootloader. On some systems you may need to press Shift to get to advanced boot menu.
In my case since I was in a VMware Workstation environment I pressed Shift or F2 to get to boot menu as shown below
So now you see many kernels are shown I started selecting one by one.One kernel after other and tried booting in some cases I failed and I got the same error message saying kernel panic vfs unable to mount root filesystem could not find (0,0)
The kernel that worked in my case from above entries was
5.0.0-32-generic
The one highlighted in screenshot. I booted it and after I could boot rather than going to GUI or GDM login which will not work.
Switch to a text-based virtual console by pressing (if you are in a virtual machine you may need to press function key on real hardware to get to text based console pressing Fn key is not required)
Ctrl+Alt+Function+F2 or
Ctrl+Alt+Function+F3 upto F12
meaning any of these key combination will give you a tty
Ctrl+Alt+Function+F4
Ctrl+Alt+Function+F5
Ctrl+Alt+Function+F6
Ctrl+Alt+Function+F7
Ctrl+Alt+Function+F8
Ctrl+Alt+Function+F9
Ctrl+Alt+Function+F10
Ctrl+Alt+Function+F11
Ctrl+Alt+Function+F12
Which ever key it gives you a terminal without a GUI press just one of the combinations.
(Just be cautious that in some systems Wi-Fi might get disabled with some function key so leave that combination of function key)
If you are on a real hardware you need to press Ctrl+Alt+ (F1/F2/F3/../../../F10/) (or whichever key works for you, although usually all will work). The GUI though you will get in either Ctrl+Alt+Fn+F1 or Ctrl+Alt+Fn+F5/F6 depending upon which tty is set for default GUI in your case. Since I am on VMware so I had to press Fn key also other wise you don't need to press Fn just a combination of Ctrl+Alt+F1/F2/F3/F4/F5/F6/F7/F8/F9/F10/F11/F12
key will give you required command prompt login.
Then login with your username and password. I was logged into tty6 (Ctrl+Alt+Fn+F6)
As explained on answer here:
update-initramfs -u -k 5.3.0-19-generic (or your version)
If you don't know your version. Use:
dpkg --list | grep linux-image
And just update Grub:
update-grub2
But just this grub update won't work as grub still is not there on hard disk. I am uploading screenshots in my case this command failed also at one or two kernels
dpkg --list | grep linux-image
:
Now without logging in GUI and before a reboot (after doing update-grub2) I did a
dpkg --configure -a
I got following screenshot during grub upgrade
As mentioned in this answer https://askubuntu.com/a/939883/992730
press space to select the desired entry and arrow keys to move up and down.
Now you see even after a update-grub2
command dpkg --configure -a
was required.
Now all the broken dependencies or packages which were being upgraded previously and some how had failed in between due to some error restarted from a point where they should have been continuing.
Then after a reboot I was able to get back a working system 19.10
Here I was finally successful.