FS#36976 - [virtualbox-guest-modules] Guest machine cannot properly mount shared folders
Attached to Project:
Arch Linux
Opened by Xinyun Zhou (xinsnake) - Wednesday, 18 September 2013, 17:36 GMT
Last edited by Ionut Biru (wonder) - Monday, 30 December 2013, 08:59 GMT
Opened by Xinyun Zhou (xinsnake) - Wednesday, 18 September 2013, 17:36 GMT
Last edited by Ionut Biru (wonder) - Monday, 30 December 2013, 08:59 GMT
|
Details
Description:
After installing linux 3.11.1-1 and virtualbox-guest-modules, guest machine cannot properly mount shared file system. The file system can be mounted, however, the file type is "none" and if a program try to read the content of that folder, it will crash and can hear noise from the computer's hard drive. Additional info: * package version(s) community/virtualbox-guest-modules 4.2.18-3 community/virtualbox-guest-utils 4.2.18-1 core/linux 3.11.1-1 (base) core/linux-headers 3.11.1-1 Steps to reproduce: 1. Do a normal update using pacman. 2. Share a folder in the VirtualBox host machine. 3. Try to open a terminal on the client machine and ls the folder. |
This task depends upon
https://bugs.archlinux.org/task/36846
I only heard about it effecting wine so I whitelisted wineserver and wine-preloader shortly after using yama, this would be the first time I heard about it VirtualBox as it doesn't appear on google or if it even uses ptrace for this.
https://www.virtualbox.org/changeset/48529/vbox
It took some effort to compile VB - for some reason it won't build with webservice, so I disabled it.
Here's what I did step-by-step. Hopefully it'll save some time for someone.
I'm not sure how verbose the explanation should be to be useful, so I'll aim for newbies like me.
I performed whole process inside my VB guest system.
My instructions are for 64 bit Arch Linux installation. For 32 bit system I guess you can skip steps 3-5.
Just in case, output of "uname -a" in my VB guest system:
Linux archwebbievm 3.11.1-2-ARCH #1 SMP PREEMPT Sun Sep 22 19:45:00 CEST 2013 x86_64 GNU/Linux
Well, here we go.
1. Setup ABS (https://wiki.archlinux.org/index.php/Arch_Build_System):
sudo pacman -S abs
sudo abs
2. Setup for building in a clean chroot (https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot):
sudo pacman -S devtools
mkdir ~/chroot
export CHROOT=$HOME/chroot
sudo mkarchroot $CHROOT/root base-devel
3. Edit $CHROOT/root/etc/pacman.conf, uncomment multilib repository:
[multilib]
Include = /etc/pacman.d/mirrorlist
4. Update chroot environment:
sudo arch-nspawn $CHROOT/root pacman -Syu
5. Install gcc-multilib to chroot:
sudo arch-nspawn $CHROOT/root pacman -S gcc-multilib
6. Copy virtualbox from ABS to build dir:
mkdir ~/build
export BUILD=$HOME/build
cp -r /var/abs/community/virtualbox $BUILD
7. Patch virtualbox package using files attached to this message:
cp -t $BUILD/virtualbox/ 005-dirops.patch LocalConfig.kmk.patch PKGBUILD.patch
cd $BUILD/virtualbox
patch -i LocalConfig.kmk.patch
patch -i PKGBUILD.patch
8. Build virtualbox in chroot:
sudo makechrootpkg -c -r $CHROOT
9. Install patched guest and host dkms to the chroot environment:
cp -t $CHROOT/root/tmp/ virtualbox-{guest,host}-dkms-4.2.18-1-x86_64.pkg.tar.xz
sudo arch-nspawn $CHROOT/root pacman -U /tmp/virtualbox-{guest,host}-dkms-4.2.18-1-x86_64.pkg.tar.xz
10. Install patched guest utils:
sudo pacman -U virtualbox-guest-utils-4.2.18-1-x86_64.pkg.tar.xz
11. Copy virtualbox-modules from ABS to build dir:
cp -r /var/abs/community/virtualbox-modules $BUILD
12. Build virtualbox-modules in chroot:
cd $BUILD/virtualbox-modules
sudo makechrootpkg -c -r $CHROOT
13. Install patched guest-modules:
sudo pacman -U virtualbox-guest-modules-4.2.18-3-x86_64.pkg.tar.xz
14. Reboot:
sudo reboot
After reboot I was able to do 'ls' in shared folders. Hopefully it'll work for somebody else too.
I can also upload patched binary virtualbox-guest-modules and virtualbox-guest-utils somewhere, but I'm not sure if it's the right way to do it.
Host & guest kernels:
Linux archfamily 3.11.4-1-ARCH #1 SMP PREEMPT Sat Oct 5 21:22:51 CEST 2013 x86_64 GNU/Linux
Modules:
virtualbox 4.2.18-2
virtualbox-host-modules 4.2.18-6
virtualbox-guest-modules 4.2.18-6
virtualbox-guest-utils 4.2.18-2
Thanks for patching the packages!