Quantcast
Channel: Linux Device Hacking
Viewing all articles
Browse latest Browse all 3247

cant update rescue system (6 replies)

$
0
0
Hi,
this is my first post. Here is my current situation:
I have a Seagate Dockstar with working Uboot, Serial connection, netconnection. Beacuse of the "Kernel too old" problem i wanted to update the rescue system to "RescueV2.8.2-10292012.tar". Problem: I dont have a running debian, so i cant use "ubiformat /dev/mtd2 -s 512 -f rootfs-mtd2.img -y" mentioned in this tutorial http://forum.doozan.com/read.php?4,7915

I tried to update the rescue system only in the uBoot environment, and i think most of it works, but it doesnt boot correctly.
The errors in serial output are:
[   20.344130] UBI error: ubi_read_volume_table: the layout volume was not found
[   20.351404] UBI error: ubi_init: cannot attach mtd2
...
[   20.601944] VFS: Cannot open root device "ubi0:mtdblock2" or unknown-block(0,0)
[   20.609297] Please append a correct "root=" boot option; here are the available partitions:
[   20.617706] 1f00            1024 mtdblock0  (driver?)
[   20.622785] 1f01            4096 mtdblock1  (driver?)
[   20.627879] 1f02           32768 mtdblock2  (driver?)
[   20.632961] 1f03          224256 mtdblock3  (driver?)
[   20.638054] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

I did the following:
nand erase 0x100000 0x400000
tftp 0x800000 uImage-mtd1.img
nand write.e 0x800000 0x100000 0x380000
tftp 0x1000000 rootfs-mtd2.img

setenv rescue_set_bootargs 'setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params'
setenv 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'
setenv bootcmd 'run usb_bootcmd; usb stop; run rescue_bootcmd; reset'
saveenv
run rescue_bootcmd

Can you help me or do you have any idea ?

I think i have to use the ubi command in uboot, but dont know how. Maybe its a hardware problem:
 u b i   p a r t   u - b o o t 
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 error: ubi_io_read: error -74 while reading 64 bytes from PEB 5:0, read 64 bytes
UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 5:512, read 512 bytes
UBI error: ubi_io_read: error -74 while reading 512 bytes from PEB 7:512, read 512 bytes
UBI error: ubi_read_volume_table: the layout volume was not found
UBI error: ubi_init: cannot attach mtd1
UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
UBI init error 22
DockStar> ubi part rootfs
 u b i   p a r t   r o o t f s 
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 error: ubi_read_volume_table: the layout volume was not found
UBI error: ubi_init: cannot attach mtd1
UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
UBI init error 22


Here is my printenv:

DockStar> printenv
 p r i n t e n v 
arcNumber=2998
baudrate=115200
bootargs=console=ttyS0,115200 ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
bootcmd=run usb_bootcmd; usb stop; run rescue_bootcmd; reset
bootcmd_pogo=run bootcmd_rescue
bootcmd_rescue=run set_bootargs_rescue; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000
bootdelay=10
console=ttyS0,115200
ethact=egiga0
ethaddr=00:10:75:1A:D2:81
fileaddr=1000000
filesize=1b60000
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.178.100
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mtddevname=rootfs
mtddevnum=2
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
ncip=192.168.178.33
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; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
rescue_installed=1
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:mtdblock2 ro rootfstype=ubifs $mtdparts $rescue_custom_params
serverip=192.168.178.33
set_bootargs_rescue=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts
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 init=$ubifs_init $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=usb start; if ext2load usb 0:1 0x800000 /boot/uImage 1; then setenv usb_device 0:1; setenv usb_root /dev/sda1; elif ext2load usb 1:1 0x800000 /boot/uImage 1; then setenv usb_device 1:1; setenv usb_root /dev/sdb1; elif ext2load usb 2:1 0x800000 /boot/uImage 1; then setenv usb_device 2:1; setenv usb_root /dev/sdc1; elif ext2load usb 3:1 0x800000 /boot/uImage 1; then setenv usb_device 3:1;setenv usb_root /dev/sdd1; fi;
usb_root=/dev/sda1
usb_rootdelay=10
usb_rootfstype=ext2
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params

Environment size: 2993/131068 bytes

uboot serial output before interrupting in netconsole:

U-Boot 2014.01-tld-1 (Mar 17 2014 - 22:04:15)
Seagate FreeAgent DockStar

SoC:   Kirkwood 88F6281_A0
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Using egiga0 device
host 192.168.178.33 is alive

uboot netconsole output:
DockStar> run rescue_bootcmd
 r u n   r e s c u e _ b o o t c m d 

NAND read: device 0 offset 0x100000, size 0x400000
 4194304 bytes read: OK
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-3.3.2-kirkwide
   Created:      2012-10-29  22:52:12 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3627768 Bytes = 3.5 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK


Starting kernel ...

kernel output on serial:
Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.3.2-kirkwide (davygravy@bitbaker64) (gcc version 4.3.5 (Buildroot 2010.08) ) #1 Mon Oct 29 17:52:07 CDT 2012
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: Seagate FreeAgent DockStar
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 ubi.mtd=2 root=ubi0:mtdblock2 ro rootfstype=ubifs mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    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 = 128MB total
[    0.000000] Memory: 122080k/122080k available, 8992k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc8800000 - 0xff000000   ( 872 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc06c06c8   (6882 kB)
[    0.000000]       .init : 0xc06c1000 - 0xc06eb000   ( 168 kB)
[    0.000000]       .data : 0xc06ec000 - 0xc0734c38   ( 292 kB)
[    0.000000]        .bss : 0xc0734c5c - 0xc07a4294   ( 446 kB)
[    0.000000] SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:114
[    0.000000] gpiochip_add: registered GPIOs 0 to 31 on device: orion_gpio0
[    0.000000] gpiochip_add: registered GPIOs 32 to 49 on device: orion_gpio1
[    0.000000] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 21474ms
[    0.000000] Console: colour dummy device 80x30
[   19.243166] Calibrating delay loop... 1191.11 BogoMIPS (lpj=5955584)
[   19.333091] pid_max: default: 32768 minimum: 301
[   19.333216] Security Framework initialized
[   19.333236] SELinux:  Disabled at boot.
[   19.333299] Mount-cache hash table entries: 512
[   19.333667] Initializing cgroup subsys cpuacct
[   19.333682] Initializing cgroup subsys devices
[   19.333694] Initializing cgroup subsys freezer
[   19.333702] Initializing cgroup subsys net_cls
[   19.333772] CPU: Testing write buffer coherency: ok
[   19.334050] Setting up static identity map for 0x511040 - 0x51107c
[   19.335061] devtmpfs: initialized
[   19.336932] NET: Registered protocol family 16
[   19.337677] Kirkwood: MV88F6281-A0, TCLK=200000000.
[   19.337693] Feroceon L2: Enabling L2
[   19.337730] Feroceon L2: Cache support initialised.
[   19.342055] bio: create slab <bio-0> at 0
[   19.342402] vgaarb: loaded
[   19.342679] SCSI subsystem initialized
[   19.343015] usbcore: registered new interface driver usbfs
[   19.343110] usbcore: registered new interface driver hub
[   19.343205] usbcore: registered new device driver usb
[   19.343782] Switching to clocksource orion_clocksource
[   19.368887] NET: Registered protocol family 2
[   19.369117] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[   19.369700] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[   19.369800] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[   19.369854] TCP: Hash tables configured (established 4096 bind 4096)
[   19.369864] TCP reno registered
[   19.369874] UDP hash table entries: 256 (order: 0, 4096 bytes)
[   19.369897] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[   19.370126] NET: Registered protocol family 1
[   19.370442] RPC: Registered named UNIX socket transport module.
[   19.370453] RPC: Registered udp transport module.
[   19.370461] RPC: Registered tcp transport module.
[   19.370468] RPC: Registered tcp NFSv4.1 backchannel transport module.
[   19.370534] NetWinder Floating Point Emulator V0.97 (double precision)
[   19.371087] audit: initializing netlink socket (disabled)
[   19.371122] type=2000 audit(0.120:1): initialized
[   19.379665] VFS: Disk quotas dquot_6.5.2
[   19.379905] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[   19.382589] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[   19.383706] JFFS2 version 2.2. (NAND) (SUMMARY)  \0xc2\0xa9 2001-2006 Red Hat, Inc.
[   19.384285] fuse init (API version 7.18)
[   19.384757] SGI XFS with security attributes, large block/inode numbers, no debug enabled
[   19.386140] msgmni has been set to 238
[   19.387410] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[   19.387424] io scheduler noop registered
[   19.387431] io scheduler deadline registered
[   19.387467] io scheduler cfq registered (default)
[   19.387526] mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver
[   19.387562] mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver
[   19.423885] mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
[   19.463863] mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )
[   19.503853] mv_xor mv_xor.2: Marvell XOR: ( xor cpy )
[   19.543853] mv_xor mv_xor.3: Marvell XOR: ( xor fill cpy )
[   19.544190] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[   19.564715] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
[   20.058742] console [ttyS0] enabled
[   20.063329] ONFI flash detected
[   20.066604] ONFI param page 0 valid
[   20.070114] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08AAD)
[   20.077828] Scanning device for bad blocks
[   20.234281] 4 cmdlinepart partitions found on MTD device orion_nand
[   20.240576] Creating 4 MTD partitions on "orion_nand":
[   20.245755] 0x000000000000-0x000000100000 : "u-boot"
[   20.251591] 0x000000100000-0x000000500000 : "uImage"
[   20.257410] 0x000000500000-0x000002500000 : "rootfs"
[   20.263121] 0x000002500000-0x000010000000 : "data"
[   20.269005] UBI: attaching mtd2 to ubi0
[   20.272861] UBI: physical eraseblock size:   131072 bytes (128 KiB)
[   20.279174] UBI: logical eraseblock size:    129024 bytes
[   20.284605] UBI: smallest flash I/O unit:    2048
[   20.289327] UBI: sub-page size:              512
[   20.293969] UBI: VID header offset:          512 (aligned 512)
[   20.299827] UBI: data offset:                2048
[   20.339653] UBI: max. sequence number:       0
[   20.344130] UBI error: ubi_read_volume_table: the layout volume was not found
[   20.351404] UBI error: ubi_init: cannot attach mtd2
[   20.356487] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[   20.363382] mv643xx_eth smi: probed
[   20.369005] mv643xx_eth_port mv643xx_eth_port.0: eth0: port 0 with MAC address 00:10:75:1a:d2:81
[   20.377894] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   20.384509] orion-ehci orion-ehci.0: Marvell Orion EHCI
[   20.389837] orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
[   20.423840] orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
[   20.443822] orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
[   20.449835] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[   20.456673] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   20.463940] usb usb1: Product: Marvell Orion EHCI
[   20.468664] usb usb1: Manufacturer: Linux 3.3.2-kirkwide ehci_hcd
[   20.474795] usb usb1: SerialNumber: orion-ehci.0
[   20.479887] hub 1-0:1.0: USB hub found
[   20.483666] hub 1-0:1.0: 1 port detected
[   20.487909] Initializing USB Mass Storage driver...
[   20.492898] usbcore: registered new interface driver usb-storage
[   20.498947] USB Mass Storage support registered.
[   20.503867] mousedev: PS/2 mouse device common for all mice
[   20.509515] i2c /dev entries driver
[   20.513476] device-mapper: uevent: version 1.0.3
[   20.518469] device-mapper: ioctl: 4.22.0-ioctl (2011-10-19) initialised: dm-devel@redhat.com
[   20.527030] cpuidle: using governor ladder
[   20.531218] cpuidle: using governor menu
[   20.536397] TCP cubic registered
[   20.539638] NET: Registered protocol family 17
[   20.544160] Registering the dns_resolver key type
[   20.549315] registered taskstats version 1
[   20.554122] console [netcon0] enabled
[   20.557800] netconsole: network logging started
[   20.562353] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[   20.568719] Initializing network drop monitor service
[   20.574022] md: Waiting for all devices to be available before autodetect
[   20.580838] md: If you don't use raid, use raid=noautodetect
[   20.587164] md: Autodetecting RAID arrays.
[   20.591277] md: Scanned 0 and added 0 devices.
[   20.595760] md: autorun ...
[   20.598565] md: ... autorun DONE.
[   20.601944] VFS: Cannot open root device "ubi0:mtdblock2" or unknown-block(0,0)
[   20.609297] Please append a correct "root=" boot option; here are the available partitions:
[   20.617706] 1f00            1024 mtdblock0  (driver?)
[   20.622785] 1f01            4096 mtdblock1  (driver?)
[   20.627879] 1f02           32768 mtdblock2  (driver?)
[   20.632961] 1f03          224256 mtdblock3  (driver?)
[   20.638054] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

one time i tried root=ubi0:rootfs and one time root=ubi0:mtdblock2, both are not working.

I also tried to boot a usb pendrive, but it fails with a similar error. Because i cant use jeffs script (i have no rescue system) i used a image found here: http://wejp.k.vu/dockstar/debian_wheezy_image_for_seagate_dockstar
Maybe someone has another image ? But i think the error is not in the image...

[   18.375563] VFS: Cannot open root device "sda1" or unknown-block(0,0)
[   18.382036] Please append a correct "root=" boot option; here are the available partitions:
[   18.390452] 1f00            1024 mtdblock0  (driver?)
[   18.395552] 1f01            4096 mtdblock1  (driver?)
[   18.400639] 1f02           32768 mtdblock2  (driver?)
[   18.405733] 1f03          224256 mtdblock3  (driver?)
[   18.410814] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[   18.419153] [<c001369c>] (unwind_backtrace+0x0/0xe0) from [<c02c6100>] (panic+0x50/0x194)
[   18.427393] [<c02c6100>] (panic+0x50/0x194) from [<c03e6c08>] (mount_block_root+0x234/0x284)
[   18.435886] [<c03e6c08>] (mount_block_root+0x234/0x284) from [<c03e6de0>] (prepare_namespace+0x124/0x184)
[   18.445512] [<c03e6de0>] (prepare_namespace+0x124/0x184) from [<c03e689c>] (kernel_init+0x12c/0x160)
[   18.454696] [<c03e689c>] (kernel_init+0x12c/0x160) from [<c000ee18>] (kernel_thread_exit+0x0/0x8)




K3X

Viewing all articles
Browse latest Browse all 3247

Trending Articles