1

How do I get identical kernel versions across multiple machines?

I have 8 machines which I want to be on identical OS versions. They originally started out as Ubuntu 14.04 installs (at differing times) and they've been patched regularly via apt-get update && apt-get upgrade && apt-get dist-pugrade. When I execute uname -a on these systems, I get several differing versions of the kernel release and kernel versions.

$> cexec uname -a 

************************* host-all *************************
--------- alpha-front---------
Linux alpha-front 3.13.0-132-generic #181-Ubuntu SMP Wed Sep 13 13:25:03 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
--------- alpha-back---------
Linux alpha-back 3.19.0-80-generic #88~14.04.1-Ubuntu SMP Fri Jan 13 14:54:07 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
--------- qa-front---------
Linux qa-front 3.19.0-80-generic #88~14.04.1-Ubuntu SMP Fri Jan 13 14:54:07 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
--------- qa-back---------
Linux qa-back 3.19.0-80-generic #88~14.04.1-Ubuntu SMP Fri Jan 13 14:54:07 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
--------- staging-front---------
Linux staging-front 3.16.0-77-generic #99~14.04.1-Ubuntu SMP Tue Jun 28 19:17:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
--------- staging-back---------
Linux staging-back 3.19.0-80-generic #88~14.04.1-Ubuntu SMP Fri Jan 13 14:54:07 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
--------- prod-front---------
Linux prod-front 4.4.0-31-generic #50~14.04.1-Ubuntu SMP Wed Jul 13 01:07:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
--------- prod-back---------
Linux prod-back 4.4.0-31-generic #50~14.04.1-Ubuntu SMP Wed Jul 13 01:07:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

The all appear to be on the same version of the OS

$> cexec cat /etc/lsb-release

************************* host-all *************************
--------- alpha-front---------
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
--------- alpha-back---------
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
--------- qa-front---------
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
--------- qa-back---------
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
--------- staging-front---------
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
--------- staging-back---------
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
--------- prod-front---------
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
--------- prod-back---------
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"

So, kernel release 3.19.0-80-generic with kernel version #88~14.04.1-Ubuntu SMP Fri Jan 13 14:54:07 UTC 2017 seems to be the most recent. This is what I'd like to ensure all systems are running.

I've duplicated the /etc/apt/sources.list from my staging-back server to my alpha-front server and did the apt-get update && apt-get upgrade && apt-get dist-upgrade cycle and yet I still have kernel release 3.13.0-132-generic with kernel version #181-Ubuntu SMP Wed Sep 13 13:25:03 UTC 2017 (no apparent changes).

There are slight differences in the virtual hardware between systems (128MB RAM vs 64MB RAM, 16 cores vs 8 cores, 500GB root disk vs 2.3TB root disk).

What do I need to do to get identical kernel releases and kernel versions?

Any suggestions would be greatly appreciated.

  • Well you need to reboot to start a new kernel, so on each machine sudo apt-get update && sudo apt-get update && sudo reboot . Update just the kernel if you do not wish to update the whole system. – Panther Sep 22 '17 at 16:22
  • I did the update cycle (apt-get udpate; apt-get upgrade; apt-get dist-upgrade; reboot) after ensuring sources.list are identical and I still get the same results. Kernel release and version are still at 3.13.0-132-generic #181-Ubuntu SMP Wed Sep 13 13:25:03 UTC 2017. – user2280349 Sep 22 '17 at 16:33
  • 1
    You can use either the initial kernel, or the HWE kernel on all machines. The initial is 3.13, the latest HWE is 4.4. – Pilot6 Sep 22 '17 at 16:48
  • @Pilot6 - can you add details either as a comment or to my answer. I am concerned HWE is not obvious to all users. – Panther Sep 22 '17 at 17:35
1

Ubuntu 14.04 comes with point releases

See https://wiki.ubuntu.com/Kernel/Support#Ubuntu_Kernel_Support

To update all your boxes to kernel 4.4 run

DESKTOP :

sudo apt-get install --install-recommends linux-generic-lts-xenial xserver-xorg-core-lts-xenial xserver-xorg-lts-xenial xserver-xorg-video-all-lts-xenial xserver-xorg-input-all-lts-xenial libwayland-egl1-mesa-lts-xenial 

MULTIARCH DESKTOP

If you run a multiarch desktop (for example, i386 and amd64 on amd64, for gaming or Wine), you may find you need a slightly more involved command, like this:

 sudo apt-get install --install-recommends linux-generic-lts-xenial xserver-xorg-core-lts-xenial xserver-xorg-lts-xenial xserver-xorg-video-all-lts-xenial xserver-xorg-input-all-lts-xenial libwayland-egl1-mesa-lts-xenial libgl1-mesa-glx-lts-xenial libgl1-mesa-glx-lts-xenial:i386 libglapi-mesa-lts-xenial:i386 

SERVER

Install the HWE kernel derived from 16.04 (xenial):

sudo apt-get install --install-recommends linux-generic-lts-xenial 

sudo apt-get install linux-generic-lts-xenial

See also https://wiki.ubuntu.com/Kernel/LTSEnablementStack#Ubuntu_14.04_LTS_-_Trusty_Tahr

  • 1
    Ugh... this is not at all intuitive. The graphic for 14.04.x Ubuntu Kernel Support Schedule shows that Ubuntu 14.04.5 (v4.4) and this is Xenial 16.04 HWE Kernel. So, if I understand this correctly, even though I'm upgrading a 14.04 (Trusty Tahr) machine to version 14.04.5, I'm going to specify a Xenial package (where Xenial Xerus is normally associated with Ubuntu 16.04). Yet I'm going to actually end up with a 14.04.5 Ubuntu version at the end of the upgrade process. – user2280349 Sep 28 '17 at 18:47
  • Interesting. I used your server HWE kernel update command on a machine on which I'd upgraded to Ubuntu 14.04.3 and I have a 4.4 HWE kernel while the DISTRIB_DESCRIPTION remained at "Ubuntu 14.04.3 LTS". This suggests that distribution release versions are independent of the kernel versions, which I wasn't aware you could do. So, if I want all my machines at kernel v3.19, I should use sudo apt-get install --install-recommends linux-generic-lts-vivid sudo apt-get install linux-generic-lts-vivid. Is this correct? – user2280349 Sep 28 '17 at 18:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.