One of the easiest ways to get started with Linux besides using a LiveCD is to install it as a virtual machine if you have supported hardware. You can use the free Oracle VirtualBox to run multiple operating systems on your host machine. My configuration is a Windows 10 laptop with 8GB of RAM, an Intel i5 processor, and a 1TB hard drive. Since Linux can be run on minimal specs, your hardware could be less and you can still be successful at running a virtual machine, but the recommended minimum RAM is 8GB. You may follow the Ubuntu VirtualBox guide and the Ubuntu As A Guest OS guide. I ran into a few issues, which I’ll address below. This guide will address the VirtualBox settings and get you to the point of installing Ubuntu.
Getting Started
After installing VirtualBox and downloading your Ubuntu ISO image, you’ll want to click on the New button to create a new virtual machine.
While naming it, when you start typing Ubuntu, it’ll automatically select Linux and Ubuntu (64 bit).
Click Next to continue.
The next step will be selecting the memory size. If you have 8GB of RAM on your system, I would select 2GB as a minimum.
Just move the slider to 2048MB if you want to use 2GB.
Click Next.
The next step is creating the virtual disk. Leave the default option of Create A Virtual Disk Now and click Create.
Next, you’ll want to select a Hard Disk File Type. By default, it is VDI VirtualBox Disk Image. I opted for VMDK Virtual Machine Disk because it is a more well-known standard. Click Next.
For the Storage On Physical Hard Drive, leave the default option of Dynamically Allocated selected and click Next.
Under File Location and Size, you can select the folder where you want to save your virtual disk. You’ll also want to specify the disk size. The minimum should be 8GB, but if you have enough storage space, I would select 30GB or more, depending on how many apps you’ll be installing and how much you’ll be using the virtual machine. When you’re ready, click Create.
Advanced Settings
Now you’ll have the basics configured, but you’ll want to go through some of the advanced options before you begin your installation.
Highlight your virtual machine and click the Settings button.
You don’t need to change anything in the General tab, so select the System tab.
Most of the default options on the Motherboard tab should be fine.
On the Processor tab, if you have a powerful enough processor, I would select 2 cores or more.
On the Acceleration tab, ensure all Hardware Virtualization options are checked.
Next, go to the Display Tab on the side.
You’ll see a Video Memory slider. I selected the largest amount available, which for me was 128MB.
Select the options for Enable 3D Acceleration. You can try selecting Enable 2D Video Acceleration, but on my machine it gave me an Invalid Setting error.
You can go through all of the other tabs, but the default options worked fine for me.
Starting Virtual Machine
When you’re ready, you can start your Ubuntu Virtual Machine. Upon first startup, you’ll be asked to select your ISO. Once you get to this point, you’ll be ready to go through the Ubuntu installation process.
When you get to the partitioning options, you can go through the guided partitioning and erase the disks and create partitions because it only sees the the virtual disk, not your entire disk.
Troubleshooting Rainbow Startup Screen
After starting your virtual machine, if you get a rainbow screen like the image above, you’ll want to go into your Virtual Machine settings. Click on the System tab and on the Motherboard tab, try checking the box for Enable EFI. After saving your settings, try starting your virtual machine again.
Since we installed Ubuntu with EFI enabled, when you first start your virtual machine, you’ll probably get a shell screen with an error about startup.nsh. This is because the virtual machine doesn’t know where to find the EFI Grub bootloader. You can resolve this error by going through these steps at the shell prompt:
- Wait for the EFI shell to leave you at the terminal.
- Type: edit startup.nsh
- Type the path to your desired .efi file. Typically: fs0:EFIubuntugrubx64.efi
- Ctrl+S to save.
- Enter to confirm.
- Ctrl+Q to exit back to shell.
- Reboot the VM. It will still display the EFI shell but will load Grub automatically.
If you want to try another option, when you get to the rainbow screen, try pressing Ctrl+Alt+F1 to open the shell and then press Ctrl+Alt+F7 to return to the graphics mode.
Also, after using all of the options I’ve listed above, I was able to install Ubuntu without using EFI mode. Compare your settings to all of the ones I’ve listed above.