Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save rhaleblian/44f2cb4418ee978603dc0b15dadf0e02 to your computer and use it in GitHub Desktop.
Save rhaleblian/44f2cb4418ee978603dc0b15dadf0e02 to your computer and use it in GitHub Desktop.
Installing Ubuntu Server in VMware Fusion Tech Preview during Bad Kernel Week

Audience

Follow-up to https://communities.vmware.com/t5/Fusion-for-Apple-Silicon-Tech/Unable-to-launch-a-VM-after-fresh-install-with-latest-technology/m-p/2900760# and related threads.

The 22H2 release of Tech Preview claims to fix the problem.

Workflow

  1. from https://ubuntu.com/download/server/arm download 20.04.4 LTS.

  2. Make the new VM as usual, EXCEPT say that you want to change the VM settings. The settings dialog will appear. Disconnect the networking adapter.

  3. Continue with the installation. The cloud-init step will take a while then continue. Some installation screens will be missing. The install itself will be deceptively[1] quick.

  4. Reboot when instructed. The boot sequence will get stuck consulting the network. Go into the settings and turn the networking adapter back on.

  5. The startup will continue and you should land on the login prompt.

  6. Since we disallowed initial installation of a lot of other packages, not just a newer kernel, you will almost certainly need to do the typical apt update and maybe even apt upgrade, if that's how you roll, which will eventually install a newer kernel. But now you'll have the original one too. Use that original one when you next boot, via the boot loader menu. That kernel is

$ uname -a
Linux confusion 5.4.0-100-generic #113-Ubuntu SMP Thu Feb 3 18:44:51 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

[1] "deceptively" meaning it'll be so fast it'll appear it didn't do enough to work.

Observations

This works, ironically, because Live CD ISOs are not being altered to have newer kernels; Canonical is relying on network updates during installation to handle that. And we are denying updates.

FAQ (or, rather, Frequently Imagined Questions)

Could this break in the future?

Yes. Canonical could decide to update the ISOs we are downloading.

Will this work for 21.10 too?

Yes. With the above caveat.

This has no desktop environment!

That's not a question.

You can get a desktop:

sudo apt install tasksel
sudo tasksel
# (select a desktop)
sudo reboot

The Ubuntu desktop item looks like it's GNOME.

@eecarus
Copy link

eecarus commented Mar 27, 2022

Brilliant walkthough, Ray, specially for a Linux noob like me who doesn't know his way around GRUB. It worked great and I was able to get an Ubuntu 20.04 VM back on my M1 mac after accidentally updating my old one and not being able to fix it using GRUB. Now I have a snapshot so I can do quick resets.

@rhaleblian
Copy link
Author

sweeeeet.

@Spaider
Copy link

Spaider commented Apr 7, 2022

Do this and kernel will be held off from updates:

apt-mark hold linux-generic linux-headers-generic linux-image-generic

@eecarus
Copy link

eecarus commented Apr 8, 2022

Thanks Denis. I will give that a try as well!

@laurentpf5
Copy link

Thanks for the walkthrough ! Helps a ton !!!! 🙏🏽

@rhaleblian
Copy link
Author

You're welcome.
Yikes, i can only assume this is still a problem...

@rhaleblian
Copy link
Author

The current Fusion Tech Preview release claims this problem fixed.

@zukonarya
Copy link

after adding the network adapter back to the vm I had to add the network interface in the shell:

ip link
sudo ip link set <YOUR INTERFACE> up
sudo dhclient <YOUR INTERFACE> -v

source: https://superuser.com/questions/214888/how-to-connect-to-internet-from-ubuntu-which-is-installed-in-a-virtual-machine-u/1528106#1528106

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment