Sunday, November 25, 2018

Install CUDA 10 on Linux mint 19 or Ubuntu 18.04

Assuming that you have nvidia GPU with cuda compatibility.
These are the steps for installing CUDA 10 on Linux mint 19 or Ubuntu 18.04
  • Install Linux mint 19/Ubuntu 18.04 fresh
  • Use the ppa nvidia drivers repo from lauchpad here
    • sudo add-apt-repository ppa:graphics-drivers/ppa
      sudo apt-get update
  • The version 410 is the current long term version as on date
  • From "Driver Manager" install the current stable version


    • Reboot; verify the driver installed from terminal using "nvidia-smi" command

    • Install these packages
      • sudo apt-get install build-essential dkms
        sudo apt-get install freeglut3 freeglut3-dev libxi-dev libxmu-dev
    • Download the deb file and follow the below steps

    • sudo dpkg -i cuda-repo-ubuntu1804-10-0-local-10.0.130-410.48_1.0-1_amd64.deb
      sudo apt-key add /var/cuda-repo-10-0-local-10.0.130-410.48/
      sudo apt-get update
      sudo apt-get install cuda

    • That's it.
    • Default location of installation is /usr/local/cuda
    • " ~/install" installs sample files
    • cd into the folder "NVIDIA_CUDA-10.0_Samples"
    • make -j2
    • Add the "PATH=$PATH:/usr/local/cuda/bin"  to your "~/.bashrc" as a last line.
    • run "deviceQuery" to verify the cuda installation.  And do the post installation formalities
    • sudo apt-get install g++ freeglut3-dev build-essential libx11-dev \
          libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev

Saturday, November 24, 2018

Challenges in installing Linux Mint 19 to dual boot along side windows

 WARNING: There is an updated Install notes. Check out  the recent post
Had a tough time setting/installing up Linux mint 19 on my existing dual boot machine to solve these 2 problems:
1. grub-efi-amd64-signed' package failed to install into /target
2. Hash Sum mismatch.
3. shim-signed and grub-efi-amd64-signed failure to configure.
Huh. Nearly 6 hours trying to figure out.

As it happened:

I had a Linux mint 18 and a rusted windows. So I wanted to refresh my machine. So I reset factory/recovery settings on windows. And wished to install Linux mint afresh. So, I have downloaded the ISO file named linuxmint-19-cinnamon-64bit-v2.iso from the official website and verified. I have made necessary partitions while installing and installation went smooth. However, right after installing and just before grub installation, this error came up.

"GRUB Installation Failed.
The 'grub-efi-amd64-signed' package failed to install into /target/. Without the GRUB boot loader, the installed system will not boot".

To rectify this.
1. install boot-repair
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install boot-repair 

Open boot repair and run the recommended things. [it took 20mins; be patient] It will FAIL badly. Never mind go ahead and restart it. It worked. Because it has successfully reinstalled grub.

2. apt-get update would not completed it will show error like "Hash Sum mismatch"

E: Failed to fetch  Hash Sum mismatch
   Hashes of expected file:
    - Filesize:393124 [weak]
    - SHA256:a70a891ed73362c0a3966c9c6c790096f5aba663389ab578a6b991b698ae43c6
    - SHA1:4e0cfabaaf47b0cbf6ecc284e5281430bbe530d2 [weak]
    - MD5Sum:94742010fa630d152bbff1445f6369b4 [weak]
   Hashes of received file:
    - SHA256:ea9bf28ed7d57e5bd739fc63485459130475026c35a84f25e57d2f5ca0521ec7
    - SHA1:af7bad4e086d5e768c450c77032ee520d58afeda [weak]
    - MD5Sum:aa28e356c8a66b4838a83ab18e10e2d5 [weak]
    - Filesize:393124 [weak]
   Last modification reported: Fri, 23 Nov 2018 12:50:34 +0000
   Release file created at: Fri, 23 Nov 2018 13:51:10 +0000

To resolve this:

sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/partial
sudo apt-get update -o Acquire::CompressionTypes::Order::=gz
sudo apt-get update

Resolve steps 2:
I am not sure above steps did resolve it completely. because I was still getting. Hash sum mismatch even after doing that.

Changing the main mirrors to different URL in Software source actually fixed in.

3. New problems:
Everytime I installed some pkg
It would try install some failed installed packages such as

Resolve steps

sudo rm /sys/firmware/efi/efivars/dump-*
sudo update-grub
sudo apt-get -f install

Linux mint and askubuntu forums.

Last Post !! Moved to new site

As I am getting old 😋, it seem like I can not remember many of my earlier tech encounters. This is the place I was logging so that I refer ...