Ubuntu Server 17.10.1 fails on boot with 'end Kernel panic - not syncing: VFS: unable to mount root

Status
Not open for further replies.

Joe Fenton

Dabbler
Joined
May 5, 2015
Messages
40
Ok, went back, ran the command to re-install. This also installed kernel 39. Generally seemed to proceed without much issue, just a few warnings that didn't look bad.
When that completed, I ran update-grub. Then I removed everything from /boot/efi/EFI/BOOT and ran the grub-install command as described. This displayed:
upload_2018-4-23_18-2-23.png


I then reverted the resolv.conf change and rebooted. I now still have an issue where I just get the grub prompt, with the same error I posted above about no such device...
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
That grub2 error message inidcates an EFI problem. As that grub-install command failed, I would in rescue mode delete the "/boot/efi/EFI/BOOT" directory, be careful to leave /boot/efi/EFI/ubuntu in place.

I would hope when booting the VM you would now be dropped to the EFI shell and exiting from there you can use the EFI boot manager screen to get your VM booted.

Although from grub2, it is supposed to handle having /boot inside a LVM, I'm wondering if this works OK when using EFI. I make little use of LVM in general, and certainly keep the partition layout as simple as possible when using bhyve.

If you can get your VM booted as I just described, you should be able to use that special grub-install command as root. If it then fails, then it would seem having /boot inside the LMV is not such a good idea.
 
Last edited:

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
OK, rather than being guilty of assuming what works in Ubuntu 16 LTS also works in Ubuntu 17, I tested it myself. Firstly, if you choose to force EFI install after selecting the "guided whole disk + LVM" layout option, Ubuntu 17 should boot post install without further intervention. In rescue mode there is an option to "Force GRUB installation to the EFI removable media path" , but this fails with an error - see attached images. So that special grub-install command does not work in Ubuntu 17, as you have found.

If the contents of /boot/efI/EFI/BOOT are removed and you then have to boot the VM from the UEFI shell, you need to install grub to your VM's disk again and update grub to restore EFI booting.

grub-install /dev/sda followed by update-grub
 

Attachments

  • u4.jpeg
    u4.jpeg
    22.2 KB · Views: 466
  • u5.jpeg
    u5.jpeg
    12.8 KB · Views: 431

Joe Fenton

Dabbler
Joined
May 5, 2015
Messages
40
Boot the VM from the UEFI shell? Do you mean boot from file, then pick and .efi file to load? Which one?
 

Joe Fenton

Dabbler
Joined
May 5, 2015
Messages
40
Nevermind, I just booted the CD again. Removed /boot/efI/EFI/BOOT contents, and ran those 2 grub commands. It now finally boots! Thanks so much. Wish I could buy you a beer or several!
 

Joe Fenton

Dabbler
Joined
May 5, 2015
Messages
40
Saying that, my DNS is still broken. Can't get apt update to work without adding a manual 8.8.8.8 nameserver. Odd one
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
never mind, I just booted the CD again. Removed /boot/efI/EFI/BOOT contents, and ran those 2 grub commands. It now finally boots! Thanks so much. Wish I could buy you a beer or several!

We got there in the end. If I 'd had my brain fully in gear, it wouldn't have taken so long. Don't forget to at least snapshot your working VM.

Saying that, my DNS is still broken. Can't get apt update to work without adding a manual 8.8.8.8 nameserver. Odd one

I presume you checked /etc/resolv.conf is still a symlink to /run/resolvconf/resolv.conf. Are you using DHCP or had you given your VM a static IP? The later is preferable. If you haven't done so already, I would configure a static IP . For example, see here:

https://askubuntu.com/questions/766131/set-static-IP-ubuntu-16-04

Note the answers and particularly the part about flushing the old IP before restarting the network service which avoids the need to reboot.

It seems odd that default disk layout in Ubuntu 17 places /boot inside the LVM then allows the install to force EFI installation to create the necessary ESP EFI partition, but provides a none working option in rescue mode for this type of disk layout.

Ubuntu 18 LTS is supposed to be released in a couple of days, I'd be interested to see what the install options are.
 

Joe Fenton

Dabbler
Joined
May 5, 2015
Messages
40
It's all a bit of a minefield to me. The learning curve of all this has been a bit steep!
I still have the symlink to the resolvconf. I don't think I had a static IP setup (but it always used the same address on my system with DHCP anyway). The file to edit on that link only had an entry for the local loop. I added the suggested entries including nameservers. Then I flushed and tried to restart the networking.service, but that fails, saying it is not found. I then restarted to try it that way. It still seems my DNS is broken, yet I can ping IP addresses!
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
You've certainly been thrown into the deep end !

It still seems my DNS is broken, yet I can ping IP addresses

Your VM doesn't need name resolution to work in order to ping a valid numerical IP address, it's name resolution which translates 8.8.8.8. to google.com for example.

The file to edit on that link only had an entry for the local loop

OK, that one's my mistake, I'd forgotten Ubuntu17 had completely changed the method of network configuration to a cloud style mechanism. This ref explains it:

https://websiteforstudents.com/configuring-static-ips-ubuntu-17-10-servers/

It's another reason why I've stuck to using debian. You should restore /etc/network/interfaces to its original contents.

Code:
root@ubuntu-vm:~# cat /etc/network/interfaces
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)																						
# Generated by debian-installer.																															 
																																							 
# The loopback interface																																	 
auto lo																																					  
iface lo inet loopback																																		
root@ubuntu-vm:~#
 
Last edited:

Joe Fenton

Dabbler
Joined
May 5, 2015
Messages
40
Deep end indeed. It's been a gradual one with Freenas alone, and then I opened up Ubuntu into the mix, and picked the wrong version it seems! :)

I reverted interfaces back and followed those instructions. As I kind of expected, it didn't work. I think there's something else wrong I now need to diagnose. Since this is a Freenas forum though and I've troubled you enough, I'll see what I can find on this next issue via google and the forums. Thanks!
 
Status
Not open for further replies.
Top