HOW TO: Boot Ubuntu Desktop VM in UEFI mode

short-stack

Explorer
Joined
Feb 28, 2017
Messages
80
Please Help!

I'm trying to get this to work on FreeNAS 11.1-U5 (lastest at time of writing) and am following this tutorial that you have so kindly shared. Thank you.

When I run the vm command, I get this error:


root@freenas:~ # vm
/usr/local/sbin/vm: WARNING: $vm_enable is not set properly - see rc.conf(5).
/usr/local/sbin/vm: ERROR: $vm_enable is not enabled in /etc/rc.conf!


I checked my rc.conf and these are the vm related lines:

# open-vm-tools
vmware_guest_vmblock_enable="YES"
vmware_guest_vmhgfs_enable="YES"
vmware_guest_vmmemctl_enable="YES"


Am I missing something here??

Uhhh I wrote this when Corral first came out which had a lot of issues created the disk from the GUI, and in 11.x adding a harddrive from the GUI is no longer an issue. So this is pretty outdated, and I should re-write it so it's current.

For the time being, until I can update this properly, the easiest way to do this now would be to do this:

  • First go under Storage, and create a zvol named whatever is easy to remember, and whatever size you want the harddisk for the VM to be.
  • Go back to the VMs section, and click the VM and then select 'devices' at the bottom.
  • Click Add device
  • For VM: Choose your VM in the drop down
  • For Type: select disk
  • For ZVol: select the zvol you just created
  • For Mode: leave it at AHCI
  • For Disk sectorsize: I just leave it at the default of 0.
Now follow through the rest of what's up above with adding the ISO as a cdrom and installing.

As for the last part regarding the issues with booting, KrisBee has a much simpler solution to using a live cd as a rescue disk here: https://forums.freenas.org/index.php?threads/howto-how-to-boot-linux-vms-using-uefi.54039/
 

gremblin

Dabbler
Joined
Aug 2, 2016
Messages
13
Uhhh I wrote this when Corral first came out which had a lot of issues created the disk from the GUI, and in 11.x adding a harddrive from the GUI is no longer an issue. So this is pretty outdated, and I should re-write it so it's current.

For the time being, until I can update this properly, the easiest way to do this now would be to do this:

  • First go under Storage, and create a zvol named whatever is easy to remember, and whatever size you want the harddisk for the VM to be.
  • Go back to the VMs section, and click the VM and then select 'devices' at the bottom.
  • Click Add device
  • For VM: Choose your VM in the drop down
  • For Type: select disk
  • For ZVol: select the zvol you just created
  • For Mode: leave it at AHCI
  • For Disk sectorsize: I just leave it at the default of 0.
Now follow through the rest of what's up above with adding the ISO as a cdrom and installing.

As for the last part regarding the issues with booting, KrisBee has a much simpler solution to using a live cd as a rescue disk here: https://forums.freenas.org/index.php?threads/howto-how-to-boot-linux-vms-using-uefi.54039/

Thank you @short-stack for the reply! I tried this method first before seeing your post. I was trying your method because I am getting a ACPI Error when trying to install.

1. Followed the above steps
2. Started VM
3. Logged in via VNC Viewer (with medium graphics settings)
4. Select Try Ubuntu (op1) or Install Ubuntu (op2)
5. ACPI Error (same error for both op1 and op2 in step 4)

Error:

[5.097O37] ACPI Error: Could not enable RealTimeClock euent (20170831/evxfevnt-218)
[5.102062] Couldn’t get size: 0x800000000000000e
[5.102078] MODSIGN: Couldn’t get UEFI db list
[5.102091] Couldn’t get size: 0x800000000000000e
[5.102106] Couldn’t get size: 0x800000000000000e


Maybe my disk image is faulty? I am using this version: ubuntu-18.04-desktop-amd64.iso I downloaded from the torrent provided on Ubuntu's website. I'll try a fresh copy and do a direct dl this time.

**EDIT**
I tried a fresh dl of the iso and downloaded direct... same error... but then I let it sit at that screen longer while typing this... and now it's installing! Woah, patience is key here. I guess my CPU is a bit dated.

**EDIT**
Nope still not working. The installer shows the Ubuntu splash screen, but then fails. I get this error:


(initramfs) Unable to find a medium containing a live file system
 
Last edited:

short-stack

Explorer
Joined
Feb 28, 2017
Messages
80
Error:

[5.097O37] ACPI Error: Could not enable RealTimeClock euent (20170831/evxfevnt-218)
[5.102062] Couldn’t get size: 0x800000000000000e
[5.102078] MODSIGN: Couldn’t get UEFI db list
[5.102091] Couldn’t get size: 0x800000000000000e
[5.102106] Couldn’t get size: 0x800000000000000e


—snip—

**EDIT**
I tried a fresh dl of the iso and downloaded direct... same error... but then I let it sit at that screen longer while typing this... and now it's installing! Woah, patience is key here. I guess my CPU is a bit dated.

It’s likely due to Ubuntu 18 on an older version of FreeNAS. What version of FreeNAS are you running? I’ve seen the error on newer version of Debian on older FreeNAS 9.x but when upgraded to the newest version the error went away.


Sent from my iPhone using Tapatalk
 

gremblin

Dabbler
Joined
Aug 2, 2016
Messages
13
It’s likely due to Ubuntu 18 on an older version of FreeNAS. What version of FreeNAS are you running? I’ve seen the error on newer version of Debian on older FreeNAS 9.x but when upgraded to the newest version the error went away.


Sent from my iPhone using Tapatalk

I'm running the latest: FreeNAS 11.1-U5.

I actually got passed that error (see edits above)... now I'm getting a new error:

(initramfs) Unable to find a medium containing a live file system

This is after the Ubuntu installer splash screen. I get this with both the Try Ubuntu (op1) and Install Ubuntu (op2). I tried forcing the zvol size, that didn't make any difference. Not really sure what to try next.

Thank you for your help!
 

gremblin

Dabbler
Joined
Aug 2, 2016
Messages
13
I'm running the latest: FreeNAS 11.1-U5.

I actually got passed that error (see edits above)... now I'm getting a new error:

(initramfs) Unable to find a medium containing a live file system

This is after the Ubuntu installer splash screen. I get this with both the Try Ubuntu (op1) and Install Ubuntu (op2). I tried forcing the zvol size, that didn't make any difference. Not really sure what to try next.

Thank you for your help!

OK!

I had a copy of Ubuntu 16.04.1 on my server and just tried that. That started up into the Try Ubuntu (op1) no problem. Trying the install now.

If this works, I'll try updating to Ubuntu 18 after this installs.
 

short-stack

Explorer
Joined
Feb 28, 2017
Messages
80
OK!

I had a copy of Ubuntu 16.04.1 on my server and just tried that. That started up into the Try Ubuntu (op1) no problem. Trying the install now.

If this works, I'll try updating to Ubuntu 18 after this installs.
Ubuntu 18 has several documented issues with the older FreeBSD kernels.

https://forums.freenas.org/index.php?threads/ubuntu-18-04-boot-to-initramfs.63431/#post-454287

https://forums.freenas.org/index.php?threads/linux-vm-will-not-boot-with-kernel-4-15.63338/

https://forums.freenas.org/index.php?threads/vm-bhyve-and-ubuntu-18-04.63514/


Sent from my iPhone using Tapatalk
 

Teeps

Dabbler
Joined
Sep 13, 2015
Messages
37
Just a follow up here for those who find this thread, like I did, and are worried about issues. I installed Ubuntu 18 desktop edition in a fresh VM on 11.2 and used the LVM encrypted disk options and didn't have a single issue with the install. Everything works perfectly, no tweaks or recovery mode necessary. VirtIO used for disk/network. Bhyve and UEFI.
 
Top