Mastering Linux System Administration. Richard Blum
to the location of your Ubuntu Server ISO image file, select the file by clicking it, and then click Open. The Optical Disk Selector window now looks similar to the following:
9 In the Optical Disk Selector window, click Choose, and you are returned to the Storage settings window's Attributes pane with the Ubuntu Server ISO image filename displayed under Controller: IDE.
10 Click OK to keep the virtually loaded ISO image file and return to the main VirtualBox Manager window.
11 Boot your Ubuntu Server VM by clicking the Start button in the VirtualBox Manager's top‐right pane.You may see lots of messages go by on your screen. Let the process continue until you reach this window:
12 Using your arrow keys, select the language you prefer and press Enter.
13 In the Keyboard configuration window, select your desired keyboard layout (the defaults are typically OK), and press Enter.
14 In the Network Connections window, review the displayed information, and press Enter.
15 In the Configure Proxy window, review the displayed information, and if you need to enter a proxy address, do so. Otherwise, press Enter.
16 In the Configure Ubuntu Archive Mirror window, press Enter.
17 If you receive the Install Update Available window, select Update To The New Installer, and press Enter. You have to wait until the installer is updated. This may take a few minutes depending on the speed of your Internet connection. When it is complete, you should see the next installation window, which looks similar to the following:
18 In the Guided Storage Configuration screen, keep the defaults, tab to Done, and press Enter.
19 Read through the information provided in the storage configuration window, and press Enter. You'll receive a warning message similar to the following:Don't let this warning message scare you. Remember that your virtual hard drive for this Ubuntu Server is merely a file on your host machine.
20 Tab to Continue, and press Enter.
21 Within the Profile Setup screen, type your first and last names in the Your Name field.
22 Tab to the Your Server's Name field, and type ubuntu‐server.
23 Tab to the Pick A Username field, and type sysadmin.
24 Now tab to the Choose A Password field, and type in a password. Be sure to choose one that you will remember!
25 Tab to the Confirm Your Password field, and type in the same password as you did in the previous step. Your screen should now look similar to the following:
26 Once all the fields in the Profile Setup window are filled, tab to Done and press Enter.
27 In the SSH Setup window, tab to Done and press Enter.You'll receive a message in the next screen when the initial installation is complete that looks similar to the following:
28 Press Enter to select Reboot Now.
29 Because the Ubuntu Server ISO image file has not yet been removed from the virtual DVD drive, you'll most likely get a “Failed” message along with a request to remove the installation medium. Click the X in the VM's upper‐right corner. You'll receive the Close Virtual Machine screen, which looks similar to the following:
30 Click the circle next to Power Off The Machine.
31 Click OK to power off the Ubuntu Server virtual machine. At this point, the VirtualBox hypervisor typically automatically removes the ISO image file from the virtual DVD drive for you. But you should check to make sure it is gone.
32 Click the Settings button in the VirtualBox Manager's top‐right pane, which opens the Settings window for the Ubuntu Server VM.
33 In the Settings window, click Storage in the left pane to open the Storage settings window for the Ubuntu Server. Here you should see the word Empty in the window's middle pane under the Controller: IDE.
34 Click OK to return to the VirtualBox Manager window.
35 Boot up your Ubuntu Server VM by clicking the Start button in the VirtualBox Manager's top‐right pane.You may see lots of messages go by on your screen. Let the process continue until you reach this window:Because this first terminal, called tty1, gets messages displayed on it, it's best to jump to a different terminal where you can work in peace.
36 Press Ctrl+Alt+F2 to reach the tty2 terminal.
37 In the Username field, type sysadmin and press Enter.
38 In the Password field, be aware that nothing will show as you type in your password. There are no symbols such as asterisks or dots shown. Type in the password you created for this system earlier, and press Enter.
39 After you log into the system successfully, you receive a prompt similar to the following:sysadmin@ubuntu-server:~$This prompt is where you enter your commands, and it's called the command‐line interface.The next several commands assume that your host machine is connected to a network.
40 As part of the installation process, update the software information by typing sudoapt update, and press Enter. When it asks for a password, type in the same password you used to log into the system.
41 When you receive a prompt, update the software by typing sudo apt dist‐upgrade, and press Enter. It may ask you for a sudo password, and if it does, type in the same password you used to log into the system.
42 When the software update process asks “Do you want to continue? [Y/n],” type Y and press Enter.This software update may take a while, so go get a cup of coffee and check the latest statuses on social media.
43 When you receive a command‐line prompt, the installation process is complete. Type sudo poweroff at the prompt and press Enter. It may ask you for a sudo password, and if it does, type in the same password you used to log into the system.
Congratulations! You've installed Ubuntu Server as a VM within the VirtualBox hypervisor. Now that the installation process is complete, it's a good idea to check and make sure everything is OK. We'll cover that next.
Checking the Installation
Though the system may appear fine after an initial installation, it's wise to check. It may be tricky to understand everything you are looking at in this section, but reviewing this information will help as we cover these utilities and concepts in detail later in the book. Also, you can return to this section the next time you perform an Ubuntu distribution installation for guidance.
First, boot your Ubuntu Server VM. After the system has booted, log into the tty2 terminal, and do the following:
Check for boot errors. There are three commands that can help you check for boot errors, and none of them requires the sudo command to run. The first is dmesg. This will display the kernel ring buffer, but that data is useful only if you check it soon after the system has booted.To see boot messages long after a system boot, type less /var/log/bootstrap.log at the prompt and press Enter. You can move forward through this log by pressing the spacebar. When you are done looking at the information, press the Q key to return to the command‐line prompt.Finally, you can look for boot errors and all kinds of messages via the journalctl command. To peruse this information, you will need to press the spacebar to move forward and then the Q key to quit your viewing.
Determine the default boot level. The default boot level on a Linux system determines what applications are started when the system boots. The command to see this information is systemctl get‐default. It does not require the sudo command to use.Most likely, you will see graphical.target when you issue this command, meaning that if graphical user interface (GUI) software is available, the GUI will start on bootup. However, on Ubuntu Server, since GUI software is not installed by default, this response from the systemctl get‐default command does not indicate a GUI is provided.
Check version information. Determining the version numbers of the system's main components is helpful when tracking down problems. First, make sure you have the right Ubuntu Server distribution version installed by typing cat /etc/issue at the prompt. The version is in