VirtualBox

Ticket #1899 (closed defect: worksforme)

Opened 4 months ago

Last modified 2 weeks ago

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

Reported by: cobrin Assigned to:
Priority: major 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

Makefile (5.9 kB) - added by frank on 08/18/08 18:23:29.
vboxvfs 1.6.5 Makefile
test.log (23.8 kB) - added by ogre_x on 08/18/08 19:14:45.
Clark Connect build log

Change History

08/11/08 18:25:36 changed by robwicks

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.

08/13/08 03:06:00 changed by h.codebilis

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

08/13/08 10:20:33 changed by frank

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?

08/14/08 00:19:17 changed by mey

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

08/14/08 08:52:24 changed by frank

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

08/16/08 06:32:20 changed by mey

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.

08/16/08 08:30:07 changed by mey

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.

08/18/08 15:15:42 changed by frank

  • summary changed from Guest Additions install failure with Centos 5.2 Guest to Guest 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.

08/18/08 18:13:04 changed by ogre_x

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

(follow-up: ↓ 11 ) 08/18/08 18:22:57 changed by frank

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

08/18/08 18:23:29 changed by frank

  • attachment Makefile added.

vboxvfs 1.6.5 Makefile

08/18/08 19:14:45 changed by ogre_x

  • attachment test.log added.

Clark Connect build log

(in reply to: ↑ 10 ; follow-up: ↓ 12 ) 08/18/08 19:19:49 changed by ogre_x

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

(in reply to: ↑ 11 ) 08/18/08 20:14:16 changed by ogre_x

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.

(follow-up: ↓ 14 ) 08/18/08 20:21:04 changed by 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.

(in reply to: ↑ 13 ) 08/18/08 21:32:17 changed by ogre_x

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?

(follow-ups: ↓ 16 ↓ 17 ) 08/18/08 22:12:19 changed by frank

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 ) 08/18/08 23:05:39 changed by ogre_x

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 ) 08/24/08 23:17:39 changed by h.codebilis

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 ;-)

09/02/08 14:47:24 changed by frank

  • status changed from new to closed.
  • resolution set to fixed.

09/30/08 23:18:13 changed by imy

  • status changed from closed to reopened.
  • resolution deleted.

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?

11/06/08 09:24:04 changed by frank

  • status changed from reopened to closed.
  • resolution set to worksforme.

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).

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy