Wednesday, March 30, 2016

How to Install a 64-bit PCLinuxOS64 2016 on UEFI PC

This article describes how to install a 64-bit PCLinuxOS64 KDE version 2016.03 on a modern PC with UEFI firmware. The PC has the following hardware specifications:
  • Gigabyte Z97-HD3 Motherboard
  • Intel Core i5-4950 CPU
  • Gigabyte Nvidia GeForce GTX 750 Ti PCI-E Video Card
  • LG DVD ROM Drive Model HL-DT-ST GH20NS10
  • Samsung 500GB SSD Model 850 EVO
  • 16 GB Kingston Hyper DDR3 RAM
  • USB Flash Card Reader
Note that PCLinuxOS64 is the only Linux OS at the moment that will install and use the Nvidia or AMD video drivers in full hardware accelerated mode automatically. This means that for the drivers for my 'Maxwell' based Gigabyte Nvidia GeForce GTX 750 Ti PCI-E video card, will be installed and used automatically without me having to install the drivers manually. Kudos to the PCLinuxOS64 team!

Unfortunately, this automatic installation and usage of Nvidia/AMD video drivers comes at a 'price'; not monetary, but the PC will take some considerable time to either restart or shut down. Why this is so, is something I am still investigating with difficulty. Just be aware of this issue - I have learned to live with it but I wish Nvidia/AMD/PCLinuxOS will take responsibility for it and provide users with a solution.

About UEFI Firmware

Basically there are two types of firmware: one is the old-style type BIOS (Basic Input/Output System) and the other is the new EFI or UEFI ([Unified] Extensible Firmware Interface).

While most of us old fogeys are familiar with the BIOS-type firmware, the computer industry, as a whole, is heading towards the UEFI-type firmware. So it very important for computer enthusiast like me, to fully understand UEFI.

There are a lot of documents and articles on UEFI found on the web - but they seems to have one goal in mind - confuse the hell out of the computer enthusiast - and they all have succeeded beautifully. However, I recommend that any computer enthusiast worth his/her salt, do some research and get to understand UEFI. Anyway, the method outlined in this article is based on a UEFI PC (which is a PC with a new UEFI firmware), which you must possess beforehand.

  1. You have a relatively modern PC with a UEFI firmware - NOT a PC with a legacy-type firmware (normally called a BIOS). Note that you can use a PC with both UEFI and legacy capabilities. Just make sure that you either configure the PC to use UEFI only or select the correct method when booting the PC from the boot menu if you decide to use the PC with both UEFI and legacy capabilities.

  2. You wish to install a 64-bit version of PCLinuxOS on it. The choice of graphical desktop environment is entirely up to you, but this article will only describe the KDE desktop.

  3. The PCLinuxOS OS will be the only OS on the PC (NO multi-booting!)

  4. You have a blank HDD or SSD on which you wish to install a 64-bit version of PCLinuxOS.

  5. You have a 4GB (or greater) USB stick that you will use to create an install boot disk for PCLinuxOS. Later, you will be given a link for downloading the iso image file.

STEP 1: Create a Bootable PCLinuxOS USB Disk

First we need to create a bootable PCLinuxOS USB disk by following the steps below:

IMPORTANT NOTE: The USB disk used in this part will be written over and all existing data will be destroyed. Backup the data if you do not wish to lose all of it.

  1. You need access to a working Linux PC with Internet connection. Using that PC, open a web browser and go to the following web site. Download the KDE iso image to your 'Downloads' folder. Note that the size of this image is 1.8GB so you would require at least a 4GB (as recommended) USB stick to create the USB boot disk.

  2. Plug in the USB disk into a USB port on the PC and close the file manager if it appears. Launch a terminal and execute:


    Make a note of the device name of the just-plugged-in USB disk - for example, one line should read as 'sdc: sdc1' - which makes the device name in this example as '/dev/sdc'.

  3. From the terminal, execute:

      su -
      umount /dev/sdc1

    Enter your password when prompted. This command will unmount the USB disk ('/dev/sdc1' used in this example - replace it with the ACTUAL device name as identified by the 'dmesg' command). Note if you see the message 'umount: /dev/sdc1: not mounted', then the USB disk is NOT mounted, and you can safely ignore the message.

  4. From the same terminal, execute:

      cd /home/guest/Downloads
      isohybrid -u pclinuxos64-kde-2016.03.iso
      dd if=pclinuxos64-kde-2016.03.iso of=/dev/sdc bs=4M status=progress

    Note that '/dev/sdc' (used here as an example) is the USB disk name NOT the partition name. Make sure you replace it with the ACTUAL disk name as identified by the 'dmesg' command. Note that if you see any warning messages after the 'isohybrid' command, you can safely ignore the message.

    The process of copying may take a while to finish - wait for the prompt to re-appear. The 'sync' command is to ensure that all delayed writes to the USB disk is flushed out - as before, wait for the prompt to re-appear.

  5. Remove the USB disk from the PC (it is not mounted so it is safe just to remove it physically), and close the terminal on the PC - the PC will not be required any more so you can shut it down if you wish.

NOTE: The creation of the USB boot disk was done on a Linux PC in the above example. You can, however, use a Macintosh PC to create the USB boot disk. It is highly recommended that you use the 'dd' command (shown above) from a terminal on Macintosh PC to copy the iso images downloaded from the Linux PCLinuxOS web site. Please do not use any other utilities for creating the USB boot drive. Do NOT try to create the USB boot disk from a Windows PC - it will not work reliably. However, you could safely create a DVD from the iso image file that was downloaded.

STEP 2: Booting The PC On Which PCLinuxOS Is To Be Installed

On the PC that the PCLinuxOS OS will be installed, plug in the USB boot disk and power it on. Press the Boot Menu function key (e.g, F12 for Gigabyte, or F8 for Asus motherboards used by the PC, etc) after the POST beep. At the Boot Menu, select the USB drive with 'UEFI' as part of it's name, and press the 'Enter' key (see figure below).

NOTE: The above instructions were designed to ensure that you boot up in UEFI mode. However, if the HDD/SSD is indeed blank, the PC will boot up in UEFI mode without you having to press the key for the Boot Menu function after the POST beep.

The PC will start booting and the PCLinuxOS Grub menu should appear. The first item, which reads 'Start PCLinuxOS Live (UEFI mode)' is already selected (see below), so just press the 'Enter' key. The OS will start to load.

Next, you will be asked to identify your keyboard (see below) - do so and click on the 'Next' button. The KDE desktop will then appear as shown below. Another window may also pop up, giving information on the passwords for the 'guest' account as well as the 'root' account - this window will automatically close after a certain time. This window can be re-opened by clicking on the 'Live CD Information' icon on the KDE desktop.

Next, we need to prepare the partitions before installing PCLinuxOS. Since we booted the PC in UEFI mode, we will use the 'gdisk' utility. Unfortunately, this utility is NOT installed by default in PCLinuxOS - we have to install it manually using the 'Synaptic Package Manager'.

Click on the 'Synaptic Package Manager' icon in the panel (at the bottom left corner of the screen) and enter the 'root' password for authentication. The Synaptic window will appear as shown below.

Click on the 'Search' button and enter 'gdisk' in the search field as shown below. Click the 'Search' button and the window below will appear.

Right-click on the 'gdisk' item and then select 'Mark for Installation' from the context menu. Then click on the 'Apply' icon button. Confirm the installation by clicking on the 'Apply' button in the confirmation window (see below). Wait for the installation to finish and you will see that a green colored mark will appear to the left of the 'gdisk' item - confirming that the installation was successful. Then close Synaptic.

Click on the PC menu, 'More Applications', 'Terminals' and 'Konsole - Terminal' to open a terminal. Then switch to the 'root' account by executing:


Enter the 'root' password when prompted and you will be in the 'root' account. We need to be in the 'root' account before we can start to prepare the partitions using 'gdisk'. Execute:

  gdisk /dev/sda

NOTE: This article will assume that you have only one HDD/SSD on your PC and that the device name is '/dev/sda'.

The 'gdisk' utility will start and you will see a screen similar to the one shown below.

If you see a warning message like the one shown by the green arrow above, it is most likely that you are using a HDD/SSD with an existing MBR partition table.

You can now choose between 2 alternative actions:
  • If you are unsure that the HDD/SSD is NOT completely blank and may contain data that you want to be saved, then exit disk by typing 'q' (the HDD/SSD will remained unchanged in this case), and then check the HDD/SSD for any contents and save it if so desired. Then restart 'gdisk' once more and follow the instructions below.

  • If you are SURE that the HDD/SSD is completely blank and the warning message was shown because a MBR type partition exists for a prior installation (i.e, the HDD/SSD was used previously), then press the 'w' (write) key, followed by the 'Enter' key. Then press the 'Y', followed by the 'Enter' key to confirm, and 'gdisk' will convert the MBR partition table to a GPT partition table and exit. Restart 'gdisk' once more and you will not get the warning message any-more (see below).

Also note the message in the prompt '(? for help)' - so if you are lost, you can press the '?' key for help any-time. Notice the 'q' command in the 'help' list - this allows you to quit 'gdisk' at any time before anything is committed (by using the 'w' command) to the HDD/SSD. It could be a lifesaver for you if you make a make a mistake during the process of creating partitions on the HDD/SSD - you can quit 'gdisk' and start all over.

The HDD does not contain any partitions at the moment, and to confirm this, type 'p', followed by the 'Enter' key. The screen will change as shown below - notice the information displayed for the HDD/SSD, plus the fact that it does not have any partitions configured yet.

The HDD/SSD for UEFI system requires an EFI System Partition (ESP) formatted as FAT32. The recommended size of this special partition is between 128 MiB (Mega-Binary-Bytes - Google it for more information). This partition must also have it's 'boot flag' set and the 'gdisk' utility internal code set to 0xEF00 (hexadecimal). The 'boot flag' will be set during the installation of a Linux distribution.

Follow the steps given below to create the ESP partition:
  1. Type the command 'n' (new) and press the 'Enter' key.

  2. You will be prompted to enter the new partition number - note that the default is 1; so just press the 'Enter' key.

  3. Next you will be prompted to enter the first sector number - note that the default is 2048; so just press the 'Enter' key.

  4. Next you will be prompted to enter the last sector number for the partition - the default is last sector on the HDD/SSD - which is what you DON'T want. You NEED a partition size of 128 MiB. It is possible to specify this sector relative to end of the last sector specified by preceding the number by a '+' - in effect the 'size' of the wanted sector. For this article, the ESP's size is around 128 MiB - so we typed '+128M' and the 'Enter' key.

  5. Next you will see the default type of partition you just created - a 'Linux filesystem' - which is NOT the type wanted. You want to create a EFI System Partition (ESP) and the correct code for it is 0xEF00 (you can type 'L', 'Enter' to list all the valid type codes). At the prompt for the hex code, enter 'ef00' followed by the 'Enter' key. The display will then confirm that you have changed the type of partition to 'EFI System'. You will now be back at the main prompt. Then type 'p', 'Enter' to check what you have done so far. The final screen will look something like this:

Note that:
  • you have created partition 1
  • the start sector is 2048 and the end sector is 264191
  • the size of the partition is 128 MiB
  • the code of the partition is hex EF00
  • the partition name (type name) is 'EFI System'
This confirms exactly what you wanted.

The next partition that will be created is the Linux swap partition. Follow the steps given below to create this (only the main command is given from now on - it is understood that each command will be followed by the 'Enter' key):
  1. Type 'n' for a new partition.

  2. Type 'Enter' to accept the default partition number 2.

  3. Type 'Enter' to accept the default first sector number.

  4. Type the required size of the swap partition - this should be equal to the target PC's RAM size - we will use 16 GiB in this article; so we will type '+16G'.

  5. Type a code of hex 8200 for the linux swap.

  6. Type 'p' to display what you have done so far (see figure below).

Should you make a mistake (e.g, specifying a wrong size for the swap partition), you can easily correct this by first deleting the partition (by using the 'd' command and specifying which partition to delete) and starting over to create a new partition. Note that the HDD will remain unaffected - nothing will be written to the HDD until you specifically execute the 'w' (write) command.

Next, you will create the actual Linux partition; i.e, the partition on which the PCLinuxOS system will reside. Follow the steps given below to create this:
  1. Type 'n' for a new partition.

  2. Type 'Enter' to accept the default partition number.

  3. Type 'Enter' to accept the default first sector number.

  4. Next we have to specify the last sector. As we want to use the rest of the HDD/SSD for PCLinuxOS, we will accept the default and just press the 'Enter' key.

  5. Type 'Enter' to accept the default partition type - which happened to be the correct 'Linux filesystem'.

  6. Type 'p' to display what you have done so far (see figure below).

Now that we have created all the required partitions, all that remained to be done is to write these partition information to the HDD. Type 'w', 'Enter', 'Y', 'Enter' again to confirm and you are done. 'gdisk's work is done and it will automatically close (see below).

Remember that, although we have partitioned the HDD properly, it is NOT formatted with the proper filesystem yet. To do this we need to invoke the 'mkfs' (make filesystem) utility as follows:

  1. For the first ESP filesystem, we require to format that partition as FAT32. To do this, execute the following command from the terminal:

      mkfs.vfat -F32 /dev/sda1

  2. For the second swap partition, we will use the 'mkswap' utility and execute:

      mkswap /dev/sda2

  3. For the Linux filesystem partitions, we can either format them now OR we can leave it as it is and carry out the formatting during installation of PCLinuxOS. To format the partition now, we execute the following command:

      mkfs.ext4 /dev/sda3
We assume that the ext4 filesystem is to be used in this article - should you decide otherwise and use other types of filesystems, consult the Web for the proper formatting commands to use. The final screen should look like the one shown below.

Close the terminal when done.

STEP 3: Installing PCLinuxOS

To start the installation process, click on the 'Install PCLinuxOS' icon on the KDE desktop. The Draklive Installation Wizard will start (see below). Click on the 'Next' button to proceed.

The DrakX Partitioning wizard will appear (see below). Notice that the 'Use existing partitions' item is already selected. Since this is what we want, just click on the next button.

The next install window will appear (see below), and we have to select which partition to format, the mount point, and the filesystem type. Since all these were correctly set, just click on the 'Next' button.

The next screen is where you confirm your choices - note the warning that says all data will be wiped. Since we are sure that no data currently exists on the HDD/SSD, we click on the 'Next' button.

The next screen (which may appear) is where the installer informs you that some packages will not be required for the system configured, and they will be removed (see below). Click on the 'Next' button.

The installation of PCLinuxOS proper will begin (see below). The progress can be monitored by the blue bar at the bottom of the window. Wait for the installer to finish.

The next screen (see below) indicates where the bootloader will be installed; along with the time delay before booting. If you want, you can also enter a security password for the bootloader. Click on the 'Next' button.

You can edit the kernel parameters on the next screen (see below). Then click on the 'Finish' button.

The bootloader will be installed, and when finished, the screen as shown below will appear. Click on the 'Finish' button as instructed. To restart the PC, click on the PC menu, select 'Leave', followed by 'Restart'. Then click on the 'Restart Computer' item when it appears.

NOTE: The PC will take some time to either restart or shut down and it will beep at you at the end. Wait for the beep, then remove the USB drive. Then press the 'Enter' key (although the prompt to do so WILL NOT appear on the screen) to restart or shut down the PC. Note this will only happen if the PC installed the hardware accelerated video drivers for the video card installed on your PC.

STEP 4: Booting Into The New PCLinuxOS System

Remove the boot USB drive when you hear the beep, and press the 'Enter' key. The PC will restarts, and after a while the PCLinuxOS GRUB menu will appear (see below). Either wait for 10 seconds or just press the 'Enter' key to start booting.

If this is the first time you are starting the PC after installation of PCLinuxOS, you will see a prompt to enter your time zone (see below). Enter the correct time zone and press the 'Next' key.

You will then be asked to set the clock to local time or UTC time (see below). You can also set the time to be automatically synchronized to a NTP server. Click the 'Next' button when done.

On the next screen (see below), enter your 'root' password. Click the 'Next' button when done.

The next screen (see below) is where you will enter the details for your main user. Click the 'Next' button when done.

Next, you will see the log in screen (see below). Click on your user's name and enter your user's password. If the name and password is accepted by the system, the KDE desktop will appear.

Note the message about updating the PC (see below), which is the next task before we do anything else on the PC.

STEP 5: Update PCLinuxOS

Take some time in absorbing the recommendations and instructions (see below) concerning updates on the window that appears in the middle of the screen. The recommended period between applying updates is twice a month - it can be shorter if you wish. Take note of the important message at the bottom of the window, where it says to apply any updates BEFORE installing any new additional software. Then click on the 'OK' button to dismiss the window. Another window will pop up - the Konquerer web browser which contains more instructions on updating PCLinuxOS. Evidently, this OS takes updating the system seriously. Click on the 'X' button at the top of the browser window to close it when you have read it.

In order to check if there are any updates available to PCLinuxOS, an icon (see below) will appear in the notification area of the bottom panel. This icon resembles an exclamation mark on an orange coloured background.

We will now apply any updates to PCLinuxOS using the Synaptic Package Manager from the menubar at the bottom of the screen, using the following steps:
  1. Click on the Synaptic Package Manager icon in the menubar and an authentication window will pop up (see below). Since updating the PC requires the root privileges, you need to enter the root password and click the 'OK' button.

  2. Synaptic will open (see below). Resize the window if you wish.

  3. Click the 'Reload' button in Synaptic's menu bar. Then wait for while until the system has finished re-loading the package information. If there are any updates, you will see the screen as shown below. Note the 'Installed (upgradeable)' item.

  4. Click on the 'Installed (upgradeable)' item and the screen will change like the one shown below.

  5. Click on the 'Mark All Upgrades' button in Synaptic's menu bar. A new window will pop up (see below). This window will display all the changes for the upgrade - if you agree, click on the 'Mark' button.

  6. The main Synaptic window will re-appear with all the update items highlighted (see below). Note also that the 'Apply' button in Synaptic's menu bar is now enabled. Click on this button to start the upgrade process.

  7. A confirmation window will pop up (see below). If you agree and wish to proceed with upgrading the system, click on the 'Apply' button.

  8. Synaptic will begin the upgrading process by first downloading all the packages from the repository via the Internet (see below).

  9. Once downloading has finished, Synaptic will begin installing them (see below).

  10. When all the packages has been installed, a log window may appear (see below). Click the 'Close' button to dismiss the log window.

  11. The main Synaptic window will re-appear (see below). Close Synaptic by clicking on on the 'X' button at the top of the window.

That's it - you now have a fully updated PCLinuxOS64 UEFI PC.

STEP 6: Post-Install PCLinuxOS64 Tasks

PCLinuxOS is a great KDE desktop OS, but you still need to perform some post-install tasks to make it even more a great OS. To do this, just follow the steps below.


Personally I use the terminal very often and one the first task I normally do is to set it up to my taste. Of course, this task is highly subjective - you are free to set the terminal up any way you like - take my way as a guide.
  1. Click on the PC menu, 'More Applications', 'Terminals' and 'Konsole - Terminal' to open the terminal. The default terminal will appear as shown below.

  2. Click on the 'Settings' item in the terminal's menu bar and then select 'Current Profile...' (see below). The current profile window will appear as shown below. I prefer a terminal size of 100 columns and 30 rows - so I changed these 2 values to suit.

  3. Click on the 'Appearance' tab and select the color scheme - I prefer to use green on black (see below). Then click on 'OK' button.

  4. Click on the 'Settings' item in the terminal's menu bar and then select 'Configure Konsole...' (see below). The current Konsole window will appear as shown below.

  5. Deselect the 'Use the current the current window size on startup' (see below). Click on the 'OK" button.

  6. Right click on the terminal in the panel below and select 'Show a Launcher When Not Running' item to pin the launcher for the terminal in the panel. Then close the terminal by clicking on the 'X' on the top right of the terminal window. Now click on the terminal icon in the panel and the configured terminal will appear as shown below.

Extra Software

Next the Synaptic Package Manager is called upon to install some software that I normally use very often. PCLinuxOS, by default, has installed a lot of software; some useful and some not. However, I feel that it is lacking some software - especially a simple command line text editor like 'nano'. The following are the additional software that I normally add for any new Linux distribution.
  • nano (simple command line text editor)
  • Google Chrome (a Web browser)
  • bluefish (a GUI-based HTML editor)
  • qbittorrent (a BitTorrent client)
  • gdisk (UEFI version of fdisk)
To install these software just follow the steps below.
  1. Click on the Synaptic Package Manager icon in the menu bar and an authentication window will pop up. Since installing any software on the PC requires the root privileges, you need to enter the root password and click the 'OK' button.

  2. Use the 'Search' facility to search for, and mark for installation, all the software listed above. By the way, Google Chrome web browser is listed as 'google-chrome-stable' in Synaptic. Then click on the 'Apply' item to install them. Confirm your choice by clicking on the 'Apply' button in the confirmation window. Synaptic will begin downloading the software, then installing them once downloading has finished. Then close the Synaptic window.
Setting HOSTNAME Permanently

One of the shortcoming of installing PCLinuxOS is that there is currently no way to specify a hostname for the PC during the install process. To fix this we need to edit 2 files; '/etc/sysconfig/network' and '/etc/hosts'. Open a terminal and change to the 'root' account (we are editing 'system' files and, therefore, we need to be in the 'root' account) and enter your password when prompted.


Next, we open the '/etc/sysconfig/network' file for editing.

  nano /etc/sysconfig/network

Note we are using the 'nano' text editor - replace the command using your favourite text editor if you wish. Next, we move the cursor to the end of the file and insert the following line.


Replace 'pc_hostname' with the hostname of your choice. Then save the file (Ctrl-O+Enter) and exit (Ctrl-X+Enter) the editor. Now, we open the '/etc/hosts' file for editing.

  nano /etc/hosts

Move the cursor to the line that starts with '' and change the 'localhost.localdomain' to the host name of your choice. That line should now read as: pc_hostname localhost

Replace 'pc_hostname' with the hostname of your choice. Then save the file (Ctrl-O+Enter) and exit (Ctrl-X+Enter) the editor. In order to make the hostname change permanent, we have to restart the PC. Do it and at the login screen, you will see the message 'Welcome to pc_hostname' (or the host name of your choice). Log in as usual and you will be back at the KDE desktop.

Generating List of Installed Software

If you recall, I said that PCLinuxOS has installed a lot of software during installation. You may be curious of exactly what software was installed and this section shows you how to generate a list of such software. Open a terminal and execute the following command:

  rpm -qa | sort > installed.txt

Now you can use 'nano' or 'mc' in the terminal to view the file 'installed.txt'; or, if you prefer, the GUI based 'kwrite' text editor to view the same file.

If you are in a hurry and need to generate the same list to view all the installed software, open a terminal and use the command below:

  rpm -qa | sort | less

If you want to query the rpm database on whether a certain software is installed, use the command below:

  rpm -qa | grep software_name

Replace 'software_name' with the actual name of the software.


Now you can go ahead and tweak your PCLinuxOS PC just the way you like it. How you do it is a very subjective, so I will not cover it in detail for this article, except to mention that you can do the 'tweaking' using the 'Configure Your Computer' and 'Configure Your Desktop' utilities, which can be activated using the icons found in the panel near the 'PC' menu found at the bottom left of your KDE desktop screen.

Enjoy your PCLinuxOS PC!

No comments:

Post a Comment