Slackware-current kernel 4.14.15 and VMware workstation 12.5. vmnet/vmmon modules issues

Since my recent kernel upgrades to the 4.14. tree, got troubles using vmware workstation. Especially logs about unable to build kernels modules, VMNET and VMMON.

First… the UI would not start after install of WS12.5.9.  From logs, got the `Unable to load libfontconfig.so.1` classic problem.

Solution found here several month ago, and it’s still works: https://malisa.wordpress.com/2017/07/06/vmware-workstation-12-5-7-on-slackware-14-2-current-kernel-4-9-35/

# cd /usr/lib/vmware/lib/libz.so.1
# mv libz.so.1 libz.so.1.old
# ln -s /usr/lib64/libz.so.1 .

Then I could start the  Workstation GUI, but with my new kernel, got a message about rebuilding kernel modules, makes sense:

Tested on VMware Workstation 12.5.7 and latest 12.5.9 ( got no license for 14.1 )

From net searches, seems to be related to kernel code change since 4.13 tree. It’s fixed in workstation 14.0/1 from the VMware release notes, but it’s not backported in 12.5….

To fix, got no credit but I hope to make you save some time…

Found a lot of discussion on VMware forum, with various patches and so on, finally, I ended up just cloning the repos from mkubecek on github: https://github.com/mkubecek/vmware-host-modules

It has done magic for me, cause it just worked out of the box  🙂

#clone repos
:~/vmware # git clone https://github.com/mkubecek/vmware-host-modules.git
Cloning into 'vmware-host-modules'...
remote: Counting objects: 639, done.
remote: Total 639 (delta 0), reused 0 (delta 0), pack-reused 639
Receiving objects: 100% (639/639), 657.40 KiB | 1.46 MiB/s, done.
Resolving deltas: 100% (445/445), done.
:~/vmware #
:~/vmware # cd vmware-host-modules/
:~/vmware/vmware-host-modules (master) #

# checkout the branch matching your release.
:~/vmware/vmware-host-modules (master) # git checkout origin/workstation-12.5.9
:~/vmware/vmware-host-modules ((w12.5.9-k4.15)) # ls
LICENSE README vmmon-only/ vmnet-only/
:~/vmware/vmware-host-modules ((w12.5.9-k4.15)) #

I’ve been to vmnet-only and vmmon-only directory then try to `make` module ( if  it won’t build here, it will not build as well with vmware tool – it was building fine 😉 )

If it builds okay, then you can replace the vmnet/vmmom from upstream.

# build the archive
:~/vmware/vmware-host-modules ((w12.5.9-k4.15)) # tar cf vmmon.tar vmmon-only
:~/vmware/vmware-host-modules ((w12.5.9-k4.15)) # tar cf vmnet.tar vmnet-only

# backup the old module source ( just in case.. )
cp /usr/lib/vmware/modules/source/vmmon.tar /usr/lib/vmware/modules/source/vmmon.tar.12.5.9.bk
cp /usr/lib/vmware/modules/source/vmnet.tar /usr/lib/vmware/modules/source/vmnet.tar.12.5.9.bk

# replace upstream module source
:~/vmware/vmware-host-modules ((w12.5.9-k4.15)) # cp vmmon.tar /usr/lib/vmware/modules/source/
:~/vmware/vmware-host-modules ((w12.5.9-k4.15)) # cp vmnet.tar /usr/lib/vmware/modules/source/

 

Then you can try to build and install the modules with the vmware-modconfig utility

# vmware-modconfig --console --install-all

vmare-modconfig restart vmware services at the end of the module install, all green

<SNIP>
Starting VMware services:
   Virtual machine monitor                  [ OK ]
   Virtual machine communication interface  [ OK ]
   VM communication interface socket family [ OK ]
   Blocking file system                     [ OK ]
   Virtual ethernet                         [ OK ]
   VMware Authentication Daemon             [ OK ]
   Shared Memory Available                  [ OK ]
:/usr/lib/vmware/modules/source #

Then you can start vmware, the GUI popped up for me 🙂

 

Enjoy!

 

 

 

LILO Warning: Video adapter does not support VESA BIOS extensions needed for display of 256 colors

I was struggling with that warning when running LILO and the bitmap menu.
I could not find the reason why and choose to fallback to the classic text menu, here is how

I couldn’t remember how long I got the message from LILO warning me about my video card not supporting the correct VESA BIOS extension, but it was annoying.

# lilo -v
LILO version 24.2 (released 22-November-2015)

<--- SNIP --->

Reading boot sector from /dev/sda
Using BITMAP secondary loader
Calling map_insert_data
Mapping bitmap file /boot/slack.bmp
Warning: Video adapter does not support VESA BIOS extensions needed for
  display of 256 colors.  Boot loader will fall back to TEXT only operation.

<--- SNIP --->

One warning was issued.
#

Falling back to TEXT only  will show  you at each boot the LILO boot: prompt.

LILO prompt

If you wait or press [ENTER] it will boot the default kernel, [TAB] will show the different entries available in lilo’s config.

I wanted something more “user friendly” and if I can’t have my beloved Slackware logo, so be it : I’ll go back to the classic LILO menu. Which looks like a redish ncurses menu <3.

Here is my lilo config –  nothing fancy – I just needed to comment the bitmap option to enable the Standard LILO menu.

# LILO configuration file                                                                                                                                                                                                                                                        
# generated by 'liloconfig'                                                                                                                                                                                                                                                      
#                                                                                                                                                                                                                                                                                
# Start LILO global section                                                                                                                                                                                                                                                      
# Append any additional kernel parameters:                                                                                                                                                                                                                                       
append=" "                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                 
boot = /dev/sda                                                                                                                                                                                                                                                                  
#compact        # faster, but won't work on all systems.                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                                 
lba32                                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                 
# Default kernel to boot: usually the latest generic in-tree kernel                                                                                                                                                                                                              
default=gen-4.14.12                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                 
# Boot BMP Image.                                                                                                                                                                                                                                                                
# Bitmap in BMP format: 640x480x8                                                                                                                                                                                                                                                
#  bitmap = /boot/slack.bmp                                                                                                                                                                                                                                                      
# Menu colors (foreground, background, shadow, highlighted                                                                                                                                                                                                                       
# foreground, highlighted background, highlighted shadow):                                                                                                                                                                                                                       
#  bmp-colors = 255,0,255,0,255,0                                                                                                                                                                                                                                                
# Location of the option table: location x, location y, number of                                                                                                                                                                                                                
# columns, lines per column (max 15), "spill" (this is how many                                                                                                                                                                                                                  
# entries must be in the first column before the next begins to                                                                                                                                                                                                                  
# be used.  We don't specify it here, as there's just one column.                                                                                                                                                                                                                
#  bmp-table = 60,6,1,16                                                                                                                                                                                                                                                         
# Timer location x, timer location y, foreground color,                                                                                                                                                                                                                          
# background color, shadow color.                                                                                                                                                                                                                                                
#  bmp-timer = 65,27,0,255                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                 
# Standard menu.                                                                                                                                                                                                                                                                 
# Or, you can comment out the bitmap menu above and                                                                                                                                                                                                                              
# use a boot message with the standard menu:                                                                                                                                                                                                                                     
#message = /boot/boot_message.txt                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                 
# Wait until the timeout to boot (if commented out, boot the                                                                                                                                                                                                                     
# first entry immediately):                                                                                                                                                                                                                                                      
prompt

<--- SNIP --->

When running lilo -v with this config, the Warning disappears.

# lilo -v
LILO version 24.2 (released 22-November-2015)

<---  SNIP --->

Reading boot sector from /dev/sda
Using MENU secondary loader
Calling map_insert_data

<---  SNIP --->

Writing boot sector.
/boot/boot.0800 exists - no boot sector backup copy made.
#

You can operationally un-comment the message option which is pointing to a simple text file, the file used as a message is shown while running lilo.

# lilo -v
LILO version 24.2 (released 22-November-2015)

<---  SNIP --->

Reading boot sector from /dev/sda
Using MENU secondary loader
Calling map_insert_data
Mapping message file /boot/boot_message.txt
Calling map_insert_file

<---  SNIP --->

#

This message will appear under the LILO menu, don’t make it to ‘long’ as it can make your screen scroll and you won’t see the menu entirely.

I took the default message from /boot/boot_message.txt  but I’ve removed all the lines that makes reference to each kernels/partitions.

# cat /boot/boot_message.txt

Welcome to the LILO Boot Loader!

Please enter the name of the partition you would like to boot
at the prompt below.
#

Here is the result:

LILO all time classic menu

Slackware Slackpkg kernel update

Prior to get to the action, here is a reminder on how slackpkg update and blacklist works.
Why should you update your kernel ? and What you should take care off prior to start the kernel update ?

Why should you update the kernel ?

At least 3 reasons for that:

  • Bugfixes
  • Features
  • Security

Even if you are not looking for fancy features or not experiencing bugs, you should look for security patches.

Especially in those times of #spectre and #meltdown, you probably have seen a lot of kernel upgrade party.

Slackware is stability oriented, and won’t propose a new kernel everyday ( even on -current ). When security comes into play, then updates come at a higher pace.

Within the first week of 2018, you had two kernel updates proposed on -current:  4.14.11 and shortly after 4.14.12 ( cannot tell for Stable 14.2).

If you follow the Slackware package tree, and if a new kernel is available, you can install it via the slackpkg utility. Let’s check it out.

Slackpkg upgrade process

Slackware ships both version with each update, the latest kernel on Current was 4.14.11 at beginning of writing. Below is what I got after searching packages with kernel in the name.

# slackpkg search kernel

Looking for kernel in package list. Please wait... DONE

The list below shows all packages with name matching "kernel".

[ installed ] - kernel-firmware-20180102git-noarch-1
[ installed ] - kernel-generic-4.14.11-x86_64-1
[ installed ] - kernel-huge-4.14.11-x86_64-2
[ installed ] - kernel-modules-4.14.11-x86_64-1
[ installed ] - kernel-headers-4.14.11-x86-1
[ installed ] - kernel-source-4.14.11-noarch-1

Those Kernel packages are handled by slackpkg, they can be removed, installed and upgraded but you can have only one version at any time.

If a newer kernel version is found when using slackpkg update then search, it will be an ‘upgrade’ of the running kernel to the newer version.

Just like any software, the ‘upgrade’ is: remove/delete the old version, and install the new one.

As a consequence, if the new kernel refuse to boot and you are not prepared to face it. You will be in trouble ( aka using liveCD/USB/Netboot to fix).

Slackpkg Blacklist

That might not be the best moment to write about slackpkg blacklist, but a reminder of what it is might help some people. This part might not be helpful if  you are already willing to upgrade your kernel, but maybe after the upgrade.

If you know the slackpkg tool, the classic combo slackpgk update / install-new / upgrade-all is familiar to you.

Slackware official documentation more than suggests you to blacklist the kernel packages to avoid the upgrade by mistake. Which is a clever advice.

As all advice, you can follow it or not 😉

The file /etc/slackpkg/blacklist is here for that ! There is already a kernel section, with common kernel packages commented.

You can un-comment them if you wish to.

#                                                                                                                                                                                                                                                                                
# Automated upgrade of kernel packages aren't a good idea (and you need to                                                                                                                                                                                                       
# run "lilo" after upgrade). If you think the same, uncomment the lines                                                                                                                                                                                                          
# below                                                                                                                                                                                                                                                                          
#                                                                                                                                                                                                                                                                                
kernel-generic                                                                                                                                                                                                                                                                   
kernel-generic-smp                                                                                                                                                                                                                                                               
kernel-huge                                                                                                                                                                                                                                                                      
kernel-huge-smp                                                                                                                                                                                                                                                                  
kernel-modules                                                                                                                                                                                                                                                                   
kernel-modules-smp                                                                                                                                                                                                                                                               
kernel-source                                                                                                                                                                                                                                                                    
kernel-firmware                                                                                                                                                                                                                                                                  
kernel-headers

When you blacklist a package, the slackpkg search won’t show any result anymore for it. You can use slackpkg file-search instead. Note file-search will return probably more than what you expect.

Luckily during the redaction, Slackware updated again the kernel to 4.14.12 which was nice for the demo.

# slackpkg search kernel

Looking for kernel in package list. Please wait... DONE

No package name matches the pattern.

#
# slackpkg file-search kernel

Looking for kernel in package list. Please wait... DONE

The list below shows the packages that contains "kernel" file.

[ installed ] - grub-2.02-x86_64-1
[  upgrade  ] - kernel-firmware-20180102git-noarch-1 --> kernel-firmware-20180104_65b1c68-noarch-1
[  upgrade  ] - kernel-generic-4.14.11-x86_64-1 --> kernel-generic-4.14.12-x86_64-1
[  upgrade  ] - kernel-huge-4.14.11-x86_64-2 --> kernel-huge-4.14.12-x86_64-1
[  upgrade  ] - kernel-modules-4.14.11-x86_64-1 --> kernel-modules-4.14.12-x86_64-1
[ installed ] - pkgtools-15.0-noarch-1
[ installed ] - pm-utils-1.4.1-x86_64-5
[  upgrade  ] - kernel-headers-4.14.11-x86-1 --> kernel-headers-4.14.12-x86-1
[  upgrade  ] - kernel-source-4.14.11-noarch-1 --> kernel-source-4.14.12-noarch-1
[ installed ] - kde-workspace-4.11.22-x86_64-4
[ installed ] - boost-1.66.0-x86_64-1
[ installed ] - fuse-2.9.7-x86_64-1
[ installed ] - libnl-1.1.4-x86_64-1
[ installed ] - libnl3-3.4.0-x86_64-1
[ installed ] - qt-4.8.7-x86_64-8
[ installed ] - texlive-2017.171108-x86_64-2

You can search specific packages using "slackpkg search package".

Here we can see that a new kernel is available for upgrade, but Slackpkg won’t be able to install the new one until the blacklist is removed ( which is what blacklisting is all about ).

 # slackpkg upgrade kernel

Checking local integrity... DONE
DONEking for kernel in package list. Please wait... 

No packages match the pattern for upgrade. Try:

	/usr/sbin/slackpkg install|reinstall 

# 

If you are not using blacklist, you are not concerned. If you just have discovered it, maybe you can ask yourself about using it in the future.

Backup the running kernel

Prior to install a new kernel, I try to have at least a backup kernel in case the new one refuse to boot. It will save the pain to find a livecd/usb/netboot to repair.

I choose to save both the HUGE and GENERIC kernel, I just copy them with another name. As the initrd is not part of any kernel packages, you don’t need to save it.

 # ls /boot/ | grep vmlinuz
vmlinuz@
vmlinuz-generic@
vmlinuz-generic-4.14.11
vmlinuz-huge@
vmlinuz-huge-4.14.11

Only vmlinuz-generic-4.14.11 and vmlinuz-huge-4.14.11 are considered. I add -bk- inside for backup.

# cp /boot/vmlinuz-generic-4.14.11 /boot/vmlinuz-bk-gen-4.14.11
# cp /boot/vmlinuz-huge-4.14.11 /boot/vmlinuz-bk-huge-4.14.11
# 
# ls /boot/ | grep vmlinuz
vmlinuz@
vmlinuz-bk-gen-4.14.11  <<<<<<<<
vmlinuz-bk-huge-4.14.11 <<<<<<<<
vmlinuz-generic@
vmlinuz-generic-4.14.11
vmlinuz-huge@
vmlinuz-huge-4.14.11

Then I edit the lilo configuration file to add the new entries.

# Linux bootable partition config begins                                                                                                  
image = /boot/vmlinuz                                                                                                                     
  root = /dev/sda1                                                                                                                        
  label = Linux                                                                                                                           
  read-only                                                                                                                               
                                                                                                                                          
image = /boot/vmlinuz-generic-4.14.11                                                                                                     
  initrd = /boot/initrd-4.14.11.gz                                                                                                        
  root = /dev/sda1                                                                                                                        
  label = gen-4.14.11                                                                                                                     
  read-only                                                                                                                               
                                                                                                                                          
image = /boot/vmlinuz-bk-huge-4.14.11                                                                                                  
  root = /dev/sda1                                                                                                                        
  label = bk-huge-4.4.11                                                                                                                  
  read-only
                                                                                                                                                                                                                                                                         
image = /boot/vmlinuz-bk-gen-4.14.11                                                                                                    
  initrd = /boot/initrd-4.14.11.gz                                                                                                        
  root = /dev/sda1                                                                                                                        
  label = bk-gen-4.14.11                                                                                                                  
  read-only                                                                                                                               
                                                                                                                                          
# Linux bootable partition config ends

Reload lilo’s config with lilo -v

# lilo -v
LILO version 24.2 (released 22-November-2015)
  * Copyright (C) 1992-1998 Werner Almesberger  (until v20)
  * Copyright (C) 1999-2007 John Coffman  (until v22)
  * Copyright (C) 2009-2015 Joachim Wiedorn  (since v23)
This program comes with ABSOLUTELY NO WARRANTY. This is free software 
distributed under the BSD License (3-clause). Details can be found in 
the file COPYING, which is distributed with this software.

Reading boot sector from /dev/sda
Using BITMAP secondary loader
Calling map_insert_data
Mapping bitmap file /boot/slack.bmp
Warning: Video adapter does not support VESA BIOS extensions needed for
  display of 256 colors.  Boot loader will fall back to TEXT only operation.
Calling map_insert_file

Boot image: /boot/vmlinuz -> vmlinuz-huge-4.14.11
Added Linux  *

Boot image: /boot/vmlinuz-generic-4.14.11
Mapping RAM disk /boot/initrd-4.14.11.gz
The initial RAM disk will be loaded in the high memory above 16M.
Added gen-4.14.11  +

Boot image: /boot/vmlinuz-bk-huge-4.14.11
Added bk-huge-4.4.11

Boot image: /boot/vmlinuz-bk-gen-4.14.11
Mapping RAM disk /boot/initrd-4.14.11.gz
The initial RAM disk will be loaded in the high memory above 16M.
Added bk-gen-4.14.11  +

Writing boot sector.
/boot/boot.0800 exists - no boot sector backup copy made.
One warning was issued.

The two new entries are added successfully, the warning about the video adapter is ‘normal’ on my machine.

At that point, you can decide to reload on the BK-HUGE or BK-GEN to make sure they are okay, or go directly to the kernel upgrade process. It’s really how cocky you want to be ^_^

Upgrade that kernel

If you have previously blacklisted the kernels packages, you can now comment them in /etc/slackpkg/blacklist so slackpkg can update them.

And upgrade all  kernel related packages with slackpkg upgrade kernel.

Slackpkg package selection for upgrade

Select the packages you want to upgrade and hit [OK], slackpkg will then download and install/upgrade them.

Slackpkg during package download and installation

At the end of the process, slackpkg will ask you if it can run lilo for you: say yes, and look for errors if any.

Your kernel image was updated.  We highly recommend you run: lilo
Do you want slackpkg to run lilo now? (Y/n)
y
Warning: Video adapter does not support VESA BIOS extensions needed for
  display of 256 colors.  Boot loader will fall back to TEXT only operation.
Added Linux  *
Fatal: open /boot/vmlinuz-generic-4.14.11: No such file or directory

Searching for NEW configuration files
		No .new files found.

#

The Fatal here was due to my use of the generic kernel: /boot/vmlinuz-generic-4.14.11 was part of the old generic package that has been ‘upgraded’ to 4.4.12.

Let’s remove this entry in lilo.conf, I probably need to build a new initrd for the new kernel anyway. I will boot from the new HUGE instead.

# Linux bootable partition config begins                                                                                                  
image = /boot/vmlinuz                                                                                                                     
  root = /dev/sda1                                                                                                                        
  label = Linux                                                                                                                           
  read-only                                                                                                                               
                                                                                                                                          
image = /boot/vmlinuz-bk-huge-4.14.11                                                                                                     
  root = /dev/sda1                                                                                                                        
  label = bk-huge-4.4.11                                                                                                                  
  read-only                                                                                                                               
                                                                                                                                          
image = /boot/vmlinuz-bk-gen-4.14.11                                                                                                      
  initrd = /boot/initrd-4.14.11.gz                                                                                                        
  root = /dev/sda1                                                                                                                        
  label = bk-gen-4.14.11                                                                                                                  
  read-only                                                                                                                               
                                                                                                                                          
# Linux bootable partition config ends

The first entry correspond to the huge kernel. /boot/vmlinuz is a symlink to the HUGE 4.14.12 kernel

# ls -lastr /boot/ | grep vmli
5360 -rw-r--r--  1 root root 5486352 Jan  6 00:20 vmlinuz-generic-4.14.12
8440 -rw-r--r--  1 root root 8640272 Jan  6 00:33 vmlinuz-huge-4.14.12
5356 -rw-r--r--  1 root root 5482256 Jan 13 15:52 vmlinuz-bk-gen-4.14.11
8436 -rw-r--r--  1 root root 8636176 Jan 13 15:53 vmlinuz-bk-huge-4.14.11
   0 lrwxrwxrwx  1 root root      23 Jan 13 16:10 vmlinuz-generic -> vmlinuz-generic-4.14.12
   0 lrwxrwxrwx  1 root root      20 Jan 13 16:10 vmlinuz-huge -> vmlinuz-huge-4.14.12
   0 lrwxrwxrwx  1 root root      20 Jan 13 16:10 vmlinuz -> vmlinuz-huge-4.14.12

Let’s run lilo -v , no error this time

# lilo -v
LILO version 24.2 (released 22-November-2015)
  * Copyright (C) 1992-1998 Werner Almesberger  (until v20)
  * Copyright (C) 1999-2007 John Coffman  (until v22)
  * Copyright (C) 2009-2015 Joachim Wiedorn  (since v23)
This program comes with ABSOLUTELY NO WARRANTY. This is free software 
distributed under the BSD License (3-clause). Details can be found in 
the file COPYING, which is distributed with this software.

Reading boot sector from /dev/sda
Using BITMAP secondary loader
Calling map_insert_data
Mapping bitmap file /boot/slack.bmp
Warning: Video adapter does not support VESA BIOS extensions needed for
  display of 256 colors.  Boot loader will fall back to TEXT only operation.
Calling map_insert_file

Boot image: /boot/vmlinuz -> vmlinuz-huge-4.14.12
Added Linux  *

Boot image: /boot/vmlinuz-bk-huge-4.14.11
Added bk-huge-4.4.11

Boot image: /boot/vmlinuz-bk-gen-4.14.11
Mapping RAM disk /boot/initrd-4.14.11.gz
The initial RAM disk will be loaded in the high memory above 16M.
Added bk-gen-4.14.11  +

Writing boot sector.
/boot/boot.0800 exists - no boot sector backup copy made.
One warning was issued.

Time to reload

You can now reaload and boot on the ‘new’ HUGE kernel, that should be labeled Linux, and you should eventually get to your login page.

I’m running the new HUGE kernel 4.4.12

$ uname -a
Linux ws1 4.14.12 #2 SMP Fri Jan 5 17:32:46 CST 2018 x86_64 Intel(R) Xeon(R) CPU D-1540 @ 2.00GHz GenuineIntel GNU/Linux
$ 
$ cat /proc/cmdline 
BOOT_IMAGE=Linux ro root=801
$ 

What to do next ?

  • You should probably makes sure everything is running fine.
  • Perhaps switch to the GENERIC kernel ?
  • Blacklist the kernel packages in /etc/slackpkg/blacklist ?
  • Clean the backup kernel if you don’t need them anymore ?

Sources

Slackware Documentation: https://docs.slackware.com/howtos:slackware_admin:systemupgrade#considerations_about_the_kernel

Experience about failure to boot after a kernel update -without- a fallback kernel.