Bright: Kernel Management

From Define Wiki
Jump to navigation Jump to search
  • Note; Install the updated kernel in the chroot image as normal (rpm -ivh etc)
  • give it 2-3 mins after changing the kernel if its a new one for the ramdisk to get created

Change the version of kernel running

In this instance I wanted to boot up and older kernel after an update to ensure the OFED modules loaded correctly.

[root@head-boston boot]# cmsh 
[head-boston]% softwareimage use default-image
[head-boston->softwareimage[default-image]]% list
Name (key)           Path                                     Kernel version                   
-------------------- ---------------------------------------- ---------------------------------
GPU-image            /cm/images/GPU-image                     2.6.32-358.23.2.el6.x86_64       
default-image        /cm/images/default-image                 2.6.32-431.29.2.el6.x86_64.debug    # <--- This is the kernel we are updating 
epcc                 /cm/images/epcc                          2.6.32-358.23.2.el6.x86_64       
gpu6.5-image         /cm/images/gpu6.5-image                  2.6.32-431.11.2.el6.x86_64.debug 
phi6.5-image         /cm/images/phi6.5-image                  2.6.32-431.20.3.el6.x86_64.debug 
storage-image        /cm/images/storage-image                 2.6.32-358.23.2.el6.x86_64       
test-image           /cm/images/test-image                    2.6.32-358.23.2.el6.x86_64       
[head-boston->softwareimage[default-image]]% set kernelversion 2.6.32-358.23.2.el6.x86_64 
[head-boston->softwareimage*[default-image*]]% list
Name (key)           Path                                     Kernel version                   
-------------------- ---------------------------------------- ---------------------------------
GPU-image            /cm/images/GPU-image                     2.6.32-358.23.2.el6.x86_64       
default-image        /cm/images/default-image                 2.6.32-358.23.2.el6.x86_64       # <--- Now its updated
epcc                 /cm/images/epcc                          2.6.32-358.23.2.el6.x86_64       
gpu6.5-image         /cm/images/gpu6.5-image                  2.6.32-431.11.2.el6.x86_64.debug 
phi6.5-image         /cm/images/phi6.5-image                  2.6.32-431.20.3.el6.x86_64.debug 
storage-image        /cm/images/storage-image                 2.6.32-358.23.2.el6.x86_64       
test-image           /cm/images/test-image                    2.6.32-358.23.2.el6.x86_64       
[head-boston->softwareimage*[default-image*]]% commit
================================ default-image =================================
Field                    Message                                                      
------------------------ -------------------------------------------------------------
module                   Warning: Module ipmi_si does not exist for specified kernel.

Reboot the nodes and the old kernel will be booted


Another example

[root@hyalite ~]# cmsh
[hyalite]% softwareimage 
[hyalite->softwareimage]% list
Name (key)                     Path                                      Kernel version             
------------------------------ ----------------------------------------- ---------------------------
default-image                  /cm/images/default-image                  2.6.32-431.29.2.el6.x86_64 
default-image-copy-01-09-16.1  /cm/images/default-image-copy-01-09-16.1  2.6.32-431.29.2.el6.x86_64 
default-image-copy-01-09-16.2  /cm/images/default-image-copy-01-09-16.2  2.6.32-431.29.2.el6.x86_64 
dtn-image                      /cm/images/dtn-image                      2.6.32-431.29.2.el6.x86_64 
samba-image                    /cm/images/samba-image                    2.6.32-431.29.2.el6.x86_64 
[hyalite->softwareimage]% use default-image-copy-01-09-16.1
[hyalite->softwareimage[default-image-copy-01-09-16.1]]%  set kernelversion 2.6.32-642.3.1.el6.x86_64
[hyalite->softwareimage*[default-image-copy-01-09-16.1*]]% commit
[hyalite->softwareimage[default-image-copy-01-09-16.1]]% 
Sat Sep  3 15:27:15 2016 [notice] hyalite: Initial ramdisk for node compute060 based on image default-image-copy-01-09-16.1 is being generated
[hyalite->softwareimage[default-image-copy-01-09-16.1]]% 
Sat Sep  3 15:27:41 2016 [notice] hyalite: Initial ramdisk for node compute060 based on image default-image-copy-01-09-16.1 was generated successfully
Sat Sep  3 15:27:41 2016 [notice] hyalite: Initial ramdisk for image default-image-copy-01-09-16.1 is being generated
[hyalite->softwareimage[default-image-copy-01-09-16.1]]% 
Sat Sep  3 15:28:06 2016 [notice] hyalite: Initial ramdisk for image default-image-copy-01-09-16.1 was generated successfully
[hyalite->softwareimage[default-image-copy-01-09-16.1]]% list
Name (key)                     Path                                      Kernel version             
------------------------------ ----------------------------------------- ---------------------------
default-image                  /cm/images/default-image                  2.6.32-431.29.2.el6.x86_64 
default-image-copy-01-09-16.1  /cm/images/default-image-copy-01-09-16.1  2.6.32-642.3.1.el6.x86_64  
default-image-copy-01-09-16.2  /cm/images/default-image-copy-01-09-16.2  2.6.32-431.29.2.el6.x86_64 
dtn-image                      /cm/images/dtn-image                      2.6.32-431.29.2.el6.x86_64 
samba-image                    /cm/images/samba-image                    2.6.32-431.29.2.el6.x86_64