Welcome! Log In Create A New Profile

Advanced

semi-hosed my Dockstar

Posted by vds 
vds
semi-hosed my Dockstar
November 14, 2013 05:32PM
For some crazy reason I tried to update my Seagate Dockstar running squeeze to wheezy and in the process of finding all the web links from almost 3 years ago I either hosed something up, or the new scripts have bugs I didn't work around correctly. It was late. I was shall we say 'not wise'. Help appreciated.

Updating squeeze => wheezy via "apt-get dist-upgrade" gave me a spinning disk (a real Dockstar 500 GB disk) that doesn't boot. Eventually the dockstar seems to power itself down, as the light goes off, which surprised me a bit. Initially it 'used to' fail nicely to the NAND os so I could at least get in via ssh, but now I don't think it's getting there.

I 'think' what I did was answer yes to Jeff's question about slamming the uboot settings with reasonable defaults, but at this point I'm not certain. I did notice that the nc stuff wasn't there, which I put back via fw_setenv. I also noticed the usb_rootfs type was ext2 which I switched to ext3 to match the other (not broken (yet) dockstar that matched this one).

The box is not totally dead, I booted it on a gigabit switch and do get some nc console info (attached). I do not have a JTAG cable, but since it's talking at least somewhat on the network, would there be a network restore / update path that I might try ?

Lastly, not having updated the dockstar in a few years I'm a little lost knowing whose update script to run for the NAND os, whose to run to get wheezy installed, and which bugs I need to work around in the various scripts. Seems like there are a lot of scripts and images out there each with some nuances that seem to be tripping folks up.

I guess what I'd like to do is get it back one the network ok for ssh access, then update whatever uBoot stuff needs to be updated, then reinstall Debian cleanly ala an initial install.

I'd be thrilled to just reinstall squeeze and get it back where it was before. Getting to wheezy would be better. Any help/ideas/pointers definitely appreciated.

Here's the nc capture with 'no' disks etc. attached to the dockstar...

U-Boot 2011.12 (Feb 12 2012 - 21:33:07)
Seagate FreeAgent DockStar
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q3-67) 4.4.1
GNU ld (Sourcery G++ Lite 2009q3-67) 2.19.51.20090709
Hit any key to stop autoboot:  0 
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... 2 USB Device(s) found
       scanning bus for storage devices... 0 Storage Device(s) found
** Block device usb 0 not supported

** Invalid boot device **
Creating 1 MTD partitions on "nand0":
0x000002500000-0x000010000000 : "mtd=3"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=3"
UBI: MTD device size:            219 MiB
UBI: number of good PEBs:        1750
UBI: number of bad PEBs:         2
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     0
UBI: available PEBs:             1729
UBI: total number of reserved PEBs: 21
UBI: number of PEBs reserved for bad PEB handling: 17
UBI: max/mean erase counter: 1/1
UBIFS error (pid 0): ubifs_get_sb: cannot open "ubi:rootfs", error -19
Error reading superblock on volume 'ubi:rootfs'!
** Block device usb 0 not supported
** Block device usb 1 not supported
** Block device usb 2 not supported
** Block device usb 3 not supported
** Block device usb 0 not supported
** Block device usb 0 not supported
Wrong Image Format for bootm command
ERROR: can't get kernel image!
stopping USB..
### JFFS2 loading 'uboot-original-mtd0.kwb' to 0x800000
Scanning JFFS2 FS: .......  read_nand_cached: error reading nand off 0x9b2000 size 8192 bytes
. done.
read_nand_cached: error reading nand off 0x9b1800 size 8192 bytes
off = 0x9b11e0 magic 0x1985 type 0xe002 node.totlen = 1880
### JFFS2 load complete: 524288 bytes loaded to 0x800000
## Starting application at 0x00800200 ...

Re: semi-hosed my Dockstar
November 14, 2013 05:45PM
You have netconsole, that is a great start. Now the next best thing to do is to stop the boot process and issue a "printenv" command.
Then post the output here. Much more useful than just the failing default boot process you posted above. ;-)
vds
Re: semi-hosed my Dockstar
November 15, 2013 10:27PM
Here's the printing output....

Environment size: 2601/131068 bytes
arcNumber=2998
baudrate=115200
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
bootdelay=10
console=ttyS0,115200
ethact=egiga0
ethaddr=00:10:75:1A:5A:E2
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
if_netconsole=ping $serverip
ipaddr=192.168.0.208
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
ncip=192.168.0.246
partition=nand0,2
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
preboot=run if_netconsole start_netconsole
printenv
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
rescue_installed=0
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
serverip=192.168.0.246
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=nc
stdin=nc
stdout=nc
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_device=0:1
usb_init=run usb_scan
usb_root=/dev/sda1
usb_rootdelay=10
usb_rootfstype=ext3
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_scan_list=1 2 3 4
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
Re: semi-hosed my Dockstar
November 16, 2013 12:05AM
vds,

You are running the latest uBoot version for this box.

The easiest way to recover is using this wheezy rootfs (latest version is 3.12) . Put this rootfs on another USB thumb, and boot it.
http://forum.doozan.com/read.php?2,12096

After you've booted into Debian, mount your USB and take a look to see what is missing. If you have a lot of packages installed on it , then you should try to recover. Or you can continue using my rootfs and install needed packages.

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



Edited 1 time(s). Last edit at 11/16/2013 12:06AM by bodhi.
vds
Re: semi-hosed my Dockstar
November 17, 2013 01:46AM
ok, dockstar number 2 now works again, seems like the squeeze => wheezy dist-upgrade is what was hosed.
  • Verified your rootfs worked for usb-key disk only.
  • mounted the native dockstar spinning disk and installed to its first partition similarly and the box boots off its native spinning disk only too.
  • I checked debian_release and found your rootfs is debian 7.1 so I did 'apt-get update' and 'apt-get upgrade' while booted spinning disk and the upgrade to current for the spinning disk worked fine.
Back in business. Thanks!

Couple things you might consider for your next update:
  • bzip2 is missing, so the tar -jxf command is not possible when booted off the usb key (containing your rootfs) when duplicating the install to spinning disk. I just added it with apt-get install to be able to extract the bzipped tar ball
  • all apt-get install type commands bark like crazy due to lack of some add-ons.

One example is:
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
vds
Re: semi-hosed my Dockstar
November 17, 2013 02:00AM
last update - dockstar 1 also works fine off both the usb key with your rootfs 'and' the spinning disk copy of the same image. So my problem was 'definitely' a hosed squeeze => wheezy update. Thanks a bunch for the help !!!!!
Re: semi-hosed my Dockstar
November 17, 2013 02:04AM
vds Wrote:
-------------------------------------------------------

> [*]Verified your rootfs worked for usb-key disk
> only.

It should work fine with hard disk. It does not make any difference what type of disk the rootfs is on. Could be thumb drives, HDDs, SD cards ….

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
vds
Re: semi-hosed my Dockstar
November 17, 2013 04:03PM
yup it does work fine either way, by 'only' I meant "with only the usb key attached".....poorly worded on my part :-)

Thanks again for the help !
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: