VectorLinux
October 31, 2014, 11:50:03 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: VirtualBox shared folders auto-mount  (Read 2752 times)
J.L.
Member
*
Posts: 6


« on: November 26, 2013, 11:24:28 pm »

I've installed Guest Additions via "su > sh /mnt/cdrom/VBoxLinuxAdditions.run" after updating the system. It works fine except for auto-mount of shared folders.

Ticking "Auto-mount" in VirtualBox settings only creates empty folders in /media. Adding "VM_Shared   /media/sf_VM_Shared   vboxsf   defaults  0   0" to /etc/fstab didn't work, nor did adding "mount -t vboxsf VM_Shared /media/sf_VM_Shared" to rc.local. Somehow the latter command works fine when typed manually in LXTerminal.

I've seen people make cron jobs run at startup, but how do you do it? Sorry, but I need a step-by-step guide being unfamiliar with this.

Thanks. VirtualBox 4.3.2 running VectorLinux 7.0 Light on Windows 7 64-bit SP1.
Logged
J.L.
Member
*
Posts: 6


« Reply #1 on: November 27, 2013, 12:24:45 am »

Just tried Guest Additions from SlackBuilds.org for Slackware 13.37 after uninstalling original. virtualbox-kernel-addons seems to have succeeded, but virtualbox-addons failed on installpkg (grep and chroot).

I noticed that the original installer was not able to build kernel modules due to missing headers. Maybe that's the issue, how would I install kernel headers?
Logged
M0E-lnx
Administrator
Vectorian
*****
Posts: 3187



« Reply #2 on: November 27, 2013, 05:31:25 am »

I dont think you can mount that on boot because the guest module loads after all the startup process has almost finished.  I think it loads right before X launches.  In my experience, When I have used this, it has been mounted manually.  Another option is to modify your line in fstab and add 'noauto' so that it does not try to mount it on boot, but you can still just mount it as you need it without having to type the whole command.

Also, See here http://superuser.com/questions/146763/my-virtualbox-fstab-will-not-auto-mount-on-reboot
Logged

J.L.
Member
*
Posts: 6


« Reply #3 on: November 27, 2013, 09:25:08 am »

Looks like you're right, none of the solutions in that link worked for me. Guess I'll just copy and paste for now.

I'm curious to see if successfully building the Guest Additions kernel modules will make a difference. Problem is, I don't know how to install the kernel headers VirtualBox needs when kernel-headers is blue and locked. Removing it from excludes and updating didn't work.
Logged
nightflier
Administrator
Vectorian
*****
Posts: 4026



« Reply #4 on: November 27, 2013, 09:40:42 am »

Not sure if this applies, but I found that I needed to copy the "VBoxLinuxAdditions.run" file to a writable location on the (virtual) hard drive before it would work right.

You don't want to disturb the kernel-headers file, but it may be necessary to install kernel sources (kernel-src): http://vectorlinux.osuosl.org/veclinux-7.0/kernels/
Logged
J.L.
Member
*
Posts: 6


« Reply #5 on: November 27, 2013, 10:17:57 am »

What do you mean by "work right"? I only had issues with building kernel modules.

Thanks, installpkg worked. Unfortunately, the main issue is still not solved.
Logged
M0E-lnx
Administrator
Vectorian
*****
Posts: 3187



« Reply #6 on: November 27, 2013, 11:05:08 am »

Yes, what you need is to install the 'kernel-src' package that matches your kernel version.  After that, you would install the guest additions from your .run file (from vbox).  Then you will need to do /etc/rc.d/rc.vboxdrv setup to compile the modules.  That's how i've always done it.
Logged

J.L.
Member
*
Posts: 6


« Reply #7 on: November 27, 2013, 12:55:54 pm »

I thought the .run file compiled the modules already? Also "bash: /etc/rc.d/rc.vboxdrv setup: No such file or directory".

Since installing the kernel modules require manual steps for no visible gain, I will be skipping that in the future.
« Last Edit: November 28, 2013, 07:27:49 pm by J.L. » Logged
nightflier
Administrator
Vectorian
*****
Posts: 4026



« Reply #8 on: November 27, 2013, 02:07:56 pm »

What do you mean by "work right"? I only had issues with building kernel modules.

I remember the file refusing to run while being read-only, but that was on a different system. A quick test on VL in a vm revealed no such problem, so disregard that.

On the other hand, building the modules failed in my vm, even though I have the kernel sources installed. Not sure where to try next. Error posted below.
Code:
grep: /lib/modules/3.10.20/build/include/linux/version.h: No such file or directory
make KBUILD_VERBOSE=1 CONFIG_MODULE_SIG= -C /lib/modules/3.10.20/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/i586-vector-linux/4.7.2/include -I/usr/src/linux-3.10.20/arch/x86/include -Iarch/x86/include/generated  -Iinclude -I/usr/src/linux-3.10.20/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/usr/src/linux-3.10.20/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-3.10.20/include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -Wno-maybe-uninitialized -m32 -msoft-float -mregparm=3 -freg-struct-return -fno-pic -mpreferred-stack-boundary=2 -march=i686 -Wa,-mtune=generic32 -ffreestanding -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -Wno-unused-but-set-variable -fno-omit-
frame-pointer -fno-optimize-sibling-calls -pg -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -include /tmp/vbox.0/include/VBox/VBoxGuestMangling.h -I/lib/modules/3.10.20/build/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -I/tmp/vbox.0/vboxguest/ -I/tmp/vbox.0/vboxguest/include -I/tmp/vbox.0/vboxguest/r0drv/linux -D__KERNEL__ -DMODULE -DVBOX -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_GUEST -DIN_GUEST_R0 -DIN_MODULE -DRT_WITH_VBOX -DVBGL_VBOXGUEST -DVBOX_WITH_HGCM -DRT_ARCH_X86  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(VBoxGuest_linux)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxguest)" -c -o /tmp/vbox.0/VBoxGuest-linux.o /tmp/vbox.0/VBoxGuest-linux.c
/tmp/vbox.0/VBoxGuest-linux.c:199:49: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'g_VBoxGuestPciId'
/tmp/vbox.0/VBoxGuest-linux.c:328:21: error: 'g_VBoxGuestPciId' undeclared here (not in a function)
/tmp/vbox.0/VBoxGuest-linux.c:209:1: error: '__mod_pci_device_table' aliased to undefined symbol 'g_VBoxGuestPciId'
make[2]: *** [/tmp/vbox.0/VBoxGuest-linux.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxguest] Error 2
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.
Logged
J.L.
Member
*
Posts: 6


« Reply #9 on: February 16, 2014, 11:46:12 am »

Ignoring the spam, I think adding "mount -t vboxsf VM_Shared /media/sf_VM_Shared" to boot.local instead of rc.local may work.

That's what I did for openSUSE, where the other methods also failed on. Unfortunately, I'm not using VectorLinux anymore, so I cannot verify.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!