How to get Debian on a Seagate GoFlex Net device

5 Oct

Update on 05.06.2013: Due to a still high interest in this post I added “USB device partitioning” and other small things …

After using my Seagate Dockstar more than one year, a friend moved into town and wanted something similiar for home uses… Now as the pogoplugs are too pricy and old Dockstar’s are pretty rare in Europe (and even then around 60€ used…) I ran into the Seagate GoFlex Net.

Seagate GoFlex Net Device

On the hardware side, nothing much has changed there. The GoFlex has just only one USB Port – which is in fact not much. So you shouldn’t use too many USB Hubs and/or devices with much wattage or bandwidth at it. But on the bright side, there is a SATA port on the top which is really useful when you are trying some sort of backup/webserver or download machine…
Another fun part is the nice black case and the 8 LED’s built into the front. They are stacked on each side, so 2×4 LEDs which are fully programmable through the kernel/sysfs. They are used in the Pogoplug software to display the amount of data which is currently lockated on the docked hdds in the top. But who wants to use that crappy software…

So next step was to get debian on that thingy – and again Jeff Doozan is there to help. His scripts, created over a year ago, were fine tuned and loads of other Pogoplug devices are supported now. And they come in very handy even for those who don’t hack hardware every day.
So if you need any help or if you’re running into problems, just visit the forum there: http://forum.doozan.com/index.php

IMPORTANT: I take no guarantee/warranty for this how to, so live with a possibly bricked device. Don’t blame me! (There are some ways and cases, where unbricking is possible, like using a UART/JTAG cable)
It might be also very useful, to rescue a print out of your U-Boot environmental settings as soon as you can play with them – just in case!

 

Part one: Prepare SSH Connection

To get started, power your GoFlex up, connect it into your LAN with web access. The first goal now is to get access to the device via SSH. It is currently booting the PlugOS software and there is atm no direct way to get access to it.

Pogoplug shows up on LAN
Pogoplug shows up on LAN

As I bought this device I read across some german forum and found out, that the PlugOS closes the SSH access with GoFlex Net Build dates around july/august 2012. So, yay, I got a pretty new one with no acces. Bad luck, anyway:

http://knowledge.seagate.com/articles/en_US/FAQ/214571en?language=en_US
Seagate themselves are pointing out here how to get access to the device…

So go the the pogoplug website and create yourself an account if you don’t already have one.
After logging in, your pogoplug device should appear on the website. Find the settings tab (well hidden – I needed my girlfriend to find it for me…)

The Pogoplug website with menu
The Pogoplug website with menu

and active the SSH access remotely:

Pogoplug website with security settings
Pogoplug website with security settings

Important: IF this option (enable SSH) does NOT appear on the website, there is potentially something wrong with your routers firewall. (blocking ports, no uPNP – depends). If the SSH port 22 is blocked, its blocked. (found here: GoFlex net missing from LAN

After that, you should be able to SSH into the device:

First SSH logon
First SSH logon

The Username should be “root” and the password should be “root” or “stxadmin” (i.e. on classic dockstars) here.

So Jeff has written scripts for different things:

Installing Debian and Updating U-Boot: http://projects.doozan.com/debian/
Just Updating U-Boot: http://projects.doozan.com/uboot/
There are tutorials, so you should at least take a look at it.

To be up-to-date, I’m using the newest Debian called “Wheezy”. There are also scripts available for bootstraped “Squeeze”. These scripts also automatically update the U-Boot bootloader to the latest version.

 

Part two: Prepare Boot device (USB)

First you should create yourself a root device (i.e. USB memory stick) where the rootfs should be placed with:

fdisk /dev/sda

You can see all available partitions on that device with the “p” command. Be sure to remove all old partitions from the stick/disk with “d”.
I’m using a 16GB USB 3.0 USB stick from Lexar, which then looks like:

Command (m for help): p
Disk /dev/sda: 16.0 GB, 16022241280 bytes
237 heads, 17 sectors/track, 7767 cylinders
Units = cylinders of 4029 * 512 = 2062848 bytes
   Device Boot      Start         End      Blocks   Id  System

Now you need to add two primary partitions.

n p 1 1 +15000M
n p 2 [enter] [enter]

“n” and “p” add a new primary partitiion, the first number is the number of the partition (here 1 and 2), the second number is the start cylinder and the last is the wanted size. So here I’m creating the first primary partition with 15GB space and the second primary partition with the rest of it (default values used then).

t 2 82

Another step is to change the file system id of the second partition to swap. The last step is to look at everything again with “p”:

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        7500    15108741+  83  Linux
/dev/sda2            7501        7767      537871+  82  Linux swap / Solaris

Save everything with “w” and exit.

 

Part three: Install on USB Disk with workaround

Now you need to make everything ready for the script and start it:

export PATH=$PATH:/usr/sbin:/sbin
cd /tmp
wget http://projects.doozan.com/debian/kirkwood.debian-wheezy.sh
chmod +x kirkwood.debian-wheezy.sh
./kirkwood.debian-wheezy.sh

Now it’s taking some time…

...
# Validating existing uBoot...
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00080000...
Connecting to jeff.doozan.com (50.116.34.13:80)
valid-uboot.md5      100% |*******************************|  1133  --:--:-- ETA
## Valid uBoot detected: [goflexnet original]
killall: hbwd: no process killed
...

The installer will ask you if you want to disable pogoplug services, which is appreciated and normal:

...
DISABLE POGOPLUG SERVICES
The pogoplug service includes an auto-update feature which could
be used to cripple or disable your device.  It is recommended
that you disable this service.
Would you like to disable the pogoplug services? [Y/n]
...

But after installing packages I ran into following error:

...
Connecting to cdn.debian.net (195.71.68.86:80)
xz-utils_5.1.1alpha+ 100% |*******************************|   232k 00:00:00 ETA
Connecting to cdn.debian.net (195.71.68.86:80)
zlib1g_1%3a1.2.7.dfs 100% |*******************************| 87460  00:00:00 ETA
FATAL: kernel too old

Obviously the standard running kernel from GoFlex Net

uname -a
Linux Pogoplug 2.6.22.18 #81 Tue Oct 19 16:05:00 PDT 2010 armv5tejl unknown

is too old to compile/install some of the packages correctly.
This is a huge problem, because at this point the U-Boot Bootloader got updated, but no working debian filesystem was installed, so rebooting the GoFlex will either end in no boot of the debian device nor getting access via SSH – because of the disabled pogoplug services.

To fix this I needed to download an version of Jeff’s/Dave’s Rescue System, available in Version 3 here.

Download it, copy it to the first non-swap partition (ext2) on the usb drive and untar it there. After that, plug the usb drive back into the GoFlex USB Slot and poweroff/poweron. Wait some time until the LED turns off and then, wait some time again and SSH will be back online. You should be now running the rescue system, a stripped down debian version, from the plugged USB drive.

But that is not our goal, just a workaround to get a newer kernel/environment. So the next step is to install the Rescue System to the NAND memory inside the GoFlex, so that we can always use it.
Some explanations and the full story can be found in Jeffs Forum Rescue Thread.
To install the rescue system do:

cd /tmp
wget http://jeff.doozan.com/debian/rescue/install_rescue.sh
chmod +x install_rescue.sh
./install_rescue.sh

Now the rescue system will be hard written into the GoFlex, so after finishing that, reboot and unplug the USB stick. Delete all files from the second ext2 partition (the old rescue system) and plug it back in. Make a reboot and you now should be running the hardcoded Rescue OS in combination with a clean USB stick.

Now we are following the already known procedure from Jeff which is documented here

cd /tmp
wget http://projects.doozan.com/debian/kirkwood.debian-wheezy.sh
chmod +x kirkwood.debian-wheezy.sh
export PATH=$PATH:/usr/sbin:/sbin

Next step is to start the install script which will download and install everything

./kirkwood.debian-wheezy.sh

Doing so brings us the following error:

touch: /sbin/01011970001622: Read-only file system

Your perl subsystem does not have support for $ENV{}
and must be disabled for debootstrap to work
Please disable perl by running the following command

chmod -x /usr/bin/perl

After perl is disabled, you can re-run this script.
To re-enable perl after installation, run:

chmod +x /usr/bin/perl

Installation aborted.

The rescue rootfs is mounted read only, as easy be checked by:

chmod -x /usr/bin/perl
chmod: /usr/bin/perl: Read-only file system

So you need to make it writable, too:

mount -o remount,rw /

Now we need to remove the debootstrap, as Jeff mentioned in this Thread

rm /usr/sbin/debootstrap
rm -rf /usr/share/debootstrap
chmod 666 /usr/bin/microperl
mount -o remount,ro /

Now start the script again by

./kirkwood.debian-wheezy.sh

and get some coffee. Depending on your internet connection and the speed of your USB drive, it may take a while…

After a lot of this and that

...
I: Unpacking libtext-wrapi18n-perl...
I: Unpacking lsb-base...
...
I: Configuring libkeyutils1:armel...
I: Configuring iproute...
...
I: Base system installed successfully.
Image Name:   Linux-3.2.0-3-kirkwood
Created:      Thu Jan  1 01:07:31 1970
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    1599648 Bytes = 1562.16 kB = 1.53 MB
Load Address: 00008000
Entry Point:  00008000
Image Name:   initramfs-3.2.0-3-kirkwood
Created:      Thu Jan  1 01:07:32 1970
Image Type:   ARM Linux RAMDisk Image (gzip compressed)
Data Size:    6741832 Bytes = 6583.82 kB = 6.43 MB
Load Address: 00000000
Entry Point:  00000000

we finally get

Installation complete

You can now reboot your device into Debian.
If your device does not start Debian after rebooting,
you may need to restart the device by disconnecting the power.

The new root password is 'root'  Please change it immediately after
logging in.

Reboot now? [Y/n]

Now you’re nearly ready.

 

Part four: Reboot and setup

Reboot and change the root password with:

passwd root

To print out your U-Boot environmental settings, you can use the command

fw_printenv

If you have also overwritten your old uboot config, you should set your MAC address to the old value or just choose a new one

fw_setenv ethaddr 00:10:75:26:69:15

and you if you are using the Seagate GoFlex Net you can also enable the main LED-control for the kernel by changing

fw_setenv arcNumber 3089

This should be also valid for the Seagate Flex Home. Additionally, the original oldschool Dockstar/Sheevaplug use the arcNumber 2097.

Last step should be to update and upgrade your current package list (and reboot):

apt-get update
apt-get upgrade
reboot

 

Part five: Finish

A couple of things you should possibly think of:

    • Instal some useful programs (from my point ov view)
      apt-get install apt-utils cron tzdata ntp psmisc vim sudo
    • match system timezone to yours
      dpkg-reconfigure tzdata
    • As there is no RTC (time-module) on the dockstar, the time offset will grow larger over the time, so you should make a cronjob which corrects the time. Start “crontab” and add the line for a every 15min check:
      crontab -e
      0-59/15 * * * * ntpdate -u pool.ntp.org
    • Add another normal user (i.e. admin):
      adduser admin

To give him super user rights, add him to the “sudoers” file using “visudo”:

visudo
admin   ALL=(ALL) ALL

Thanks for reading!

Facebooktwittergoogle_plusFacebooktwittergoogle_plus

14 Replies to “How to get Debian on a Seagate GoFlex Net device

  1. Hi Gr3yh0und,

    thank’s for this post but I read it too late…

    I Started with ./kirkwood.debian-wheezy.sh and ended up in “Kernel too old” as you stated here.
    I cycled the power on the goflex net and the led is now blinking orange. (maybe the error ?)

    After this I tried to install the rescue system. I plugged the USB Stick in another system and prepared the stick like this:

    Device Boot Start End Blocks Id System
    /dev/sdbi1 * 1 505 1001889 83 Linux
    /dev/sdbi2 506 758 501952 82 Linux swap / Solaris
    /dev/sdbi3 * 759 3943 6319040 83 Linux

    I formatted Partition 1+3 with ext2 an untarred the rescue .tar onto partition 3. When I boot now nothing changed. LED ist blinking orange all the time (more then 10 minutes)

    any ideas what went wrong ?

    • Actually I would partition the USB drive like Jeff meant:

      1. Configure partion 1 as Linux (I’d recommend making this at least 512Mb. The default bare-bones installation uses 280Mb.)
      2. Configure partion 2 as Linux Swap (I used 256MB. Adjust according to your anticipated memory usage.)
      3. Set partition 1 active

      Sounds like he doesn’t find anything on the USB drive…

  2. Hi Gr3yh0und,
    a little update. I formated partition 1 and filled it with the untarred rescue system too. When cycling power, the LED flashes for about 10 seconds then it switches off, still no access. My network monitor does not find the device…

    any ideas ?

    Regards

    • After it switches off, the system is loaded. As through you won’t have set the arcNumber, the Kernel doesn’t exactly know which “kirkwood” device it is running on. So he doesn’t know which LED he needs to control for the “heartbeat” blinking. Sure, that there isn’t anything on the network? Do you have any DHCP in your lan?

      • Thanks for your suggestion, it’s right i did not set arcNumber. I have a DHCP Server. Before I startet I definied a fixed IP to the mac of the device but neither the ip nor the mac shows up in the lan. (no unknown device is shown).

        Now I will try another type of usb device and come back…

      • Still no success, I used a uSB 2.0 Stick with LED, formatted as suggested and filled in the rescue tar (untarred).

        When the system starts is see the USB Stick flashing too this continues for about 20 secs, then the Goflex LED is off an there are some few flashes of the USB stick led.

        But the system does not apear to have network connection. Here ist the log of the first try where we can see that the uBoot was installed correctly ?

        ## Valid uBoot detected: [goflexnet original]
        ....
        
        # Installing uBoot
        ## Installing goflexnet davygravy-2012-04-19
        Connecting to download.doozan.com (50.116.34.13:80)
        
        uboot.mtd0.kwb.md5   100% |***************************************************|     0  --:--:-- ETA
        uboot.mtd0.kwb.md5   100% |***************************************************|    32  --:--:-- ETA
        Connecting to download.doozan.com (50.116.34.13:80)
        
        uboot.mtd0.kwb         0% |                                                   |     0  --:--:-- ETA
        uboot.mtd0.kwb        29% |**************                                     |   152k 00:00:02 ETA
        uboot.mtd0.kwb       100% |***************************************************|   512k 00:00:00 ETA
        Erase Total 4 Units
        
        Performing Flash Erase of length 131072 at offset 0x0
        Performing Flash Erase of length 131072 at offset 0x20000
        Performing Flash Erase of length 131072 at offset 0x40000
        Performing Flash Erase of length 131072 at offset 0x60000 done
        Writing data to block 0 at offset 0x0
        Writing data to block 1 at offset 0x20000
        Writing data to block 2 at offset 0x40000
        Writing data to block 3 at offset 0x60000
        Block size 131072, page size 2048, OOB size 64
        Dumping data starting at 0x00000000 and ending at 0x00080000...
        ## Verifying new uBoot...
        Connecting to download.doozan.com (50.116.34.13:80)
        
        uboot.mtd0.kwb.md5   100% |***************************************************|     0  --:--:-- ETA
        uboot.mtd0.kwb.md5   100% |***************************************************|    32  --:--:-- ETA
        # Verified successfully!
        
        # Installing uBoot environment
        Connecting to download.doozan.com (50.116.34.13:80)
        
        uboot.environment.md 100% |***************************************************|     0  --:--:-- ETA
        uboot.environment.md 100% |***************************************************|    32  --:--:-- ETA
        Connecting to download.doozan.com (50.116.34.13:80)
        
        uboot.environment      0% |                                                   |     0  --:--:-- ETA
        uboot.environment    100% |***************************************************|   128k 00:00:00 ETA
        Erase Total 1 Units
        
        Performing Flash Erase of length 131072 at offset 0xc0000 done
        Writing data to block 6 at offset 0xc0000
        
        # Verifying uBoot environment
        Block size 131072, page size 2048, OOB size 64
        Dumping data starting at 0x000c0000 and ending at 0x000e0000...
        Connecting to download.doozan.com (50.116.34.13:80)
        
        uboot.environment.md 100% |***************************************************|     0  --:--:-- ETA
        uboot.environment.md 100% |***************************************************|    32  --:--:-- ETA
        
        
        # Setting arcNumber to 2097 (SheevaPlug)
        # Note: if you have a kernel that supports your platform, you should use the proper arcNumber.
        # You can set the correct arcNumber by running the following command:
        /usr/sbin/fw_setenv arcNumber 3089
        
        # uBoot installation has completed successfully.
        

        Any ideas ?

        Regards

  3. Gr3yh0und, thanks for this article. I got a GoFlex Home and want to run Debian on it.

    The last sentence on your tutorial says:
    “This should be also valid for the Seagate Flex Home. Additionally, the original oldschool Dockstar/Sheevaplug use the arcNumber 2097.

    Have fun!”

    By that do you mean the tutorial can also be applied to the GoFlex Home or are you referring only to the line:
    fw_setenv arcNumber 3089?

    I’d like to know. Thanks in advance

    Thanks
    /C

    • Hi,

      The GoFlex Home devices are basically the same, but look out for other tutorials. Hardware etc. is nearly the same, so the whole procedure should be pretty much the same.
      In the last part I was refering to the arcNumber, google that and you will find a list with all Seagate devices listed. On the kernel side the Home variant is the same as the rest.

      Cheers

  4. Hi Gr3yhound,

    I would like to ask a direct question, since I am seeing some things with my GFN which I beleive are quite strange:

    a) I am able to boot from harddisk, but it takes just as long as booting from a USB-drive (at least it feels that way). On the other hand, my GoFlex Home is lightning fast when booting from the harddisk. So I was wondering whether you might experience long boot times from HDD as well?

    b) Something completely strange is happening when I try to boot from a USB-drive (a specific stick ??, will have to experiment more …). Netconsole tells me it boots, but it will not obtain an IP address, when I plug the stick in directly OR via an ACTIVE USB hub. If, on the other hand, I use a PASSIVE hub with no own power supply, it boots (netconsole looks exactly the same) but it also obtains an IP (the one permanently assigned to it by the router). Have you by any chance run into anything similar and solved it, maybe?

  5. If you are having problems with the install_rescue.sh script I suggest doing the following changes to it.
    After the changes are done, it should run fine from the V3 rescue booting from USB.

    Apparently the o argument to nanddump is causing a problem with the checksum checking.
    flash_eraseall is old/deprecated and needs to be replaced with flash_erase

    # Original commands in comments, fixed commands below.
    
    #$NANDDUMP -no -l 0x80000 -f /tmp/uboot-mtd0-dump /dev/mtd0
    $NANDDUMP -n -l 0x80000 -f /tmp/uboot-mtd0-dump /dev/mtd0
    
    #$FLASH_ERASEALL /dev/mtd1
    /usr/sbin/flash_erase /dev/mtd1 0 0
    
    #$FLASH_ERASEALL /dev/mtd2
    /usr/sbin/flash_erase /dev/mtd2 0 0
    
  6. Hey,

    Awesome post! I have a few off topic queries and am hoping you would entertain them.

    I ordered and will be receiving my Seagate GoFlex NET unit. I plan to add 2, 1TB FreeAgent Goflex Drives(which I already have) to it. I have never owned nor used a NAS, ever. I use a linux mint desktop and am familiar with terminal.

    I was planning to use the GoFlex NET by creating a file in notepad and pasting & saving the file to the Seagate drive root as “.ceid” file, the lines in the file would be below:
    servicename=yoursharename
    xcode.metadata=never
    xcode.thumbnail=never
    xcode.stream=never
    cifs.mode=rw

    This above method, I have learnt, would help bypass pogoplug and enable me to use the GoFelx NET as a simple NAS via network drive mapping.

    What is my need:
    Well I want to use Plex Media Server on my NAS or the linux mint laptop, currently the plex server is running on my laptop just fine. I have a huge bunch of movies(that don’t need the NAS processor to do any transcoding i.e. they play in the format required for my Apple TV 2 and iOS devices) which would be on my seagate drives that would eventually go into the GoFlex NET.

    My question is this:
    1) Should I just use the Seagate GoFlex NET to store the movies and run the plex media server on my laptop, map the drives using the method I mentioned earlier?
    Or
    2) Should I install debian on the Seagate Goflex NET and install plex media server for debian, there is a list of processors supported here and it looks like the GoFlex NET which has a Marvell Kirkwood 1.2GHz should be able to work, keeping in mind transcoding wont be required.

    If you do suggest #2, since I am a NAS novice, how would I be able to connect to the NAS to start/stop the plex media server, most likely via terminal, would firefox run to check/add movies via the server webGUI? would it be very difficult to access via another win7 laptop?

    Basically, I don’t want to have a laptop/HTPC(Home Theater PC) lying around, it looks, well not as good as just having a standalone Seagate GoFlex NET around.

    Thank you for taking the time to read my query(s) and I hope you would help me make a decision. I am completely assuming that you know about Plex (fingers crossed) 😉

    Regards,
    Jake.

  7. Hey,

    Thank you for this tutorial.
    I just have a few noob questions.

    I have two 1 TB Seagate Agent GoFlex Drives docked, I installed Debian on the right HDD (when the Seagate Agent GoFlex NET is facing me), no issues

    1) Will each HDD have a different ip address/map (I am trying to map it to my laptop which is running Ubuntu)
    2) The users (admin) I added with a password, will this user protect access to both drives
    3) Can I mount the drive(s) via Ubuntu on startup using
    sudo mount -t cifs -o user=username,pass=password //192.168.x.x/share /folder/to/mount/to
    Or should I use
    sudo apt-get install smbfs
    sudo mount -t smbfs -o user=username,pass=password //192.168.x.x/share /folder/to/mount/to

    Unable to understand the architecture of the Seagate Agent GoFlex NET, now after debian install! Pl. help!

    xoxo,
    Sue!

  8. Pingback: Build your own Pro NAS – Seagate Goflex Net with Debian Linux, RAID1 and OpenMediaVault | DonCharisma.com

  9. Pingback: Build your own Pro NAS – Seagate Goflex Net with Debian Linux, RAID1 and OpenMediaVault | Don Charisma

Leave a Reply

Your email address will not be published. Required fields are marked *