developer.shyd.de. studying my hobby

17Jan/1113

Seagate Dockstar Debian Squeeze

debian-logo
(8 votes, average: 5.00 out of 5)
Loading...Loading...

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:

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 again readonly:

-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 rootfilesystem 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:

root@debian: cd /tmp
root@debian: wget 193.16.217.9/files/dockstarheavy.deb
root@debian: dpkg -i --force-overwrite dockstarheavy.deb
root@debian: 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:

add to

/etc/rc.local
echo default-on > /sys/class/leds/dockstar\:green\:health/trigger
echo none       > /sys/class/leds/dockstar\:orange\:misc/trigger

and in

/etc/init.d/halt 

find

log_action_msg "Will now halt"
halt -d -f $netdown $poweroff $hddown

add after

echo none > /sys/class/leds/dockstar\:green\:health/trigger

to set it off, when the system halts.
Now take a reboot.

root@debian: reboot

Once it comes up again the LED flashes green, while booting it flashes in orange heartbeat mode. After bootsequense it now should stay green.

4. Optimizations

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 highloghting for root uncomment this line in:

vim /etc/vim/vimrc
syntax on

Probably you want to change the hostname:

vim /etc/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:

dpkg-reconfigure tzdata

For now your dockstar is more or less ready to use, just install software for your needs.
If "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/old and /media/new and

$ 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.

5. Reference

http://jeff.doozan.com/debian/
http://forum.doozan.com/read.php?2,582
http://www.dermute.de/132-dockstar-debian-squeeze-kernel

Tagged as: , , , | 13,765 views Leave a comment
  • fayze

    thanks for the guide. i was following jeff’s guide, but his site currently has some problems and isn’t serving up the files the install script requests. yours was the only one i could get to work. and thanks for being so clear with easy to follow instructions, especially with the bonus led edits, those are very useful.

  • Pingback: Iniviting All Downloaders (No PC & laptop users) - Page 10

  • Lilipuce

    Thanks for all what you do, it’s really helpful. As jeff’s installation didn’t work. I tried yours. It worked a little bit further but not completely. If you have time, could you have a look on http://forum.doozan.com/read.php?2,4244,4587#msg-4587 where I explain my problem.
    Thanks in advance for your help !

  • Pingback: Seagate Dockstar Discussion and Tutorial Thread - Page 29

  • http://forum.pardususer.de Alaska

    Thanks a lot for your site – everything is useful here!
    :-)

  • http://www.suinot.org rsuinux

    Hello,
    I make the part 3 for your doc, but, my dockstar will not start. I make dpkg with option and move the /boot/uInitrd, but no result.
    Is very util to move the uInitrd?

  • http://www.suinot.org rsuinux

    hello, it’s me, again :)
    Just for information, my dockstar is now configured, except the firewall (in progress). For my personal use, the sshd run not in port 22 but in port….. secret :)
    And, in the final boot, /etc/rc.local run with the led green (param ‘default-on’), but also with this test:

    # For information, I indicates that ssh is active as a flashing LED orange (param ‘heartbeat’)
    ps x | grep sshd | grep sbin > /dev/null

    if [ "$?" = "0" ]
    then
    echo heartbeat > /sys/class/leds/dockstar\:orange\:misc/trigger
    fi

    exit 0

    • shyd

      Nicely done!
      I don’t run sshd on 22 too

  • Hecube

    hello

    Thanks for your work ;)
    I’m trying to install debian with your script but I can’t

    I: Unpacking base-files…
    I: Unpacking base-passwd…
    I: Unpacking bash…
    I: Unpacking libbz2-1.0…
    I: Unpacking coreutils…
    W: Failure while unpacking required packages. This will be attempted up to five times.
    W: Failure while unpacking required packages. This will be attempted up to five times.
    W: Failure while unpacking required packages. This will be attempted up to five times.
    W: Failure while unpacking required packages. This will be attempted up to five times.
    W: Failure while unpacking required packages. This will be attempted up to five times.
    debootstrap failed.
    See /tmp/debian/debootstrap/debootstrap.log for more information.

    and I can’t read the log :

    Pogoplug:/tmp/debian$ cd debootstrap
    -bash: cd: debootstrap: Permission denied

    Does the script still work for anyone ?

    Thx !

    • shyd

      Hi,
      I will try later.
      Try reading the log with cat /tmp/debian/debootstrap/debootstrap.log | more
      It’s a little strange, that you can’t cd to debootstrap

    • shyd

      Well, I just took an empty usb stick, partitioned it correctly and booted into rescueV2. I don’t have pogoplug on nand anymore but it should make no difference.
      The script runs through all steps flawlessly.

      1) Did you partition your usb stick as described?
      2) Did you plug it in before running the script?
      3) Is this your first installation on this particular device?

    • Lolowerde

      have a look there : http://forum.doozan.com/read.php?2,4244,4587#msg-4587

      it worked for me..

      good luck

  • Pingback: PogoPlug Pro - Discussion Thread. - Page 17

  • Mahesh

    I am using dockstar from a long time, today i have changed USb drive, Installation went fine but after reboot, i am not able to SSH dockstar. I checked router for Ip address but i am not able to find any IP address assigned to dockstar. I again reinstalled debian but I got the same problem. I dont know what is going wrong here.
    Please somebody help me to get this sorted.

    Thanks in advance.

    • shyd

      Do you have a serial connection? This will help you!
      If you don’t: try to edit /etc/network/interfaces to give the dockstar a static ip. Do this in pogoplug/rescue or at your desktop machine with the usb drive connected to it.

  • njren

    Don’t comment the line:
    /etc/init.d/hbmgr.sh start
    My pogoplug e02 disabled ssh after I did it and rebooted. I googled about it. It seems I am not the only one with the problem.
    I’ll need a serial cable to fix it.

  • Pingback: La mia playstation il Pogoplug :-) » Taglioli on the road...