Seagate Freeagent Dockstar: Unterschied zwischen den Versionen

Aus DL8RDS Wiki
Wechseln zu: Navigation, Suche
(Install Debian)
(Install Debian)
Zeile 353: Zeile 353:
  
 
So I tried the TFTP method: http://www.plugcomputer.org/plugwiki/index.php/Installing_Debian_To_Flash#Run_the_Debian_Installer
 
So I tried the TFTP method: http://www.plugcomputer.org/plugwiki/index.php/Installing_Debian_To_Flash#Run_the_Debian_Installer
 +
 +
First you need to install '''atftpd''': http://www.ubuntugeek.com/howto-setup-advanced-tftp-server-in-ubuntu.html
 +
 +
Note that the default tftp-directory is /srv/tftp
 +
 +
Then follow the advice given there: http://www.plugcomputer.org/plugwiki/index.php/Installing_Debian_To_Flash#Fetch_the_bits
 +
and get the following files:
 +
 +
==== U-Boot Images ====
 +
 +
DENX U-Boot is recommended over the old, buggy Marvell version. Instructions re. upgrading are below.
 +
 +
==== Debian Installer ====
 +
 +
The latest installer images should be available at:
 +
 +
http://d-i.debian.org/daily-images/armel/daily/kirkwood/netboot/marvell/sheevaplug/
 +
 +
however, if the automated build fails, the above may not exist; in which case look for the last successful build in
 +
 +
http://d-i.debian.org/daily-images/armel/
 +
 +
For example, if at the time of writing (2011-06-02) the current build was missing, the last successful image could be:
 +
 +
http://d-i.debian.org/daily-images/armel/20110527-16:34/kirkwood/netboot/marvell/sheevaplug/
 +
 +
The above are the daily images, used for testing; if you prefer, you can find the latest stable images here:
 +
 +
ftp://ftp.debian.org/debian/dists/stable/main/installer-armel/current/images/kirkwood/netboot/marvell/sheevaplug/
 +
 +
You want both the uImage and uInitrd files. Into the TFTP directory they go.
 +
 +
==== Kernel ====
 +
 +
http://sheeva.with-linux.com/sheeva/ - what more is there to say? Oh, except that you probably want the latest, and you definitely want the sheeva-2.6.XX-uImage and sheeva-2.6.XX-Modules.tar.gz files. The config file might be good too, if you want to see what kernel config you're running with. Put 'em all in the TFTP directory.
 +
  
  

Version vom 26. Dezember 2011, 02:11 Uhr

I am using a Seagate Freeagent Dockstar disk station as a fully fledged server at DB0ZM. Here are the pictures.

1 Pictures

Freeagent1.jpg

Freeagent2.jpg

2 Links

3 Procedure

3.1 Grabbing the serial port

First you need to connecto to the serial port. For this purpose you use an Arduino style level shifter with 3,3V which you connect to the pins 6, 4, 2:

 9  7  5  3  1 
10  8  6  4  2
      RX TX GND 3.3V!

Now do the following steps:

  • Connect the Freeagent to your DHCP router, but don't connect it to the internet! The Freeagent shall receive an IP address, but it shall not be able to phone home!
  • Start your terminal client (Linux: minicom), and don't forget to disable Hardware Flow Control in minicom!!

So when you now boot up the device, you'll get the following output in the terminal:

U-Boot 1.1.4 (Jul 16 2009 - 21:02:16) Cloud Engines (3.4.16)

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 00690D60

Soc: 88F6281 A0 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz 

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 128MB 
DRAM Total size 128MB  16bit width
Flash:  0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:256 MB

CPU : Marvell Feroceon (Rev 1)
CLOUD ENGINES BOARD: REDSTONE:1.0

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0 

NAND read: device 0 offset 0x100000, size 0x300000

Reading data from 0x3ff800 -- 100% complete.
 3145728 bytes read: OK
## Booting image at 00800000 ...
   Image Name:   Linux-2.6.22.18
   Created:      2009-08-31  23:31:05 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1976384 Bytes =  1.9 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK 

Starting kernel ... 

Uncompressing Linux............................................................................................................................ done, booting the kernel.
[    0.000000] Linux version 2.6.22.18 (bdietrich@brad-ux) (gcc version 4.2.1) #57 Mon Aug 31 16:31:01 PDT 2009
[    0.000000] CPU: ARM926EJ-S [56251311] revision 1 (ARMv5TE), cr=00053177
[    0.000000] Machine: Feroceon-KW
[    0.000000] Using UBoot passing parameters structure
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] CPU0: D VIVT write-back cache
[    0.000000] CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
[    0.000000] CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
[    0.000000] Built 1 zonelists.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mtdblock2 ro
[    0.000000] PID hash table entries: 512 (order: 9, 2048 bytes)
[    0.000000] Console: colour dummy device 80x30
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 128MB 0MB 0MB 0MB = 128MB total
[    0.000000] Memory: 125824KB available (3588K code, 252K data, 120K init)
[    0.240000] Mount-cache hash table entries: 512
[    0.240000] CPU: Testing write buffer coherency: ok
[    0.240000] NET: Registered protocol family 16
[    0.240000] 
[    0.240000] CPU Interface
[    0.240000] -------------
[    0.240000] SDRAM_CS0 ....base 00000000, size 128MB 
[    0.240000] SDRAM_CS1 ....disable
[    0.240000] SDRAM_CS2 ....disable
[    0.240000] SDRAM_CS3 ....disable
[    0.240000] PEX0_MEM ....base e8000000, size 128MB 
[    0.240000] PEX0_IO ....base f2000000, size   1MB 
[    0.240000] INTER_REGS ....base f1000000, size   1MB 
[    0.240000] NFLASH_CS ....base fa000000, size   2MB 
[    0.240000] SPI_CS ....base f4000000, size  16MB 
[    0.240000] BOOT_ROM_CS ....no such
[    0.240000] DEV_BOOTCS ....no such
[    0.240000] CRYPT_ENG ....base f0000000, size   2MB 
[    0.240000] 
[    0.240000]   Marvell Development Board (LSP Version KW_LSP_4.2.7_patch21_with_rx_desc_tuned)-- SHEEVA PLUG  Soc: 88F6281 A0 LE
[    0.240000] 
[    0.240000]  Detected Tclk 200000000 and SysClk 400000000 
[    0.240000] MV Buttons Device Load
[    0.240000] Marvell USB EHCI Host controller #0: c0537600
[    0.740000] PEX0 interface detected no Link.
[    0.740000] PCI: bus0: Fast back to back transfers enabled
[    0.740000] SCSI subsystem initialized
[    0.740000] usbcore: registered new interface driver usbfs
[    0.740000] usbcore: registered new interface driver hub
[    0.740000] usbcore: registered new device driver usb
[    0.740000] NET: Registered protocol family 2
[    0.750000] Time: kw_clocksource clocksource has been installed.
[    0.840000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.840000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[    0.840000] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.840000] TCP: Hash tables configured (established 4096 bind 4096)
[    0.840000] TCP reno registered
[    0.870000] RTC has been updated!!!
[    0.870000] RTC registered
[    0.870000] Use the XOR engines (acceleration) for enhancing the following functions:
[    0.870000]   o RAID 5 Xor calculation
[    0.870000]   o kernel memcpy
[    0.870000]   o kenrel memzero
[    0.870000] Number of XOR engines to use: 4
[    0.870000] cesadev_init(c00116b4)
[    0.870000] mvCesaInit: sessions=640, queue=64, pSram=f0000000
[    0.870000] MV Buttons Driver Load
[    0.870000] squashfs: version 3.3 (2007/10/31) Phillip Lougher
[    0.870000] squashfs: LZMA suppport for slax.org by jro
[    0.870000] JFFS2 version 2.2. (NAND) �Â�© 2001-2006 Red Hat, Inc.
[    0.870000] io scheduler noop registered
[    0.870000] io scheduler anticipatory registered (default)
[    0.890000] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
[    0.890000] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
[    0.900000] serial8250.0: ttyS1 at MMIO 0xf1012100 (irq = 34) is a 16550A
[    0.900000] RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
[    0.910000] Loading Marvell Ethernet Driver:
[    0.920000]   o Cached descriptors in DRAM
[    0.920000]   o DRAM SW cache-coherency
[    0.920000]   o Single RX Queue support - ETH_DEF_RXQ=0
[    0.930000]   o Single TX Queue support - ETH_DEF_TXQ=0
[    0.940000]   o TCP segmentation offload enabled
[    0.940000]   o Receive checksum offload enabled
[    0.940000]   o Transmit checksum offload enabled
[    0.950000]   o Network Fast Processing (Routing) supported
[    0.960000]   o Driver ERROR statistics enabled
[    0.960000]   o Driver INFO statistics enabled
[    0.960000]   o Proc tool API enabled
[    0.970000]   o Rx descripors: q0=128
[    0.970000]   o Tx descripors: q0=532
[    0.980000]   o Loading network interface(s):
[    0.980000]     o eth0, ifindex = 1, GbE port = 0
[    0.990000]     o eth1, ifindex = 2, GbE port = 1
[    0.990000] 
[    1.000000] mvFpRuleDb (c7ed5000): 1024 entries, 4096 bytes
[    1.000000] Intel(R) PRO/1000 Network Driver - version 7.3.20-k2-NAPI
[    1.010000] Copyright (c) 1999-2006 Intel Corporation.
[    1.010000] e100: Intel(R) PRO/100 Network Driver, 3.5.17-k4-NAPI
[    1.020000] e100: Copyright(c) 1999-2006 Intel Corporation
[    1.020000] 
[    1.020000] Warning Sata is Powered Off
[    1.030000] NFTL driver: nftlcore.c $Revision: 1.98 $, nftlmount.c $Revision: 1.41 $
[    1.040000] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron NAND 256MiB 3,3V 8-bit)
[    1.050000] Scanning device for bad blocks
[    1.140000] Bad eraseblock 1825 at 0x0e420000
[    1.150000] Using static partition definition
[    1.160000] Creating 4 MTD partitions on "nand_mtd":
[    1.160000] 0x00000000-0x00100000 : "u-boot"
[    1.170000] 0x00100000-0x00500000 : "uImage"
[    1.170000] 0x00500000-0x02500000 : "root"
[    1.180000] 0x02500000-0x10000000 : "data"
[    1.180000] ehci_marvell ehci_marvell.70059: Marvell Orion EHCI
[    1.190000] ehci_marvell ehci_marvell.70059: new USB bus registered, assigned bus number 1
[    1.230000] ehci_marvell ehci_marvell.70059: irq 19, io base 0xf1050100
[    1.250000] ehci_marvell ehci_marvell.70059: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
[    1.250000] usb usb1: configuration #1 chosen from 1 choice
[    1.260000] hub 1-0:1.0: USB hub found
[    1.260000] hub 1-0:1.0: 1 port detected
[    1.380000] USB Universal Host Controller Interface driver v3.0
[    1.660000] usb 1-1: new high speed USB device using ehci_marvell and address 2
[    1.810000] usb 1-1: configuration #1 chosen from 1 choice
[    1.810000] hub 1-1:1.0: USB hub found
[    1.820000] hub 1-1:1.0: 4 ports detected
[    2.170000] usb 1-1.2: new high speed USB device using ehci_marvell and address 3
[    2.270000] usb 1-1.2: configuration #1 chosen from 1 choice
[    2.280000] usbcore: registered new interface driver usblp
[    2.280000] drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
[    2.290000] Initializing USB Mass Storage driver...
[    2.300000] scsi0 : SCSI emulation for USB Mass Storage devices
[    2.300000] usbcore: registered new interface driver usb-storage
[    2.310000] USB Mass Storage support registered.
[    2.310000] mice: PS/2 mouse device common for all mice
[    2.320000] i2c /dev entries driver
[    2.320000] Linux telephony interface: v1.00
[    2.330000] md: linear personality registered for level -1
[    2.330000] md: raid0 personality registered for level 0
[    2.340000] md: raid1 personality registered for level 1
[    2.510000] raid6: int32x1     97 MB/s
[    2.680000] raid6: int32x2    114 MB/s
[    2.850000] raid6: int32x4    122 MB/s
[    3.020000] raid6: int32x8    110 MB/s
[    3.020000] raid6: using algorithm int32x4 (122 MB/s)
[    3.020000] md: raid6 personality registered for level 6
[    3.030000] md: raid5 personality registered for level 5
[    3.030000] md: raid4 personality registered for level 4
[    3.040000] raid5: measuring checksumming speed
[    3.090000]    arm4regs  :  1084.000 MB/sec
[    3.140000]    8regs     :   754.800 MB/sec
[    3.190000]    32regs    :   890.400 MB/sec
[    3.190000] raid5: using function: arm4regs (1084.000 MB/sec)
[    3.200000] device-mapper: ioctl: 4.11.0-ioctl (2006-10-12) initialised: dm-devel@redhat.com
[    3.200000] dm_crypt using the OCF package.
[    3.210000] sdhci: Secure Digital Host Controller Interface driver
[    3.210000] sdhci: Copyright(c) Pierre Ossman
[    3.220000] usbcore: registered new interface driver usbhid
[    3.220000] drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
[    3.230000] TCP cubic registered
[    3.230000] NET: Registered protocol family 1
[    3.240000] NET: Registered protocol family 17
[    3.240000] md: Autodetecting RAID arrays.
[    3.250000] md: autorun ...
[    3.250000] md: ... autorun DONE.
[    7.870000] Empty flash at 0x00de8e44 ends at 0x00de9000
[    8.020000] VFS: Mounted root (jffs2 filesystem) readonly.
[    8.030000] Freeing init memory: 120K
[    8.050000] scsi 0:0:0:0: Direct-Access              USB DISK 2.0     PMAP PQ: 0 ANSI: 4
[    8.150000] sd 0:0:0:0: [sda] 31277056 512-byte hardware sectors (16014 MB)
[    8.160000] sd 0:0:0:0: [sda] Write Protect is off
[    8.160000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    8.210000] sd 0:0:0:0: [sda] 31277056 512-byte hardware sectors (16014 MB)
[    8.220000] sd 0:0:0:0: [sda] Write Protect is off
[    8.220000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    8.230000]  sda: sda1
[    8.240000] sd 0:0:0:0: [sda] Attached SCSI removable disk
[    8.240000] sd 0:0:0:0: Attached scsi generic sg0 type 0
init started: BusyBox v1.7.0 (2008-02-26 19:25:17 IST)
starting pid 285, tty : '/etc/init.d/rcS'
[   10.200000] eth0: link down
[   10.200000] eth0: started
udhcpc (v1.7.0) started
HWADDR 00 0x10 0x75 0x1a 0xc0 0x57
PIP0 192
PIP1 87
Sending discover...
[   11.860000] eth0: link up, full duplex, speed 100 Mbps
Sending discover...
Sending select for 192.168.178.24...
Lease of 192.168.178.24 obtained, lease time 864000
HWADDR 00 0x10 0x75 0x1a 0xc0 0x57
PIP0 192
PIP1 87
eth0      Link encap:Ethernet  HWaddr 00:10:75:1A:C0:57  
          inet addr:192.168.178.24  Bcast:192.168.178.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:532 
          RX bytes:1240 (1.2 KiB)  TX bytes:1180 (1.1 KiB)
          Interrupt:11 

eth0:0    Link encap:Ethernet  HWaddr 00:10:75:1A:C0:57  
          inet addr:169.254.192.87  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:11 

starting pid 339, tty : '/bin/sh'
-sh-3.2# 

So my Freeagent has received the IP 192.168.178.24

3.2 Logging in through the network

You may also find out its address if you look at the router GUI or if you use

fping -g 192.168.0.0/24

So when you know the IP, you can now log into the Freeagent using

ssh root@(Freeagent-IP)
Passwd: stxadmin

If you have plugged in a USB stick, you may see it with mount:

-bash-3.2# mount 
 rootfs on / type rootfs (rw) 
 /dev/root on / type jffs2 (ro) 
 none on /proc type proc (rw) 
 none on /sys type sysfs (rw) 
 none on /dev/pts type devpts (rw) 
 none on /tmp type tmpfs (rw) 
 /tmp/.cemnt/sda1 on /tmp/.cemnt/mnt_sda1 type ext2 (rw,nosuid,nodev,noexec,noatime) 

sda1 is a hard drive. 'cd' into it and back up the NAND:

-bash-3.2# cd /tmp/.cemnt/mnt_sda1
-bash-3.2# mkdir Backup 
-bash-3.2# cd Backup 
-bash-3.2# dd if=/dev/mtd0 of=mtd0 
   2048+0 records in 2048+0 records out 
-bash-3.2# sha1sum mtd0 >mtd0.sha1
-bash-3.2# dd if=/dev/mtd1 of=mtd1 
   8192+0 records in 8192+0 records out 
-bash-3.2# sha1sum mtd1 >mtd1.sha1 
-bash-3.2# dd if=/dev/mtd2 of=mtd2 
   65536+0 records in 65536+0 records out 
-bash-3.2# sha1sum mtd2 >mtd2.sha1 
-bash-3.2# dd if=/dev/mtd3 of=mtd3 
   448512+0 records in 448512+0 records out 
-bash-3.2# sha1sum mtd3 >mtd3.sha1 

3.3 Resume control

Now we want to resume control and make sure that the Pogoplug software won't call home.

-bash-3.2# killall hbwd                      #stop the Pogoplug binary
-bash-3.2# mount -o remount,rw /             #remount writeable
-bash-3.2# chmod go+w /dev/null              #fix a bug

Disable the pogoplug code to come up again when the system starts up the next time:

-bash-3.2# vi /etc/init.d/rcS 

Now go to the line that says

/etc/init.d/hbmgr.sh start

and disable it by writing a "#" in front.

Now you can reboot with

-bash-3.2# mount -o remount,ro / 
-bash-3.2# /sbin/halt 

3.4 Updating U-Boot

Follow the instructions given here:

http://jeff.doozan.com/debian/uboot/

Enter:

cd /tmp 
wget http://jeff.doozan.com/debian/uboot/install_uboot_mtd0.sh 
chmod +x install_uboot_mtd0.sh 
./install_uboot_mtd0.sh 

AND DO NOT UNPLUG POWER!!!!!!!!!!!!

After it has completed successfully, you may powercycle.

3.5 Install Debian

The method with Jeff Doozan's script did not work for me because the repository seemed corrupted. The steps were taken from there: http://www.mikrocontroller.net/articles/DockstarDebianSqueeze#Debian_installieren

So I tried the TFTP method: http://www.plugcomputer.org/plugwiki/index.php/Installing_Debian_To_Flash#Run_the_Debian_Installer

First you need to install atftpd: http://www.ubuntugeek.com/howto-setup-advanced-tftp-server-in-ubuntu.html

Note that the default tftp-directory is /srv/tftp

Then follow the advice given there: http://www.plugcomputer.org/plugwiki/index.php/Installing_Debian_To_Flash#Fetch_the_bits and get the following files:

3.5.1 U-Boot Images

DENX U-Boot is recommended over the old, buggy Marvell version. Instructions re. upgrading are below.

3.5.2 Debian Installer

The latest installer images should be available at:

http://d-i.debian.org/daily-images/armel/daily/kirkwood/netboot/marvell/sheevaplug/

however, if the automated build fails, the above may not exist; in which case look for the last successful build in

http://d-i.debian.org/daily-images/armel/

For example, if at the time of writing (2011-06-02) the current build was missing, the last successful image could be:

http://d-i.debian.org/daily-images/armel/20110527-16:34/kirkwood/netboot/marvell/sheevaplug/

The above are the daily images, used for testing; if you prefer, you can find the latest stable images here:

ftp://ftp.debian.org/debian/dists/stable/main/installer-armel/current/images/kirkwood/netboot/marvell/sheevaplug/

You want both the uImage and uInitrd files. Into the TFTP directory they go.

3.5.3 Kernel

http://sheeva.with-linux.com/sheeva/ - what more is there to say? Oh, except that you probably want the latest, and you definitely want the sheeva-2.6.XX-uImage and sheeva-2.6.XX-Modules.tar.gz files. The config file might be good too, if you want to see what kernel config you're running with. Put 'em all in the TFTP directory.





Now be patient. This takes a while. And: DO NOT UNPLUG POWER!!!!

3.6 Write the image to the FLASH

3.7 Configure Debian

This comes from here: http://www.mikrocontroller.net/articles/DockstarDebianSqueeze