Trying to fix very poor VirtualBox install experience

#1

TLDR; how do I build the kernel that NixOS uses? I’m assuming it’s built using a nixpkg…if so, what’s the attribute path?

I recently installed NixOS on a virtualbox with the minimal CD and was met with a pretty frustrating experience. The Graphics would completely stop working a few seconds into the boot process. I switched to the (nomodeset) option in GRUB which allowed me to boot from the CD and perform the install. The install itself was easy and straightforward. Then after the install I could not boot using the OS installed on the disk…the graphics would just stop, just like when I was booting without the (nomodeset) option from the CD.

After a few hours of triage, I finally tried switching the graphics controller from VMSVGA to VBoxSVGA, and viola, everything started working. I could even boot from the CD without selecting (nomodeset).

I’m pretty surprised that this issue exists today. It prevents you from being able to install NixOS on a default VirtualBox machine, and the fact that graphics stops working makes it very difficult for the typical user to triage.

I’ve opened an issue here: https://github.com/NixOS/nixpkgs/issues/58070

I’ve had to mess with kernel graphics config in the past and am willing to see if I can fix this issue, but I don’t know how the install image is built and what kernel it uses. I assume that it’s using a kernel from nixpkgs? So if someone can just provide me with the name of the kernel, I can build it and just crack open the iso, install it and test potential fixes. Thanks for any guidance here.

1 Like

#2

The ISO isn’t really meant for VBox, that’s why the download page has the OVA: https://nixos.org/nixos/download.html
If you want to make your own VirtualBox images, take a look at: https://github.com/Luis-Hebendanz/nixos-generators

0 Likes

#3

The ISO isn’t really meant for VBox

Should https://nixos.org/nixos/manual/index.html#sec-instaling-virtualbox-guest be removed?

0 Likes

#4

I think it could be improved with your suggestions, would be nice if the instructions would actually work again :slight_smile:. I just think that not many people tried to run the ISO straight in a VBox recently.

0 Likes