VirtualBox

Ticket #1899 (closed defect: fixed)

Opened 6 years ago

Last modified 4 years ago

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

Reported by: cobrin Owned by:
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 Download (5.9 KB) - added by frank 6 years ago.
vboxvfs 1.6.5 Makefile
test.log Download (23.8 KB) - added by ogre_x 6 years ago.
Clark Connect build log

Change History

comment:1 Changed 6 years ago 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.

comment:2 Changed 6 years ago 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

comment:3 Changed 6 years ago 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?

comment:4 Changed 6 years ago 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

comment:5 Changed 6 years ago by frank

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

comment:6 Changed 6 years ago 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.

comment:7 Changed 6 years ago 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.

comment:8 Changed 6 years ago 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.

comment:9 Changed 6 years ago 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

comment:10 follow-up: ↓ 11 Changed 6 years ago 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

Changed 6 years ago by frank

vboxvfs 1.6.5 Makefile

Changed 6 years ago by ogre_x

Clark Connect build log

comment:11 in reply to: ↑ 10 ; follow-up: ↓ 12 Changed 6 years ago by ogre_x

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

comment:12 in reply to: ↑ 11 Changed 6 years ago 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.

comment:13 follow-up: ↓ 14 Changed 6 years ago 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.

comment:14 in reply to: ↑ 13 Changed 6 years ago 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?

comment:15 follow-ups: ↓ 16 ↓ 17 Changed 6 years ago 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

comment:16 in reply to: ↑ 15 Changed 6 years ago 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.

comment:17 in reply to: ↑ 15 Changed 6 years ago 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 ;-)

comment:18 Changed 6 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

comment:19 Changed 6 years ago by imy

  • Status changed from closed to reopened
  • Resolution fixed 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?

comment:20 Changed 5 years ago 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).

comment:21 in reply to: ↑ description Changed 5 years ago by ogre_x

  • Status changed from closed to reopened
  • Resolution worksforme deleted

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 Changed 5 years ago by frank

  • Summary changed from Guest Additions install failure with Centos 5.2 Guest => Fixed in 1.6.6 to Guest Additions install failure with Centos 5.2 Guest => Fixed in SVN

Added this workaround to SVN.

comment:23 Changed 5 years ago by sandervl73

  • Status changed from reopened to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use