Document Scope
This article covers installation and basic setup for Ubuntu 20.04.
Step 1: Create bootable USB and load Ubuntu 20.04 ISO.
On a separate computer, with a spare USB 8GB or more that you are willing to part with, assuming Windows.
- If you need the ISO, download Ubuntu-Server 20.04.2 LTS ISO - https://ubuntu.com/download/server
- If you need the program to create bootable USB, download https://rufus.ie/
- Open Rufus and load the ISO onto the USB drive; select the USB you want to reformat under the 'Device' dropdown, and use 'select' to select the Ubuntu ISO file (it looks like ubuntu-20.04.2-live-server-amd64.iso).
Step 2: Plug in bootable USB drive and boot to it.
You motherboard BIOS menu may differ, but it is overall the same process. Get to your boot menu, and select the UEFI option for the bootable USB drive that has the Ubuntu ISO file on it. It will take a few minutes to load.
Example of selecting the UEFI option for the USB drive containing the Ubuntu ISO file:
Step 3: Setup Ubuntu network. (Mostly skipping screens.)
Make sure the system has a network. Please check with your IT/Network Admins to see if the network port/cable AT YOUR SITE works or not. Most of this is just skipped (or pressing 'Done' at the bottom) until you reach the 'Guided Storage Configuration' section.
Example of skipping the network setup screens:
Step 4: Setup your OS, Scratch, and Data partition.
Mistakes in this step are common; if mistakes are made, use the 'reset' at the bottom to start over. Please pay particular attention to the overview below before proceeding with Step 4a:
- We are making one of your drives the BOOT drive, meaning the OS will use this drive to boot Ubuntu 20.04
- Linux OS BOOT drive requires 4 partitions: efi, boot, SWAP, and root '/'; this will show you how to set them up.
- We are making one of your drives the Scratch (/scr) partition; used as a medium or temporary data storage for quick read/write use. (Imagine a workbench with the tools or parts prepped for you to use for your project, but needs to be cleared by the end of the day.)
- We are making one of your drives the Data (/data) partition; used as more permanent storage, it is slower but usually high capacity. (Typically, a bulky hard drive or highest capacity drive.)
Step 4a: Select 'Custom Storage Layout' to proceed to partitioning your installed drives.
Example of custom storage layout option:
Step 4b: Setup the Boot drive.
- Select 'Use as Boot Device'
Example of selecting 'Use as Boot Device':
2. Add GPT Partitions for the following (after each one, go back and re-select the boot drive and do 'Add GPT Partition' until step 4c is completed):
-
- 500m; ext4; /boot
- 10g; SWAP; /(unselectable)
- <leave blank intentionally to fill remaining space on this drive>; ext4; / (this forward slash just means it's root; leave as-is)
Examples of boot drive partitions:
Step 4c: Setup the Scratch drive.
Easy, since we're using the entire capacity of one drive. In this case, the 2nd M.2 drive is being used.
- Select the desired drive for Scratch, and then 'add GPT partition'
- <leave blank intentionally to fill remaining space on this drive>; ext4; <use dropdown to select /Other>, and then name it 'scr'>
- Create
Example of setting up Scratch drive:
Step 4d: Setup the Data drive.
Easy again, since we're using the entire capacity of this last drive. In this case, the only drive that can be selected is used since the others are already configured.
- Select the drive for Data, and then 'add GPT partition'
- <leave blank intentionally to fill remaining space on this drive>; ext4; <use dropdown to select /Other>, and then name it 'data'>
- Create
Example of setting up Data drive:
Step 4e: Review, confirm, and 'Continue' the partition creation step.
Summary of partitions according to everything instructed in Step 4 should look like this:
- / - root
- /boot
- /boot/efi - automatically created when you selected your first drive to be used as the boot device
- /data
- /scr
- SWAP
Now go ahead and hit Done, and then Continue, to proceed to next step.
Example of confirming destructive action to proceed:
Step 5: Setup your username and password.
This is really important. The default user/password is intended for you to change for yourself or your team. This will double as your root credentials later, so do not lose or forget it.
Example of the user/pass setup step:
Step 6: Confirm installation of OpenSSH Server, and then proceed to Ubuntu OS installation.
Also, another really important step, as it will install SSH components necessary for you to remote in from another system on your network.
Example of OpenSSH Server selection step:
Ubuntu will start to install. It takes 2-3 minutes for the bottom option of 'cancel update and reboot' option to appear. It is recommended to use this option as soon as you see it.
Example of Ubuntu OS installation process:
Once the system reboots, there will be no GUI at first. It will also complain or note that a network port is attempting to reconfigure (or searching for network). It can take up to 4-5 minutes per port being searched until it loads a login prompt.
Example of what to expect after rebooting Ubuntu 20.04 for the first time after installation:
Step 7: Setting up your Ubuntu OS for NVIDIA drivers and GUI display.
After the system reboots, you will be greeted by terminal-mode/command-line only. NO GUI; we'll get to that shortly. We have to first setup the base-system and make it work nicely with NVIDIA drivers. A constant challenge for users is making sure their system's Linux OS has a functional NVIDIA driver installed, as Linux/header updates unlink NVIDIA modules if local updates are ran.
These commands are condensed so you can copy/paste AFTER you can SSH into your system, OR very carefully type out.
If you want to SSH to run the next set of commands:
If you're local and not iKVM/remote with the system (you don't have the luxury of copy/paste), it might be easier if you SSH into the system from this point to run the next set of commands. Since this is a fresh blank Ubuntu installation, it won't have the network ports setup yet. You can run 'sudo apt-get install net-tools' to get IP on the network ports.
Step 7a: Grant root access for yourself for the next set of commands during this step.
FIRST, grant yourself 'root' access by using the command:
sudo bash
Use the password you setup for this system, and then you will be greeted with a 'root@<whatever>'.
Step 7b: Update base-system.
apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y
Step 7c: Blacklist Nouveau in system files.
Nouveau is a legacy display driver loaded by Linux. It conflicts with NVIDIA and needs to be disabled so NVIDIA driver can install properly. All this is put on one line for the sake of time, but it basically writes the blacklist-nouveau parameter, so it doesn't load when Ubuntu boots, ever.
echo "blacklist nouveau" >> /etc/modprobe.d/blacklist-nouveau.conf && echo "blacklist lbm-nouveau" >> /etc/modprobe.d/blacklist-nouveau.conf && echo "options nouveau modset=0" >> /etc/modprobe.d/blacklist-nouveau.conf && echo "alias nouveau off" >> /etc/modprobe.d/blacklist-nouveau.conf && echo "alias lbm-nouveau off" >> /etc/modprobe.d/blacklist-nouveau.conf && echo options nouveau modeset=0 | tee -a /etc/modprobe.d/nouveau-kms.conf
Step 7d: Get rid if legacy/old NVIDIA modules.
apt-get remove nvidia* && apt-get autoremove -y
Step 7e: Install necessary packages for NVIDIA driver and other Docker packages.
This packages install takes 5-8 minutes.
apt-get install net-tools -y && apt-get install build-essential -y && apt-get install gfortran -y && apt-get install ethtool -y && apt-get install software-properties-common -y && apt-get install curl -y && apt-get install ipmitool -y && apt-get install git -y
Step 7f: Update system files.
Should take 1-2 minutes.
update-initramfs -u
Step 7g: Install Ubuntu-desktop.
This takes approximately 10-12 minutes. You may want to step away from your system after running this.
apt install ubuntu-desktop -y
Step 7h: REBOOT to allow all the changes to apply.
Important: Depending on the hardware, your system may feature a primary onboard/offboard display selection. Generally, onboard is the display-port built into the motherboard, and offboard is a GPU-accelerated device.
- If your system DOES NOT have a built-in display port to the motherboard, meaning NO onboard/offboard selection, the display will naturally default to the only option--the Graphics Card.
- If your system supports onboard/offboard display, results may vary whether the Ubuntu 20.04 login screen will loop or freeze.
There is no confirmed expectation for Ubuntu 20.04 because it really does differ depending on the hardware installed, and there are many combinations of hardware that may or may not allow normal Ubuntu 20.04 behavior AFTER the login screen. If it hangs on the login screen, reboot the system, get to the screen again, and try 'ctrl+alt+f3' to reach a terminal-only screen again so you can resolve it when properly installing the NVIDIA drivers in step 8.
reboot
Step 8: Installing NVIDIA driver.
Once you get access to a terminal, whether getting lucky with the display as the system is locally, or SSH'ed via IP, you can install.
#get root access again
sudo bash
<password>
#this downloads the NVIDIA driver .run file to whatever directory you are currently in
#for example sake, this is the latest A6000 Linux Driver file at the time of publishing this article
wget https://us.download.nvidia.com/XFree86/Linux-x86_64/460.56/NVIDIA-Linux-x86_64-460.56.run
#makes the .run file executable
chmod +x NVIDIA-Linux-x86_64-460.56.run
#disables all GUI/display
init 3
#executes the now executable .run file
./NVIDIA-Linux-x86_64-460.56.run
If all steps above were performed correctly, it will NOT complain about nouveau being loaded, ignore all questions until it asks to install or configure nvidia-xconfig for you, say no at this prompt. If it fails to install, it will clearly say that the NVIDIA Driver installation has failed. If this occurs, try running the installation file again, and provide Exxact with the LAST screen before the NVIDIA driver installation fails so we can further investigate.
If it successfully installs, you can run this command to check installed NVIDIA hardware.
#installed NVIDIA hardware
nvidia-smi
#installed NVLinks, if you have it (it can run this command even if you DON'T have them installed)
nvidia-smi nvlink -s
If you run into display issues on Step 8.
Ubuntu sometimes does not know what to do with the system's onboard/offboard capability. It is more consistent with CentOS for it to work regardless what the primary display option is in BIOS, but onboard VGA may cause Ubuntu to have issues with it. However, in Exxact's own experience with a Supermicro 4U with onboard VGA using the installation method above, there were no issues.
Comments
0 comments
Please sign in to leave a comment.