VirtualBox

Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#1899 closed defect (fixed)

Guest Additions install failure with Centos 5.2 Guest => Fixed in SVN

Reported by: Steve Cobrin Owned by:
Component: guest additions Version: VirtualBox 1.6.4
Keywords: centos vfsmod Cc:
Guest type: Linux Host type: Windows

Description

Guest Additions install failure with Centos 5.2 Guest

Environment

Host OS - Windows XP (32-bit)
Vbox version - 1.6.4
Guest OS - CentOS 5.2
Guest OS Kernel - 2.6.18-92.1.6.el5.centos.plus

Problem

After updating my CentOS kernel to the latest CentOS released version, I went to re-install the Guest Additions, however that failed with the message

"Unable to build the kernel module. See the log file /var/log/vboxadd-install.log for more details."

Reviewing the log below, it appears to have failed compilation of vfsmod.c at the end ....

Log

Building the shared folder support kernel module.

make KBUILD_VERBOSE=1 -C /lib/modules/2.6.18-92.1.6.el5.centos.plus/build SUBDIRS=/tmp/vbox.2 SRCROOT=/tmp/vbox.2 modu
les
test -e include/linux/autoconf.h -a -e include/config/auto.conf || (            \
        echo;                                                           \
        echo "  ERROR: Kernel configuration is invalid.";               \
        echo "         include/linux/autoconf.h or include/config/auto.conf are missing.";      \
        echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \
        echo;                                                           \
        /bin/false)
mkdir -p /tmp/vbox.2/.tmp_versions
rm -f /tmp/vbox.2/.tmp_versions/*
make -f scripts/Makefile.build obj=/tmp/vbox.2
grep: /tmp/vbox.2/include/linux/version.h: No such file or directory
  gcc -m32 -Wp,-MD,/tmp/vbox.2/.vfsmod.o.d  -nostdinc -isystem /usr/lib/gcc/i386-redhat-linux/4.1.2/include -D__KERNEL
__ -Iinclude  -include include/linux/autoconf.h  -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing
 -fno-common -Wstrict-prototypes -Wundef -Werror-implicit-function-declaration -Os -pipe -msoft-float -fno-builtin-spr
intf -fno-builtin-log2 -fno-builtin-puts  -mpreferred-stack-boundary=2  -march=i686 -mtune=generic -mtune=generic -mre
gparm=3 -ffreestanding -Iinclude/asm-i386/mach-generic -Iinclude/asm-i386/mach-default -fomit-frame-pointer -g  -fno-s
tack-protector -Wdeclaration-after-statement -Wno-pointer-sign -fshort-wchar -I/lib/modules/2.6.18-92.1.6.el5.centos.p
lus/build/include -I/tmp/vbox.2/ -I/tmp/vbox.2/include -I/tmp/vbox.2/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -
DIN_RING0 -D_X86_ -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DVBOX_HGCM -DLOG_TO_BACKDOOR -DIN_MODULE -DIN_GUEST_R0    -DMODULE -D
"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(vfsmod)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxvfs)" -c -o /tmp/vbox.2/.t
mp_vfsmod.o /tmp/vbox.2/vfsmod.c
/tmp/vbox.2/vfsmod.c: In function ‘sf_read_super_aux’:
/tmp/vbox.2/vfsmod.c:243: error: ‘struct inode’ has no member named ‘u’
/tmp/vbox.2/vfsmod.c: In function ‘sf_clear_inode’:
/tmp/vbox.2/vfsmod.c:296: error: ‘struct inode’ has no member named ‘u’
/tmp/vbox.2/vfsmod.c:304: error: ‘struct inode’ has no member named ‘u’
make[2]: *** [/tmp/vbox.2/vfsmod.o] Error 1
make[1]: *** [_module_/tmp/vbox.2] Error 2
make: *** [vboxvfs] Error 2

Attachments (2)

Makefile (5.9 KB ) - added by Frank Mehnert 16 years ago.
vboxvfs 1.6.5 Makefile
test.log (23.8 KB ) - added by Fredrik Duprez 16 years ago.
Clark Connect build log

Download all attachments as: .zip

Change History (25)

comment:1 by Robert A. Wicks, 16 years ago

I am getting the same error, and I did softlink /usr/src/kernels/2.6.18-92.1.6.el5.centos.plust to /usr/src/linux. I still got the error.

comment:2 by john, 16 years ago

I'm getting the same error with kernel 2.6.18-92.1.10.el5.centos.plus. VBox Additions worked fine under 2.6.18-92.1.6

For reference, here's my configuration:

/usr/src/linux -> /usr/src/kernels/2.6.18-92.1.10.el5.centos.plus-i686/

/usr/src/kernels contains:

2.6.18-92.1.10.el5.centos.plus-i686 2.6.18-92.1.6.el5-i686 2.6.18-92.el5-i686

/lib/modules contains:

2.6.18-92.1.10.el5.centos.plus 2.6.18-92.1.6.el5 2.6.18-92.el5

comment:3 by Frank Mehnert, 16 years ago

This should work, I just tested this on a rhel5 jail. Does the file

/lib/modules/2.6.18-92.1.6.el5.centos.plus/build/include/linux/utsrelease.h

exist? If so, could you attach the content?

comment:4 by mey, 16 years ago

I also got the same error recently when using the centos.plus 100hz kernel.

Possibly this is related to this discussion

http://forums.virtualbox.org/viewtopic.php?p=17144

comment:5 by Frank Mehnert, 16 years ago

I would appreciate if all of you who are experiencing this problem could answer my last question.

comment:6 by mey, 16 years ago

My apologies. Yes, /lib/modules/2.6.18-92.1.6.el5.centos.plus/build/include/linux/utsrelease.h does exist on my system, owned by root, 644 permissions.

comment:7 by mey, 16 years ago

Contents of /lib/modules/2.6.18-92.1.6.el5.centos.plus/build/include/linux/utsrelease.h is:

#define UTS_RELEASE "2.6.18-92.1.6.el5.centos.plus"

When I booted the same VM with Cent OS 2.6.18-92.1.10.el5, the Guest Additions appeared to build and install correctly.

comment:8 by Frank Mehnert, 16 years ago

Summary: Guest Additions install failure with Centos 5.2 GuestGuest Additions install failure with Centos 5.2 Guest => Fixed in 1.6.6

Thanks. I finally fixed the detection, the fix will be included in 1.6.6.

comment:9 by Fredrik Duprez, 16 years ago

Sounds promising, will this fix deal with this type of kernel as well:

#define UTS_RELEASE "2.6.18-92.cc4"

This is Clark Connect 4.3 (CentOS based firewall distro). http://www.virtual-box.org/ticket/1973

comment:10 by Frank Mehnert, 16 years ago

I have to extend the Makefile to handle this case as well. Actually this is a big mess since redhat decided to backport some interface changes from 2.6.19 into 2.6.18. Now we have to detect every such kernel flavor ... I will attach the modified Makefile. Could you check if it works for you? Try to install the Linux guest additions. Then modify the guest file /usr/src/vboxvfs-1.6.4/Makefile with the attached one and execute

/usr/src/vboxvfs-1.6.4/build_in_tmp

by Frank Mehnert, 16 years ago

Attachment: Makefile added

vboxvfs 1.6.5 Makefile

by Fredrik Duprez, 16 years ago

Attachment: test.log added

Clark Connect build log

in reply to:  10 ; comment:11 by Fredrik Duprez, 16 years ago

Tried it and attached makefile log. Does it look good? I don't know exactly what to look for.

in reply to:  11 comment:12 by Fredrik Duprez, 16 years ago

Replying to ogre_x:

Tried it and attached makefile log. Does it look good? I don't know exactly what to look for.

There are files located under /lib/modules/2.6.18-92.cc4/misc/

and

modprobe vboxvfs

returns no error

but dmesg|grep vb

gives

no version for "vboxadd_cmc_open" found: kernel tainted

and mount -t vboxsf install /media/install

says wrong fs type, bad option, bad superblock on install or too many mounted filesystems

This is on a Vista64 host.

comment:13 by Frank Mehnert, 16 years ago

Compilation looks good. The no version for "vboxadd_cmc_open" found: kernel tainted is no problem. The other problem is probably because the mount.vboxsf tool is not installed. Please check if /sbin/mount.vboxsf exists.

in reply to:  13 comment:14 by Fredrik Duprez, 16 years ago

Replying to frank:

Compilation looks good. The no version for "vboxadd_cmc_open" found: kernel tainted is no problem. The other problem is probably because the mount.vboxsf tool is not installed. Please check if /sbin/mount.vboxsf exists.

No it does not. Is it because the original install script was stopped due to the failed build? Can I get it there manually somehow?

comment:15 by Frank Mehnert, 16 years ago

Yes: Unpack the existing VBoxLinuxAdditions.run but don't install it (this will create a directory install in the current directory:

sh VBoxLinuxAdditions.run --noexec --keep

Then replace the Makefile in vboxvfs by the one from this defect:

cp Makefile install/module/vboxvfs/Makefile

Then start the installation:

cd install && ./install.sh

in reply to:  15 comment:16 by Fredrik Duprez, 16 years ago

Replying to frank:

Good job! Now it works, so if you commit the changes for cc4 as well this should install on ClarkConnect out of the box when 1.6.6 is released.

Thanks.

in reply to:  15 comment:17 by john, 16 years ago

That works for me too. Great job... thanks !

Also, many apologies for being unable to get back to you some of the information you asked for ... I hate it when my day job gets in the way ;-)

comment:18 by Frank Mehnert, 16 years ago

Resolution: fixed
Status: newclosed

comment:19 by imy, 16 years ago

Resolution: fixed
Status: closedreopened

I replaced the original Makefile by the one I downloaded at the beginning of this page, but it doesn't work for me. I still receive the same error "Please install the build and header files for your current Linux kernel. The current kernel version is 2.6.26.3-29.fc9.i686". What should I do now?

comment:20 by Frank Mehnert, 16 years ago

Resolution: worksforme
Status: reopenedclosed

imy, your problem is different. It seems that you just installed the wrong kernel headers package. Make sure that even the flavor is correct (i.e. i386 != i686). Make sure that /lib/modules/uname -r/build points to a valid directory containing the Linux headers. Don't create this link yourself, just make sure that the correct package is installed (the correct kernel header package will create that link).

in reply to:  description comment:21 by Fredrik Duprez, 16 years ago

Resolution: worksforme
Status: closedreopened

The upcoming version 5 of Clark Connect http://www.clarkconnect.com names it's kernel like this:

2.6.18-128.1.v5

Which means that the makefile will need to cope with this as well.

...
                            grep '"2.6.18.*v5.*"' $(inc)/linux/utsrelease.h),\
...
                        echo "$(KERNELRELEASE)"|grep '2.6.18.*v5.*'),\
...

Can this be fixed in an upcoming vbox release, please?

comment:22 by Frank Mehnert, 16 years ago

Summary: Guest Additions install failure with Centos 5.2 Guest => Fixed in 1.6.6Guest Additions install failure with Centos 5.2 Guest => Fixed in SVN

Added this workaround to SVN.

comment:23 by Sander van Leeuwen, 16 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette