Ubuntu 12.04 change priority/runlevel of Virtualbox on startup

Getting Virtualbox to automatically start seems to be a pretty big problem if you do a search for "virtualbox ubuntu autostart". Most of the issues seem to be stuck at the same part; Vbox runs just fine when running the "vboxautostart-service" but it just will not start when Ubuntu starts. The problem is the runlevels.

My problem was at most of my apps were starting at the same exact run level of 20. The problem with that is some should be started before others. For instance, my ZFS needed to load before Vbox, but they were loading at the same time causing Vbox to silently fail. I lowered ZFS to start on 19, and spread out how Vbox starts. They now look like this:


Notice I have vboxdrv set to start before the rest of the Vbox services. It's pretty simple to change the order, just be careful. First you want to remove the service from update-rc.d, then add it back in with the new order. Here is an example.

$sudo update-rc.d -f virtualbox remove

$sudo update-rc.d virtualbox defaults 21

For more info on run levels in Ubuntu this site is what I used.


This is the site that pointed me in the correct direction.


More reference sites:


Server 2008 WINS with two NIC's

If you are still running WINS (I do for simplicity) and have two NICs in your WINS box, you will need to change the order of the NICs so WINS knows where to look. This was driving me nuts.

Things I did to resolve the issue.

DNS Server, on the Interfaces tab disable the NIC your non "main" NICs.
NIC, Under "Manage Network Connections" select your non "main' NIC, uncheck all boxes except for IPv4/6. Then select your IPv4 box, uncheck register DNS, and disable NetBIOS.
Still in the Manage Network Connections, select Advanced (File Menu) -> Advanced Settings. Move your "main" connection to the top of the list. Press ok.

You are done, go back and WINS should know be able to resolve/connect.


Ubuntu 12.04 + OSX Time Machine

I think I have covered this in an old post, but I just fixed some things that have been bugging me. The first referenced article at the bottom was a huge help in getting me started, but he has a lot of malformed xml tags. He also creates 3 files, which I've found you do not need, just create one.

Ok, first install netatalk and avahi.
sudo apt-get install netatalk avahi-daemon

Now let's create and edit our new avahi service
sudo nano /etc/avahi/services/afp.service

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
    <name replace-wildcards="yes">%h</name>
If you are running Samba on this server as well, you might want to change the <name> field. I have changed mine to <name>timelord</name>. This will allow your timemachine/apple shares to coexist on the same server (it will look like a different server in Finder though)
MM:MM:MM:MM:MM:MM should be the MAC address of your Ubuntu server. You can quickly find it by running the following command.
ifconfig -a | grep HWaddr
UUUU needs to be a unique UUID. Go to guidgen.com to generate a UUID. Now save the file, and let's move on.

Create some directories and a new user:
sudo mkdir -p /mnt/timemachine

sudo useradd -c "Time Machine User" -d /mnt/timemachine/ -s /bin/false -g 10 timemachine

sudo passwd timemachine

Set your timemachine share so it is supported:
sudo touch /mnt/timemachine/.com.apple.timemachine.supported

Set some ACLs:
sudo chown -R timemachine:users /mnt/timemachine

Next we move to setting up two files for netatalk:
sudo nano /etc/netatalk/afpd.conf

at the very bottom of the file, add:
- -tcp -nozeroconf
This tells netatalk to use tcp and not use zeroconf, if you don't use this then you will get two enties in Finder.

Configure your /etc/netatalk/AppleVolumes.default file:
# By default all users have access to their home directories.
#~/                      "Home Directory"
/mnt/timemachine "TimeMachine" allow:timemachine options:tm
# End of File

Now restart your services, and you should be done:
sudo service netatalk restart

sudo service avahi-daemon restart

Time Machine Server Requirements