I tried installing XUbuntu 22.04 on Hyper-V and it installs fine but after installation and reboot, the screen goes black with a flashing screen.
I was able to watch F1 output until it gets to:
Starting Hostname Service ...
tmp-sanity\x2dmount...After which the black screen starts.
I was able to trigger Ctrl+Alt+F3 but the login only shows for a second and then goes black again.
I think this is a driver issue but I have no idea on how to resolve.
Any ideas on how to fix this?
Notes:
- Ubuntu Desktop 22.04 works fine
- Only have RDP access to the Hyper-V server so I'm a bit limited on control.
2 Answers
This issue is likely caused because the VM was installed using Generation 1 virtual machine. Try installing the VM as Generation 2 instead.
Note: to install vm as generation 2, you must disable secure boot under HyperV VM Settings -> Security -> Secure Boot Enabled (uncheck).
Note: This does not seem to fix issues with XUbuntu 20.04 which still gets black screen. In this case, you will need to boot into single user mode and install linux-azure package.
The way to fix this is by installing linux-azure package as follows:
- Boot into single user mode
- At Grub menu, select main entry and click
eto edit - Find line that starts with
linuxand addsingleafterroremembering to add spaces before and after - Hit F10 to reboot
- At Grub menu, select main entry and click
- At prompt, start networking:
systemctl start NetworkManager.service - apt update and install
linux-azure
apt-get update
apt-get install linux-azure- Reboot
restart -r now
Your system should boot super fast and should work just fine.