You are not logged in.
I've run into an issue with the virtualbox-sun build from AUR. I can't setup the module with the command
/etc/rc.d/vboxdrv setupI keep getting the error
:: Building/installing vbox modules for Linux 2.6.32-ARCH x86_64 [BUSY]
/etc/rc.d/vboxdrv: line 54: cd: /src: No such file or directory [FAIL]
> See '/var/log/vboxdrv-setup.log' for further detailsLooking at the vboxdrv file I can see there is a variable $INSTALL_DIR used on line 54, but I can find no line where it is set.
/var/log/vboxdrv-setup.log contains only this line
make: *** No targets specified and no makefile found. Stop.I read the news about the kernel package split, so I have installed the headers package
[rene@ArchLounge ~]$ pacman -Q kernel26 kernel26-headers
kernel26 2.6.32.2-2
kernel26-headers 2.6.32.2-2A search on the forum gave me the thread http://bbs.archlinux.org/viewtopic.php?id=87788. According to this I may need to run mkinitcpio. I did that by reinstalling the kernel. Don't know if that is enough though?
Looking in my /etc/rc.d/ folder I can't find the file called dkms_autoinstaller. (also used in the vboxdrv file.) Is this file needed? If yes where do I find it?
Last edited by madeye (2010-01-07 10:39:08)
MadEye | Registered Linux user #167944 since 2000-02-28 | Homepage
Offline
Try this on line 54
cd "/usr/lib/virtualbox/src"If it doesn't wok just find path to your vboxdrv directory. Changing name from vboxdrv-3.1.2 to vboxdrv in usr/src/ should also help.
Last edited by einhard (2010-01-05 18:31:06)
Offline
Thanks for the help. That was exactly what I needed.
I found that after changing the path to /usr/src/vboxdrv-3.1.2 the vboxdrv would build, however the other two modules (vboxnetadp and vboxnetflt) didn't.
I have now modified the script to build those two modules also. Here is the new script: (Please note that only the INSTALL_DIR var at the beginning and the setup section of the original script has been modified.)
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
. /etc/conf.d/vboxdrv
INSTALL_DIR="/usr" # No trailing slash!
case "$1" in
start)
stat_busy "Loading modules for VirtualBox"
for module in "${MODULES[@]}"; do
if [ "$module" = "${module#!}" ]; then
modprobe -q $module >/dev/null 2>&1
grep -q ^$module /proc/modules
if [ $? -ne 0 ]; then
res=$?; break
fi
fi
done
if [ -n "$res" ]; then
stat_fail
printhl "Try running '$0 setup', of course without quotes"
else
add_daemon vboxdrv
stat_done
fi
;;
stop)
stat_busy "Unloading modules for VirtualBox"
for module in "${MODULES[@]}"; do
if [ "$module" = "${module#!}" ]; then
REVERSE="$module $REVERSE"
fi
done
if modprobe -q -r $REVERSE >/dev/null 2>&1; then
rm_daemon vboxdrv
stat_done
else
stat_fail
fi
;;
restart)
$0 stop
$0 start
;;
setup)
if [ -x /etc/rc.d/dkms_autoinstaller ]; then
for module in "${MODULES[@]}"; do
dkms add -m $module -v $VBOX_VERSION >/dev/null 2>&1
done
exec /etc/rc.d/dkms_autoinstaller start
else
stat_busy "Building/installing vbox modules for `uname -srm`"
SETUP_LOG='/var/log/vboxdrv-setup.log'
# Build vboxdrv module
cd "$INSTALL_DIR/src/vboxdrv-$VBOX_VERSION"
make >${SETUP_LOG} 2>&1 && make install >>${SETUP_LOG} 2>&1; RET=$?; make clean >/dev/null 2>&1
# Build vboxnetadp module
cd "$INSTALL_DIR/src/vboxnetadp-$VBOX_VERSION"
make >${SETUP_LOG} 2>&1 && make install >>${SETUP_LOG} 2>&1; RET+=$?; make clean >/dev/null 2>&1
# Build vboxnetflt module
cd "$INSTALL_DIR/src/vboxnetflt-$VBOX_VERSION"
make >${SETUP_LOG} 2>&1 && make install >>${SETUP_LOG} 2>&1; RET+=$?; make clean >/dev/null 2>&1
if [ "$RET" -eq 0 ]; then
stat_done
else
stat_fail
printhl "See '${SETUP_LOG}' for further details"
fi
fi
;;
*)
echo "usage: $0 {start|stop|restart|setup}"
esac
# vim:set ts=4 sw=4 et:There's just one thing that I'm not sure is OK yet. The RET var is set in the first build line, and I made it add the return value in the next two. Could this give problems?
The VBOX_VERSION var is pulled from /etc/conf.d/vboxdrv. Seemed to me to be the best way of doing this.
Please feel free to tell me if I've done something wrong or if you think I'm a complete hopeless case ![]()
MadEye | Registered Linux user #167944 since 2000-02-28 | Homepage
Offline
@madeye: I'm sorry, it was me who indeed introduced a small bug in the script in question; here follows a patch:
--- a/etc_rc.d_vboxdrv 2009-12-27 13:24:06.000000000 +0000
+++ b/etc_rc.d_vboxdrv 2010-01-06 23:44:04.000000000 +0000
@@ -50,6 +50,7 @@
exec /etc/rc.d/dkms_autoinstaller start
else
stat_busy "Building/installing vbox modules for `uname -srm`"
+ . /etc/vbox.cfg
SETUP_LOG='/var/log/vboxdrv-setup.log'
cd "$INSTALL_DIR/src"
make >${SETUP_LOG} 2>&1 && make install >>${SETUP_LOG} 2>&1; RET=$?; make clean >/dev/null 2>&1I also have updated the PKGBUILD accordingly.
Last edited by bdheeman (2010-01-06 23:51:14)
Balwinder S Dheeman
http://werc.homelinux.net/
Offline
No problem.
It gave me a chance to look into how the rc scripts are put together ![]()
Marking the topic as solved.
MadEye | Registered Linux user #167944 since 2000-02-28 | Homepage
Offline