[SOLVED] load VirtualBox modules without root pw

Hi,
i want to write a wrapper script for virtualbox to load the modules when virtualbox starts and unload them when it exits.
is there a way to load those specific modules without root password? i could teach sudo to allow modprobe without password but that would be a security problem.
Last edited by jnhieber (2013-07-13 16:42:19)

I'm experiencing some problems with suspend to ram on my x230t. since kernel 3.10 i often get a kernel panic when i suspend.
i use an up to date system (no testing) with linux-ck-ivybridge and intel graphics. i wrote systemd scripts to unload third party modules before suspend (like vboxdrv).
that actually doesn't solve the problem but i thought it might be a good idea if only loading such modules when they are really needed, i don't use virtualbox often.
thanks for the reply, i think this can work. the script can only be changed by root so this would be no security problem.
so this is solved, i'm thinking about a new topic regarding my kernel panics, do you know where to get the kernel logs of the panic?
when i go to suspend the sleep led blinks fast and the screen is blank, so i have to rely on log files.

Similar Messages

  • [solved] loading nvidia module at boot

    On wiki there is an simple explanation how to make intel graphics module load with kernel. Now among other things I have cute hi-res vc on my laptop. What is the combination of modules/options to get the same effect with nvidia cards?
    I've already tried adding just the nvidia module to kernel, but nothing happened. It's harder to google the solution, since almost all results show people having problems with nvidia card not working at all. Mine is fine, but I want to make it work better
    I've got GeForce 7600 GT, package nvidia 180.51-1 for x86_64 (if this makes any difference in this case).
    EDIT:
    /proc/driver/nvidia/registry
    EnableVia4x: 0
    EnableALiAGP: 0
    NvAGP: 3
    ReqAGPRate: 15
    EnableAGPSBA: 0
    EnableAGPFW: 0
    Mobile: 4294967295
    ResmanDebugLevel: 4294967295
    RmLogonRC: 1
    ModifyDeviceFiles: 1
    DeviceFileUID: 0
    DeviceFileGID: 0
    DeviceFileMode: 438
    RemapLimit: 0
    UpdateMemoryTypes: 4294967295
    UseVBios: 1
    RMEdgeIntrCheck: 1
    UsePageAttributeTable: 4294967295
    EnableMSI: 0
    MapRegistersEarly: 0
    RegistryDwords: ""
    should I copy-paste any these parameters to modprobe.conf?
    i'm going to experiment a little more. with any luck i'll get the problem solved, but still - any suggestions will be appreciated.
    Last edited by tr00per87 (2009-05-15 13:48:01)

    you gave me good direction. i got some effect. it isn't perfect, but looks ok.
    in final steps it took me two reboots
    * first - i've added vga=ask to kernel line and found highest resolution.
    in this case it was only 1024x768. "only" because my monitor has native resolution of 1440x900.
    teh number in my case is 0x318, which leads me to...
    * second - changed vga=ask to vga=0x318. works just fine :]
    the funny thing is now during boot on the top of the screen i have not one, but two arch schwags.
    look also:
    http://bbs.archlinux.org/viewtopic.php?id=25133
    http://bbs.archlinux.org/viewtopic.php?id=66108
    EDIT:
    it appears this effect has nothing to do with loading nvidia module into kernel image. all debianers may sleep well
    Last edited by tr00per87 (2009-05-15 15:22:44)

  • [SOLVED] Loading Kernel Modules with Options

    Hi,
    I am trying to load the nf_conntrack_ftp kernel module on boot. I followed the Arch Wiki's article on kernel module loading [0] and created a file in /etc/modules-load.d/ called nf_conntrack_ftp.conf:
    /etc/modules-load.d/nf_conntrack_ftp.conf wrote:# Load the nf_conntrack_ftp kernel module at boot
    nf_conntrack_ftp
    This loads the nf_conntrack_ftp module on boot just fine; unfortunately the module uses the default FTP port (21) and I need it to run on a different port (6621). When I try to dynamically load nf_conntrack_ftp using modprobe nf_conntrack_ftp ports=6621 it loads just fine and according to systools has the port set correctly. However, if I try to set the port anywhere in /etc/modules-load.d/ I always get an error message during boot saying:
    Failed to start Load Kernel Modules. See 'systemctl status systemd-modules-load.service' for details.
    Looking at the systemctl status message as recommended by the error message on boot doesn't yield anything useful:
    systemctl status systemd-modules-load.service wrote:
    systemd-modules-load.service - Load Kernel Modules
       Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static)
       Active: failed (Result: exit-code) since Sun 2014-02-09 16:46:13 EST; 11min ago
         Docs: man:systemd-modules-load.service(8)
               man:modules-load.d(5)
      Process: 287 ExecStart=/usr/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE)
    Main PID: 287 (code=exited, status=1/FAILURE)
    Feb 09 16:46:13 babylon5 systemd[1]: systemd-modules-load.service: main process exited, code=exited, status=1/FAILURE
    Feb 09 16:46:13 babylon5 systemd[1]: Failed to start Load Kernel Modules.
    Feb 09 16:46:13 babylon5 systemd[1]: Unit systemd-modules-load.service entered failed state.
    I have tried to set the "ports=6621" module option in multiple ways ...
    1. As part of the same nf_conntrack_ftp.conf file in /etc/modules-load.d/:
    /etc/modules-load.d/nf_conntrack_ftp.conf wrote:
    # Load the nf_conntrack_ftp kernel module at boot
    nf_conntrack_ftp
    options nf_conntrack_ftp ports=6621
    2. As a separate test.conf file in /etc/modules-load.d/:
    /etc/modules-load.d/nf_conntrack_ftp.conf wrote:# Load the nf_conntrack_ftp kernel module at boot
    nf_conntrack_ftp
    /etc/modules-load.d/test.conf wrote:options nf_conntrack_ftp ports=6621
    3. I even tried just adding "ports=6621" to the end of the nf_conntrack_ftp.conf file in /etc/modules-load.d/:
    /etc/modules-load.d/nf_conntrack_ftp.conf wrote:# Load the nf_conntrack_ftp kernel module at boot
    nf_conntrack_ftp ports=6621
    None of these worked. The moment there is "options nf_conntrack_ftp ports=6621" in any file in /etc/modules-load.d/ I get the error message on boot and the kernel module won't get loaded.
    What am I missing / doing wrong? Is it not possible to set kernel module parameters on boot? Does nf_conntrack_ftp need to be loaded by the initramfs, i.e. do I need to add the modconf hook to my /etc/mkinitcpio.conf?
    Thanks,
    Marek
    [0] https://wiki.archlinux.org/index.php/Kernel_modules
    Last edited by marco1475 (2014-02-09 22:54:26)

    Raynman wrote:
    marco1475 wrote:[0] https://wiki.archlinux.org/index.php/Kernel_modules
    Read this again, specifically the section about setting options, paying close attention to directory names.
    D'oh! Thanks for pointing that out, what a stupid oversight on my part:
    The files that tell the system which kernel modules to load go into /etc/modules-load.d/.
    The files that tell the system which parameters to pass to the kernel modules when loading them go into /etc/modprobe.d/.
    Now that each file is where it belongs everything works.

  • [solved] No ide_disk module = no root device

    Does anyone know what CONFIG_BLK_DEV_IDEDISK was replaced by? As of 2.6.27 it's obsolete, but w/o it my system can't boot (no root disk devices created).
    Edit- NVM, my dumbass didn't have all the hooks needed, although on a slightly related note, is loading all the modules I need as easy as specifying them specifically, and having no hooks.
    Last edited by omgwtfbyobbq (2009-04-18 05:31:05)

    AlexanderHolmgaard,
    you don't NEED pulseaudio to have a working sound system (i'm running pure alsa since i started using linux on all my systems and those i help maintain).
    Your problem was likely caused by incorrect settings in /etc/asound.conf or ~/.asoundrc .
    Pulseaudio changes those files in order to ensure pulse and alsa work together as intended.
    In short, you didn't solve your problem but just got lucky pulseaudio works OOTB on your system.
    (troubleshooting pulseaudio tends to be much harder then troubleshooting alsa)

  • Setup Virtualbox modules without initscripts/sysvinit installed?

    Hi All,
    I'm running my Arch lappy without any any initscripts or sysvinit installed as I'm running and playing with systemd.
    Just wondering if anyone can guide me on how to build the modules for Virtualbox?
    Cheers,
    Mitch.

    HI All,
    Thanks for the responses. Yes, this would be installation-related, so I thank you for moving it to the right place
    The thing is falconindy, I completely removed initscripts. Everything has been working fine for about two months so I got rid of the older stuff. This is what I get without initscripts installed:
    [mitchell@richters-laptop ~]$ sudo /etc/rc.d/vboxdrv setup
    /etc/rc.d/vboxdrv: line 3: /etc/rc.conf: No such file or directory
    /etc/rc.d/vboxdrv: line 4: /etc/rc.d/functions: No such file or directory
    /etc/rc.d/vboxdrv: line 23: stat_busy: command not found
    /etc/rc.d/vboxdrv: line 30: stat_done: command not found
    /etc/rc.d/vboxdrv: line 42: stat_busy: command not found
    /etc/rc.d/vboxdrv: line 44: stat_done: command not found
    /etc/rc.d/vboxdrv: line 47: stat_busy: command not found
    /etc/rc.d/vboxdrv: line 49: stat_done: command not found
    /etc/rc.d/vboxdrv: line 52: stat_busy: command not found
    /etc/rc.d/vboxdrv: line 54: stat_done: command not found
    /etc/rc.d/vboxdrv: line 57: stat_busy: command not found
    /etc/rc.d/vboxdrv: line 59: stat_done: command not found
    /etc/rc.d/vboxdrv: line 62: stat_busy: command not found
    [mitchell@richters-laptop ~]$
    I don't even know what package owns "stat_done" and "stat_busy", I can't see it in the file listing for initscripts.
    I can see how it's building now from the script and will manually compile for now .
    Last edited by mj4077au (2011-09-10 21:06:22)

  • [SOLVED] Loading kernel modules: 'Invalid module foramat'

    Hi.
    I installed latest driver for my VIA video card. The driver is for Ubuntu and SuSE, but I successfully installed it and the files are at place. I changed the driver in my xorg.conf file and it is working, but I am not able to load 'drm' 'via-chrome9'and 'via-agp' kernel modules. The output message says "Invalid module format". These modules are working on Ubuntu. Is there something I can do to make them work.
    Regards.
    Last edited by Gruntz (2008-05-02 09:41:07)

    Gruntz wrote:These modules are working on Ubuntu.
    You cannot use packages compiled for Ubuntu's kernel with Arch's kernel.  You'd have to recompile it against our kernel

  • [SOLVED] Virtualbox module "vboxdrv" - loading at boot

    I can manualy boot the "vboxdrv" module using
    sudo modprobe vboxdrv
    and this works every time - I can use Virtual box withouth problems. I would really like to load this module at boot time using the "/boot/syslinux/syslinux.cfg" file and then recompile the image using mkinitcpio -p. I edited the file like this, but the module doesn't get loaded.
    LABEL arch
    MENU LABEL Linux (Arch)
    LINUX ../vmlinuz-linux
    APPEND root=/dev/sda3 rw init=/usr/lib/systemd/systemd vboxdrv
    INITRD ../initramfs-linux.img
    I have seen that people useing "modeprobe.****=*****" command or something similar in this file to load modules. How should I use this to load vboxdrv module?
    Last edited by 71GA (2014-04-13 11:48:36)

    halimbo wrote:
    I don't see the problem in adding vboxdrv to the initramfs, when he clearly wants to have it loaded anytime he boots.
    For the graphics drivers it's supposed in the wiki, too.
    So I don't see a problem in adding the driver for virtualbox. but that's just me, i see.
    When i follow your argumentation, there is no reason to add graphics drivers in /etc/mkinitcpio.conf because the drivers are not needed to mount the initial filesystem.
    It's not only about mounting the real root it's about ensuring a succesfull bootup of the whole system and having graphics modules loaded early helps to do that. On my laptop for example there is a race condition with X11, which wants to start before udev figured out the appropriate graphics driver module to load. So it would boot into terminal and the display manager service would report "failed" as status otherwise.
    Last edited by blackout23 (2014-04-13 18:45:14)

  • Systemd service for virtualbox loading/unloading modules too

    I'd like to have a vbox.service that handles inserting/removing the needed modules as well as running the target vbox.   I modified ngoonee's service as shown below to handle the modprobe and rmmod steps but I have two issues:
    [Unit]
    Description=Virtualbox Headless VM
    [Service]
    ExecStartPre=/usr/bin/sudo /usr/bin/modprobe -a vboxdrv vboxnetflt
    ExecStart=/usr/bin/VBoxHeadless --startvm narch
    ExecStop=/usr/bin/VBoxManage controlvm narch poweroff
    ExecStopPost=/usr/bin/sudo /usr/bin/rmmod vboxdrv vboxnetflt
    User=facade
    [Install]
    WantedBy=muti-user.target
    Issue #1) The service fails when trying to run the ExecStopPost command since the vbox doesn't go instantly down and the modules are in use.  So, without building in a sleep command... how can I have the rmmod run when the poweroff of the vbox takes some time?
    Issue #2) To my knowledge, I cannot mix root user commands and user-defined commands, my solution has been to use sudo but I think that isn't very elegant.  Is there a way to have the User= statement only apply to the ExecStart and ExecStop commands?
    Last edited by graysky (2013-11-24 10:16:54)

    Try a separate service for loading the modules (with unloading on stop and StopWhenUnneeded=true so the unloading happens as soon as you no longer need them). Add Requires and After to the VM service (now you can also have multiple VM services without modprobe/rmmod conflicts). This should clear up #2 as well.
    If you're lucky, this fixes #1 too.
    (I had written some more, but then I wanted to check something with VBox and it crashed my system -- it's done that a few times recently.)

  • I can't load VirtualBox OSE additions modules

    Hi to everyone:
    I have VirtualBox (OSE) installed on my system:
    [glsadmin@researchlinux ~]$ pacman -Qs virtualbox
    local/virtualbox-modules 3.0.12-1
    Kernel modules for VirtualBox
    local/virtualbox-ose 3.0.12-1
    Powerful x86 virtualization for enterprise as well as home use (Open Source Edition)
    local/virtualbox-ose-additions 3.0.12-1
    Guest Additions for VirtualBox (Open Source Edition)
    local/virtualbox-ose-additions-modules 3.0.12-1
    Kernel modules for VirtualBox Guest Additions
    I can't load the modules of OSE additions:
    [root@researchlinux ~]# modprobe vboxadd
    FATAL: Error inserting vboxadd (/lib/modules/2.6.31-ARCH/misc/vboxadd.ko): No such device
    [root@researchlinux ~]# modprobe vboxvfs
    FATAL: Error inserting vboxvfs (/lib/modules/2.6.31-ARCH/misc/vboxvfs.ko): No such device
    [root@researchlinux ~]#
    But they're on the system:
    [root@researchlinux ~]# pacman -Ql virtualbox-ose-additions-modules
    virtualbox-ose-additions-modules /lib/
    virtualbox-ose-additions-modules /lib/modules/
    virtualbox-ose-additions-modules /lib/modules/2.6.31-ARCH/
    virtualbox-ose-additions-modules /lib/modules/2.6.31-ARCH/misc/
    virtualbox-ose-additions-modules /lib/modules/2.6.31-ARCH/misc/vboxadd.ko
    virtualbox-ose-additions-modules /lib/modules/2.6.31-ARCH/misc/vboxvfs.ko
    [root@researchlinux ~]#
    Someone else with the same problem ... anyone knows how to fix it?

    wonder wrote:
    do you have virtualbox-additions installed?
    pacman -Qs virtualbox
    No, I don't.
    [glsadmin@researchlinux ~]$ pacman -Qs virtualbox
    local/virtualbox-modules 3.1.0-1
    Kernel modules for VirtualBox
    local/virtualbox-ose 3.1.0-1
    Powerful x86 virtualization for enterprise as well as home use (Open Source Edition)
    local/virtualbox-ose-additions 3.1.0-1
    Guest Additions for VirtualBox (Open Source Edition)
    local/virtualbox-ose-additions-modules 3.1.0-1
    Kernel modules for VirtualBox Guest Additions
    I remember that program's package (virtualbox-additions) is under PUEL license, but I can't use the package in one enterprise environment; by that reason I thought that the virtualbox-ose-additions package could be useful for my main target: change between the guest system and the host system without to use the CTRL key for to release the mouse pointer.

  • [SOLVED] Can't load this module??

    Ok, I discovered why I have no eth0 device. I have an
    Nvidia MCP61 Ethernet card, according to lscpi -v
    and no associated "Kernel" modules.
    The necessary Ethernet driver for that Nvidia card is forcedeth
    however
    # modprobe forcedeth
    FATAL: Module forcedeth not found.
    but if I perform a systemwide find..
    I get
    /usr/lib/modules/3.6.2-1-ARCH/kernel/drivers/net/ethernet/nvidia/forcedeth.ko.gz
    but according to 'man modprobe' the modprobe program looks in the /lib/modules/'uname -r' directory
    and when I run
    # uname -r
    3.5.6-1-ARCH
    I can cleary see why modprobe didn't work since according to the previous "find" there is no "forcedeth" in that directory.
    so I tried
    # modprobe -S 3.6.2-1-ARCH
    Error: missing parameters. See -h.
    to tell modprobe to search in that directory instead, but despite different variations I couldn't change the version sucessfully.
    So instead I tried copying the "forcedeth.ko.gz" to the /lib/modules/3.5.6-1-ARCH directory
    and I still haven't been able to "modprobe" it, even with full pathname and force option provided.
    So, in summation, I had the driver in the wrong directory according to 'uname -r' and thus I couldn't
    load it. I tried to manually give modprobe a different kernel version, without sucess, and have tried
    copying forcedeth.ko.gz to the directory which corresponded to /lib/modules/'uname -r'.
    I guess I need to either
    - upgrade the kernel without an internet connection?
    - sucessfully modprobe forcedeth despite the kernel version conflict?
    - maybe throw a symbolic link somewhere?
    - give an explicit option  to define a full path in a config file?
    - do something with mkinitcpio that can specify that module and boot into that ramdisk?
    Any suggestions would be greatly appreciated, since I don't know how else to load the module.
    If any other info on my system might give a lead, I'd be more than happy to provide it. Thanks. I'm almost there...
    Last edited by confusion-is-my-sedative (2012-10-26 21:26:06)

    ok, did and done. (However, note that this isn't raw code since I have to type from display of the monitor to the laptop.)
    # file /boot/vmlinuz-linux
    /boot/vmlinuz-linux: Linux kernel x86 boot executable bzImage, version 3.6.2-1-ARCH (tobias@T=POWA-LX) #1 SMP PREMPT Fri Oct 12 23:58, RO-rootFS, swap_dev 0x3, Normal VGA
    According to file, I do have the latest kernel, which makes this even more peculiar since it isn't consistent with 'uname -r'
    3.5.6-1-ARCH
    and I'm using grub legacy, I think.
    # cat /boot/grub/menu.1st
    timeout 5
    default 0
    color light-blue/black light-cyan/blue
    # BOOT SECTION
    # (0) Arch Linux
    title Arch Linux
    root (hd0,2)
    kernel /boot/vmlinuz-linux root=/dev/disk/by-uuid/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx ro modeset=0
    initrd /boot/initramfs-fallback.img
    # (1) Arch Linux
    title Arch Linux Fallback
    root (hd0,2)
    kernel /boot/vmlinuz-linux root=/dev/disk/by-uuid/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx ro
    initrd /boot/initramfs-fallback.img
    I didn't post the whole config since transcribing comments with mode suggestions would be needless. But I don't think there's any danger in ommitting the '#' lines, is there?

  • VirtualBox: Load kernel modules at startup

    I have installed virtualbox and I would like to load its modules vboxdrv at startup so following what is commented in ArchWiki https://wiki.archlinux.org/index.php/Vi … el_Modules, I have create a file virtualbox.conf at /etc/modules-load.d with the following content:
    tee /etc/modules-load.d/virtualbox.conf <<< "vboxdrv"
    and then:
    depmod -a
    Finally, I restart the system but at boot time when loading modules it fails and it recommends me to see systemctl.
    System Info:
    VirtualBox 4.2.4
    Kernerl version: 3.6.6-1-ARCH

    I am trying to load vboxdrv only.
    Recently I have done the following:
    $ sudo /usr/lib/systemd/systemd-modules-load
    Module 'nfs' is already loaded
    Module 'cuse' is already loaded
    Failed to find module 'snd-seq-oss'
    Module 'vboxdrv' is already loaded
    so I guess this is caused by snd-seq-oss at startup, but I do not know how to solve this. In the meantime I will google...
    For your information: I am using OSS.
    I highly appreciate your comments, thanks to all of you.
    graysky wrote:
    toni wrote:VirtualBox 4.2.4
    Kernerl version: 3.6.6-1-ARCH
    ...and `pacman -Syu` your system!
    toni wrote:tee /etc/modules-load.d/virtualbox.conf <<< "vboxdrv"
    I suspect you want to load more than just the vboxdrv, no?  For example, my setup requires both vboxdrv and vboxnetflt to work properly.
    Last edited by toni (2013-01-06 16:40:42)

  • [SOLVED] Screen turns off on boot at "Loading ACPI Modules"

    So, I have been using arch for some time and am really liking it so far.  It has replaced Windows on my desktop and am planning to install it on my laptop when I get a chance.  I showed my parents some audio apps that run under Linux, and they suddenly wanted arch too!   I decided to install arch on their desktop, so after migrating Windows to a larger hard drive, I installed arch onto the remaining space...  Everything seemed fine until I tried to boot into the new system.  Once it reaches "Loading ACPI Modules" the screen turns off and refuses to turn back on.  I have tried everything I could think of (booting into the LiveCD again and running pacman -Syu on the new install, swapping the monitor to a different video port, reinstalling arch) and some solutions I found on the forums (adding acpi=off, noapic, nolapic_sound to the boot line.)  The latter made the boot skip ACPI, but the the screen blanks on "Waiting for udev events to be processed"!  I'm thinking it might be something to do with the video card (an old Radeon X1300 AGP) but I don't know what to do to fix it...  The system doesn't lock up, as even after it blanks I can log in and push Ctrl-G to make a terminal beep!  I've tried everything I can think of...  If this doesn't work I'll probably try another distro on that machine.  The system is:
    Intel D845WN Motherboard
    1GB PC133 RAM
    2.2Ghz Celeron Processor
    Radeon X1300 AGP card
    Sound Blaster Audigy PCI card
    USB 2.0 PCI Card
    PCI NIC
    Thanks in advance for any advice!
    EDIT:  Actually, I think it does lock up, as I don't have to hold down the power button to turn it off after the screen blanks.
    EDIT AGAIN: Thanks, adding "radeon.setmode=0" worked like a charm!  I knew that card was a bit wacky, but I didn't think it would stop the system from booting...
    Last edited by Fwirt (2009-10-12 23:24:27)

    ok, seems it's the  automatic kernel mode setting (KMS) that causes this see:
    http://wiki.archlinux.org/index.php/ATI … _.28KMS.29
    to get the system to boot, go into the grub menu, edit the boot option (i.e. press 'e') then edit the line that looks like
    kernel /vmlinuz26 root=...
    and add
    radeon.modeset=0
    at the end of it. Then your system should start fine. Now add this to the corresponding line in /boot/grub/menu.lst
    greetings
    Indriði

  • [SOLVED] [systemd] systed-module-load.service inactive (dead)

    Hello archers,
    I use VirtualBox and I'm tired of loading modules manually so I figured that a conf file can be created in /etc/modprobe.d/ that will load those modules at boot. Well, easier said than done because it doesn't seem to work.
    Here's my virtualbox.conf:
    # modules relevant to VirtualBox
    vboxdrv
    vboxnetadp
    vboxnetflt
    and here's my systemctl status systemd-modules-load.service:
    systemd-modules-load.service - Load Kernel Modules
    Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static)
    Active: inactive (dead)
    start condition failed at Sun 2013-10-20 09:27:06 CEST; 6s ago
    none of the trigger conditions were met
    Docs: man:systemd-modules-load.service(8)
    man:modules-load.d(5)
    Looking forward to hearing from you.
    Last edited by robin92 (2013-10-20 11:10:55)

    robin92 wrote:so I figured that a conf file can be created in /etc/modprobe.d/ that will load those modules at boot.
    Why not read the Wiki and follow the instructions?
    https://wiki.archlinux.org/index.php/VirtualBox
    Last edited by loafer (2013-10-20 08:06:04)

  • [SOLVED] virtualbox-modules: dkms: command not found

    $ makepkg -s
    ==> Making package: virtualbox-modules 4.2.6-4 (Tue Jan 29 15:42:01 EET 2013)
    ==> Checking runtime dependencies...
    ==> Checking buildtime dependencies...
    ==> Retrieving Sources...
    ==> Extracting Sources...
    ==> Removing existing pkg/ directory...
    ==> Starting build()...
    -> Host modules
    /home/yuri/builds/virtualbox-modules/PKGBUILD: line 26: dkms: command not found
    ==> ERROR: A failure occurred in build().
    Aborting...
    $ which dkms
    which: no dkms in (~/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/vendor_perl:/usr/bin/core_perl)
    $ su - -c 'which dkms'
    /usr/sbin/dkms
    Since makepkg uses fakeroot (and should never be run as root), ...
    https://wiki.archlinux.org/index.php/AUR
    What is the proper way to make it work? Thank you.
    Last edited by x-yuri (2013-01-29 19:33:44)

    It's not my PKGBUILD. It's PKGBUILD, downloaded by abs (community/virtualbox-modules):
    # $Id: PKGBUILD 82593 2013-01-21 11:10:44Z tpowa $
    # Maintainer: Ionut Biru <[email protected]>
    # Maintainer: Sébastien Luttringer <[email protected]>
    pkgbase=virtualbox-modules
    pkgname=('virtualbox-host-modules' 'virtualbox-guest-modules')
    pkgver=4.2.6
    pkgrel=4
    arch=('i686' 'x86_64')
    url='http://virtualbox.org'
    license=('GPL')
    makedepends=('linux-headers'
    "virtualbox-host-dkms>=$pkgver"
    "virtualbox-guest-dkms>=$pkgver"
    'expac'
    'bc')
    build() {
    _kernver=$(expac -Q '%v' linux-headers)-ARCH
    # dkms need modification to be run as user
    cp -r /var/lib/dkms .
    echo "dkms_tree='$srcdir/dkms'" > dkms.conf
    # build host modules
    msg2 'Host modules'
    dkms --dkmsframework dkms.conf build "vboxhost/$pkgver" -k "$_kernver"
    # build guest modules
    msg2 'Guest modules'
    dkms --dkmsframework dkms.conf build "vboxguest/$pkgver" -k "$_kernver"
    package_virtualbox-host-modules(){
    _kernver=$(expac -Q '%v' linux-headers)-ARCH
    _extraver=extramodules-${_kernver%.*}-ARCH
    pkgdesc='Host kernel modules for VirtualBox'
    depends=("linux>=${_kernver%.*}" "linux<$(echo "${_kernver%.*}+0.1"|bc)")
    replaces=('virtualbox-modules')
    conflicts=('virtualbox-modules')
    install=virtualbox-host-modules.install
    install -dm755 "$pkgdir/usr/lib/modules/$_extraver"
    cd "dkms/vboxhost/$pkgver/$_kernver/$CARCH/module"
    install -m644 * "$pkgdir/usr/lib/modules/$_extraver"
    find "$pkgdir" -name '*.ko' -exec gzip -9 {} +
    sed -ie "s/EXTRAMODULES='.*'/EXTRAMODULES='$_extraver'/" "$startdir/virtualbox-host-modules.install"
    package_virtualbox-guest-modules(){
    _kernver=$(expac -Q '%v' linux-headers)-ARCH
    _extraver=extramodules-${_kernver%.*}-ARCH
    pkgdesc='Guest kernel modules for VirtualBox'
    license=('GPL')
    depends=("linux>=${_kernver%.*}" "linux<$(echo "${_kernver%.*}+0.1"|bc)")
    replaces=('virtualbox-archlinux-modules')
    conflicts=('virtualbox-archlinux-modules')
    install=virtualbox-guest-modules.install
    install -dm755 "$pkgdir/usr/lib/modules/$_extraver"
    cd "dkms/vboxguest/$pkgver/$_kernver/$CARCH/module"
    install -m644 * "$pkgdir/usr/lib/modules/$_extraver"
    find "$pkgdir" -name '*.ko' -exec gzip -9 {} +
    sed -ie "s/EXTRAMODULES='.*'/EXTRAMODULES='$_extraver'/" "$startdir/virtualbox-guest-modules.install"
    # vim:set ts=2 sw=2 et:
    Could it possibly be that this time makepkg must be run as root?

  • [SOLVED] pacman -Syu on 10/17/2012, systemd can't load kernel modules

    Ok, I did a [pacman -Syu] on my laptop, and everything went well. So I decided to upgrade my PC as well, did a reboot and then couldn't ssh into it.
    Had to access the machine, and found
    # systemctl --failed
    UNIT LOAD ACTIVE SUB JOB DESCRIPTION
    [email protected] loaded failed failed dhcpcd on eth0
    httpd.service loaded failed failed Apache Web Server
    systemd-modules-load.service loaded failed failed Load Kernel Modules
    LOAD = Reflects whether the unit definition was properly loaded.
    ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
    SUB = The low-level unit activation state, values depend on unit type.
    JOB = Pending job for the unit.
    3 loaded units listed. Pass --all to see loaded but inactive units, too.
    To show all installed unit files use 'systemctl list-unit-files'.
    so it failed to load kernel modules...
    # systemctl status systemd-modules-load.service
    systemd-modules-load.service - Load Kernel Modules
    Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static)
    Active: failed (Result: exit-code) since Wed, 17 Oct 2012 18:27:11 -0400; 45min ago
    Docs: man:systemd-modules-load.service(8)
    man:modules-load.d(5)
    Process: 102 ExecStart=/usr/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE)
    CGroup: name=systemd:/system/systemd-modules-load.service
    Oct 17 18:27:11 MyHost systemd[1]: Failed to start Load Kernel Modules.
    Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
    ... then I checked network devices
    # ip addr
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
    valid_lft forever preferred_lft forever
    # ip addr show dev eth0
    Device "eth0" does not exist.
    ... then the modules; and I saw that none appeared for the Ethernet...
    # lspci -v | grep Ethernet -A8
    00:07.0 Bridge: NVIDIA Corporation MCP61 Ethernet (rev a2)
    Subsystem: Hewlett-Packard Company Device 2a6c
    Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 5
    Memory at fe02d000 (32-bit, non-prefetchable) [size=4K]
    I/O ports at fc00 [size=8]
    Capabilities: [44] Power Management version 2
    Capabilities: [50] MSI: Enable- Count=1/8 Maskable+ 64bit+
    Capabilities: [6c] HyperTransport: MSI Mapping Enable- Fixed+
    ... whereas they did for other devices
    # lspci -v | grep Kernel
    Kernel driver in use: ohci_hcd
    Kernel driver in use: ehci_hcd
    Kernel driver in use: sata_nv
    Kernel driver in use: sata_nv
    Kernel driver in use: pcieport
    Kernel driver in use: pcieport
    Kernel driver in use: pcieport
    Kernel driver in use: nouveau
    I'm guessing it's probably something with the new image after the pgrade, but I don't know which module to load nor do I
    understand why systemd isn't loading the modules when it was working stable enough to act as a headless server before. However, I've only been a week or so with systemd and might have overlooked something in the configs. Any help or insight would be greatly appreciated. Please. I'm desperate.
    Last edited by confusion-is-my-sedative (2012-10-26 21:30:01)

    Yep, I got that far, and tried the same advice from a different user with a 'tee' command which did the same thing, but unfortunately the forcedeth module can't be loaded because its in a different directory than the 'uname -r' specification allows modprobe to search for. I posted my attempts here: https://bbs.archlinux.org/viewtopic.php?pid=1181940

Maybe you are looking for

  • Problem: More than one VPN user at a time - Airport Extreme Base Station

    Hey Folks, Myself and my girlfriend both have work laptop PCs. It appears that the AEBS only allows one VPN user at a time. When a new user is logging in, it will kick out the other user. Is there a setting on the AEBS that will allow more than one V

  • Mac Freezes

    Bought a new mac pro this year and having problems with it freezing up a couple times a day. Seems to occur when I am NOT using the computer. All functions cease except mouse movement (but will not select anything or show Doc). Sometimes will freeze

  • ORA-31466: no publications found (Oracle 10.2.0.1.0)

    When I execute BEGIN DBMS_CDC_SUBSCRIBE.SUBSCRIBE( subscription_name => 'C1_SUB', source_schema => 'R1', source_table => 'C1啊', column_list => 'COL1埃, COL2唉', subscriber_view => 'C1_VIEW'); END; with chinese characters in table name and column name a

  • EDI 850 - Config to avoid Sending Item with Delv. Completed=ON

    Hi Guys We are sending our PO and Schedulling Agreement (SA) through EDI (as 850) to our suppliers.  However, our SA are opened for a long time so they can grow a lot, meaning that we have multiple items with multiple Schedule Lines.  Sometimes, that

  • J2ME Questions about School Project

    Hello, Before graduating college, I must complete a senior project with a team. For our project we would like to developed some embedded devices(hopefully using j2me). I'm not sure if it will be possible to do so. We have 2 different devices that mus