Welcome! Log In Create A New Profile

Advanced

Semi-bricked Dockstar help needed: Have netconsole :(

Posted by letsjam1984 
Semi-bricked Dockstar help needed: Have netconsole :(
May 31, 2014 03:00PM
Hello All,

Have been following instructions for a while, but managed to semi-brick the dockstar today, so need some help.

Sequence of events:

1. Decided to upgrade to latest uboot. Did upgrade.
2. Enabled netconsole. Reboot
2. Dockstar never came back up into debian.

What I did:
1. Took backups of mtd0 and uboot using nanddump script before update. Dont know how to restore them with current state. I think restoring those would probably work.
2. Took backup of filesystem before update. Tried restoring it. Didnt help.
3. Based on errors (see below output), did fsck of filesystems from ubuntu box, fixed lots of errors, but it didnt fix the error, leading me to suspect that the upgraded uboot has a different setting or not compatible with my installed kernel?

What I have:
1. Netconsole still works.
2. printenv and netconsole output below:

Netconsole output:
U-Boot 2014.01-tld-1 (Mar 17 2014 - 22:04:15)
Seagate FreeAgent DockStar
gcc (Debian 4.6.3-14) 4.6.3
GNU ld (GNU Binutils for Debian) 2.22
Hit any key to stop autoboot:  0
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
** File not found /rescueme **
** Unrecognized filesystem type **
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:        1752
UBI: number of bad PEBs:         0
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:             1731
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 "rootfs", error -22
UBIFS error (pid 0): ubifs_mount: Error reading superblock on volume 'rootfs' er
rno=-22!

ubifsmount - mount UBIFS volume

Usage:
ubifsmount <volume-name>
    - mount 'volume-name' volume
1 bytes read in 557 ms (0 Bytes/s)
Found bootable drive on usb 0:1
EHCI timed out on TD - token=0x1a008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x801f8c80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x801f8c80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x801f8c80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x801f8c80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x801f8c80
EHCI timed out on TD - token=0x80008d80
 ** ext4fs_devread read error - block
EHCI timed out on TD - token=0x801f8c80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x801f8c80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x801f8c80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x801f8c80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x801f8c80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x801f8c80
EHCI timed out on TD - token=0x80008d80
** Can't read partition table on 0:0 **
** Invalid partition 1 **
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   kernel 3.2.0-4-kirkwood
   Created:      2013-12-18  19:33:25 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1608432 Bytes = 1.5 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
stopping USB..
### JFFS2 loading 'uboot-original-mtd0.kwb' to 0x800000
Scanning JFFS2 FS: ......... done.
### JFFS2 load complete: 524288 bytes loaded to 0x800000
## Starting application at 0x00800200 ...

Printenv from Netconsole:
U-Boot 2014.01-tld-1 (Mar 17 2014 - 22:04:15)
Seagate FreeAgent DockStar
gcc (Debian 4.6.3-14) 4.6.3
GNU ld (GNU Binutils for Debian) 2.22
Hit any key to stop autoboot: 10
 0
DockStar> printenv
 p r i n t e n v
arcNumber=2097
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:95:A2
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=10.0.0.9
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=10.0.0.174
partition=nand0,2
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
preboot=run if_netconsole start_netconsole
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; na
nd 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=10.0.0.174
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; se
tenv stdout nc; setenv stderr nc; version;
stderr=nc
stdin=nc
stdout=nc
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && u
bifsload 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 ext
2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; el
se 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 t
est $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; se
tenv 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

Environment size: 2590/131068 bytes
DockStar>

This is what I have. Can follow instructions. Familiar with Linux command prompt/shell scripting, not a lot on kernel-level stuff.

Help!!!!!!!!!!! :)
Re: Semi-bricked Dockstar help needed: Have netconsole :(
June 01, 2014 10:07AM
letsjam1984,

How did you back up your current USB rootfs?

The error seems to indicate that the file system is Ext4.
** ext4fs_devread read error - block
And your u-boot env is set to Ext3
usb_rootfstype=ext3

So if your rootfs was Ext4, then format a new USB drive as Ext4, and then restore it. Change the usbrootfs_type to ext4 in netconsole:
setenv  usb_rootfstype ext4

OTOH, if you intended to use Ext3 and the backup rootfs was ext4 then it's a mismatch between that file system and the usb_rootfstype.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Semi-bricked Dockstar help needed: Have netconsole :(
June 01, 2014 11:00AM
bodhi Wrote:
-------------------------------------------------------
> letsjam1984,
>
> How did you back up your current USB rootfs?
>
> The error seems to indicate that the file system
> is Ext4.
>
> ** ext4fs_devread read error - block
>
> And your u-boot env is set to Ext3
>
> usb_rootfstype=ext3
>
>
> So if your rootfs was Ext4, then format a new USB
> drive as Ext4, and then restore it. Change the
> usbrootfs_type to ext4 in netconsole:
>
> setenv  usb_rootfstype ext4
>
>
> OTOH, if you intended to use Ext3 and the backup
> rootfs was ext4 then it's a mismatch between that
> file system and the usb_rootfstype.

Bodhi,

Thanks for catching that. I recall trying a conversion to ext4 some months ago for better reliability, but I thought it didnt work. Looks like it may have at one level at least, though its been a while since that happened.

Backup/restore was a simple tar command to yield a tgz, connected to a ubuntu box.

Will try:
1. Change env to ext4 and see if it boots.
2. Else, will format drive to ext3 and restore filesystem to it and then try.

Will report back.
Re: Semi-bricked Dockstar help needed: Have netconsole :(
June 05, 2014 01:44PM
Update.

So looks like the HDD I was using somehow got borked.

Reformatted it and then restored original install - didnt work
Reformatted and restored image from forum - didnt work
New HDD with old image - didnt work
New HDD with backup image from forum - Worked! Finally!

Now also installing the rescue system so things are easier if required in the future. Also figuring out an rsync based backup method.
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: