GA Kernel Modules Rebuilding at Every Boot / Removed at Reboot, Shutdown

Discussions about using Linux guests in VirtualBox.
chrisretusn
Posts: 17
Joined: 4. May 2020, 17:07

GA Kernel Modules Rebuilding at Every Boot / Removed at Reboot, Shutdown

Post by chrisretusn »

VirtualBox Version 6.1.32 r149290; Guest Additions same.
Host info:

Code: Select all

# inxi -SMCGNz
System:
  Kernel: 5.16.11 x86_64 bits: 64 Console: pty pts/1 Distro: Slackware 15.0
Machine:
  Type: Desktop System: Gigabyte product: M68MT-S2 v: N/A serial: N/A
  Mobo: Gigabyte model: M68MT-S2 serial: N/A BIOS: Award v: F1
    date: 11/15/2010
CPU:
  Info: quad core model: AMD Phenom II X4 840 bits: 64 type: MCP cache:
    L2: 2 MiB
  Speed (MHz): avg: 1500 min/max: 800/3200 cores: 1: 800 2: 800 3: 2500
    4: 1900
Graphics:
  Device-1: NVIDIA GF108 [GeForce GT 730] driver: nvidia v: 390.147
  Display: server: X.Org v: 1.20.14 driver: X: loaded: nvidia
    unloaded: modesetting,nouveau,nv,vesa gpu: nvidia resolution: 1366x768~60Hz
  OpenGL: renderer: GeForce GT 730/PCIe/SSE2 v: 4.6.0 NVIDIA 390.147
Network:
  Device-1: NVIDIA MCP61 Ethernet type: network bridge driver: forcedeth
  Device-2: Qualcomm Atheros AR2417 Wireless Network Adapter [AR5007G
  802.11bg]
    driver: ath5k
Guest Info (copied and pasted from VM):

Code: Select all

# inxi -SMCGNz
System:
  Kernel: 5.16.11 x86_64 bits: 64 Desktop: KDE Plasma 5.24.2
    Distro: Slackware 15.0
Machine:
  Type: Virtualbox System: innotek GmbH product: VirtualBox v: 1.2
    serial: N/A
  Mobo: Oracle model: VirtualBox v: 1.2 serial: N/A BIOS: innotek GmbH
    v: VirtualBox date: 12/01/2006
CPU:
  Info: dual core model: AMD Phenom II X4 840 bits: 64 type: MCP cache:
    L2: 1024 KiB
  Speed (MHz): avg: 3215 min/max: N/A cores: 1: 3215 2: 3215
Graphics:
  Device-1: VMware SVGA II Adapter driver: vmwgfx v: 2.19.0.0
  Display: server: X.Org v: 1.20.14 driver: X: loaded: vmware
    unloaded: modesetting,vesa gpu: vmwgfx resolution: 1280x675~60Hz
  OpenGL: renderer: llvmpipe (LLVM 13.0.1 128 bits) v: 4.5 Mesa 21.3.7
Network:
  Device-1: Intel 82540EM Gigabit Ethernet driver: e1000
  Device-2: Intel 82371AB/EB/MB PIIX4 ACPI type: network bridge
    driver: piix4_smbus
The VirutalBox Guest Additons kernel is being rebuilt at every boot. It is also being removed at every shutdown, reboot. This does explain why the modules are being rebuilt at every boot but, why are they being removed on shutdown / reboot? The Guess Additions are successfully installed in /opt/VBoxGuestAdditions-6.1.32/. The kernel modules are installed in /lib/modules/5.16.11/misc/ during the start up. I have verified that the drivers are indeed removed by booting to an install ISO, mounting the guest hard drive and checking /lib/modules/5.16.11/misc/. The VirtualBox kernel modules no longer present.

Screen shots follow:
At every boot:
Virtual Machine Start Up
Virtual Machine Start Up
ksnip_20220226-151339.png (42.57 KiB) Viewed 8199 times
On shutdown:
On Shutdown
On Shutdown
ksnip_20220226-150748.png (36.09 KiB) Viewed 8199 times
On reboot:
On Reboot
On Reboot
ksnip_20220226-150958.png (35.88 KiB) Viewed 8199 times
This issue have been happening for quite some time. I would like to get it resolved. Thanks.
chrisretusn
Posts: 17
Joined: 4. May 2020, 17:07

Re: GA Kernel Modules Rebuilding at Every Boot / Removed at Reboot, Shutdown

Post by chrisretusn »

Waited over a month before a follow up. With 135 views to date, guess there is no solution for this and I must be only one that sees this issue.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: GA Kernel Modules Rebuilding at Every Boot / Removed at Reboot, Shutdown

Post by mpack »

It seemed like a Linux support question to me. I could not see an obvious VirtualBox relevance.

Also, no VM log was provided.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: GA Kernel Modules Rebuilding at Every Boot / Removed at Reboot, Shutdown

Post by fth0 »

Perhaps you have two different variants of the VirtualBox Guest Additions (GA) installed, a Slackware-provided one and an Oracle-provided one. Try to uninstall both if possible, then search for all files named "vbox*" (e.g. sudo find / -iname "vbox*").
arQon
Posts: 228
Joined: 1. Jan 2017, 09:16
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu 16.04 x64, W7

Re: GA Kernel Modules Rebuilding at Every Boot / Removed at Reboot, Shutdown

Post by arQon »

Sometimes, guessing games are a nice diversion. :)

I'm going with "Immutable drive".
chrisretusn
Posts: 17
Joined: 4. May 2020, 17:07

Re: GA Kernel Modules Rebuilding at Every Boot / Removed at Reboot, Shutdown

Post by chrisretusn »

mpack wrote:It seemed like a Linux support question to me. I could not see an obvious VirtualBox relevance.
This is the Linux Guest forum. correct. Maybe I should have spelled out GA (Guess Additions).
Also, no VM log was provided.
Okay, didn't think to post one. Not sure that will help but, here ya go from my last session.
Attachments
VBox.log.zip
(26.92 KiB) Downloaded 3 times
Last edited by mpack on 31. Mar 2022, 16:44, edited 3 times in total.
Reason: Remove offsite (pastebin) attachment, make local.
chrisretusn
Posts: 17
Joined: 4. May 2020, 17:07

Re: GA Kernel Modules Rebuilding at Every Boot / Removed at Reboot, Shutdown

Post by chrisretusn »

fth0 wrote:Perhaps you have two different variants of the VirtualBox Guest Additions (GA) installed, a Slackware-provided one and an Oracle-provided one. Try to uninstall both if possible, then search for all files named "vbox*" (e.g. sudo find / -iname "vbox*").
Slackware does not provide a variants of the VirtualBox Guess Additions. I use the GA that come with the VirtualBox installer.
chrisretusn
Posts: 17
Joined: 4. May 2020, 17:07

Re: GA Kernel Modules Rebuilding at Every Boot / Removed at Reboot, Shutdown

Post by chrisretusn »

arQon wrote:Sometimes, guessing games are a nice diversion. :)

I'm going with "Immutable drive".
So I guess the information provided in my first post was useless, please enlighten me on what I should have provided. Thanks. ;)
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: GA Kernel Modules Rebuilding at Every Boot / Removed at Reboot, Shutdown

Post by mpack »

Looks like this might be a variant of this one:
viewtopic.php?f=7&t=103520
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: GA Kernel Modules Rebuilding at Every Boot / Removed at Reboot, Shutdown

Post by fth0 »

Thanks for providing the VBox.log file, which shows the usually expected log messages during shutdown.

Immutable virtual disk images are automatically restored to their initial contents just before the next VM start and are described in 5.4. Special Image Write Modes.

Depending on your programming skills, you could try some manual debugging by adding more info statements to the /opt/VBoxGuestAdditions-6.1.32/init/vboxadd shell script.
chrisretusn
Posts: 17
Joined: 4. May 2020, 17:07

Re: GA Kernel Modules Rebuilding at Every Boot / Removed at Reboot, Shutdown

Post by chrisretusn »

mpack wrote:Looks like this might be a variant of this one:
viewtopic.php?f=7&t=103520
I looked at that just now. I could not find vboxdrv.sh anywhere in the VM.

I am guessing this is being caused by the init.d scripts vboxadd and or vboxadd-service.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: GA Kernel Modules Rebuilding at Every Boot / Removed at Reboot, Shutdown

Post by fth0 »

chrisretusn wrote:I could not find vboxdrv.sh anywhere in the VM.
This is correct.

VirtualBox builds and uses Linux kernel modules on Linux hosts and in Linux guests. vboxdrv.sh (on Linux hosts) and vboxadd (in Linux guests) are similar scripts. The former had a bug (introduced in VirtualBox 6.1.24 and solved in 6.1.28), which led to the host-side Linux kernel modules being built on every host reboot. mpack just hinted that vboxadd could have a similar bug.
chrisretusn
Posts: 17
Joined: 4. May 2020, 17:07

Re: GA Kernel Modules Rebuilding at Every Boot / Removed at Reboot, Shutdown

Post by chrisretusn »

fth0 wrote:Thanks for providing the VBox.log file, which shows the usually expected log messages during shutdown.

Immutable virtual disk images are automatically restored to their initial contents just before the next VM start and are described in 5.4. Special Image Write Modes.
After reading the link provided. I am preyty sure not using an Immutable image.

Code: Select all

~$ vboxmanage showmediuminfo VirtualBoxVMs/Slackware64-racer/Slackware64-racer.vdi
UUID:           8fec7786-0f98-4cf1-acd1-c375f0b8dd8e
Parent UUID:    base
State:          created
Type:           normal (base)
Location:       /home/chris/VirtualBoxVMs/Slackware64-racer/Slackware64-racer.vdi
Storage format: VDI
Format variant: dynamic default
Capacity:       65536 MBytes
Size on disk:   50678 MBytes
Encryption:     disabled
Property:       AllocationBlockSize=1048576
In use by VMs:  Slackware64-racer (UUID: 9387a9db-f222-4f0e-a23d-0646ce29ae3a)
Depending on your programming skills, you could try some manual debugging by adding more info statements to the /opt/VBoxGuestAdditions-6.1.32/init/vboxadd shell script.
I am familiar with bash. I am not familiar with the "adding more info statements. I do know how to debug bash. I was avoiding having to try and fix this my self. I will look at vboxadd and see what I can figure out.
chrisretusn
Posts: 17
Joined: 4. May 2020, 17:07

Re: GA Kernel Modules Rebuilding at Every Boot / Removed at Reboot, Shutdown

Post by chrisretusn »

fth0 wrote:
chrisretusn wrote:I could not find vboxdrv.sh anywhere in the VM.
This is correct.

VirtualBox builds and uses Linux kernel modules on Linux hosts and in Linux guests. vboxdrv.sh (on Linux hosts) and vboxadd (in Linux guests) are similar scripts. The former had a bug (introduced in VirtualBox 6.1.24 and solved in 6.1.28), which led to the host-side Linux kernel modules being built on every host reboot. mpack just hinted that vboxadd could have a similar bug.
I looked for the "mod_dir" in vboxadd, it's not there. In fact there is no "mod_" in the script.

As I mentioned in my last post to fth0 I will look at vboxadd.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: GA Kernel Modules Rebuilding at Every Boot / Removed at Reboot, Shutdown

Post by fth0 »

chrisretusn wrote:I am familiar with bash. I am not familiar with the "adding more info statements.
You'll probably have understood it yourself by now ;), but just in case:

The vboxadd shell script contains an internal function named "info()", which is used "all over the place" to generate the messages you've already screenshotted and marked yellow. I just tried to use layman terms when writing "info statements".
chrisretusn wrote:I do know how to debug bash. I was avoiding having to try and fix this my self. I will look at vboxadd and see what I can figure out.
I'm curious what you'll find out, please let us know. :)
Post Reply