Trying to install Guest Additions in Fedora 24

Discussions about using Linux guests in VirtualBox.
Post Reply
Patricio
Posts: 5
Joined: 6. Nov 2016, 18:19

Trying to install Guest Additions in Fedora 24

Post by Patricio »

Hi, I'm trying to install Guest Additions, the guest SO is Fedora 24 and the host SO is Windows 7.

I'm doing this to fix the screen resolution in Fedora because the maximum I can get is 1024x768, while in Windows I have 1366x768.

The problem is that when I try to install Guest Additions I get this:

Code: Select all

Verifying archive integrity... All good.
Uncompressing VirtualBox 5.0.26 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 5.0.26 of VirtualBox Guest Additions...
Removing existing VirtualBox DKMS kernel modules[  OK  ]
Removing existing VirtualBox non-DKMS kernel modules[  OK  ]
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox DKMS kernel modules[  OK  ]
Removing existing VirtualBox non-DKMS kernel modules[  OK  ]
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module[FALLÓ]
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions[  OK  ]
Press Return to close this window...
So everything is fine except Building the main Guest Additions module

This is in /var/log/vboxadd-install.log:

Code: Select all

Uninstalling modules from DKMS
Attempting to install using DKMS

Creating symlink /var/lib/dkms/vboxguest/5.0.26/source ->
                 /usr/src/vboxguest-5.0.26

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j2 KERNELRELEASE=4.8.4-200.fc24.x86_64 -C /lib/modules/4.8.4-200.fc24.x86_64/build M=/var/lib/dkms/vboxguest/5.0.26/build......(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.8.4-200.fc24.x86_64 (x86_64)
Consult /var/lib/dkms/vboxguest/5.0.26/build/make.log for more information.
Failed to install using DKMS, attempting to install without
grep: /lib/modules/4.8.4-200.fc24.x86_64/build/include/linux/version.h: No such file or directory
make KBUILD_VERBOSE=1 CONFIG_MODULE_SIG= -C /lib/modules/4.8.4-200.fc24.x86_64/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules
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)
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
make -f ./scripts/Makefile.build obj=/tmp/vbox.0
  gcc -Wp,-MD,/tmp/vbox.0/.VBoxGuest-linux.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/6.1.1/include -I./arch/x86/include -I./arch/x86/include/generated/uapi -I./arch/x86/include/generated  -I./include -I./arch/x86/include/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -Wno-maybe-uninitialized -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fvar-tracking-assignments -g -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -DCC_HAVE_ASM_GOTO -Wno-declaration-after-statement -include /tmp/vbox.0/include/VBox/VBoxGuestMangli
So I guess that it can't find include/generated/autoconf.h or include/config/auto.conf files, what can I do?

I've already done:

Code: Select all

yum install dkms binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel
What else can I do?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Trying to install Guest Additions in Fedora 24

Post by Perryg »

I would verify that the running kernel matches the kernel-devel and kernel-headers.
Patricio
Posts: 5
Joined: 6. Nov 2016, 18:19

Re: Trying to install Guest Additions in Fedora 24

Post by Patricio »

Perryg wrote:I would verify that the running kernel matches the kernel-devel and kernel-headers.
It's ok according to me.

Code: Select all

[patricio@localhost lab3-tsc]$ uname -r
4.8.4-200.fc24.x86_64
[patricio@localhost lab3-tsc]$ 

Code: Select all

[root@localhost lab3-tsc]# yum install kernel-devel
Yum command has been deprecated, redirecting to '/usr/bin/dnf install kernel-devel'.
See 'man dnf' and 'man yum2dnf' for more information.
To transfer transaction metadata from yum to DNF, run:
'dnf install python-dnf-plugins-extras-migrate && dnf-2 migrate'

Última comprobación de caducidad de metadatos hecha hace 2:54:20, el Sun Nov  6 12:51:40 2016.
El paquete kernel-devel-4.8.4-200.fc24.x86_64 ya se encuentra instalado, omitiendo.
Dependencias resueltas.
Nada por hacer.
¡Listo!
[root@localhost lab3-tsc]

Code: Select all

[root@localhost lab3-tsc]# yum install kernel-headers
Yum command has been deprecated, redirecting to '/usr/bin/dnf install kernel-headers'.
See 'man dnf' and 'man yum2dnf' for more information.
To transfer transaction metadata from yum to DNF, run:
'dnf install python-dnf-plugins-extras-migrate && dnf-2 migrate'

Última comprobación de caducidad de metadatos hecha hace 2:54:50, el Sun Nov  6 12:51:40 2016.
El paquete kernel-headers-4.8.4-200.fc24.x86_64 ya se encuentra instalado, omitiendo.
Dependencias resueltas.
Nada por hacer.
¡Listo!
[root@localhost lab3-tsc]
In english those commands say that kernel-headers-4.8.4-200.fc24.x86_64 and kernel-devel-4.8.4-200.fc24.x86_64 are already installed, and the versions from both commands match what I get with uname -r

I'm new to Linux and Fedora, so I don't know what to do.

Any kind of help is welcome.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Trying to install Guest Additions in Fedora 24

Post by Perryg »

Will they build on the previous kernel?
Patricio
Posts: 5
Joined: 6. Nov 2016, 18:19

Re: Trying to install Guest Additions in Fedora 24

Post by Patricio »

Perryg wrote:Will they build on the previous kernel?
I don't know, how can I check that?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Trying to install Guest Additions in Fedora 24

Post by Perryg »

During the boot process you should see a list of installed kernels. Since the 4.8.* kernels was not the default for Fedora 24 there should be a choice of something in the 4.7.* range unless this is a new install. Look at boot and tell me if there are any previous kernels and what the version numbers are.
Patricio
Posts: 5
Joined: 6. Nov 2016, 18:19

Re: Trying to install Guest Additions in Fedora 24

Post by Patricio »

It's version 4.5.5-300.fc24.x86_64
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Trying to install Guest Additions in Fedora 24

Post by Perryg »

Very well. Now has the guest had the additions installed with that kernel? What happens if you boot to that kernel and install the additions? Note: you may need to install the headers and devel package to match. Easiest way is to use the $(uname -r) wildcard while you are booted in that kernel
Example:
dnf install kernel-headers-$(uname -r) kernel-devel-$(uname -r)
Patricio
Posts: 5
Joined: 6. Nov 2016, 18:19

Re: Trying to install Guest Additions in Fedora 24

Post by Patricio »

Nice, now I could install GA without errors and the resolution in Fedora match the Host, Thanks!!!
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Trying to install Guest Additions in Fedora 24

Post by Perryg »

That's good. If you want to go to the newer kernel I would first install dkms and then boot to the new kernel. After that run "rcvboxadd setup" in an elevated terminal.
alopezv
Posts: 2
Joined: 11. Nov 2016, 22:22

Re: Trying to install Guest Additions in Fedora 24

Post by alopezv »

Hello!
I'm having the same problem on F25:

Code: Select all

[armando@localhost VBOXADDITIONS_5.1.8_111374]$ sudo ./VBoxLinuxAdditions.run 
[sudo] password for armando: 
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.8 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Removing installed version 5.1.8 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
vboxadd.sh: Building Guest Additions kernel modules.
Failed to set up service vboxadd, please check the log file
/var/log/VBoxGuestAdditions.log for details.

Code: Select all

[armando@localhost VBOXADDITIONS_5.1.8_111374]$ cat /var/log/VBoxGuestAdditions.log

Created symlink /etc/systemd/system/multi-user.target.wants/vboxadd.service → /usr/lib/systemd/system/vboxadd.service.
vboxadd.sh: failed: Look at /var/log/vboxadd-install.log to find out what went wrong.
vboxadd.sh: failed: Please check that you have gcc, make, the header files for your Linux kernel and possibly perl installed..
Created symlink /etc/systemd/system/multi-user.target.wants/vboxadd-service.service → /usr/lib/systemd/system/vboxadd-service.service.
Created symlink /etc/systemd/system/multi-user.target.wants/vboxadd-x11.service → /usr/lib/systemd/system/vboxadd-x11.service.

Code: Select all

[armando@localhost VBOXADDITIONS_5.1.8_111374]$ sudo dnf install kernel-headers-$(uname -r) kernel-devel-$(uname -r)
Last metadata expiration check: 3:12:30 ago on Fri Nov 11 12:09:21 2016.
Package kernel-headers-4.8.0-0.rc7.git0.1.fc25.x86_64 is already installed, skipping.
No package kernel-devel-4.8.0-0.rc7.git0.1.fc25.x86_64 available.
Error: Unable to find a match.
Already wen't thru all the steps in the logs and even those in this post, can you please help me?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Trying to install Guest Additions in Fedora 24

Post by Perryg »

No package kernel-devel-4.8.0-0.rc7.git0.1.fc25.x86_64 available
You need to use a kernel that has the required packages available or build them your self from source.
alopezv
Posts: 2
Joined: 11. Nov 2016, 22:22

Re: Trying to install Guest Additions in Fedora 24

Post by alopezv »

Perryg wrote:
No package kernel-devel-4.8.0-0.rc7.git0.1.fc25.x86_64 available
You need to use a kernel that has the required packages available or build them your self from source.
Thanks, I'll do so.
Post Reply