Welcome! Log In Create A New Profile

Advanced

Netgear Stora - Bad blocks

Posted by zanco83 
Netgear Stora - Bad blocks
April 26, 2024 05:09AM
Hello,
just a quick review as said in the very detailed instructions for uboot installation.

Scanning device for bad blocks
Bad eraseblock 785 at 0x06220000
Bad eraseblock 851 at 0x06a60000
Bad eraseblock 864 at 0x06c00000
Bad eraseblock 866 at 0x06c40000
Bad eraseblock 944 at 0x07600000
Bad eraseblock 946 at 0x07640000
Bad eraseblock 947 at 0x07660000
Bad eraseblock 968 at 0x07900000
Bad eraseblock 1063 at 0x084e0000
Bad eraseblock 1159 at 0x090e0000
UBI: number of bad PEBs: 10
UBI: number of PEBs reserved for bad PEB handling: 38


Are those bad blocks out of the mtd0, right? so uboot update could be done without any problem, correct?
What kind of problem could I have with those?

Thanks a lot



Edited 1 time(s). Last edit at 04/26/2024 05:13AM by zanco83.
Re: Netgear Stora - Bad blocks
April 26, 2024 12:17PM
I performed the update considering that the blocks where not the one involved in mtd0, but after erasing and writing correctly, fw_setenv seems not to work by ssh console.

-bash-3.2# fw_setenv ipaddr 192.168.178.170
Unlocking flash...
Done
Erasing old environment...
Done
Writing environment to /dev/mtd0...
Done
Locking ...
Done
-bash-3.2# fw_printenv
arcNumber=2097
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=52:3b:20:9c:11:51
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
-bash-3.2# fw_printenv --help
## Error: "--help" not defined
-bash-3.2# fw_printenv ?
## Error: "?" not defined
-bash-3.2# fw_printenv
arcNumber=2097
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=52:3b:20:9c:11:51
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
Re: Netgear Stora - Bad blocks
April 26, 2024 01:09PM
@zanco83,

> -bash-3.2# fw_setenv ipaddr 192.168.178.170
That was the stock OS fw_setenv you're using.

Check the content of
cat /etc/fw_env.config

It's best that you post the session how you flash u-boot here.

And do you have serial console? have you tried running kwboot before doing the flashing?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Netgear Stora - Bad blocks
April 26, 2024 01:24PM
-bash-3.2# cat /etc/fw_env.config
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Notice, that the "Number of sectors" is ignored on NOR.

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

I'm trying to set the env variable before booting into usb debian. Do I need to do that after?
I first erase and flash uboot 2017 and then the default 2016 as written in the step by step instructions

Yes, I've serial console
Yes, I tried kwboot through serial but I've received a protocol error



Edited 2 time(s). Last edit at 04/26/2024 01:27PM by zanco83.
Re: Netgear Stora - Bad blocks
April 26, 2024 01:37PM
> # MTD device name Device offset Env. size Flash
> sector size Number of sectors
> /dev/mtd0 0xc0000 0x20000 0x20000

Looks OK.

>
> I'm trying to set the env variable before booting
> into usb debian. Do I need to do that after?

If you have serial console, then it is OK to set the envs after booting into Debian. The Debian rootfs uses DHCP so the IP address will be assigned by the router. The IP addresses in the envs are only relevant during u-boot booting.

> Yes, I've serial console
> Yes, I tried kwboot through serial but I've
> received a protocol error

After kwboot starts and see protocol error, up-arrow to recall the kwboot command on the terminal and run it again immediately. Try this many times until you get a handshake. And make sure the 3 serial wires are away from the power cord (it could cause noises).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Netgear Stora - Bad blocks
April 26, 2024 02:27PM
Hello,
thanks for your answers and your help.
kwboot, request to reboot the device, so it will be with the new mtd.
Can I reboot by netconsole?
Re: Netgear Stora - Bad blocks
April 26, 2024 03:03PM
> Can I reboot by netconsole?

Don't use netconsole when you have serial console. Serial console willl show everything, netconsole is not good for troubleshooting now. Once you got everything working, you could remove serial console (in this case leave the 3 wires attached for furture debugging).

And then set up netconsole if you wish to see the boot progress, and also recover from a bad kernel installation,....

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Netgear Stora - Bad blocks
May 03, 2024 09:21AM
Thanks Bodhi, everything seems good
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: