
Red Linux Setup Guide
For ThinkStation P340
***Official support of RHEL 8.2.0 and later.

2
Contents
SECTION 1 – BIOS SETUP & PRE-INSTALLATION STEPS
SECTION 2 – INSTALLING RHEL 8.2
SECTION 3 – RAID INSTALLATION
SECTION 4 – LAN CONNECTION
SECTION 5 – INSTALLING THE NVIDIA GRAPHICS DRIVER
SECTION 6 – REVISION HISTORY

3
Section 1 – BIOS Setup & Pre-Installation Steps
The first step before installing Linux is to make sure the system BIOS is setup
correctly.
• Boot into BIOS by pressing the function F1 key at the “Lenovo” splash
screen.
• Tab over to the “Startup” menu. Pressing F9 function key will allow Legacy
and UEFI bootable devices by setting “UEFI/Legacy Boot” to “Both”;
otherwise, it will be an unchangeable setting to “UEFI only”.

4
• Check whether Secure Boot is disabled. If found enabled, disable it.
• Press function F10 key to save and exit BIOS setup.

5
Section 2 – Installing RHEL 8.2
Please refer to the following instructions and screenshots on how to install RHEL
8.2 on the Lenovo ThinkStation P340.
Insert the RHEL installation media (either through USB or CD/DVD).
• Power on the system and press the F12 function key whenever the
following Lenovo splash screen appears.
• Select the Linux bootable installation media from the F12 boot menu list.

6
• Select “Install Red Hat Enterprise Linux 8.2” from the GRUB boot menu
and press enter.
• The Red Hat Enterprise Linux Welcome Screen should appear. Select the
appropriate language and “Continue”.

7
• Adjust the “Keyboard”, “Language Support”, and “Time & Date” accordingly
by selecting each one.
• Select “SOFTWARE SELECTION” and choose the type of software to
install.

8
• Select the type of “Base Environment” as well as each “Add-Ons” to install.
In this example, “Workstation” was selected for the “Base Environment” and
all “Add-Ons” were selected.
• Select “Installation Destination”.

9
• Select the device on where to install the operating system and “Done” in the
upper left.
• For storage devices with previous partitions created, select “Reclaim
space”.

10
• Select “Delete all” to delete all the previously created partitions or select
each partition to delete and select the “Delete” option. When done, select
“Reclaim space” at the bottom.
• Select “Begin Installation” in the bottom right.

11
• Select “Root Password”.
• Enter a root password in both of boxes below and select “Done” in the upper
left.

12
• Select “User Creation”.
• Fill in the appropriate boxes below and select “Done” in the upper left.

13
• Once the installation completes, select “Reboot” at the bottom right.
• Select “License Information”.

14
• Check the box at the bottom left and “Done” at the upper left.
• Select “FINISH CONFIGURATION”.

15
• Log in to the Linux Desktop using the login credentials created above.
• Red Hat Enterprise Linux 8.x Desktop screen.

16
Section 3 – RAID Installation
Currently Lenovo P340 systems only support single drive installations and not
RAID installations in RHEL 8.2 operating system due to unavailable kernel drivers.
Section 4 – LAN Connection
LAN is native to RHEL 8.2 and would not require additional drivers for it to work.
Users should make sure of having working internet connection to carry on with
Section 5.

17
Section 5 – Installing the Nvidia Graphics Driver
In order to get optimal performance out of the Nvidia GPU, it is a good idea to
install the Nvidia graphics driver.
• Download the latest Nvidia graphics driver for the appropriate Nvidia GPU
from here.
• Blacklist the Linux Nouveau driver by following the steps below-
o Open a terminal window and log in as root: sudo su
o Enter /etc/modprobe.d directory and create a file named blacklist.conf
o Add line blacklist nouveau in the blacklist.conf file, then save and exit
by pressing
o the ESC key followed by a colon and x (like :x!) or followed by a
colon and wq! (like :wq!)
o Run the command: dracut -f to update the initramfs file
• Install all prerequisites using the following commands-
o dnf groupinstall “Development Tools”
o dnf install elfutils-libelf-devel
Note: If you don’t have a valid RHEL subscription, install the packages
above from the installation media. This will require manual intervention
steps to modify the yum repository. Once done modifying the yum
repository, install “Development Tools” and “elfutils-libelf-devel” as
mentioned in the beginning of this step.

18
To manually update the yum repository, mount the RHEL installation media
to your system and follow the steps below:
***Yellow highlighted text signifies directory path to installation media, so it
may slightly vary for every user.
► Copy “media.repo” from the installation source to /etc/yum.repos.d/
directory.
# cp -v /run/media/lenovo/RHEL-8-2-0-/media.repo
/etc/yum.repos.d/redhat.repo
► Set permission levels accordingly.
# chmod 644 /etc/yum.repos.d/redhat.repo

19
► Edit the redhat.repo file using vi or nano to look something like this:
[InstallMedia-BaseOS]
name=Red Hat Enterprise Linux 8.2.0 – BaseOS
metadata_expire=-1
gpgcheck=1
enabled=1
baseurl=file:///run/media/lenovo/RHEL-8-2-0-/BaseOS/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[InstallMedia-AppStream]
name=Red Hat Enterprise Linux 8.2.0 – BaseOS
metadata_expire=-1
gpgcheck=1
enabled=1
baseurl=file:///run/media/lenovo/RHEL-8-2-0-/AppStream/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

20
► Once done editing the repo, do yum update:
# yum update
► Once the yum update is complete, install the “Development Tools” and
“elfutils-libelf-devel” with the help of commands mentioned in the
beginning of Step 3.

21
• Edit the kernel by following the steps below-
o Reboot the system and select “Install Red Hat Enterprise Linux
8.2” from the GRUB boot menu and press e
o Delete “quite” and type “nomodeset” in the kernel
o Save the changes by pressing CTRL+X

22
• In case of a system freeze, reboot the system and select “Test this media &
install Red Hat Enterprise Linux 8.2” and press enter.
• Log into the system and edit the /etc/gdm/custom.conf file using the
following steps-
o Log in as root: sudo su
o vi /etc/gdm/custom.conf
o Uncomment the WaylandEnable=false comment
o Save and exit by doing :wq!

23
• Reboot the system and press ALT+F2 once the grub menu appears to
enter the init 3 command line. Follow the steps below to install the Nvidia
driver-
o Log in as root: sudo su
o Navigate to the directory consisting the Nvidia driver by using the
command: cd directory_name
o Make the driver executable: chmod +x Nvidia_driver
o Install the driver by using command: ./Nvidia_driver
• Select “Continue Installation” and press enter.

24
• Wait until the completion of building of kernel modules.
• Optional: Choose whether to install the 32-bit compatibility libraries.

25
• Select “Install and overwrite existing..” option for an incomplete installation
of libglvnd installation.
• Nvidia driver installing progress bar may appear.

26
• Select “Yes” to update the X-configuration file to use the Nvidia X driver.
• Hit “OK” when the screen shoots installation completed message.

27
• Execute the following command to verify the Nvidia driver is loaded: nvidiasmi
• Reboot the system.

28
Section 4 – Revision History