Sunday, January 11, 2009

Getting Mediatomb to start at system startup

Guide from: http://icrontic.com/forum/showthread.php?p=590832

hypo@homer-slaver:/etc$ sudo update-rc.d -f mediatomb remove
Removing any system startup links for /etc/init.d/mediatomb ...
/etc/rc0.d/K20mediatomb
/etc/rc1.d/K20mediatomb
/etc/rc2.d/S20mediatomb
/etc/rc3.d/S20mediatomb
/etc/rc4.d/S20mediatomb
/etc/rc5.d/S20mediatomb
/etc/rc6.d/K20mediatomb
hypo@homer-slaver:/etc$ sudo update-rc.d mediatomb start 90 2 3 4 5 . stop 10 0 1 6 .
Adding system startup for /etc/init.d/mediatomb ...
/etc/rc0.d/K10mediatomb -> ../init.d/mediatomb
/etc/rc1.d/K10mediatomb -> ../init.d/mediatomb
/etc/rc6.d/K10mediatomb -> ../init.d/mediatomb
/etc/rc2.d/S90mediatomb -> ../init.d/mediatomb
/etc/rc3.d/S90mediatomb -> ../init.d/mediatomb
/etc/rc4.d/S90mediatomb -> ../init.d/mediatomb
/etc/rc5.d/S90mediatomb -> ../init.d/mediatomb
hypo@homer-slaver:/etc$ sudo reboot

Note: command hypo@homer-slaver:/etc$ sudo update-rc.d mediatomb start 90 2 3 4 5 . stop 10 0 1 6 .

may also be replaced by command specified by the original post, but it is not recommended as order of disabling services is not correctly maintained.

hypo@homer-slaver:/etc$ sudo update-rc.d mediatomb defaults 99

The idea is that mediatomb should be one of the last services to startup, so that eth0 is all setup. I already have setup my /etc/interfaces file correctly for this.


hypo@homer-slaver:/etc$ cat network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp


update: after doing the steps above, mediatomb would startup correctly, but all network connectivity would be lost.

I also noticed that removing line iface eth0 inet dhcp would cause the network to configured properly, but mediatomb wouldn't run. I figured out this was happening because after logging in, the NetworkManager Applet would run and try to configure the interface again, leading to some confusion within the system (don't know exactly what conflict / confusion).

NetworkManagerApplet was disabled by:
1. browse to System > Preferences > Sessions
2. scroll down and uncheck Network Manager
3. close
4. sudo reboot

No comments: