Welcome! Log In Create A New Profile

Advanced

Seagate GoFLEX Home won't boot off SATA HDD

Posted by habibie 
Seagate GoFLEX Home won't boot off SATA HDD
March 18, 2018 11:12AM
So, I managed to flash bodhi's uboot on my Seagate GoFLEX Home (from here) and it has no problem to boot off of an external USB memory stick. However, when I attached a SATA HDD (already formatted as an EXT4 filesystem, labeled with rootfs, and contains a root filesystem extracted from linux-4.15.2-kirkwood-tld-1-bodhi.tar.bz2) to the SATA port, it boots off the SATA port with its LED first flashes as green/yellow and then turns to remain a solid RED. At this point, I can't access it through an SSH login, i.e. no IP Address, etc. Again, it has no problem when boot off of an external USB memory stick even though both USB memory stick and SATA HDD are attached to the device. I also configured it with a netconsole to troubleshoot uBoot without a serial cable. When booting from a SATA HDD, the netconsole output shows it was loading DTB /boot/dts/kirkwood-pogo_e02.dtb. However, when booting off of an external USB memory stick, the netconsole output shows it was loading DTB /boot/dts/kirkwood-goflexhome.dtb (see below). I don't know why. Anyway, the fw_printenv dump is shown below and hope it will reveal what the problem is.

Net Console output (booting from SATA HDD):
U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:21:31 -0700)
Seagate GoFlex Home
gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28
Hit any key to stop autoboot:  0 
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: ST3000DM001-1ER166 Firm: CC26 Ser#: Z503WNB5
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
Unknown command 'mmc' - try 'help'
## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** Bad device usb 0 **

Partition Map for IDE device 0  --   Partition Type: EFI

Part    Start LBA       End LBA         Name
        Attributes
        Type GUID
        Partition GUID
  1     0x00000800      0x004007ff      "rootfs"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        type:   linux
        guid:   d35fd06c-e4a9-4ac5-8ca0-882586ffd53f
  2     0x00400800      0x008007ff      ""
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        type:   linux
        guid:   db41d8bd-746b-4619-874f-14f7ed6025e8
  3     0x00800800      0x00c007ff      ""
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        type:   linux
        guid:   b948c24e-3521-414b-88aa-9770a5c65dbe
  4     0x00c00800      0x010007ff      ""
        attrs:  0x0000000000000000
        type:   0657fd6d-a4ab-43c4-84e5-0933c84b4f4f
        type:   swap
        guid:   13145338-7ca2-44d5-b1fe-48d1baa02d23
  5     0x01000800      0x15d50a38e     "data"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        type:   linux
        guid:   111be5a6-ef54-4fee-a33c-01bc1c3e9ff8
Unknown command 'mmc' - try 'help'
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: ST3000DM001-1ER166 Firm: CC26 Ser#: Z503WNB5
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
device ide 0:1
1 bytes read in 68 ms (0 Bytes/s)
Found bootable drive on ide 0
loading uImage ...
3821592 bytes read in 1029 ms (3.5 MiB/s)
loading uInitrd ...
7245696 bytes read in 1134 ms (6.1 MiB/s)
loading DTB /boot/dts/kirkwood-pogo_e02.dtb ...
10444 bytes read in 111 ms (91.8 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.12.1-kirkwood-tld-1
   Created:      2017-07-20   8:11:24 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3821528 Bytes = 3.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.12.1-kirkwood-tld-1
   Created:      2017-07-24   0:18:23 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7245632 Bytes = 6.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000


Starting kernel ...

Net Console output (booting from SATA HDD):
U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:21:31 -0700)
Seagate GoFlex Home
gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28
Hit any key to stop autoboot:  0 
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: ST3000DM001-1ER166 Firm: CC26 Ser#: Z503WNB5
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
Unknown command 'mmc' - try 'help'

Partition Map for USB device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            7800832         9415b7df-01     83 Boot

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
139 bytes read in 753 ms (0 Bytes/s)

Partition Map for IDE device 0  --   Partition Type: EFI

Part    Start LBA       End LBA         Name
        Attributes
        Type GUID
        Partition GUID
  1     0x00000800      0x004007ff      "rootfs"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        type:   linux
        guid:   d35fd06c-e4a9-4ac5-8ca0-882586ffd53f
  2     0x00400800      0x008007ff      ""
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        type:   linux
        guid:   db41d8bd-746b-4619-874f-14f7ed6025e8
  3     0x00800800      0x00c007ff      ""
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        type:   linux
        guid:   b948c24e-3521-414b-88aa-9770a5c65dbe
  4     0x00c00800      0x010007ff      ""
        attrs:  0x0000000000000000
        type:   0657fd6d-a4ab-43c4-84e5-0933c84b4f4f
        type:   swap
        guid:   13145338-7ca2-44d5-b1fe-48d1baa02d23
  5     0x01000800      0x15d50a38e     "data"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        type:   linux
        guid:   111be5a6-ef54-4fee-a33c-01bc1c3e9ff8
Unknown command 'mmc' - try 'help'
importing envs ...
running scan_disk ...
Scan device mmc
Unknown command 'mmc' - try 'help'
device mmc 0:1
** Bad device mmc 0 **
device mmc 1:1
** Bad device mmc 1 **
device mmc 2:1
** Bad device mmc 2 **
device mmc 3:1
** Bad device mmc 3 **
device mmc 4:1
** Bad device mmc 4 **
device mmc 5:1
** Bad device mmc 5 **
device mmc 6:1
** Bad device mmc 6 **
device mmc 7:1
** Bad device mmc 7 **
Scan device usb
device usb 0:1
1 bytes read in 692 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
3821592 bytes read in 823 ms (4.4 MiB/s)
loading uInitrd ...
7245696 bytes read in 820 ms (8.4 MiB/s)
loading DTB /boot/dts/kirkwood-goflexhome.dtb ...
10603 bytes read in 3183 ms (2.9 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.12.1-kirkwood-tld-1
   Created:      2017-07-20   8:11:24 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3821528 Bytes = 3.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.12.1-kirkwood-tld-1
   Created:      2017-07-24   0:18:23 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7245632 Bytes = 6.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000


Starting kernel ...

fw_prrintenv dump:
[root@debian:/root 2%] # fw_printenv 
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
ethact=egiga0
ethaddr=00:11:22:33:44:55:66
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
load_dtb_addr=0x1c00000
load_initrd_addr=0x1100000
load_uimage_addr=0x800000
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
machid=0x831
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
usb_ready_retry=15
arcNumber=3338
[root@debian:/root 3%] #

/boot/uEnv.txt on a SATA HDD:
dtb_file=/boot/dts/kirkwood-goflexhome.dtb
devices=usb ide
disks=0 1 2 3 4 5 6 7

/boot/uEnv.txt on a SATA HDD:
dtb_file=/boot/dts/kirkwood-goflexhome.dtb
devices=usb ide
disks=0 1 2 3 4 5 6 7



Edited 1 time(s). Last edit at 03/18/2018 03:30PM by habibie.
Re: Seagate GoFLEX Home won't boot off SATA HDD
March 18, 2018 03:04PM
habibie,

You did not activate netconsole. These are the relevant uboot envs.

if_netconsole=ping $serverip
ipaddr=192.168.0.231
preboot_nc=run if_netconsole start_netconsole
serverip=192.168.0.220
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;

To activate netconsole, boot with USB and copy/paste this command to execute at Linux shell (to avoid typo, don't retype):

fw_setenv preboot 'run preboot_nc'

And note the 2 variables (I am going to use 192.168.x.xxx and 192.168.y.yyy below, but they should be replaced with actual number).

ipaddr=192.168.0.231
serverip=192.168.0.220

serverip is your OpenSuSE Linux desktop IP address. So if it is 192.168.x.xxx, then
fw_setenv serverip 192.168.x.xxx
ipaddr is the IP you want this GFHome to have. So if it is 192.168.y.yyy, then
fw_setenv ipaddr 192.168.y.yyy

Start nc on OpenSuSE Linux desktop
nc -lup 6666 192.168.y.yyy 6666
And power up the GFHome.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Seagate GoFLEX Home won't boot off SATA HDD
March 18, 2018 03:33PM
Bodhi,

You are right. I fixed the netconsole now. Also, I have updated my OP to include the netconsole output which indicates uboot loads a wrong boot/dts/kirkwood-pogo_e02.dtb file when booting off of a SATA HDD. I don't know how this happens.
Re: Seagate GoFLEX Home won't boot off SATA HDD
March 18, 2018 04:39PM
habibie Wrote:
-------------------------------------------------------
> Bodhi,
>
> You are right. I fixed the netconsole now. Also, I
> have updated my OP to include the netconsole
> output which indicates uboot loads a wrong
> boot/dts/kirkwood-pogo_e02.dtb file when
> booting off of a SATA HDD. I don't know how this
> happens.

Remember: there should be only one rootfs in the system. Meaning if you want to boot correctly from the HDD rootfs, you will need to either:

- remove the USB rootfs completely.

- Or to keep the USB drive plugged in as data drive, remove the pertinent information (from the USB) that could mislead u-boot to detect it as a rootfs , and that means a few things:

rootfs partition label, /boot/uImage, /boot/uEnv.txt

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Seagate GoFLEX Home won't boot off SATA HDD
March 18, 2018 05:58PM
Exactly.

When I ONLY have a SATA HDD, uboot somehow loads /boot/dts/kirkwood-pogo_e02.dtb instead of /boot/dts/kirkwood-goflexhome.dtb. This puzzles me.

Right now, a quick and dirty hack is to rename the original kirkwood-pogo_e02.dtb file to kirkwood-pogo_e02.dtb.orig and create a symlink file of kirkwood-pogo_e02.dtb from kirkwood-goflexhome.dtb (see below) so my Seagate GoFLEX Home will boot with debian.

root@debian:~# ls -la /boot/dts/
total 1452
drwxr-xr-x 2 root root  4096 Mar 18 16:21 .
drwxr-xr-x 3 root root  4096 Mar 18 14:17 ..
-rw-r--r-- 1 root root 13516 Jul 16  2017 kirkwood-asus_m25.dtb
-rw-r--r-- 1 root root 10734 Jul 16  2017 kirkwood-b3.dtb
-rw-r--r-- 1 root root 10756 Jul 16  2017 kirkwood-blackarmor-nas220.dtb
-rw-r--r-- 1 root root 10769 Jul 16  2017 kirkwood-canvio-home-nas.dtb
-rw-r--r-- 1 root root  9944 Jul 16  2017 kirkwood-cloudbox.dtb
-rw-r--r-- 1 root root 12284 Jul 16  2017 kirkwood-d2net.dtb
-rw-r--r-- 1 root root  9504 Jul 16  2017 kirkwood-db-88f6281.dtb
-rw-r--r-- 1 root root 10392 Jul 16  2017 kirkwood-db-88f6282.dtb
-rw-r--r-- 1 root root 12772 Jul 16  2017 kirkwood-dir665.dtb
-rw-r--r-- 1 root root 13425 Jul 16  2017 kirkwood-dns320.dtb
-rw-r--r-- 1 root root 13473 Jul 16  2017 kirkwood-dns325.dtb
-rw-r--r-- 1 root root 10396 Jul 16  2017 kirkwood-dockstar.dtb
-rw-r--r-- 1 root root 10287 Jul 16  2017 kirkwood-dreamplug.dtb
-rw-r--r-- 1 root root 21934 Jul 16  2017 kirkwood-ds109.dtb
-rw-r--r-- 1 root root 21914 Jul 16  2017 kirkwood-ds110jv10.dtb
-rw-r--r-- 1 root root 22766 Jul 16  2017 kirkwood-ds111.dtb
-rw-r--r-- 1 root root 22862 Jul 16  2017 kirkwood-ds112.dtb
-rw-r--r-- 1 root root 21874 Jul 16  2017 kirkwood-ds209.dtb
-rw-r--r-- 1 root root 21958 Jul 16  2017 kirkwood-ds210.dtb
-rw-r--r-- 1 root root 22906 Jul 16  2017 kirkwood-ds212.dtb
-rw-r--r-- 1 root root 21914 Jul 16  2017 kirkwood-ds212j.dtb
-rw-r--r-- 1 root root 21894 Jul 16  2017 kirkwood-ds409.dtb
-rw-r--r-- 1 root root 21886 Jul 16  2017 kirkwood-ds409slim.dtb
-rw-r--r-- 1 root root 22790 Jul 16  2017 kirkwood-ds411.dtb
-rw-r--r-- 1 root root 21874 Jul 16  2017 kirkwood-ds411j.dtb
-rw-r--r-- 1 root root 22770 Jul 16  2017 kirkwood-ds411slim.dtb
-rw-r--r-- 1 root root 12075 Jul 16  2017 kirkwood-ea4500-dsa.dtb
-rw-r--r-- 1 root root 11166 Jul 16  2017 kirkwood-ea4500.dtb
-rw-r--r-- 1 root root 10603 Jul 16  2017 kirkwood-goflexhome.dtb
-rw-r--r-- 1 root root 11895 Jul 16  2017 kirkwood-goflexnet.dtb
-rw-r--r-- 1 root root 10522 Jul 16  2017 kirkwood-guruplug-server-plus.dtb
-rw-r--r-- 1 root root 10867 Jul 16  2017 kirkwood-ib62x0.dtb
-rw-r--r-- 1 root root 11580 Jul 16  2017 kirkwood-iconnect.dtb
-rw-r--r-- 1 root root 12298 Jul 16  2017 kirkwood-iomega_ix2_200.dtb
-rw-r--r-- 1 root root  9540 Jul 16  2017 kirkwood-iomega_ix4_200d.dtb
-rw-r--r-- 1 root root 10282 Jul 16  2017 kirkwood-is2.dtb
-rw-r--r-- 1 root root  8544 Jul 16  2017 kirkwood-km_kirkwood.dtb
-rw-r--r-- 1 root root 10774 Jul 16  2017 kirkwood-laplug.dtb
-rw-r--r-- 1 root root 13095 Jul 16  2017 kirkwood-lenovo-iomega-ez.dtb
-rw-r--r-- 1 root root 13091 Jul 16  2017 kirkwood-lenovo-ix2-ng.dtb
-rw-r--r-- 1 root root 14689 Jul 16  2017 kirkwood-linkstation-lsqvl.dtb
-rw-r--r-- 1 root root 13673 Jul 16  2017 kirkwood-linkstation-lsvl.dtb
-rw-r--r-- 1 root root 12558 Jul 16  2017 kirkwood-linkstation-lswsxl.dtb
-rw-r--r-- 1 root root 14321 Jul 16  2017 kirkwood-linkstation-lswvl.dtb
-rw-r--r-- 1 root root 13429 Jul 16  2017 kirkwood-linkstation-lswxl.dtb
-rw-r--r-- 1 root root 12805 Jul 16  2017 kirkwood-linksys-viper.dtb
-rw-r--r-- 1 root root 12741 Jul 16  2017 kirkwood-lschlv2.dtb
-rw-r--r-- 1 root root 14161 Jan 30  2016 kirkwood-lswvl.dtb
-rw-r--r-- 1 root root 13285 Jan 30  2016 kirkwood-lswxl.dtb
-rw-r--r-- 1 root root 12737 Jul 16  2017 kirkwood-lsxhl.dtb
-rw-r--r-- 1 root root 11097 Jul 16  2017 kirkwood-mplcec4.dtb
-rw-r--r-- 1 root root 11279 Jul 16  2017 kirkwood-mv88f6281gtw-ge.dtb
-rw-r--r-- 1 root root 12346 Jul 16  2017 kirkwood-n1t1.dtb
-rw-r--r-- 1 root root 12731 Jul 16  2017 kirkwood-nas2big.dtb
-rw-r--r-- 1 root root 12387 Jul 16  2017 kirkwood-net2big.dtb
-rw-r--r-- 1 root root 13763 Jul 16  2017 kirkwood-net5big.dtb
-rw-r--r-- 1 root root 13124 Jul 16  2017 kirkwood-netgear_readynas_duo_v2.dtb
-rw-r--r-- 1 root root 13304 Jul 16  2017 kirkwood-netgear_readynas_nv+_v2.dtb
-rw-r--r-- 1 root root 11869 Jul 16  2017 kirkwood-netgear_stora_ms2000.dtb
-rw-r--r-- 1 root root 10278 Jul 16  2017 kirkwood-ns2.dtb
-rw-r--r-- 1 root root 10179 Jul 16  2017 kirkwood-ns2lite.dtb
-rw-r--r-- 1 root root 10565 Jul 16  2017 kirkwood-ns2max.dtb
-rw-r--r-- 1 root root 10533 Jul 16  2017 kirkwood-ns2mini.dtb
-rw-r--r-- 1 root root 13074 Jul 16  2017 kirkwood-nsa310.dtb
-rw-r--r-- 1 root root 12458 Jul 16  2017 kirkwood-nsa310a.dtb
-rw-r--r-- 1 root root 12636 Jul 16  2017 kirkwood-nsa310b-lmsensor-redusbled.dtb
-rw-r--r-- 1 root root 13296 Jul 16  2017 kirkwood-nsa310s.dtb
-rw-r--r-- 1 root root 13691 Jul 16  2017 kirkwood-nsa320.dtb
-rw-r--r-- 1 root root 13292 Jul 16  2017 kirkwood-nsa320s.dtb
-rw-r--r-- 1 root root 14548 Jul 16  2017 kirkwood-nsa325.dtb
-rw-r--r-- 1 root root 11681 Jul 16  2017 kirkwood-openblocks_a6.dtb
-rw-r--r-- 1 root root 11721 Jul 16  2017 kirkwood-openblocks_a7.dtb
-rw-r--r-- 1 root root  9913 Jul 16  2017 kirkwood-openrd-base.dtb
-rw-r--r-- 1 root root 10382 Jul 16  2017 kirkwood-openrd-client.dtb
-rw-r--r-- 1 root root 10069 Jul 16  2017 kirkwood-openrd-ultimate.dtb
lrwxrwxrwx 1 root root    23 Mar 18 16:21 kirkwood-pogo_e02.dtb -> kirkwood-goflexhome.dtb
-rw-r--r-- 1 root root 10444 Jul 16  2017 kirkwood-pogo_e02.dtb.orig
-rw-r--r-- 1 root root 10284 Jul 16  2017 kirkwood-pogoplug_v4.dtb
-rw-r--r-- 1 root root 11112 Jul 16  2017 kirkwood-qizhitong_501m_v2.dtb
-rw-r--r-- 1 root root  9784 Jul 16  2017 kirkwood-rd88f6192.dtb
-rw-r--r-- 1 root root 10608 Jul 16  2017 kirkwood-rd88f6281-a.dtb
-rw-r--r-- 1 root root  9944 Oct  9  2014 kirkwood-rd88f6281-a0.dtb
-rw-r--r-- 1 root root  9992 Oct  9  2014 kirkwood-rd88f6281-a1.dtb
-rw-r--r-- 1 root root 10621 Jul 16  2017 kirkwood-rd88f6281-z0.dtb
-rw-r--r-- 1 root root 22762 Jul 16  2017 kirkwood-rs212.dtb
-rw-r--r-- 1 root root 21874 Jul 16  2017 kirkwood-rs409.dtb
-rw-r--r-- 1 root root 22790 Jul 16  2017 kirkwood-rs411.dtb
-rw-r--r-- 1 root root 10599 Jul 16  2017 kirkwood-sheevaplug-esata.dtb
-rw-r--r-- 1 root root 10498 Jul 16  2017 kirkwood-sheevaplug.dtb
-rw-r--r-- 1 root root 11919 Jul 16  2017 kirkwood-t5325.dtb
-rw-r--r-- 1 root root 12453 Jul 16  2017 kirkwood-topkick.dtb
-rw-r--r-- 1 root root 10640 Jul 16  2017 kirkwood-ts219-6281.dtb
-rw-r--r-- 1 root root 11528 Jul 16  2017 kirkwood-ts219-6282.dtb
-rw-r--r-- 1 root root 10604 Jul 16  2017 kirkwood-ts419-6281.dtb
-rw-r--r-- 1 root root 11492 Jul 16  2017 kirkwood-ts419-6282.dtb
root@debian:~#
Re: Seagate GoFLEX Home won't boot off SATA HDD
March 18, 2018 06:31PM
No, that dirty hack is not reconmended :)

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Seagate GoFLEX Home won't boot off SATA HDD
March 18, 2018 08:04PM
bodhi Wrote:
-------------------------------------------------------
> No, that dirty hack is not reconmended :)
>
Understood. But, that goes to show at least the u-boot and its environment are working. What I don't know is why u-boot loads kirkwood-pogo_e02.dtb instead of kirkwood-goflexhome.dtb when booting through a SATA HDD while it loads OK with kirkwood-goflexhome.dtb when booting through a USB memory stick. After all, they both are extracted from the same Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 archive. I am hoping there is a way to fix this issue. Until then, I will temporarily use this quick and dirty hack to test my Seagate GoFLEX Home as a NAS.
Re: Seagate GoFLEX Home won't boot off SATA HDD
March 18, 2018 10:15PM
habibie,

As I've said above, conflicting info from both USB and HDD rootfs

https://forum.doozan.com/read.php?3,54589,54659#msg-54659

Use one for data and other for rootfs then problem will be gone.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Seagate GoFLEX Home won't boot off SATA HDD
March 19, 2018 06:31AM
bodhi Wrote:
-------------------------------------------------------
> habibie,
>
> As I've said above, conflicting info from both USB and HDD rootfs
>
> https://forum.doozan.com/read.php?3,54589,54659#msg-54659
>
> Use one for data and other for rootfs then problem will be gone.
>
Bodhi,

I now only have a SATA HDD attached sans any USB memory stick, and yet my Seagate GoFLEX Home still loads the kirkwood-pogo_e02.dtb instead of the kirkwood-goflexhome.dtb when booting through a SATA HDD. This happens regardless I have the USB memory stick attached or not. So, what you said is not an issue, AFAICT.
Re: Seagate GoFLEX Home won't boot off SATA HDD
March 19, 2018 03:01PM
habibie,

> I now only have a SATA HDD attached sans any USB
> memory stick, and yet my Seagate GoFLEX Home still
> loads the kirkwood-pogo_e02.dtb instead of
> the kirkwood-goflexhome.dtb when booting
> through a SATA HDD. This happens regardless I have
> the USB memory stick attached or not. So, what you
> said is not an issue, AFAICT.


OK then post the netconsole bootog for this configuration.

Power up, interrupt console and

printenv
boot

If you use uEnv.txt then also

cat /boot/uEnv.txt

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Seagate GoFLEX Home won't boot off SATA HDD
March 19, 2018 08:59PM
Bodhi,

My Seagate GoFLEX Home's netconsole bootlog is shown below and it clearly indicates dtb_file=/boot/dts/kirkwood-pogo_e02.dtb. I replaced it with dtb_file=/boot/dts/kirkwood-goflexhome.dtb and now it boots OK. Thank you.
U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:21:31 -0700)
Seagate GoFlex Home
gcc (Debian 6.3.0-18) 6.3.0 20170516
GNU ld (GNU Binutils for Debian) 2.28
Hit any key to stop autoboot:  3 
 0 
GoFlexHome> printenv
printenv
arcNumber=3338
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=3
bootdev=usb
device=0:1
devices=usb ide mmc
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-pogo_e02.dtb
ethact=egiga0
ethaddr=00:11:22:33:44:55
if_netconsole=ping $serverip
ipaddr=192.168.1.89
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_initrd=echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd
load_initrd_addr=0x1100000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
machid=0x831
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
ncip=192.168.1.87
partition=nand0,2
preboot=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start";  setenv scan_ide "ide reset";  setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.1.87
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 3; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=nc
stdin=nc
stdout=nc
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start";  setenv init_ide "ide reset";  setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices;  do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read;  fi; else if $devtype part $disknum; then run uenv_read; fi;  fi
usb_ready_retry=15

Environment size: 2861/131068 bytes
GoFlexHome> boot
boot
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: ST3000DM001-1ER166 Firm: CC26 Ser#: Z503WNB5
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
Unknown command 'mmc' - try 'help'
## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** Bad device usb 0 **

Partition Map for IDE device 0  --   Partition Type: EFI

Part    Start LBA       End LBA         Name
        Attributes
        Type GUID
        Partition GUID
  1     0x00000800      0x004007ff      "rootfs"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        type:   linux
        guid:   d35fd06c-e4a9-4ac5-8ca0-882586ffd53f
  2     0x00400800      0x008007ff      ""
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        type:   linux
        guid:   db41d8bd-746b-4619-874f-14f7ed6025e8
  3     0x00800800      0x00c007ff      ""
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        type:   linux
        guid:   b948c24e-3521-414b-88aa-9770a5c65dbe
  4     0x00c00800      0x010007ff      ""
        attrs:  0x0000000000000000
        type:   0657fd6d-a4ab-43c4-84e5-0933c84b4f4f
        type:   swap
        guid:   13145338-7ca2-44d5-b1fe-48d1baa02d23
  5     0x01000800      0x15d50a38e     "data"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        type:   linux
        guid:   111be5a6-ef54-4fee-a33c-01bc1c3e9ff8
Unknown command 'mmc' - try 'help'
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide

Reset IDE: Bus 0: OK Bus 1: not available  
  Device 0: Model: ST3000DM001-1ER166 Firm: CC26 Ser#: Z503WNB5
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
device ide 0:1
1 bytes read in 68 ms (0 Bytes/s)
Found bootable drive on ide 0
loading uImage ...
3821592 bytes read in 1022 ms (3.6 MiB/s)
loading uInitrd ...
7245696 bytes read in 1132 ms (6.1 MiB/s)
loading DTB /boot/dts/kirkwood-pogo_e02.dtb ...
10603 bytes read in 166 ms (61.5 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-4.12.1-kirkwood-tld-1
   Created:      2017-07-20   8:11:24 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3821528 Bytes = 3.6 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-4.12.1-kirkwood-tld-1
   Created:      2017-07-24   0:18:23 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7245632 Bytes = 6.9 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000


Starting kernel ...
Re: Seagate GoFLEX Home won't boot off SATA HDD
March 19, 2018 11:38PM
habibie,

Apparently, during u-boot installation, you have missed step 8f.

Quote

8. Flashing default u-boot envs image (if you are upgrading from 2016.05-tld-1 u-boot, you can skip this step 8).

As described in step 1, u-boot envs must be defined in /etc/fw_env.config as

# MTD device name Device offset Env. size Flash sector size Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000

This default envs image supports booting with multiple disk drives (and hubs) attached. The disk drives could be any type (usb, sata, sd card). The scanning logic and default envs were set to automatically boot the box with the following required configuration:

For whatever reason, if you can't set up your configuration to satisfy the following 4 requirements, then don't flash this defaut envs image. It might not boot properly. In this case, section C below can be used to tailor the envs to your specific configuration.

r1. There must be only one partition among all partitions from all drives that contains the kernel files. The 2 kernel files are /boot/uImage and /boot/uInitrd.
r2. The partition that contains the 2 kernel files must be partition 1 in a disk drive
r3. The partition that contains the rootfs must be labeled rootfs
r4. The rootfs partition is recommended to be type Ext3 (this is not a hard requirement, ext4 should boot OK, but Ext3 will ensure no problem).

So the bottom line is if you have only one rootfs in a single Ext3 partition, which is labeled as rootfs, then you're all set.

a. Download the default u-boot envs at Dropbox:

uboot.2016.05-tld-1.environment.bodhi.tar
md5:
3823eef10011b864859d31a76470e0e3
sha256:
c8db95a4225e8d78bdaaaa372bd5a87e4b98f3448dd9c62fc96c72b2df1a997c

This tarball includes 3 files:

uboot.2016.05-tld-1.environment.img (the default envs image to be flashed)
uboot.2016.05-tld-1.environment (the content of the default envs in text format)
uboot.2016.05-tld-1.environment.64K.img (small envs image to be flashed on HP T5325 only).

b. Extract the archive to /tmp
cd /tmp
tar -xf uboot.2016.05-tld-1.environment.bodhi.tar

c. Save current envs with fw_printenv, or just copy/paste the listing into a text file.
fw_printenv > current_envs.txt

d. Flash u-boot envs to NAND location 0xC0000.

Be extra careful with the next 2 commands, you should see output that look like below. If there is error, then do not reboot, post your problem here so we can help.

/usr/sbin/flash_erase /dev/mtd0 0xc0000 1
Expected output:
Erase Total 1 Units
Performing Flash Erase of length 131072 at offset 0xc0000 done

/usr/sbin/nandwrite -s 786432 /dev/mtd0 uboot.2016.05-tld-1.environment.img
Expected output:
Writing data to block 6 at offset 0xc0000

e. Modify the following u-boot variables using fw_setenv:

Note that arcNumber and machid are not necessary if you are booting with FDT kernel 3.17+ in the latest kernel and rootfs thread. But it does not hurt to set them anyway.

archNumber and machid are required for non-FDT kernel (3.16.x or earlier)

Also note that only some boxes need machid, some don't (so the command fw_setenv machid below clears them).

for Pogo V4/Mobile:
fw_setenv arcNumber 3960
fw_setenv machid f78

for iConnect:
fw_setenv arcNumber 2870
fw_setenv machid

for Stora:
fw_setenv arcNumber 2743
fw_setenv machid

for Dockstar:
fw_setenv arcNumber 2998
fw_setenv machid

for Pogo E02:
fw_setenv arcNumber 3542
fw_setenv machid dd6

for GoFlex Home:
fw_setenv arcNumber 3338
fw_setenv machid


for GoFlex Net:
fw_setenv arcNumber 3089
fw_setenv machid

for Sheevaplug:
fw_setenv arcNumber 2097
fw_setenv machid

for NSA325:
fw_setenv arcNumber 4495
fw_setenv machid

for NSA320:
fw_setenv arcNumber 3956
fw_setenv machid

for NSA310S/320S:
fw_setenv arcNumber 4931
fw_setenv machid

for NSA310:
fw_setenv arcNumber 4022
fw_setenv machid


Then for all boxes, restore these 2 envs using the saved envs text in step c (replace xxx with the real saved values)
fw_setenv mtdparts 'xxxxxxxxx'
fw_setenv ethaddr 'xx:xx:xx:xx:xx:xx'

Note: for boxes that boot with SATA as rootfs. Please make this adjustment if your boot drive is SATA:
fw_setenv bootcmd_uenv 'run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3'
(This will help the "ide reset" to work properly. There seems to be a bug in u-boot that if you do "ide reset" too quickly in succession, the SATA drive might have problem spinning up).

f. Adjust the DTB name to boot with a rootfs that has FDT kernel 3.17+ (this is the normal case):

Find your box DTB file in the rootfs /boot/dts directory and adjust the env to it. For example, if the box is the Dockstar
fw_setenv dtb_file '/boot/dts/kirkwood-dockstar.dtb'

In the special case when you are booting with a non-FDT kernel 3.16 or earlier, or if you have appended the DTB to uImage. Remove the DTB file env. If not sure please post question before continuing.
fw_setenv dtb_file


h. For sanity check, list you envs again
fw_printenv

If there is error in listing u-boot envs, stop here and post your problem so we can help.

Remember to save away your old envs text file created in step c for future reference in case more need to be restored.

i. Done step 8.


9. For sanity check, print out uBoot envs to see if they look OK.
fw_printenv
and then double check the ethaddr env again to be sure. Don't reboot if there is error while listing U-Boot envs.

10. Set up netconsole. It's important to set up neconsole if you don't already have serial console connected. If you have serial console, don't set up netconsole at this moment, because it will interfere with serial console.

If you've flashed the default environments in step 8 then activate netconsole with the following envs:

Adjust 192.168.0.xxx and 192.168.0.yyy below to the real numbers in your network configuration. 192.168.0.xxx is this plug IP address, and 192.168.0.yyy is the IP address of the netconsole server where it will monitor the output from the this plug (adjust them to the real values in your own local network settings).

fw_setenv preboot_nc 'setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi'
fw_setenv preboot 'run preboot_nc'
fw_setenv ipaddr '192.168.0.xxx'
fw_setenv serverip '192.168.0.yyy'


11. Reboot. Upon reboot, in either serial console or netconsole, uBoot banner should show:

U-Boot 2017.07-tld-1 (….)
<your box name>

DONE installation.


So how to fix that.

Boot into Debian (with USB or with your current HDD setup). And set it.

fw_setenv dtb_file '/boot/dts/kirkwood-goflexhome.dtb'

And restore the correct kirkwood-pogo_e02 so that it can be reused if you ever reuse this rootfs for Pogo E02.

Reboot.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Seagate GoFLEX Home won't boot off SATA HDD
March 20, 2018 07:11AM
Bodhi,

It appears that way. Anyway, when you asked me to post the output of the bootlog, I spotted the culprit and fixed it right the way. Thank you.

Now, I think I am facing some issues with some R/W NFS performance. I need to do more testing on this.
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: