It’s been some days now when I got my dockstar and I’ve been reading along the web to get more and more information about how to get debian to work with the dockstar. There are a couple of HowTo’s out there, but I had to check at least a few of them to get to know what I wanted to know. So I decided to make my own HowTo as kind as a merged one with everything important in it.
Of course the first step was to unbox the little homeserver, but the second one, the most important step if you are going to put it online is to disable the Pogoplug software before you connect it to the internet by simply disabling the autoupdate on the NAND. You have done this already? Skip to part two! Well then, you have to go offline, yes your wan-interface must go down. 😱
1. Cut Pogo from the WWW
If you don’t have a DHCP running to get the IP-Address of the dockstar you can figure it out with this line at your desktop computer with
nmap -e eth0 -sP $(printf “169.254.%d.%d” 0xbe 0xef) where the last octets are the end of the MAC-Address as read on the sticker at the dockstar’s buttom.
Now you are ready to engage a ssh session to the dockstar:
$ ssh -l root ip_of_dockstar # password will be stxadmin -bash-3.2: killall hbwd # stop Pogoplug-Updater -bash-3.2: mount -o remount,rw / # remount flash with read-write -bash-3.2: vi /etc/init.d/rcS
Now comment this line out to permanently disable autostart of the updater:
"/etc/init.d/hbmgr.sh start" to "#/etc/init.d/hbmgr.sh start"
If you are done remount the flash readonly again:
-bash-3.2: mount -o remount,ro /
In my HowTo I will skip the part making backups of the original Pogoplug software because I am optimistic not to brick my dockstar or sell it in some days with pogo. 😆
2. Install Debian Squeeze on USB Stick
With this done we have to prepare a propper usb-stick, some guys say 2 GB are enough, I recommend at least 2 GB, I took a 4 GB stick to have some space to play with.
Make sure the stick is partitioned like
sda1 as root filesystem and
sda2 as swap, I use 256 MB for swap and the rest as rootfs. Just take
gparted on your desktop computer an partition your drive. You don’t have to format
sda1, the installscript will do:
cd /tmp #wget http://jeff.doozan.com/debian/dockstar.debian-squeeze.sh #debootstrap won't work wget http://dev.shyd.de/dockstar/dockstar.debian-squeeze.sh #old debootstrap will work chmod +x dockstar.debian-squeeze.sh export PATH=$PATH:/usr/sbin:/sbin ./dockstar.debian-squeeze.sh
This will take some time to be done, get yourself a coffee.
After your device reboots, it may have a different IP address (it’s identifying as ‘debian’ to the DHCP server now instead of ‘Pogoplug’). Don’t worry if the green LED stops flashing, the current kernel doesn’t support it!
Now you can login as root using password root.
3. Install new Kernel
Well, we want to get the LED back flashing and probably some modules for usb devices and other optimizations, therefor we install the the heavykernel by gorgone:
[email protected]: cd /tmp # [email protected]: wget 220.127.116.11/files/dockstarheavy.deb # seems to be down, so use my backup: [email protected]: wget http://files.schuett.io/dockstar/dockstarheavy.deb # backup file I used [email protected]: dpkg -i --force-overwrite dockstarheavy.deb [email protected]: mv /boot/uInitrd /boot/org.uInitrd # very important, otherwise device wont boot again
To make the LED “know what to do” you have to edit two more files:
echo default-on > /sys/class/leds/dockstar\:green\:health/trigger echo none > /sys/class/leds/dockstar\:orange\:misc/trigger
log_action_msg "Will now halt" halt -d -f $netdown $poweroff $hddown
echo none > /sys/class/leds/dockstar\:green\:health/trigger
to set it off, when the system halts.
Now take a reboot.
[email protected]: reboot
Once it comes up again the LED flashes green, while booting it flashes in orange heartbeat mode. After the boot sequence it now should stay green.
Due to security change the rootpw, also speed up upgrades by modifying the
sources.list to a server nearby and update the repos:
passwd vi /etc/apt/sources.list apt-get update
Install your favorite editor, vim for me:
apt-get install vim
To enable syntax highlighting for root uncomment this line in:
vim /etc/vim/vimrc syntax on
Probably you want to change the hostname:
When running a server it’s recommended to set a static ip:
vim /etc/network/interfaces auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.0.10 netmask 255.255.255.0 gateway 192.168.0.1
If you have change the network, make sure the DNS is correct:
vim /etc/resolv.conf 192.168.0.1
In case you want to change the timezone, type:
For now your dockstar is more or less ready to use, just install software for your needs.
df -h doesn’t look that good, don’t worry, it’s no problem to change to a bigger stick. Just in short: Mount both sticks as
/media/new and then
cp -a /media/old/* /media/new/.
This is not the end of the story, I have some plans to do with my dockstar, stay tuned though.