Jump to content
funtoo forums
  • 0
akbarstatix

openrc questions

Question

I am confused by the following when I try to add a start up script to default runlevel.

 

When I run the following to add vboxdrv I have the following result:

quad ~ # rc-update add vboxdrv default
 * rc-update: vboxdrv already installed in runlevel `default'; skipping

And when I look at the contents of my /etc/runlevels/default directory I do see a link for vboxdrv.  

 

However when I look at the output of rc-status, vboxdrv is not listed as a script that is being managed.

quad ~ # rc-status 
Runlevel: default
 syslog-ng                                                         [  started  ]
 dhcpcd                                                            [  started  ]
 netmount                                                          [  started  ]
 sshd                                                              [  started  ]
 postfix                                                           [  started  ]
 dbus                                                              [  started  ]
 consolekit                                                        [  started  ]
 gpm                                                               [  started  ]
 ntpd                                                              [  started  ]
 vixie-cron                                                        [  started  ]
 local                                                             [  started  ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed
 lvmetad                                                           [  started  ]
Dynamic Runlevel: manual

So I am forced to manually start vboxdrv with each reboot.  I do have systemd installed on this box as well (required by cinnamon/gnome desktop that I installed.)

 

How to fix this?  

 

open-rc version: 

quad ~ # equery l openrc
 * Searching for openrc ...
[IP-] [  ] sys-apps/openrc-0.18.3:0

 

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Virtualbox has at least 3 kernel modules that need to be loaded.

If vboxdrv isn't loaded you see an error when Virtualbox is launched.
The tutorial is here: http://www.funtoo.org/Package:VirtualBox
Upon boot OpenRC for auto-loading modules add module names to  /etc/conf.d/modules
modules="vboxdrv vboxnetadp vboxnetflt"

If that method doesn't work follow instructions Load Modules/Upon boot systemd

Share this post


Link to post
Share on other sites
  • 0

When you manually start vboxdrv are you doing it with the init script?  Any errors?

/etc/init.d/vboxdrv start

What do you get when use the eselect rc module to start it?

eselect rc start vboxdrv

Do you have rc logging enabled in /etc/rc.conf?   Any errors in the log file?

Share this post


Link to post
Share on other sites
  • 0

I don't receive any error starting by either method.  I usually just use /etc/init.d/vboxdrv start to load the mod's.

 

Odd thing is  vboxdrv is not shown in the list of available scripts when I issue "eselect rc list" command.   I wonder if this is related to the rc-update/rc-status issues.

quad dennis # eselect rc list
Available init scripts
  NetworkManager
  alsasound
  binfmt                    boot
  bluetooth
  bootmisc                  boot
  busybox-ntpd
  busybox-watchdog
  consolefont
  consolekit                default
  cups-browsed
  cupsd
  dbus                      default
  devfs                     sysinit
  device-mapper             boot
  dhcpcd                    default
  dhcpd
  dhcrelay
  dhcrelay6
  dmcrypt
  dmesg                     sysinit
  dmeventd
  dnsmasq
  fsck                      boot
  git-daemon
  gpm                       default
  hostname                  boot
  hwclock                   boot
  ip6tables
  iptables
  keymaps                   boot
  killprocs                 shutdown
  kmod-static-nodes         sysinit
  local                     default
  localmount                boot
  loopback                  boot
  lvm                       boot
  lvm-monitoring
  lvmetad
  mdadm
  mdraid
  mit-krb5kadmind
  mit-krb5kdc
  mit-krb5kpropd
  mod-mono-server
  modules                   boot
  mount-ro                  shutdown
  mtab                      boot
  net.lo
  netif.tmpl
  netmount                  default
  ntp-client
  ntpd                      default
  numlock
  openrc-settingsd
  osclock
  pciparm
  postfix                   default
  postgresql-9.4
  procfs                    boot
  pydoc-2.7
  pydoc-3.3
  rfcomm
  root                      boot
  rsyncd
  s6-svscan
  samba
  savecache                 shutdown
  sntp
  sshd                      default
  svnserve
  swap                      boot
  swapfiles                 boot
  swclock
  sysctl                    boot
  sysfs                     sysinit
  syslog-ng                 default
  termencoding              boot
  tmpfiles.dev              sysinit
  tmpfiles.setup            boot
  udev                      sysinit
  udev-postmount            boot
  urandom                   boot
  vixie-cron                default
  wpa_supplicant
  xdm
  xdm-setup
  xsp
quad dennis # eselect rc start vboxdrv
Starting init script
quad dennis # 

Share this post


Link to post
Share on other sites
  • 0

Is this a script created for openrc  or a regular bash script?  I believe openrc expects the former and it may ignore anything that doesn't have #!/sbin/runscript or #!/sbin/openrc-run as the first line.

Share this post


Link to post
Share on other sites
  • 0

VirtualBox only needs the modules loaded,

  modprobe vboxdrv vboxnetadp vboxnetflt vboxpci.

The userland side ( virtualbox, VBoxManage, VBoxHeadless ) uses the modules, openrc doesn't need to do anything.

 

I did a clean install a month ago, whenever I switch hypervisors, and I don't see vboxdrv in my /etc/init.d or /etc/conf.d.

Running app-emulation/virtualbox-5.0.8

Is this a left over from a previous series 4 box install.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...