Welcome! Log In Create A New Profile

Advanced

Possible to install Debian on Seagate Business Storage 2?

Posted by iamnewbie 
Possible to install Debian on Seagate Business Storage 2?
October 04, 2014 08:47PM
Hello, sorry my english isnt so good ...

I bought a Seagate Business Storage 2-Bay which use a Cavium CNS3420 SoC(700 MHz) 512 MB RAM, the Seagate Central(256MB RAM) use the same. The board have a UART Port, look at the attached file.
I could start Telnet on the device by a bug(php shell, cant find the link atm ...). It is not so easy to compile any programms for the NAS because, look here -> https://sites.google.com/site/modcentralnas

Here is some Sourcecodes from the NAS(410MB) http://www.seagate.com/files/www-content/support-content/external-products/business-storage/2-bay/_shared/downloads/seagate-nas-sources.tgz
Firmware Link: http://www.seagate.com/files/www-content/support-content/external-products/business-storage/2-bay/_shared/downloads/seagate_nas-update-1400319-2bay.zip

and here from Seagate Central http://www.seagate.com/files/www-content/support-content/external-products/seagate-central/_shared/downloads/seagate-central-firmware-gpl-source-code.zip

Please look in the Seagate Central Kernel (sources\GPL\linux), there are config files for the 1,2,4 Bay NASes and under the path sources\GPLv2+\u-boot is some uboot stuff!

The NAS boot from any internel mmc?There are to /dev/mmcblk0p1 and /dev/mmcblk0p2 with uImages on /dev/md0 is the rootfs

I mount the /dev/mmcblk0p1 on /mnt/mmc1
root@BA-38D10C:/mnt/mmc1# ls -l
total 7984
drwx------ 2 root root 12288 Sep 20 16:35 lost+found
-rw-r--r-- 1 root root 8129640 Oct 4 17:27 uImage
Attachments:
open | download - Cavium.txt (22 KB)
Re: Possible to install Debian on Seagate Business Storage 2?
October 12, 2014 07:16AM
That's quite an interesting bit of hardware. I'm sorry I don't know if it's possible or exactly how to do it ... but ... the first thing you'll need to do is get root access, via console of some sort, telnet or ssh ... there's a procedure described here to do it :

http://notesabouttech.com/getting-ssh-access-on-a-seagate-business-storage-nas/

Once your "in", you'll need to figure out how to boot off of something other than the stock firmware, from a USB or hard drive. That'll put you in a version of linux your in control of, and you can sit back and hack the device to your heart's content.

Another way "in" is via a serial cable, and interrupt the boot process. I'll bet there's a serial connector on that board somewhere ... personally I've stayed away from serial wherever possible, so not really my field of expertise ...

Another way "in" is via TFTP'ing a new firmware image in (I was able to unbrick my router like this) ... however that would imply that you have a firmware image that's bootable, and helps you in some way, like giving you root access.

There are other forums and sites to look on apart from here - OpenWRT has a lot of info on hardware including the GoFlexNet for instance. OpenWRT runs embedded, so it's related .... Also check out archlinux for info ... personally I think Debian is the best choice for what you'll be doing with it, but arch or openwrt are possibles too ...

It's a starting point, sorry I can't help any further, perhaps one of the more experienced guys here can offer some advice :D Keep searching, chances are someone somewhere will have done it already ... if not then you could be a pioneer, and I'll look forward to seeing your how-to post here once you've done it ....

Quick question, does it have 2xSATA ports or 3 ? ... ie I couldn't see if the top drive slot for the laptop drive is USB or SATA ... reason I ask is, maybe I'll buy one myself !

Cheers

DC
Re: Possible to install Debian on Seagate Business Storage 2?
October 13, 2014 01:06PM
A little more research at my end yields that Cavium do include Debian on their SDK. "Cavium ships a Debian root filesystem in its SDK" - http://www.linux-mips.org/wiki/Cavium_SOC

Only problem is that you're unlikely to get it off them, for free. I suspect Seagate will have had the SDK in developing the board ... Might be worth emailing Cavium ... but I'm sceptical you'll get it ... they put the SDK kits for people like Seagate and have a big price tag on it ... however I did read of users on Ubiquiti forum getting access for the Edgerouter lite which uses Cavium processor ... so might be worth a try ...

There's something called "debwrt" which is a mix between openwrt and debian ... they mention "Cavium Networks Econa CNS3xxx" in their builds ... now I suspect this wasn't aimed at the Business Storage 2 ... more likely at the Gateworks Laguna GW2388-4 - http://www.gateworks.com/product/item/laguna-gw2388-4-network-processor ... it's a slightly different purpose, routing rather than NAS ...

Which leads me nicely to openwrt, they have support for the Cavium based Gateworks board which uses the same CPU as yours - CNS3420 ... http://wiki.openwrt.org/toh/start

So here's the thing, a debwrt build will come as a .bin file for flashing onto whatever device - Linux has tools to extract the files, kernel and rootfs out of the binary file, it's called "binwalk" (it works I've used it before). Then put onto a USB drive (I wouldn't recommend flashing the internal NAND until you're sure you want to !). Might then be possible with serial connection to interrupt the boot process, ask it to boot from USB, and then into debwrt or openwrt using their images. If the debwrt would boot, then you'd have a debian kernel I think, and around that might be possible to build a full debian install ... perhaps using vlad's method of bootstrapping - http://forum.doozan.com/read.php?2,5986

I'm happy for anyone else on this forum to chip in and fill in the blanks. I'm more persistent than expert, and often don't know things, so rely on what others post here a lot ... maybe there's a simpler way !

Hope you get it Debian'ised soon, I might buy one :D

Cheers

DC

Don Charisma ... because anything is possible with Charisma

My blog - http://DonCharisma.org
Our commercial site - http://DonCharisma.com
Re: Possible to install Debian on Seagate Business Storage 2?
October 15, 2014 12:54PM
Hi,
I also own this NAS and compile the Kernel.

When booting my Kernel, it doesnt find the root file System. Here is the log: http://pastebin.com/fM3twzGH


The Filesystem drivers are compiled in (not as modules), and die partition is deteceted.
The Debian rootfs is this one: Debian-3.16.0-kirkwood-tld-2-rootfs-bodhi
I dont use an initrd. Do i need this?

Any hints?

iamnewbiew wrote in this forum http://hukd.mydealz.de/deals/seagate-business-storage-2-bay-nas-405182?page=11#comments, that i can use every pogoplug rootfs.


Regards



Edited 2 time(s). Last edit at 10/15/2014 12:58PM by blackdevil.
Re: Possible to install Debian on Seagate Business Storage 2?
October 15, 2014 02:16PM
At first try to build an initramfs, this will help to load the right modules.

Second where is your rootfs located? Maybe your bootargs are just wrong.
Re: Possible to install Debian on Seagate Business Storage 2?
October 15, 2014 02:28PM
Is there an easy way to build the initramfs?
My rootfs is on /dev/sda1... there are no other disks.
Re: Possible to install Debian on Seagate Business Storage 2?
October 15, 2014 02:45PM
For the initramfs or initrd there are two options.

First you build your own rootfs or chroot in an existing rootfs and generate it by: mkinitramfs

Or you just load the initrd.img from bodhi's rootfs it's in /boot/

So just load first kernel, then initrd -> boot

edit: for building rootfs this is a quite good howto http://www.yoovant.com/debian-wheezy-rootfs/



Edited 1 time(s). Last edit at 10/15/2014 02:48PM by Peacemaker.
Re: Possible to install Debian on Seagate Business Storage 2?
October 18, 2014 07:44AM
Debian 7.6 (Wheezy) is up and running quite good.

Now there is one question about uboot:

Here is my uboot config: http://pastebin.com/xAB7fMRK
I want to boot every time automatically the "bootcmd". But i have to stop the autoboot and start with the command "run bootcmd", otherwise the System boots the original firmware from NAND, and not the debian from disk. Any hints?

I m going to setup a rootfs for all other people. But before I am going to compile a newer Kernel. Are there any hints for porting an old 2.6.35 .config to the 3.17 .config? Not just "make oldconfig", maybe something like "disable all new features" or so.

Regards and many thanks!
Re: Possible to install Debian on Seagate Business Storage 2?
October 18, 2014 03:13PM
blackdevil,

> I want to boot every time automatically the
> "bootcmd". But i have to stop the autoboot and
> start with the command "run bootcmd", otherwise
> the System boots the original firmware from NAND,
> and not the debian from disk. Any hints?

You did not post the u-boot banner so I don't know which version. However, try this first:

bootargs_root=root=/dev/sda1 rootwait
bootcmd_scsi=scsi init;ext2load scsi 0 0x8000000 /boot/uImage; bootm 0x8000000
bootcmd=setenv bootargs $(bootargs_console) $(bootargs_root); run bootcmd_scsi

And execute
boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Possible to install Debian on Seagate Business Storage 2?
October 20, 2014 01:16PM
bodhi Wrote:
-------------------------------------------------------

> You did not post the u-boot banner so I don't know
> which version.

Gday,
here is the uboot banner:

U-Boot 2008.10-mpcore (Nov 11 2012 - 16:30:36)
Whitney model:(HALFDOME) release v1.2-beta2

CPU: Cavium Networks CNS3000
ID Code: 410fb024 (Part number: 0xB02, Revision number: 4) 
CPU ID: 900 
Chip Version: c

DRAM:  512 MB
Parallel Flash:  0 kB
Flash Manufacturer: MX
Serial Flash: 512 kB
Serial Flash:
Bank # 1:  Nb pages: 2048  Page Size: 256
  Size:    524288 bytes,  Logical address: 0x60000000
  Area 0: 60000000 to 60FFFFFF      SPI flash
In:    serial
Out:   serial
Err:   serial
CPU works at 700 MHz (700/1/1)
DDR2 Speed is 400 MHz 
Restoring RTC
Hit any key to stop autoboot:  0 

Serial Flash Sector 3 Erase OK!
0x00010000        
mmc_init
Detected SD Card

8131076 bytes read
enter do_eth_down!!!
## Booting kernel from Legacy Image at 08000000 ...
   Image Name:   Linux-2.6.35.13-cavm1.whitney-ec
   Created:      2014-03-27   0:54:18 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    8131012 Bytes =  7.8 MB
   Load Address: 02000000
   Entry Point:  02000000
   Loading Kernel Image ... OK
OK



>However, try this first:
>
> bootargs_root=root=/dev/sda1 rootwait
> bootcmd_scsi=scsi init;ext2load scsi 0 0x8000000
> /boot/uImage; bootm 0x8000000
> bootcmd=setenv bootargs $(bootargs_console)
> $(bootargs_root); run bootcmd_scsi
>
>
> And execute
>
> boot
>

I tried it, but only the stock kernel will be loaded.
When I stop autoload and try the "boot"-cmd from uboot-console:
Hit any key to stop autoboot:  0 
Whitney # boot
Unknown command 'boot' - try 'help'

Booting in uboot-console with "run bootcmd"-cmd works fine.

Some more hints?

Many thanks
Steffen
Hallo Blackdevil, ja lösche die originalen Einstellungen! Bei mir hatten sich aus welchem Grund auch immer die kompletten Einstellungen im U-Boot verabschiedet und es geht ohne Probleme. Einige Daten wie archNumber, eth0, eth1,ethaddr und modelname hatte ich auch noch hinzugefügt.

netboot=0
archNumber=2776
bootargs_console=console=ttyS0,38400
bootargs_root=root=/dev/sda1 rootwait
bootcmd_scsi=scsi init;ext2load scsi 0 0x8000000 /boot/uImage;bootm
bootcmd=setenv bootargs $(bootargs_console) $(bootargs_root); run bootcmd_scsi; bootm
ipaddr=10.0.0.212
serverip=10.0.1.125
netmask=255.255.0.0
ethaddr0=00:10:75:38:XX:XX
ethaddr1=00:10:75:38:XX:XX
ethaddr=00:10:75:38:XX:XX
cpu_clock=700
model_name=whitney_2bay
stdin=serial
stdout=serial
stderr=serial
verify=n
rtclog=51e63ac5
root@debian ~ >

Das sind die Bootargs vom U-Boot, siehe seagate-central-firmware-gpl-source-code\sources\GPLv2+\u-boot\include\configs\whitney_2bay.h
#define CONFIG_BOOTCOMMAND1						\
	"mmcinit;ext2load mmc 0:1 0x8000000 uImage;bootm"

#define CONFIG_BOOTCOMMAND2						\
	"mmcinit;ext2load mmc 0:2 0x8000000 uImage;bootm"

#define CONFIG_BOOTARGS1						\
	"console=ttyS0,38400 mem=256M root=/dev/md0 rootwait"

#define CONFIG_BOOTARGS2						\
	"console=ttyS0,38400 mem=256M root=/dev/md1 rootwait"
Re: Possible to install Debian on Seagate Business Storage 2?
October 22, 2014 02:29PM
Hi,

are these Bootcommand hard coded in the uboot-firmware? Have I to rebuild uboot with the correct bootcmd for my case?

Regard and many thanks!

minimi Wrote:
-------------------------------------------------------

> Das sind die Bootargs vom U-Boot, siehe
> seagate-central-firmware-gpl-source-code\sources\G
> PLv2+\u-boot\include\configs\whitney_2bay.h
>
> #define CONFIG_BOOTCOMMAND1						\
> 	"mmcinit;ext2load mmc 0:1 0x8000000
> uImage;bootm"
> 
> #define CONFIG_BOOTCOMMAND2						\
> 	"mmcinit;ext2load mmc 0:2 0x8000000
> uImage;bootm"
> 
> #define CONFIG_BOOTARGS1						\
> 	"console=ttyS0,38400 mem=256M root=/dev/md0
> rootwait"
> 
> #define CONFIG_BOOTARGS2						\
> 	"console=ttyS0,38400 mem=256M root=/dev/md1
> rootwait"
> 
dingdongcupcake
Re: Possible to install Debian on Seagate Business Storage 2?
October 22, 2014 04:05PM
If nothing else, I would like very much to attach a serial console to my Seagate NAS. Can you please send some details about the location of the header and the pinout?

Thanks,

Erik
Re: Possible to install Debian on Seagate Business Storage 2?
October 28, 2014 02:12PM
Hi dingdongcupcake,
there is just one free header with 2x2 pins. The pins have are 2mm and not the common 2,54 mm.
If you look from the side to the pins, front right is ground, front left is rx, rear left is tx.

If you need a detailed manual for hacking the nas via a php vulnaribilty, have a look here: http://geektimes.ru/post/231593/
It is russian, but the google translator does a good work!


@all:
What the best way to get a newer kernel compiled and running? Any hints?
Sadly the direct booting from the harddisk wont work :-( Any other tips? I posted my config a few posts up.

Regards
blackdevil
Re: Possible to install Debian on Seagate Business Storage 2?
October 29, 2014 12:17AM
@blackdevil,

Quote

> U-Boot 2008.10-mpcore (Nov 11 2012 - 16:30:36)
> Whitney model:(HALFDOME) release v1.2-beta2

> Whitney # boot
> Unknown command 'boot' - try 'help'

> Booting in uboot-console with "run bootcmd"-cmd
> works fine.

This u-boot is quite old and customized by Seagate. So I suspect that they have removed the boot command. You could do:
help

in serial console to see which commands are available.

The best starting point to build kernel for this is to find the source tree for this Cavium box from their GPL release and create a patch from that, or if somebody has created such a patch. Without that, the other alternative is to find a reference manual for this SoC. It is not simple. If you can get the GPL tarball from Seagate, then there is hope. But if stock kernel is too old, then it is difficult to build new kernel for it.

UPDATE:

- I've checked IamNewbie's log file. Indeed they've removed boot command.

- The kernel is quite old:
[    0.000000] Linux version 2.6.35.13-cavm1.whitney-econa.whitney-econa (builder@ubuntu) (gcc version 4.4.1 (MontaVista Linux G++ 4.4-) ) #2 Wed Mar 20 16:06:27 PDT 2013
Can you create a patch from this version using the mainline 2.6.35 ? I wonder what it 'd look like.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 3 time(s). Last edit at 10/29/2014 04:17AM by bodhi.
Re: Possible to install Debian on Seagate Business Storage 2?
October 29, 2014 03:39PM
@bodhi

Thanks for this useful answer!

The patch of the /arch/arm/mach-cns3xxx direcory is attached. Or do you need the patch of the complete linux source?
Attachments:
open | download - original.patch (393.9 KB)
Re: Possible to install Debian on Seagate Business Storage 2?
October 30, 2014 12:21AM
blackdevil,

The patch is large and looks pretty bad :) I don't think we should even attempt to retrofit it. If you can find the Linux SATA driver for this SoC that can be used in modern kernel, then I would say attempting to create a DTS for FDT kernel is feasible. If you can't find SATA driver then I would throw in the towel :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Possible to install Debian on Seagate Business Storage 2?
November 05, 2014 01:16PM
Hi bodhi,
isn't the SATA driver included in the current Kernel?

I think, I have thrown in the towel for now. I wanted to upgrade the kernel for using a stable BTRFS, but I change my filesystems back to ext4 now.

Thank you very much for your help!

Regards
blackdevil
Re: Possible to install Debian on Seagate Business Storage 2?
December 05, 2014 08:16AM
There's a Cavium SDK3 which is based around 3.4 kernel, and Debian is included ... Ubiquiti users seemed to have some success obtaining it last year - http://community.ubnt.com/t5/EdgeMAX/getting-the-SDK-from-Cavium/td-p/506305

Cheers

D

Don Charisma ... because anything is possible with Charisma

My blog - http://DonCharisma.org
Our commercial site - http://DonCharisma.com
to all
I bought a Seagate Business Storage 2-Bay too. Anyone has succeeded in establishing openwrt on this device?

Best regard, Raconteur
Hi, I am planning to buy the Business Storage 2-Bay NAS cause I would get it for 160€, which is very cheap.
But the firmware seems unusable depending on most ratings on Amazon.

You guys got Debian Wheezy running on it and I guess failed at something else?

I couldn't really understand what works and what not and want a Step-By-Step HowTo for running Debian and/or Arch Linux on the Seagate Business Storage 2-Bay NAS.

Couldn't find anything on the net, except this thread to use a alternative OS.

Sincerely

Yama
Re: Possible to install Debian on Seagate Business Storage 2?
March 04, 2015 02:25PM
Can anyone tell me, which linux kernel modules/drivers i need for get USB working on this cns3xxx device?



Edited 1 time(s). Last edit at 03/04/2015 02:26PM by blackdevil.
Re: Possible to install Debian on Seagate Business Storage 2?
March 12, 2015 11:46AM
I would like to find out that, too.
.. After I got some information from you, or either the kernel you are using, since I was not able to boot a kernel except the stock one... >_<

So mind giving the kernel you are using and some information for me, please?
Re: Possible to install Debian on Seagate Business Storage 2?
March 15, 2015 02:21PM
Hi,
here is the kernel source I use https://kimowe.de/owncloud/index.php/s/4LKjmPrbFSw9xEJ

And some helpfull commands:
make uImage -j8 uImage LOADADDR=0x2000000
make -j8 modules

sudo make modules_install INSTALL_MOD_PATH=/media/ROOTFS

sudo cp ./arch/arm/boot/uImage /media/ROOTFS/boot/

Maybe youd can help me :-)

Thanks!
Re: Possible to install Debian on Seagate Business Storage 2?
March 15, 2015 02:41PM
Thanks, I'll look into it.
Btw, I pm'd you one or two month's ago :P

//Edit
Damn, can't build a toolchain for this. Compiling the old gcc fails with missing modules of gcc and glibc++.

Could you give me a uImage, till I am able to compile one myself?



Edited 1 time(s). Last edit at 03/15/2015 07:04PM by Yama.
Re: Possible to install Debian on Seagate Business Storage 2?
March 16, 2015 03:46PM
Re: Possible to install Debian on Seagate Business Storage 2?
March 16, 2015 07:25PM
I am glad, that you linked the modules.
I was really able to boot debian for the first time :D

Extract your modules.tar.gz directly in root and put this in /etc/modules:

cns3xxx
cns3xxx_pse_init
usblp
xhci-hcd

First two lines are for the network, like minimi told us on mydealz.
I just looked around in the modules.tar.gz and saw the usb folder in it and just added both modules in it in this file and it works :)
My idea is to load the uImage from a Raspberry Pi via tftp and then use a USB dongle as rootfs.
That would require the USB drivers compiled in kernel. But I am still unable to compile.
Maybe I should now try to compile on the device itself.

On kirkwood 3.17 after sshd is started, I got cryptic symbols on serial and network wasn't working anymore (whole system crashed I guess).
On the latest 3.18 I still get the cryptic symbols, which makes serial unusable, but network works and I can ssh to it.

Did you manage to boot automatically to debian instead stock OS?

I would like to use arch linux on it, but the kernel is just too damn old for it. :(



Edited 1 time(s). Last edit at 03/16/2015 07:31PM by Yama.
Re: Possible to install Debian on Seagate Business Storage 2?
March 16, 2015 09:21PM
@Yama,

On the latest 3.18 I still get the cryptic symbols, which makes serial unusable, but network works and I can ssh to it.

Which 3.18 version? And these weird chars might just be the box's serial baud rate/parity/... parameters are different than we expected.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Possible to install Debian on Seagate Business Storage 2?
March 16, 2015 09:57PM
Debian-3.18.5-kirkwood-tld-1-rootfs-bodhi.tar.bz2 Jessie

The unexpected parameters are?
I tried several baurates, but no luck.

//Edit
Not working network seems to be not-always-working dhcp, like blackdevil mentioned on mydealz.
I needed to enable T0 with 38400 in /etc/inittab. Now it works on serial :D



Edited 2 time(s). Last edit at 03/17/2015 10:06AM by Yama.
Re: Possible to install Debian on Seagate Business Storage 2?
March 17, 2015 02:15PM
Hi,

great progress Yama :-)

I use the same uImage and modules like Yama. I added the 2 usb lines to the /etc/modules, but no USB device gets recognized.

Any idea?
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: