LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   VirtualBox for Slackware Users (https://www.linuxquestions.org/questions/slackware-14/virtualbox-for-slackware-users-4175689027/)

MDKDIO 05-02-2021 02:24 PM

Quote:

Originally Posted by FTIO (Post 6247299)
I don't use slackpkg or any of those things...way too confusing for me and I always worry that they're adding in things I don't see or am giving 'permission' to install. I don't mean that the program is being sneaky or doing wrong or bad things, I mean I just kind of prefer to 'install' stuff by hand, so I *know* it got installed and I *know* it got such-and-such dependency built and installed first, etc. It's much slower, I'm absolutely positive, but any 'updates' my system needs I've always waited to be told about in the Slackware e-mails, like I get for the vulnerability updates to install also, or kernel.

I guess though, I could try that slackpkg here, on this setup before I wipe it and start fresh with a newer version of 'current' and see what happens and if anything changed to make it so VBox installs. Give me a little while to install it and to figure out how to use it just enough to try the update thing or maybe the upgrade all thing (just writing that out gives me the willies! lol)...it's like an Ubuntu monster turning into a bacteria and infecting Slackware, heh heh.

I'll holler if something happens, or if it doesn't work as hoped. Meh...I just remembered, now I have to swap the video card again into the new system and all the USB cables and such, lol.

All good that, it'll take the time it takes.
Def give slackpkg a try, it is not that hard to get sorted. Once done a couple of times, you'll get the hang of it.

Just to make it a little easier for you, and this being a little way off topic.
Make a new thread if you run into any problems or have questions during the process.

FTIO 05-02-2021 04:33 PM

I went ahead and got the latest Slackware install iso from AlienBob's site. I did the slackpkg thing, but it didn't seem to make any difference trying to install the VBox.run file after an
Code:

slackpkg upgrade-all
, so I figured what the heck and installed this latest and formatted the root partition.

Once it was installed and I booted up, I downloaded the VirtualBox-6.1.22-144080 file and tried to install it, which, it did fine as I got no errors in konsole, but once I tried to run it, here's what I got:

Code:

(process:7380): GLib-GObject-WARNING **: 16:11:25.989: cannot register existing type 'NMAgentManagerError'

(process:7380): GLib-CRITICAL **: 16:11:25.989: g_once_init_leave: assertion 'result != 0' failed

(process:7380): GLib-GObject-WARNING **: 16:11:25.989: cannot retrieve class for invalid (unclassed) type '<invalid>'
Segmentation fault

That looks like the same 'problem' as before. I have no idea what else it could be or what else I can do. I do a *full* install from the flashdrive (even on USB3 it takes a little while, long enough for me to smoke half a pipe of my tobacco), the latest kernel 5.10.33.

If I try the kernel in the 'extra' on the flashdrive, I just need to do a normal ol'
Code:

upgradepkg <kernel stuff>
, right? Then just do
Code:

mkinitrd -c -k -o
correct? I'm so used to lilo and now using elilo, I'm sorta lost again until I get this in my head, heh.

Uncle Lumpy 05-02-2021 05:23 PM

This looks a lot like the problem people were having a month or two back with VirtualBox VMs failing to start because the program would try to go out to see if there were any updates available. Before starting a VM, try disabling the update check in the VBox GUI. You might need to get out of the program or even reboot. Then try running a VM to see if it works.

The only reason I say this is because the first line in the error code has "NMAgent" in it``NetworkManager Agent maybe?

Just a thought,
Lumpy

MDKDIO 05-02-2021 05:44 PM

Same as the error reported here
https://www.linuxquestions.org/quest...27-4175690823/

Suggestion posted there for fixing the problem:
run
Code:

VBoxManage setextradata global GUI/UpdateDate never
I've never done this my self, so no idea if it'll fix the problem for you.

Regarding installation of the kernel from /extra...

I'm guessing you mean /testing ? (to install the 5.12 kernel)

I'd do it like this instead:
The easy way (see below), is to do this in konsole while in KDE/XFCE...

Install the kernel packages found under /testing/packages/linux-5.12.x/ IF you want to install 5.12 that is.
To install the 5.12 generic kernel, you'll need: (this list of files is taken from a mirror site, your USB memory might have a dif version of the kernel)
kernel-generic-5.12.1-x86_64-1.txz
kernel-headers-5.12.1-x86-1.txz
kernel-modules-5.12.1-x86_64-1.txz
kernel-source-5.12.1-noarch-1.txz
(not everyone would agree to this, but it is how I do it)

So basically run installpkg /path_to_the_files/kernel-generic-5.12.0-x86_64-1.txz
(or what ever the filename is, I'm guessing that 5.12.0 not yet been updated to 5.12.1 on that ISO you downloaded and put on your USB memory).

Once done installing these packages, as you pointed out, it's time to run mkinitrd

I suggest that you do this.
Run this command:
/usr/share/mkinitrd/mkinitrd_command_generator.sh

It will give you a suggested command line for making the initrd file.
The easy way:
Copy this suggested command line using your mouse, once you've selected the complete command line, you paste it into the Konsole window

It might look like this:
mkinitrd -c -k 5.10.33 -f ext4 -r /dev/nvme0n1p2 -m xhci-pci:ohci-pci:ehci-pci:xhci-hcd:uhci-hcd:ehci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-asus:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:ext4 -u -o /boot/initrd.gz

IMPORTANT!
Do not run this command as is, make sure you change 5.10.33 to the version of the kernel you just installed (if 5.12.0, 5.10.33 -> 5.12.0)
AND
.../boot/initrd.gz, name it like initrd-5.12.0.gz (same thing here, if it is 5.12.0 you've just installed)

Once satisfied with the changes made, run the command.

This will generate some files in your /boot directory
/boot/initrd-5.12.0.gz
/boot/vmlinuz-generic-5.12.0

Since you are using elilo, I'm guessing you have UEFI, so there's two more things to do:
1. Copy the /boot/initrd-5.12.0.gz and /boot/vmlinuz-generic-5.12.0 files to /boot/efi/EFI/Slackware directory
2. Edit the elilo.conf file found in /boot/efi/EFI/Slackware/elilo.conf

It'll looks something like this: (this is an example based on how my file looks like at the moment)

Code:

chooser=simple
delay=5
timeout=5
default=generic1
#
image=vmlinuz-generic-5.12.0
        label=generic1
        initrd=initrd-5.12.0.gz
        read-only
        append="root=/dev/nvme0n1p2 vga=normal ro"

Copy this section to make a new section for your just installed kernel.

image=vmlinuz-generic-5.12.0
label=generic1
initrd=initrd-5.12.0.gz
read-only
append="root=/dev/nvme0n1p2 vga=normal ro"

Change image=vmlinuz-generic-5.12.0 to correct name.
Change label=generic1 to something else, make sure you edit the line default=generic1 and put the same label name there.
Change initrd=initrd-5.12.0.gz to correct name

Once done, save the changes and you're done.

Example of how this elilo.conf with two (2) sections might look like once done:

Code:

chooser=simple
delay=5
timeout=5
default=generic1
#
image=vmlinuz-generic-5.12.0
        label=generic1
        initrd=initrd-5.12.0.gz
        read-only
        append="root=/dev/nvme0n1p2 vga=normal ro"

image=vmlinuz-generic-5.11.15
        label=generic2
        initrd=initrd-5.11.15.gz
        read-only
        append="root=/dev/nvme0n1p2 vga=normal ro"

Reboot your computer, give VirtualBox another go

FTIO 05-03-2021 04:38 PM

Quote:

Originally Posted by MDKDIO (Post 6247364)
Same as the error reported here
https://www.linuxquestions.org/quest...27-4175690823/

Suggestion posted there for fixing the problem:
run
Code:

VBoxManage setextradata global GUI/UpdateDate never

Sorry if this is a bonehead question, but just where and when do I use that code? Should it be something like:

Code:

VBoxManage setextradata global GUI/UpdateDate never /opt/VirtualBox/VirtualBox
or when installing the .run file, as in:

Code:

VBoxManage setextradata global GUI/UpdateDate never VirtualBox-6.1.22...amd64.run
or what?

MDKDIO 05-04-2021 01:18 AM

Quote:

Originally Posted by FTIO (Post 6247689)
Sorry if this is a bonehead question, but just where and when do I use that code? Should it be something like:

Code:

VBoxManage setextradata global GUI/UpdateDate never /opt/VirtualBox/VirtualBox
or when installing the .run file, as in:

Code:

VBoxManage setextradata global GUI/UpdateDate never VirtualBox-6.1.22...amd64.run
or what?

Before starting VirtualBox

So install first

If you made a reinstallation, system and VirtualBox.
Try with a normal start of VirtualBox first.

If you still see the same error.
Run the suggested command before starting VirtualBox

Daedra 05-04-2021 03:05 PM

Forgive me if this is posted earlier, I looked but didn't see anything. Is anyone else having problems building guest additions on a 32bit Slackware-current guest VM with the latest stable release 6.1.22-144080? Here is the log output...

https://pastebin.com/qLkKUTgS

FTIO 05-07-2021 09:16 PM

Well, I looked at the instructions for installing a newer kernel and...I got dizzy trying to keep up, heh, so I haven't done that, *but*, I did try the thing with that command:

Code:

VBoxManage setextradata global GUI/UpdateDate never
then clicked on the VirtualBox in my menu. Not knowing quite what I was supposed to do, I'd done this as root first in konsole and then did:

Code:

/opt/VirtualBox/VirtualBox
to start it up. Unfortunately it segfaulted. For a few minutes I tried to figure out what I'd done wrong or what else I could try and then I decided just for the heck of it to enter that VBoxManage code as *user* in konsole, then ran VirtualBox with the same command to start it as I used as root, and...VirtualBox ran as it was supposed to...sort of. I can't figure out how to make it use my whole 1920x1080 screen as it does in my 14.2 system, and it almost immediately wants to make sure I've downloaded/installed extensions for it which didn't help anything.

It's usable just fine, but since I tried to import the file I exported(?) from the VirtualBox that I have running on my 14.2 system, it isn't quite working out very well, because the import wants to think it's still in a 1920x1080 screen when it's actually in a slightly smaller screen and thus a line and a half aren't being seen as it scrolls upward from the bottom in the rpg I tried to play.

I mean, if I could get the VBox to use the whole screen, like it does on my 14.2 system, I think it'd be okay, and I suppose I could just rearrange the windows of the app for the rpg, but it's a pain doing that, it's just time consuming more than anything.

I also didn't test if I have to enter that VBoxManage code every time before I want to use VirtualBox...that also could end up being the greatest PITA of all...but, I guess to try and look on the bright side, it *is* working at least, heh.

Thanks to everyone for helping out with this and helping me try things and suggestions and your time, I honestly appreciate it. Personally though, I find this is a bug, and not a small one, but I have no idea if it's a Slackware problem, a kernel problem, or VirtualBox's fault, but this can't happen in any release of Slackware 15 (if that's what it might actually be labelled, heh heh) as far as I'm concerned, as it would mean I'm stuck at 14.2 until it somehow got 'fixed'.

lovemeslk 05-08-2021 01:41 AM

Open a terminal after you install virtualbox.
As your regular user and copy paste this in yor terminal press enter all done.
Code:

VBoxManage setextradata global GUI/UpdateDate never
Next time you upgrade the virtualbox do it again.
the updater that runs everytime you start virtualbox is built on a prebuilt
library and is not compatible with slackware current.
This has been going on a long time.
How I figured this out was using the testing version that
didn't use the updater call.

I currently use Virtualbox in Slackware Current the latest VB I develop in MacOSX and Windows-10 slackware-14.2.
Macosx has a very threatening policy of running Macosx on VB on none Apple hardware.
I careless I have bought so many Macosx operating systems that I will run it on anything I wish.
Nice not having to reboot and run macosx on a ryzen cpu

Quote:

VirtualBox Graphical User Interface
Version 6.1.20 r143896 (Qt5.6.1)
Copyright © 2021 Oracle Corporation and/or its affiliates. All rights reserved.
Slackware 14.2+ 5.12.2

lovemeslk 05-08-2021 02:07 AM

Quote:

Originally Posted by Daedra (Post 6247994)
Forgive me if this is posted earlier, I looked but didn't see anything. Is anyone else having problems building guest additions on a 32bit Slackware-current guest VM with the latest stable release 6.1.22-144080? Here is the log output...

https://pastebin.com/qLkKUTgS

The failure is a kernel header issue. I would in Slackware.
And the GCC version 10.3.0 in 32bit.
Select other 32bit kernel for the guest operating system it will be at the bottom.
Meantime I will download 32 bit slackware and check it out.
to fix this. this is what is causing the aditional modules to be built.
Code:

/tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.c:272:27: error: too many arguments to function ‘__vmalloc’
  272 |        pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM | __GFP_NOWARN, MY_PAGE_KERNEL_EXEC);
      |                          ^~~~~~~~~
In file included from ./include/asm-generic/io.h:911,
                from ./arch/x86/include/asm/io.h:375,
                from ./include/linux/io.h:13,
                from ./include/linux/pci.h:39,
                from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:135,
                from /tmp/vbox.0/combined-os-specific.c:28:
./include/linux/vmalloc.h:107:14: note: declared here
  107 | extern void *__vmalloc(unsigned long size, gfp_t gfp_mask);
      |              ^~~~~~~~~

Quote:

to fix the above issue is line 272 of /opt/VBoxGuestAdditions-6.1.22/src/vboxguest-6.1.22/vboxguest/r0drv/linux/alloc-r0drv-linux.c
The reason is "32bit long" that is 16bit are already defined in the kernel header.
so well the driver is calling for long long when it should be "32bit long long" that is 32bit. . Not needed for the 3rd call .
Quote:

./include/linux/vmalloc.h:107:14: note: declared here
so the fix is the
Code:

    pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM | __GFP_NOWARN, MY_PAGE_KERNEL_EXEC);
to
 //  pHdr = (PRTMEMHDR)__vmalloc(cb + sizeof(*pHdr), GFP_KERNEL | __GFP_HIGHMEM | __GFP_NOWARN, MY_PAGE_KERNEL_EXEC);

so if you note
Quote:

/tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.c:272:27: error: too many arguments to function ‘__vmalloc’
You will see this is the third call to be built. would be needed if 64bit Long long.
because the kernel has already defind it as 32bit long long
We need to edit line 266
Code:

# else  /* !RTMEMALLOC_EXEC_HEAP */
to
# else  defined(PAGE_KERNEL_EXEC) && defined(CONFIG_X86_PAE)

Quote:

Read below after editing the alloc-r0drv-linux.c file
To fix this.
Code:

test -e include/generated/autoconf.h -a -e include/config/auto.conf || (                \
echo >&2;                                                        \
echo >&2 "  ERROR: Kernel configuration is invalid.";                \
echo >&2 "        include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "        Run 'make oldconfig && make prepare' on kernel src to fix it.";        \
echo >&2 ;                                                        \
/bin/false)
make -f ./scripts/Makefile.build obj=/tmp/vbox.0 \

cd /usr/src/linux
make mrproper
if running huge-smp kernel
cat /boot/config > .config
make oldconfig
make prepare
But this isn't an issue it is just a warning
that pops up if something else fails.

OK now that you have edited the file.
Quote:

cd /opt/VBoxGuestAdditions-6.1.22
then time to build.
Code:

make install
Then
make clean

reboot
when the kde or xfce4 start to flicker
click on the "view" tab
Then click the auto-resize Guest Display it will stop.
Quote:

This is a work around not a fix untill VirtualBox really deals with a true 32 bit system.Like slackware.

FTIO 05-16-2021 09:39 AM

Okay, for the heck of it, I downloaded the very latest and greatest Slackware64 iso and put it on my flashdrive.

Installed it on my new system, completely deleting everything already on the NVME drives and starting afresh.

Went to SlackBuilds.org and took a look at VirtualBox that was there and what, if any, dependencies it wanted to build it. It did...when I click on virtualbox, it tells me it requires acpica and virtualbox-kernel before being built itself.

Off I hie myself to get vbox-kernel and acpica. With acpica, I built the lastest and greatest it offered on the website instead of the 4 year old version for the Slackware 14.2 but still using the build script for the 14.2 since it still built fine. Installed that and moved on to get vbox-kernel.

The vbox and vbox-kernel I decided to just go ahead and try to build the version that was offered for 14.2, 5 0.40 (which was also the vbox itself on SlackBuilds).

Seeing's how I had the 5.10.37 kernel now with this newest x64 iso, it had a little bit more to build than it did with the 14.2 kernel, and even on this new system with a Ryzen 7 3700X and 16GB of RAM, it still took about an hour +/-, *BUT*, unfortunately it suddenly stopped with the same error I've been getting every other time I try to build or install...it can't find(?) vboxvdrv (or maybe vboxdrv) and/or vboxvdrv.ko (vboxdrv.ko).

Before trying to build the vbox, I of course went to the VirtualBox site and downloaded the 6.1.22-144080.run file and tried that before trying to build vbox. It installed without errors, but of course when starting it up it segfaults within a few seconds.

So, all I can figure is Slackware current is missing something that vbox desperately is trying to find and use but isn't there. Fresh installs of Slackware on bare metal and it doesn't work *every* time, consistently. It's just frustrating, heh. I've done searches on this and most every answer is to do a

Code:

modprobe vboxdrv
I'm going to give that a try, and if that doesn't work, I'm just going to wait until Slackware 15 is done with Beta and testing and is fully ready for the general public to install. I read through the mkinitrd, but is too confusing ATM (I'm on some new meds for my neuropathy and it's making my memory even worse than it is *without* the meds, so I'm getting confoozled a little easier than normal).

MDKDIO 05-17-2021 03:01 AM

Quote:

Originally Posted by FTIO (Post 6251236)
Okay, for the heck of it, I downloaded the very latest and greatest Slackware64 iso and put it on my flashdrive.

Installed it on my new system, completely deleting everything already on the NVME drives and starting afresh.

Went to SlackBuilds.org and took a look at VirtualBox that was there and what, if any, dependencies it wanted to build it. It did...when I click on virtualbox, it tells me it requires acpica and virtualbox-kernel before being built itself.

Off I hie myself to get vbox-kernel and acpica. With acpica, I built the lastest and greatest it offered on the website instead of the 4 year old version for the Slackware 14.2 but still using the build script for the 14.2 since it still built fine. Installed that and moved on to get vbox-kernel.

The vbox and vbox-kernel I decided to just go ahead and try to build the version that was offered for 14.2, 5 0.40 (which was also the vbox itself on SlackBuilds).

Seeing's how I had the 5.10.37 kernel now with this newest x64 iso, it had a little bit more to build than it did with the 14.2 kernel, and even on this new system with a Ryzen 7 3700X and 16GB of RAM, it still took about an hour +/-, *BUT*, unfortunately it suddenly stopped with the same error I've been getting every other time I try to build or install...it can't find(?) vboxvdrv (or maybe vboxdrv) and/or vboxvdrv.ko (vboxdrv.ko).

Before trying to build the vbox, I of course went to the VirtualBox site and downloaded the 6.1.22-144080.run file and tried that before trying to build vbox. It installed without errors, but of course when starting it up it segfaults within a few seconds.

So, all I can figure is Slackware current is missing something that vbox desperately is trying to find and use but isn't there. Fresh installs of Slackware on bare metal and it doesn't work *every* time, consistently. It's just frustrating, heh. I've done searches on this and most every answer is to do a

Code:

modprobe vboxdrv
I'm going to give that a try, and if that doesn't work, I'm just going to wait until Slackware 15 is done with Beta and testing and is fully ready for the general public to install. I read through the mkinitrd, but is too confusing ATM (I'm on some new meds for my neuropathy and it's making my memory even worse than it is *without* the meds, so I'm getting confoozled a little easier than normal).

That's odd.
I too had problems with installation of VirtualBox at first on current.
I did as suggested, I installed from the .run file
Of course, after installing the dependencies.
After this, it's been working fine.
I also run this on a Ryzen rigg, 16 GB RAM and nvme m.2 drive

I can't figure why it wouldn't work for you as well.

Slackbuild for 14.2 I did not try, I did try once with Ponce slackbuild

aikempshall 05-18-2021 04:28 AM

VirtualBox was reasonably stable until the introduction of the 5.10.x series kernel to current. Then VirtualBox started to seg fault for a lot of machines. It took Oracle some time to get VirtualBox stable again.

Just a thought, never tried this, install a kernel from the 5.4.xx series in current with 6.1.16 VirtualBox.

FTIO 05-18-2021 11:43 AM

Heh...I'm still trying to make sure I've got the 'mkinitrd' thing correct (and correctly written on a piece of paper to follow as instructions from Pat's 'readme' about initrd). Still pretty sure I'm going to have it all wrong, but hey, it's a new system and I can start from bare metal all I want I suppose, heh heh.

bamunds 05-18-2021 11:54 AM

@FTIO is there are reason you aren't using:
/usr/share/mkinitrd/mkinitrd_command_generator.sh {/boot/vmlinuz.xx)

That's the easy way to get the initrd to build.
Cheers, BrianA_MN


All times are GMT -5. The time now is 05:51 PM.