VirtualBox

17 年 前 建立

16 年 前 結束

15 年 前 更新

#1899 closed defect (fixed)

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

回報者: Steve Cobrin 負責人:
元件: guest additions 版本: VirtualBox 1.6.4
關鍵字: centos vfsmod 副本:
Guest type: Linux Host type: Windows

描述

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

附加檔案 (2)

Makefile (5.9 KB ) - 17 年 前, 由 Frank Mehnert 新增
vboxvfs 1.6.5 Makefile
test.log (23.8 KB ) - 17 年 前, 由 Fredrik Duprez 新增
Clark Connect build log

下載所有附檔: .zip

更動歷史 (25)

comment:1 17 年 前Robert A. Wicks 編輯

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 17 年 前john 編輯

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 17 年 前Frank Mehnert 編輯

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 17 年 前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

comment:5 17 年 前Frank Mehnert 編輯

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

comment:6 17 年 前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.

comment:7 17 年 前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.

comment:8 17 年 前Frank Mehnert 編輯

摘要: 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 17 年 前Fredrik Duprez 編輯

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 17 年 前Frank Mehnert 編輯

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

17 年 前Frank Mehnert 編輯

附檔: 新增 Makefile

vboxvfs 1.6.5 Makefile

17 年 前Fredrik Duprez 編輯

附檔: 新增 test.log

Clark Connect build log

回覆:  10 ; comment:11 17 年 前Fredrik Duprez 編輯

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

回覆:  11 comment:12 17 年 前Fredrik Duprez 編輯

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 17 年 前Frank Mehnert 編輯

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.

回覆:  13 comment:14 17 年 前Fredrik Duprez 編輯

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 17 年 前Frank Mehnert 編輯

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

回覆:  15 comment:16 17 年 前Fredrik Duprez 編輯

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.

回覆:  15 comment:17 17 年 前john 編輯

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 17 年 前Frank Mehnert 編輯

狀態: newclosed
處理結果: fixed

comment:19 16 年 前imy 編輯

狀態: closedreopened
處理結果: fixed

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 16 年 前Frank Mehnert 編輯

狀態: reopenedclosed
處理結果: 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).

回覆:  description comment:21 16 年 前Fredrik Duprez 編輯

狀態: closedreopened
處理結果: worksforme

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 16 年 前Frank Mehnert 編輯

摘要: 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 16 年 前Sander van Leeuwen 編輯

狀態: reopenedclosed
處理結果: fixed
注意: 瀏覽 TracTickets 來幫助您使用待辦事項功能

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