Difference between revisions of "Revert to minimal Debian installation"

From BubbaWiki
Jump to navigation Jump to search
m (bubba_auth.xml and bubba_version confirmed redundant by Carl, Excito and may be removed as a part of this process.)
m
Line 43: Line 43:
iface eth1 inet dhcp
iface eth1 inet dhcp
</pre>  
</pre>  
That'll have them load automatically when the system is initializing. A peculiar thing about the B3 and B2 is that the command shutdown won't have them power off and the LED will still be lit after the device having shut down. The way Excito turns the power off is by writing a certain number to a file followed by a reboot. Upon the system loading it will read that file - and if told to, power down instead of continuing booting. This is what shuts down the B3 (proper):  
That'll have them load automatically when the system is initializing. A peculiar thing about the B3 and B2 is that the command shutdown won't have them power off and the LED will still be lit after the device having shut down. The way Excito turns the power off is by writing a certain number to a file followed by a reboot. Upon the system loading it will read that file - and if told to, power down instead of continuing booting ''but'' the button-daemon will still be running in order for the device to remain operational. This is what shuts down the B3 (proper):  
<pre>/sbin/write-magic 0xdeadbeef
<pre>/sbin/write-magic 0xdeadbeef
/sbin/reboot
/sbin/reboot
Line 51: Line 51:
reboot
reboot
</pre>  
</pre>  
Save it as an alias in your .bashrc or equivalent and name it accordingly.  
Save it as an alias in your .bashrc or equivalent with an appropriate name.  


Next two things to do is to remove the user "admin" since it was only used by the web interface and change the root password to something more appropriate - and then we'll reboot.<br>  
Next two things to do is to remove the user "admin" since it was only used by the web interface and change the root password to something more appropriate - and then we'll reboot.<br>  
Line 59: Line 59:


reboot
reboot
</pre>  
</pre>
 
=== Done! What now?  ===
=== Done! What now?  ===



Revision as of 14:04, 18 July 2011

This tutorial is primarily aimed towards the B3 but the principle should be the same for other products.


If you'd rather do without the web interface and preinstalled packages that comes with the Excito servers, a "vanilla" Debian installation may be desirable. However, attempting to install the official Debian releases instead of the by Excito prepared images can be time-consuming and difficult. An option is to revert from the factory defaults to an "almost vanilla" Debian installation by purging unwanted packages. There are only a few caveats - specifically, LVM support, OpenSSH and the network configuration - but they are critical in order to maintain a working device after reboot.

Initial setup

First off, we'll start with the B3 as-is unboxed. Plug it in as per the official instructions and boot it. Launch a browser and go to the device web interface. Do the Wizard setup and proceed to the Users page and grant yourself shell access. It may be a good idea to switch the Network setting to Server only. Once done, do a software update and then reboot the device.

When the B3 is up and running again - log in by SSH and switch to superuser (the default password is "excito") once logged in.

ssh username@b3.local
su

Delete packages

Next up, purge (the below code is actually one line and not two but has been formatted for legibility). Dialogues will be displayed asking you wether you'd like to purge databases or not for the Horde, Mediatomb and Squeezecenter applications. Opt for removal of all data. The default MySQL root user password is empty.

aptitude purge squeezecenter mailutils guile-1.8-libs libmailutils2 dhcp3-client dhcp3-common bubba bubba-frontend bubba-backend postfix mysql-server mysql-server-5.1
mysql-common mdadm mnemo2-base turba2-base libmysqlclient16 libfribidi0 libgmp3c2 libgsasl7 libidn11 libntlm0 libpng12-0 libxapian15

The purge command will for the mostpart of the time not only remove the installed packages but also delete any configuration files created for or by them. However, there'll still be some remnants left for you to deal with manually.

cd /etc

rm -rf album aliases aliases.db avahi bubba_auth.xml bubba_version bubba-networkmanager.conf cups defoma dhcp3 dovecot foomatic ftd ghostscript horde mediatomb netatalk 
samba mt-daapd.conf

Reconfiguration

Next thing to do is to reinstall OpenSSH and LVM support - these were removed automatically as they were part of one of the meta-packages we purged earlier.

aptitude install openssh-server lvm2

With that issue out of the way let's get the networking set up proper.

vi /etc/network/interfaces

You should see this:

iface eth0 inet dhcp

iface eth1 inet dhcp

Edit to this:

auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet dhcp

That'll have them load automatically when the system is initializing. A peculiar thing about the B3 and B2 is that the command shutdown won't have them power off and the LED will still be lit after the device having shut down. The way Excito turns the power off is by writing a certain number to a file followed by a reboot. Upon the system loading it will read that file - and if told to, power down instead of continuing booting but the button-daemon will still be running in order for the device to remain operational. This is what shuts down the B3 (proper):

/sbin/write-magic 0xdeadbeef
/sbin/reboot

This is for the B2:

echo -e "3735928559">/sys/devices/platform/bubbatwo/magic
reboot

Save it as an alias in your .bashrc or equivalent with an appropriate name.

Next two things to do is to remove the user "admin" since it was only used by the web interface and change the root password to something more appropriate - and then we'll reboot.

deluser admin

passwd

reboot

Done! What now?

There it is, an "almost vanilla" Debian system on your B3. You should have 165 packages installed and except for a few crucial ones (bubba-buttond, bubba3-kernel, bubba3-modules and excito-keyring - the last one is not vital but useful) it's the very same as what you'd get by installing plain old Debian. Depending on what you want to do with your server you may want to consider installing some of the following softwares:

  • sudo
  • proftpd
  • apache2
  • mysql
  • php5
  • python
  • ruby
  • dd-client
  • transmission
  • dnsmasq


Issues

At the time of writing this there is only one issue left unresolved - old files and directories created by the various softwares removed. This includes, amongst others, Mediatomb, Squeezecenter and Horde. There may also be special users and groups - those that were created for these applications to use.