Wednesday 28 August 2024

Installing Ubuntu 22.04 on VirtualBox Windows

Installing an operating system is an essential system administration task. Ubuntu is an open-source Linux operating system. VirtualBox is virtualization software. It allows you to create virtual PCs. You can use a virtual PC similar to a physical PC. This tutorial explains how to install the latest version of Ubuntu on VirtualBox.

Downloading VirtualBox

The following website provides the official binary (installation) file of VirtualBox.

https://www.virtualbox.org/wiki/Downloads

Downloading Ubuntu

You can download the latest version of Ubuntu from the following official site.

https://ubuntu.com/download/desktop

The official site contains many download links. The default link receives a large number of requests. If you use the default download link, your download speed may slow. To speed up the downloading, you can use alternative links. Alternative links contain the mirror images of the official IOS image. Select the mirror that has the highest bandwidth speed.

download ubuntu ios image

After downloading both files, we need to set up VirtualBox.

Installing VirtualBox

The installation process is straightforward. It includes only a few options. Click Next on the welcome screen.

welcome screen

The next screen shows the license agreement. We must accept the license agreement to install it.

license agrement

The next screen allows us to customize the installation location and features we want to install. The default selection includes all the necessary features to install and run Ubuntu. We do not need to add or remove any feature here. Select the partition on which you want to install VirtualBox. You can also make a new folder and rename it to VirtualBox. After selecting the destination location, click Next.

features and locations

The installation process resets the network interface. If you are doing any online activity, such as downloading or uploading a file, you should first complete that. Click Yes to continue the installation process.

internet connection warning

The next screen has four options.
The first option creates a start menu entry.
The second option places a shortcut link on the Desktop. The third option adds a link to the Quick Access toolbar.
The fourth option registers file association.
The first three options allow us to customize how we access VirtualBox after the installation. When we open a file on a Windows system, it uses the file's extension to select software that can open it.

settings

The next screen shows the confirmation message for installation. If you want to make any changes to the selection, you can use the back button to go to that setting.

confirm installation

The installation process takes a few seconds. The last screen allows us to start VirtualBox just after the installation.

installation finish

Creating a virtual machine on VirtualBox

The New option on the home screen creates a new virtual machine. The process starts with a wizard. The home screen includes all the necessary options.

create virtual machine screen

  • The first field sets a name for the virtual machine.
  • The second field sets the location where we want to save this virtual machine. Use the other option to browse partitions. Select the partition where you want to save this machine. You can also make a folder to save the machine in a specific folder.
  • In the third field, we select the downloaded Ubuntu IOS image file.
  • The wizard automatically selects Edition, Type, and Version of OS from the IOS image file.

With the default selection, VirtualBox automatically installs the operating system from the selected IOS image file. To manually install it, we must check the Skip unattended installation box.

ios file location and virtual machine name

Next, we configure the RAM and CPU core for this virtual machine. The minimum recommended RAM is 4 GB. You can assign two CPU cores to this machine.

cpu ram

The next screen specifies the hard disk size. It has three options.

  1. Create a new virtual disk now
  2. Use an existing virtual hard disk file
  3. Do not add a virtual hard disk

The first option creates a new hard disk. The second option allows us to use an existing hard disk. The third option creates a virtual machine without a hard disk. Select the first option and specify the hard disk size. The minimum recommended size is  20 GB.

hard disk

The next screen shows the summary of all configurations. To change any configuration, use the Back button. To create the virtual machine with the selected configuration, click Finish.

virtual machine creattion wizard ends

Installing Ubuntu 22.04 on Virtualbox

The Start button starts this virtual machine.

The first screen of the installation process presents three options. The first option allows us to test or install Ubuntu. It is the default selection. The installation process automatically executes this option after 30 seconds if we do not select any other option.

The second option starts Ubuntu in the safe mode. You can use this option if the first option does not work.

The third option allows us to test memory. You can use this option to debug memory.

installation process first screen

The virtual machine automatically captures the mouse pointer when we move the cursor point over it. To release the cursor point, you need to press the host key. VirtualBox automatically assigns a host key. If required, you can change it from here.

host key

The first screen of the installation process localizes the language. Select your preferred language for installation.

language

The next screen allows you to configure accessibility options. If you need any accessibility option, you can configure it from here. If not, click Next.

accessibilty

The next screen localizes the keyboard layout.

keyboard layout

The next screen seeks permission to use the internet during the installation. If we allow the installation process to connect to the internet, it automatically downloads and installs all essential packages we need after the installation.

install package

If any updates are available, it displays them on the next screen.

update

The next screen has two options. The first option allows us to install Ubuntu on this system. The second option lets us use Ubuntu without installation.

Select the first option and click Next.

install on disk

The next screen has two options: Interactive installation and Automated installation.

If we select the first option, the installation process starts in interactive mode. In this mode, we manually provide answers to all questions.

If we select the second option, the installation process starts in automated mode. In this mode, a configuration file provides answers to all questions. To use this mode, you must create an answer file. Administrators use this option to install Ubuntu on multiple systems simultaneously. 

Select the first option and click Next.

installation option

The next screen allows us to select the software packages we want with the default installation. If we choose the first option, it installs only essential packages, such as a web browser, calculator, and text editors.

If we choose the second option, it installs the most commonly used packages, such as Office, RithomBox, and media editors.

Select the second option and click Next.

software package

By default, Ubuntu does not install any third-party proprietary packages. However, the upcoming screen has options to instruct the installation process to download and install all necessary third-party packages and drivers.

Tick both checkboxes and click Next.

software package

The next screen presents the disk partition scheme. It has two options: automatic and manual.

partition option

automatic

The first option automatically erases the entire disk and makes all the necessary partitions. It automatically selects the appropriate size for each partition. We have no control over which partitions it makes and what size it chooses for each partition. However, it gives a couple of options to customize this process. The screen reveals these options when we click the Advanced Features button. These options are the following: -

  • None
  • Use LVM
  • Use LVM with encryption
  • Erase the disk and use ZFS
  • Erase the disk and use ZFS with encryption
  • Enable hardware-backed full disk encryption

<

default partiton scheme

  • The first option is the default. It uses the default partition types to create all the necessary partitions.
  • The second option creates LVM partitions on the free disk space.
  • The third option creates LVM partitions on the free disk space and enables encryption on partitions.
  • The fourth option erases the entire disk and creates ZFS partitions.
  • The fifth option erases the entire disk, creates ZFS partitions, and enables encryption.
  • The sixth option enables hardware-backed full-disk encryption.

manual

The second option allows to create and format partitions manually. We can specify the size of each partition. We can skip optional partitions or add any additional partitions of our choice. We can also select the file system for each partition.

Select the second option and click Next.

The first screen of the manual partitioning lists all attached hard disks and available free space on each disk.

manual partition

Select the disk on which you want to install Ubuntu.

Click the + button. It opens a new window. The opened window contains three form fields: size, used as, and mount point.

manual partition screen

The size field sets the partition size. It lists supported units in a dropdown. It automatically converts the specified size in the selected unit.

The 'used as' dropdown lists supported file systems.

The mount point dropdown lists mount points.

  • All fields are compulsory. 
  • We must specify the partition size and select the unit for the specified size.
  • We must select a mount point for each partition.
  • We must select a file system for each partition.

The following table lists the minimum recommended partitions for a manual installation.

SizeUsed asMount point
20 GBExt4/
1 GBExt4/home
500 MBExt4/boot
2 GBswapNone

The root (/) partition

root partition

The /boot partition

boot partition

The /home partition

home partition

The swap partition

swap partition

The installation process does not make these partitions immediately. It keeps this information in RAM until we confirm the installation process after providing all the necessary information.

all partitions

The next screen creates a user account and sets the computer name. It automatically generates the computer name from the user name. If you like the auto-generated name, you can keep it. If not, you can manually set it.

Set a password for the user. It checks the specified password and displays how complex it is. On a production system, you should use a complex password. On a testing system, you can use a simple password.

After the password field, it has two options: -

  1. Require my password to log in
  2. Use Active Directory

If we uncheck the first option, it does not ask this user to enter the password at the login screen.

If we check the second option, we can use an active directory user account to log in.

computer name

The next screen localizes the time zone. Click on the map to select your preferred time zone.

time zone

The next screen displays a summary of all settings. Til this time, it does not write anything to the disk. If we want to change any setting, we can change it.

Click the Install button to start the installation.

summary

The installation process may take several minutes. During this process, it displays a detailed overview of the features and functions of Ubuntu.

installation running

A few settings require a system reboot. The last screen asks the user to restart the system.

Remove the installation disk and restart the system.

restart the system

After booting, the installation process lists the default account we created during the installation process on the login screen.

login screen

When a user login the first time, Ubuntu starts a setup wizard. The first screen of this wizard allows us to register the system for the Ubuntu Pro program. Ubuntu Pro is a paid feature. It provides paid support.

Ubuntu is an open-source operating system. You do not need to pay anything to download, install, and use it. You will also get community-based support free of cost. In many circumstances, community-based support alone is not enough. You may need faster support. In that case, you may consider buying paid support from Ubuntu.

ubuntu pro support

On the next screen, we select whether we want to share system data with  Ubuntu. If we choose yes, the system automatically sends error logs and crash reports to the Ubuntu log server after excluding all personal information.

error reporting

The last screen suggests opening the app center to download essential apps.

default apps

Click Finish to close the wizard. With this, the installation process ends. Now, the Ubuntu system is ready to use.

installation finish

Conclusion

Installing Ubuntu is an essential task for a system administrator. As a system administrator, you perform Ubuntu installation many times. In this tutorial, I explained how to install Ubuntu on a virtual machine. I hope it will help you perform Ubuntu installation effectively and rapidly.

No comments:

Post a Comment