LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   How can I install virtualbox with sbopkg on a multilib 64bit? (http://www.linuxquestions.org/questions/slackware-14/how-can-i-install-virtualbox-with-sbopkg-on-a-multilib-64bit-4175475638/)

chytraeus 09-02-2013 09:19 PM

How can I install virtualbox with sbopkg on a multilib 64bit?
 
I have multilb 64 set and working. I have steam working for my son. What I cannot seem to figure out is how to get virtualbox installed and have guest additions working. I can install it from source downloaded from virtualbox.org. I would like to be able to install it with sbopkg. I know it's unsupported but from searching the forum I take it that many people are installing it that way anyway. Besides having multilib setup properly and and adding the vbox group or user is there an additional step(s)? I see that acpica is a dependency. Do I need the 32 bit compatibility version of that package?

kikinovak 09-03-2013 02:25 AM

Here's my own documentation:

http://www.microlinux.fr/slackware/L...lBox-HOWTO.txt

Hope that helps.

chytraeus 09-03-2013 04:33 AM

1 Attachment(s)
Quote:

Originally Posted by kikinovak (Post 5020702)
Here's my own documentation:

http://www.microlinux.fr/slackware/L...lBox-HOWTO.txt

Hope that helps.

Slackware guest system
------------------------

Install Guest Additions:

Devices> Install Guest Additions

# Mount / dev / cdrom / mnt / cdrom
# Cd / mnt / cdrom
#. / VBoxLinuxAdditions.run

Restart.

I did the above but guest additions fails to start.

ruario 09-03-2013 05:37 AM

@kikinovak: Just an observation, you state in your README file:

Quote:

If you want to build a kernel module for an other virtualbox version you can use the included "virtualbox-kernel-mksrctarball.sh", which will generate the needed source package for you. You will need to have the corresponding virtualbox-ose version already installed.
Do you really need to install first? Can't you just get the src from VirtualBox-4.1.24.tar.bz2:VirtualBox-4.1.24/src/VBox/HostDrivers

P.S Even for the non-OSE binary packages you can still get the host source with a little sed and tar magic, without a preinstall, e.g.
Code:

$ sed '1,/^eval .finish/d' VirtualBox-4.2.16-86992-Linux_amd64.run | tar -xOf- ./VirtualBox.tar.bz2 | tar -xjvf- src/vboxhost
EDIT: Actually it is even easier with:

Code:

$ sh ./VirtualBox-4.2.16-86992-Linux_amd64.run --tar -xOf- ./VirtualBox.tar.bz2 | tar -xjvf- src/vboxhost

ponce 09-03-2013 05:44 AM

I guess that's quoted from the virtualbox-kernel's README on SBo.

ruario 09-03-2013 05:50 AM

@chytraeus:

You have some weird spacing and capitalisation. Also you aren't actually typing the '#' characters are you? These are just to represent the root shell, i.e. just run the following as root within the guest environment:

Code:

mount /dev/cdrom /mnt/cdrom
cd /mnt/cdrom
./VBoxLinuxAdditions.run


ruario 09-03-2013 05:55 AM

@ponce: Ah yes, so it is, my mistake. I don't use the OSE version from SBo but rather the binary makeself scripts provided www.virtualbox.org/wiki/Downloads so I had not noticed this before. Nonetheless I'll still not certain you need to preinstall, just to get the source. That sounds kinda weird.

chytraeus 09-03-2013 06:28 AM

Quote:

Originally Posted by ruario (Post 5020771)
@chytraeus:

You have some weird spacing and capitalisation. Also you aren't actually typing the '#' characters are you? These are just to represent the root shell, i.e. just run the following as root within the guest environment:

Code:

mount /dev/cdrom /mnt/cdrom
cd /mnt/cdrom
./VBoxLinuxAdditions.run


Yes, I'm typing the same as your code above. Also, when I run ./VBoxLinuxAdditions.run, it complains that I don't have the kernel headers or source installed even though I did a full install.

ruario 09-03-2013 06:36 AM

Quote:

Originally Posted by chytraeus (Post 5020789)
Also, when I run ./VBoxLinuxAdditions.run, it complains that I don't have the kernel headers or source installed even though I did a full install.

Strange, what does this report, when run in the guest:

Code:

ls /var/log/packages/kernel-*

bormant 09-03-2013 07:22 AM

Quote:

Originally Posted by chytraeus (Post 5020789)
it complains that I don't have the kernel headers or source installed even though I did a full install.

... and recommends to see log file for details. Is there something intresting?

tronayne 09-03-2013 09:26 AM

Quote:

Originally Posted by chytraeus (Post 5020584)
I have multilb 64 set and working. I have steam working for my son. What I cannot seem to figure out is how to get virtualbox installed and have guest additions working. I can install it from source downloaded from virtualbox.org. I would like to be able to install it with sbopkg. I know it's unsupported but from searching the forum I take it that many people are installing it that way anyway. Besides having multilib setup properly and and adding the vbox group or user is there an additional step(s)? I see that acpica is a dependency. Do I need the 32 bit compatibility version of that package?

You indicate that you're running a full installation of Slackware 64-bit?

You do not need any 32-bit compatibility package(s) for VirtualBox; you can install a 32-bit (or 64-bit) guest operating system in VirtualBox and you'll be just fine. For example, you can install WinXP and Win7 and Slackware 32-bit as guests in your 64-bit VirtualBox installation.

It is also not necessary to build VirtualBox from source (nice, but not necessary). If you go to https://www.virtualbox.org/wiki/Downloads, you download VirtualBox 4.2.16 Oracle VM VirtualBox Extension Pack (there's a link right next to the label). Then you click VirtualBox 4.2.16 for Linux Hosts, look down the list for All Distributions then click the AMD64 link it's http://download.virtualbox.org/virtu...inux_amd64.run if you want to go there directly).

That will download VirtualBox-4.2.16-86992-Linux_amd64.run, 85237201 bytes).

You install that with
Code:

su -
sh ./VirtualBox-4.2.16-86992-Linux_amd64.run

That will install it.

The acpiuca drives are part of the kernel and should be found in /usr/src/linux-3.2.45/drivers/acpi/acpica (if you've applied the kernel update patches otherwise they'll be in the distribution kernel source tree -- use locate acpica to find them).

You may wish to actually log in as root, startx, open a terminal window and do the installation as above.

Either way, VirtualBox will be installed in /opt/VirtualBox.

When you first start it, you'll want to install the Extension Pack -- you only do this once when you install or update VirtualBox.
  • Start VirtualBox
  • Click the File tab
  • Click Extensions
  • Click the Add Packages icon to the right of the file window (it's the one without the X)
  • Navigate to where you downloaded the Extensions
  • Click OK
The Extensions or for you VirtualBox host, not for the guest(s).

Potential problems may be that you did not do a full installation of Slackware and the kernel source is not present. Do this:
Code:

cd /usr/src
ls -al
drwxr-xr-x  5 root root 4096 Aug 26 09:57 ./
drwxr-xr-x 17 root root 4096 Aug 30 15:23 ../
lrwxrwxrwx  1 root root  12 May 23 15:54 linux -> linux-3.2.45/
drwxr-xr-x 24 root root 4096 May 22 00:18 linux-3.2.45/
lrwxrwxrwx  1 root root  28 Jul 10 07:12 vboxhost-4.2.16 -> /opt/VirtualBox/src/vboxhost/

(The above is with VirtualBox installed)

You should see the symbolic link linux -> linux-3.2.45/ (3.2.45 is the kernel version if the patches have been applied); that's where your kernel source lives. The other link gets installed by VirualBox.

In the past there have been some difficulties with VirutalBox source; e.g., no USB support (I think that's gone away). I chose, a long time ago, to simply install the binary version and be done with it -- it works, I don't have to screw around and, if I want to remove the binary version I simply
Code:

su -
/opt/VirtualBox/uninstall.sh

and it's gone.

Keep in mind that when you install a guest, you install the guest additions in that guest, not in the VirutalBox host.

In /opt/VirtualBox you will find UserManual.pdf. Everything you want to know about Guest Additions is found at page 59 of that manual.

To reiterate:
  • You do not need Multilib for anything having to do with VirtualBox.
  • It's quicker and easier to install the binary version.
  • The binary version works just fine.
  • Install Guest Additions in each Guest operating system.
  • You can install a 32-bit guest operating system in a 64-bit VirtualBox installation; you can also install a 64-bit guest operating system in a 64-bit VirtualBox installation; you cannot install a 64-bit guest operating system in a 32-bit VirtualBox installation.
  • Everything works if you let it.
Hope this helps some.

chytraeus 09-11-2013 01:53 AM

3 Attachment(s)
Quote:

Originally Posted by tronayne (Post 5020871)
You indicate that you're running a full installation of Slackware 64-bit?

You do not need any 32-bit compatibility package(s) for VirtualBox; you can install a 32-bit (or 64-bit) guest operating system in VirtualBox and you'll be just fine. For example, you can install WinXP and Win7 and Slackware 32-bit as guests in your 64-bit VirtualBox installation.

It is also not necessary to build VirtualBox from source (nice, but not necessary). If you go to https://www.virtualbox.org/wiki/Downloads, you download VirtualBox 4.2.16 Oracle VM VirtualBox Extension Pack (there's a link right next to the label). Then you click VirtualBox 4.2.16 for Linux Hosts, look down the list for All Distributions then click the AMD64 link it's http://download.virtualbox.org/virtu...inux_amd64.run if you want to go there directly).

That will download VirtualBox-4.2.16-86992-Linux_amd64.run, 85237201 bytes).

You install that with
Code:

su -
sh ./VirtualBox-4.2.16-86992-Linux_amd64.run

That will install it.

The acpiuca drives are part of the kernel and should be found in /usr/src/linux-3.2.45/drivers/acpi/acpica (if you've applied the kernel update patches otherwise they'll be in the distribution kernel source tree -- use locate acpica to find them).

You may wish to actually log in as root, startx, open a terminal window and do the installation as above.

Either way, VirtualBox will be installed in /opt/VirtualBox.

When you first start it, you'll want to install the Extension Pack -- you only do this once when you install or update VirtualBox.
  • Start VirtualBox
  • Click the File tab
  • Click Extensions
  • Click the Add Packages icon to the right of the file window (it's the one without the X)
  • Navigate to where you downloaded the Extensions
  • Click OK
The Extensions or for you VirtualBox host, not for the guest(s).

Potential problems may be that you did not do a full installation of Slackware and the kernel source is not present. Do this:
Code:

cd /usr/src
ls -al
drwxr-xr-x  5 root root 4096 Aug 26 09:57 ./
drwxr-xr-x 17 root root 4096 Aug 30 15:23 ../
lrwxrwxrwx  1 root root  12 May 23 15:54 linux -> linux-3.2.45/
drwxr-xr-x 24 root root 4096 May 22 00:18 linux-3.2.45/
lrwxrwxrwx  1 root root  28 Jul 10 07:12 vboxhost-4.2.16 -> /opt/VirtualBox/src/vboxhost/

(The above is with VirtualBox installed)

You should see the symbolic link linux -> linux-3.2.45/ (3.2.45 is the kernel version if the patches have been applied); that's where your kernel source lives. The other link gets installed by VirualBox.

In the past there have been some difficulties with VirutalBox source; e.g., no USB support (I think that's gone away). I chose, a long time ago, to simply install the binary version and be done with it -- it works, I don't have to screw around and, if I want to remove the binary version I simply
Code:

su -
/opt/VirtualBox/uninstall.sh

and it's gone.

Keep in mind that when you install a guest, you install the guest additions in that guest, not in the VirutalBox host.

In /opt/VirtualBox you will find UserManual.pdf. Everything you want to know about Guest Additions is found at page 59 of that manual.

To reiterate:
  • You do not need Multilib for anything having to do with VirtualBox.
  • It's quicker and easier to install the binary version.
  • The binary version works just fine.
  • Install Guest Additions in each Guest operating system.
  • You can install a 32-bit guest operating system in a 64-bit VirtualBox installation; you can also install a 64-bit guest operating system in a 64-bit VirtualBox installation; you cannot install a 64-bit guest operating system in a 32-bit VirtualBox installation.
  • Everything works if you let it.
Hope this helps some.

Thanks for the clear explanation. It cleared up my confusion.
I finally had some time to look at this today.
I downloaded the latest release and extension pack from virtualbox.org

Code:

sudo su -
sh VirtualBox-4.2.18-88780-Linux_amd64.run

I fired up VirtualBox and started my 32bit Slackware-14.0. I chose the huge-smp and I got an error stating that I needed pae enabled (see first thumbnail). I'm not sure why that is. So, I used the ISO to boot my VM with the huge.s kernel. After my VM finishes booting from the Slackware 14 ISO, I then set lilo to boot the generic kernel and did a mkinitrd. However, I was still getting errors when trying to install guest additions - complained that the kernel headers for my kernel were not installed (see my post above). I remembered seeing something about a non-smp kernel in the Slackware file tree. I used wget to download and install the kernel headers package from here:
http://mirrors.slackware.com/slackwa...2.45-x86-3.txz

Then did:
Code:

installpkg kernel-headers-3.2.45-x86-3.txz
sh VBoxLinuxAdditions.run

Still got an error about missing kernel headers. Then,
Code:

removepkg kernel-headers-3.2.45-x86-3.txz
cd /home/chytraeus
lftp -c "open http://mirrors.slackware.com/slackware/slackware-14.0/patches/packages/linux-3.2.45/ ; mirror linux-3.2.45-nosmp-sdk"
cd /home/chytraeus/linux-3.2.45-nosmp-sdk
sh patch-to-non-smp.sh

My /usr/src/linux was now converted to non-smp and I run:
Code:

sh VBoxLinuxAdditions.run
and no more warnings about missing kernel headers (see second thumbnail).

I rebooted and guest additions started properly (see third thumbnail).
Hopefully this will help somebody else if they encounter this problem too.

tronayne 09-11-2013 07:55 AM

Hmm. Interesting --glad you got it going.

I've always found it useful when installing Slackware to let it default the kernel and to install everything (not the KDE language packs and other similar things, just what gets installed with "all"). That also installs the kernel source -- I don't ever mess with the kernel but the kernel source comes in handy now and again when some third-party packages need to add modules and needs the source to build them (like VirtualBox).

The kernel updates of a few weeks ago were twiddled a little because there was a problem with Intel graphics -- the content of the patches/packages directory at the mirrors is the current, working, version.

Now, keep in mind that this is Slackware 64-bit 14.0 stable, not current that I'm talking about.

After downloading all the kernel packages, the content of the linux-3.2.45 is
Code:

ls -al linux-3.2.45
total 118508
drwxr-xr-x 2 root root    4096 Jul 12 09:55 ./
drwxr-xr-x 3 root root    16384 Sep  9 14:50 ../
-rw-r--r-- 1 root root      426 Jul 12 09:52 kernel-firmware-20130512git-noarch-1.txt
-rw-r--r-- 1 root root 19802100 Jul 12 09:53 kernel-firmware-20130512git-noarch-1.txz
-rw-r--r-- 1 root root      198 Jul 12 09:53 kernel-firmware-20130512git-noarch-1.txz.asc
-rw-r--r-- 1 root root      626 Jul 12 09:53 kernel-generic-3.2.45-x86_64-3.txt
-rw-r--r-- 1 root root  3485472 Jul 12 09:53 kernel-generic-3.2.45-x86_64-3.txz
-rw-r--r-- 1 root root      198 Jul 12 09:53 kernel-generic-3.2.45-x86_64-3.txz.asc
-rw-r--r-- 1 root root      332 Jul 12 09:53 kernel-headers-3.2.45-x86-3.txt
-rw-r--r-- 1 root root  603016 Jul 12 09:53 kernel-headers-3.2.45-x86-3.txz
-rw-r--r-- 1 root root      198 Jul 12 09:53 kernel-headers-3.2.45-x86-3.txz.asc
-rw-r--r-- 1 root root      638 Jul 12 09:53 kernel-huge-3.2.45-x86_64-3.txt
-rw-r--r-- 1 root root  6687512 Jul 12 09:53 kernel-huge-3.2.45-x86_64-3.txz
-rw-r--r-- 1 root root      198 Jul 12 09:53 kernel-huge-3.2.45-x86_64-3.txz.asc
-rw-r--r-- 1 root root      520 Jul 12 09:53 kernel-modules-3.2.45-x86_64-3.txt
-rw-r--r-- 1 root root 22315872 Jul 12 09:54 kernel-modules-3.2.45-x86_64-3.txz
-rw-r--r-- 1 root root      198 Jul 12 09:54 kernel-modules-3.2.45-x86_64-3.txz.asc
-rw-r--r-- 1 root root      464 Jul 12 09:54 kernel-source-3.2.45-noarch-3.txt
-rw-r--r-- 1 root root 68374900 Jul 12 09:55 kernel-source-3.2.45-noarch-3.txz
-rw-r--r-- 1 root root      198 Jul 12 09:55 kernel-source-3.2.45-noarch-3.txz.asc

Also, keep in mind that "huge" is the default.
Code:

su -
cd linux-3.2.45
upgradepkg --install-new *.t?z
<wait a while>
<reboot>

does the trick -- and you don't have to mess with initrd and all that stuff.

You then install VirtualBox (or reinstall it -- it'll delete the existing installation for you) with the new kernel version. Star 'er up, install the Extensions and then install a guest (if it's Slackware 323-bit, install everything -- this is where the dual-side Slackware DVD comes in handy, 64-bit on one side, 32-bit on the other). You might want to download all the patches in the 32-bit guest and upgradepkg those, too; depending on what you intend to do with the 32-bit guest.

Now the machine I have VirtualBox installed on has 8G RAM -- I allocate half of that to one guest (so I can't run more than one guest at a time, I know that and I don't try). You need at least 2G for a guest (so it's not running like a three-legged dog with a busted tail anyway), and I don't use the guests for much of anything except start, do something, stop -- YMMV.'

Sounds like you got there in any event, maybe this will help a little when the upgrade comes along (you have the current one, I'm one behind I just learned when I started VirtualBox for Patch Tuesday for Win7-- arrgh!).

ppr:kut 09-11-2013 11:57 AM

Quote:

Originally Posted by ruario (Post 5020774)
@ponce: Ah yes, so it is, my mistake. I don't use the OSE version from SBo but rather the binary makeself scripts provided www.virtualbox.org/wiki/Downloads so I had not noticed this before. Nonetheless I'll still not certain you need to preinstall, just to get the source. That sounds kinda weird.

Yes, you do need to install first. The source used to compile the kernel modules is processed during the compile of virtualbox itself, you can't simply extract it from the main tarball. There's probably ways around that, but then again I don't feel like hunting after them everytime they change something in their kernel source processing. So for the time being, this is the best I can do.

ruario 09-11-2013 12:35 PM

OK, thanks for the clarification.


All times are GMT -5. The time now is 02:29 AM.