1. You have installed openSUSE 12.3 and use systemd, the default.
2. You have installed VirtualBox, any present version.
3. You have (or want to) installed DKMS to auto update the VirtualBox kernel Modules.
4. DKMS does not seem to be working for you when you reboot your PC after loading a new kernel.
DKMS should work with VirtualBox. reinstalling its kernel modules each time you update your kernel version and this works well in openSUSE 11.4. DKMS can be setup to work with other programs that also need to compile a kernel module against the present running kernel. You can install DKMS from YaST if you have added in the Packman repository. The problem with using DKMS in openSUSE 12.3, is that after it has been installed, the dkms_autoinstaller service is not being run at startup, apparently due to the usage of systemd. The dkms_autoinstaller bash script normally resides in the /etc/init.d folder and from the YaST / System / Run Level services, symbolic links are created in rcx folders, that represent the different run levels you want the service to use. However, DKMS was just not working, at least for me, so I have come up with a new plan of attack to get DKMS running properly in openSUSE 12.3 and the basics are as follows:
1. I Disabled the /etc/init.d/dkms_autoinstaller in the system runlevel control (removes all symbolic links)
2. Moved the dkms_autoinstaller bash script file to the /usr/sbin folder where the dkms binary file is located.
3. Created a systemd service file called run_dkms.service in the folder /lib/systemd/system
4. Ran the command systemctl enable /lib/systemd/system/run_dkms.service (which puts a symbolic link in /etc/systemd something)
So, if it sounds like you need to get DKMS working because it is installed and you are using VirtualBox, then continue reading on...
1. First, we need to disable the dkms_autoinstaller runlevel service. Open up terminal and run the following command:
Code:
sudo /sbin/chkconfig -d dkms_autoinstaller
Code:
sudo mv /etc/init.d/dkms_autoinstaller /usr/sbin/dkms_autoinstaller
Code:
In KDE Alt-F2: kdesu kwrite /lib/systemd/system/run_dkms.service
Code:
In GNOME Alt-F2: gnomesu gedit /lib/systemd/system/run_dkms.service
Code:
# This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. [Unit] Description=Update kernel modules DefaultDependencies=no After=local-fs.target Conflicts=shutdown.target Before=basic.target shutdown.target [Service] ExecStartPre=/usr/local/bin/userfix ExecStart=/usr/sbin/dkms_autoinstaller start Type=oneshot TimeoutSec=0 StandardInput=tty [Install] WantedBy=multi-user.target
Code:
sudo systemctl enable /lib/systemd/system/run_dkms.service
Code:
In KDE Alt-F2: kdesu kwrite /usr/local/bin/userfix
Code:
In GNOME Alt-F2: gnomesu gedit /usr/local/bin/userfix
Code:
#!/bin/bash #: Title : /usr/local/bin/userfix #: Date Created: 2-22-12 #: Last Edit : 2-22-12 #: Author : James D. McDaniel #: Version : 1.00 #: Description : Run User Pre-dkms Compile Commands #: Options : None echo echo "User Fix File was Executed ..." echo # Place your user code here, to be run before dkms is run exit 0 # End Of Script
Code:
sudo chmod +x /usr/local/bin/userfix
I Have incorporated my run_dkms & userfix scripts into the SASI (SuSE Automated Script Installer) which will automatically install the run_dkms & userfix scripts for you. Just copy and paste the following command into a terminal session:
Code:
wget -nc http://paste.opensuse.org/view/download/56179570 -O ~/bin/make-dkms-installer ; chmod +x ~/bin/make-dkms-installer ; make-dkms-installer
So who might want to install DKMS in openSUSE 12.3 and why? Again, DKMS is used to reinstall kernel modules, that must be compiled against the present running kernel. VirtualBox is one such example. Without DKMS or other such means, if you upgrade or replace your working kernel, VirtualBox will stop running until you run the command: sudo /etc/init.d/vboxdrv setup, but this step is not required if you have installed DKMS and of course my DKMS fix here.
Please let me know if you have any questions or problems.
Thank You,
Message