how to backup/restore your NAND patitions and full device August 03, 2016 01:06PM |
Registered: 8 years ago Posts: 91 |
Re: how to backup/restore your NAND patitions and full device August 03, 2016 01:10PM |
Admin Registered: 14 years ago Posts: 19,317 |
cat /proc/mtd
Re: how to backup/restore your NAND patitions and full device August 04, 2016 08:19AM |
Registered: 8 years ago Posts: 91 |
rescue:/tmp# cat /proc/mtd dev: size erasesize name mtd0: 00100000 00020000 "u-boot" mtd1: 00400000 00020000 "uImage" mtd2: 02000000 00020000 "rootfs" mtd3: 0db00000 00020000 "data"For the chance to possibly clone the whole system onto another device later, I'd like to use the more robust version:
nanddump --noecc --omitoob -l 0x80000 -f mtd0 /dev/mtd0
Re: how to backup/restore your NAND patitions and full device August 04, 2016 01:16PM |
Admin Registered: 14 years ago Posts: 19,317 |
nanddump --noecc --omitoob -f mtd0 /dev/mtd0 nanddump --noecc --omitoob -f mtd1 /dev/mtd1 nanddump --noecc --omitoob -f mtd2 /dev/mtd2 nanddump --noecc --omitoob -f mtd3 /dev/mtd3After dumping, look at the size of each mtd file to verify they are correct.
nandwrite /dev/mtd0 mtd0
Re: how to backup/restore your NAND patitions and full device August 04, 2016 05:57PM |
Registered: 8 years ago Posts: 91 |
Re: how to backup/restore your NAND patitions and full device August 04, 2016 11:01PM |
Admin Registered: 14 years ago Posts: 19,317 |
Re: how to backup/restore your NAND patitions and full device August 07, 2016 03:59AM |
Registered: 8 years ago Posts: 91 |
fw_setenv serverip 192.168.1.2 fw_setenv ipaddr 192.168.1.100 fw_setenv if_netconsole 'ping $serverip' fw_setenv start_netconsole 'setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;' fw_setenv preboot 'run if_netconsole start_netconsole'
kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2016.05-tld-1.goflexnet.mtd0.kwb -p
[Type Ctrl-\ + c to quit] U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:27:19 -0700) Seagate GoFlex Net SoC: Kirkwood 88F6281_A1 DRAM: 128 MiB WARNING: Caches not enabled NAND: 256 MiB In: serial Out: serial Err: serial Net: egiga0 Error: egiga0 address not set. 88E1116 Initialized on egiga0 *** ERROR: `ethaddr' not set ping failed; host 192.168.1.35 is not alive Hit any key to stop autoboot: 0 *** ERROR: `ethaddr' not set Wrong Image Format for bootm command ERROR: can't get kernel image! GoFlexNet>
GoFlexNet> printenv baudrate=115200 bootargs=root=/dev/nfs nfsroot=192.168.1.35: ip=192.168.1.40:192.168.1.35:::::off bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm bootdelay=5 ethact=egiga0 if_netconsole=ping $serverip ipaddr=192.168.1.40 preboot=run if_netconsole start_netconsole serverip=192.168.1.35 start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version; stderr=serial stdin=serial stdout=serial Environment size: 580/131068 bytes GoFlexNet> version U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:27:19 -0700) Seagate GoFlex Net gcc (Debian 4.9.2-10) 4.9.2 GNU ld (GNU Binutils for Debian) 2.25 GoFlexNet>
env default -f ethaddr env saveSo I probably could reflash it now, if only I knew how to access files and devices.
Device 0 bad blocks: 094e0000 09be0000 0dc00000 0e540000 GoFlexNet>So are these bad blocks true or just caused by the erroneus system?
Re: how to backup/restore your NAND patitions and full device August 07, 2016 02:35PM |
Admin Registered: 14 years ago Posts: 19,317 |
Re: how to backup/restore your NAND patitions and full device August 07, 2016 02:57PM |
Admin Registered: 14 years ago Posts: 19,317 |
cp -a uboot.2016.05-tld-1.environment.scr /media/sdb1/boot/
usb start ext2load usb 0:1 0x800000 /boot/uboot.2016.05-tld-1.environment.scr source 0x800000 printenv
setenv devices 'usb ide' setenv ethaddr xx:xx:xx:xx:xx:xx setenv dtb_file '/boot/dts/kirkwood-goflexnet.dtb' boot
Re: how to backup/restore your NAND patitions and full device August 07, 2016 03:52PM |
Registered: 8 years ago Posts: 91 |
Sending boot message. Please reboot the target.../ Sending boot image... 0 % [......................................................................] 1 % [......................................................................] 3 % [......................................................................] 5 % [......................................................................] 6 % [......................................................................] 8 % [......................................................................] 10 % [......................................................................] 11 % [......................................................................] 13 % [......................................................................] 15 % [......................................................................] 17 % [......................................................................] 18 % [......................................................................] 20 % [......................................................................] 22 % [......................................................................] 23 % [......................................................................] 25 % [......................................................................] 27 % [......................................................................] 29 % [......................................................................] 30 % [......................................................................] 32 % [......................................................................] 34 % [......................................................................] 35 % [......................................................................] 37 % [......................................................................] 39 % [......................................................................] 41 % [......................................................................] 42 % [......................................................................] 44 % [......................................................................] 46 % [......................................................................] 47 % [......................................................................] 49 % [......................................................................] 51 % [......................................................................] 53 % [......................................................................] 54 % [......................................................................] 56 % [......................................................................] 58 % [......................................................................] 59 % [......................................................................] 61 % [......................................................................] 63 % [......................................................................] 64 % [......................................................................] 66 % [......................................................................] 68 % [......................................................................] 70 % [......................................................................] 71 % [......................................................................] 73 % [......................................................................] 75 % [......................................................................] 76 % [......................................................................] 78 % [......................................................................] 80 % [......................................................................] 82 % [......................................................................] 83 % [......................................................................] 85 % [......................................................................] 87 % [......................................................................] 88 % [......................................................................] 90 % [......................................................................] 92 % [......................................................................] 94 % [......................................................................] 95 % [......................................................................] 97 % [......................................................................] 99 % [....................................] [Type Ctrl-\ + c to quit] U-Boot 2016.05-tld-1 (Jun 12 2016 - 13:27:19 -0700) Seagate GoFlex Net SoC: Kirkwood 88F6281_A1 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 Abort ping failed; host 192.168.1.35 is not alive Hit any key to stop autoboot: 0 GoFlexNet> <INTERRUPT> GoFlexNet> <INTERRUPT> GoFlexNet> <INTERRUPT> GoFlexNet> <INTERRUPT> GoFlexNet> <INTERRUPT> GoFlexNet> <INTERRUPT> GoFlexNet> <INTERRUPT> GoFlexNet> <INTERRUPT> GoFlexNet> <INTERRUPT> GoFlexNet> <INTERRUPT> GoFlexNet> <INTERRUPT> GoFlexNet> <INTERRUPT> GoFlexNet> <INTERRUPT> GoFlexNet> <INTERRUPT> GoFlexNet> <INTERRUPT> GoFlexNet> usb start starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 2 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found GoFlexNet> ext2load usb 0:1 0x800000 /boot/uboot.2016.05-tld-1.environment.scr 2845 bytes read in 279 ms (9.8 KiB/s) GoFlexNet> source 0x800000 ## Executing script at 00800000 Unknown command 'bootcmd_exec=run' - try 'help' ## Error: "load_initrd" not defined ## Error: "load_dtb" not defined ## Booting kernel from Legacy Image at 00800000 ... Image Name: uboot.2016.05-tld-1.environment. Created: 2016-08-07 19:42:49 UTC Image Type: ARM Linux Script (uncompressed) Data Size: 2781 Bytes = 2.7 KiB Load Address: 00000000 Entry Point: 00000000 Contents: Image 0: 2773 Bytes = 2.7 KiB Verifying Checksum ... OK Wrong Image Type for bootm command ERROR: can't get kernel image! Unknown command 'bootcmd=run' - try 'help' ## Error: "scan_disk" not defined ## Error: "set_bootargs" not defined ## Error: "bootcmd_exec" not defined Unknown command 'bootcmd_uenv=run' - try 'help' ## Error: "uenv_import" not defined Unknown command 'devices=usb' - try 'help' Unknown command 'disks=0' - try 'help' Unknown command '192.168.1.35' - try 'help' Unknown command 'led_error=orange' - try 'help' Unknown command 'led_exit=green' - try 'help' Unknown command 'led_init=green' - try 'help' Unknown command 'loading' - try 'help' 10228 bytes read in 968 ms (9.8 KiB/s) Unknown command 'load_initrd=echo' - try 'help' 6114335 bytes read in 499 ms (11.7 MiB/s) Unknown command 'load_uimage=echo' - try 'help' 2822232 bytes read in 391 ms (6.9 MiB/s) Unknown command 'preboot_nc=run' - try 'help' Unknown command 'scan_disk=echo' - try 'help' Scan device usb device usb 0:1 1 bytes read in 242 ms (0 Bytes/s) Found bootable drive on usb 0 Unknown command 'bootargs' - try 'help' Unknown command 'ncip' - try 'help'
Re: how to backup/restore your NAND patitions and full device August 07, 2016 04:59PM |
Admin Registered: 14 years ago Posts: 19,317 |
Re: how to backup/restore your NAND patitions and full device August 07, 2016 05:26PM |
Admin Registered: 14 years ago Posts: 19,317 |
Re: how to backup/restore your NAND patitions and full device August 08, 2016 09:13AM |
Registered: 8 years ago Posts: 91 |
[....] Starting OpenBSD Secure Shell server: sshd@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0666 for '/etc/ssh/ssh_host_rsa_key' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored. bad permissions: ignore key: /etc/ssh/ssh_host_rsa_key Could not load host key: /etc/ssh/ssh_host_rsa_key @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0666 for '/etc/ssh/ssh_host_dsa_key' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored. bad permissions: ignore key: /etc/ssh/ssh_host_dsa_key Could not load host key: /etc/ssh/ssh_host_dsa_key . ok 1775 (klogd) . ok [warn] Not starting NFS kernel daemon: no exports. ... (warning). Debian GNU/Linux 7 debian ttyS0 debian login: root Login incorrect
Read from socket failed: Connection reset by peer
Re: how to backup/restore your NAND patitions and full device August 08, 2016 12:37PM |
Registered: 8 years ago Posts: 91 |
rescue:~# fw_printenv arcNumber=3089 baudrate=115200 bootargs=root=/dev/nfs nfsroot=192.168.1.35: ip=192.168.1.40:192.168.1.35:::::off bootcmd=sleep 3; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_pogo; reset 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_pogo=run bootcmd_rescue bootcmd_rescue=run set_bootargs_rescue; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000 bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi; sleep 3 bootdelay=10 bootdev=usb bootfile=uImage-mtd1.img device=0:1 devices=usb ide mmc disks=0 1 2 3 dtb_file=/boot/dts/kirkwood-goflexnet.dtb ethact=egiga0 ethaddr=52:3b:20:9c:11:51 fileaddr=800000 filesize=ca0 if_netconsole=ping $serverip ipaddr=192.168.1.40 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 mainlineLinux=yes mtdids=nand0=orion_nand mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data) nand_erasesize=20000 nand_oobsize=40 nand_writesize=800 nc_ready=1 ncip=192.168.1.35 partition=nand0,2 preboot=run preboot_nc 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 rescue_installed=1 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.35 set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params set_bootargs_rescue=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts sleep_period=3 start_netconsole=setenv ncip $serverip; setenv bootdelay 10; 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 rescue:~#
Re: how to backup/restore your NAND patitions and full device August 08, 2016 11:38PM |
Admin Registered: 14 years ago Posts: 19,317 |
Chuck99
Re: how to backup/restore your NAND patitions and full device August 09, 2016 02:42AM |
Re: how to backup/restore your NAND patitions and full device August 09, 2016 04:03AM |
Admin Registered: 14 years ago Posts: 19,317 |
printenvand then go ahead boot the USB rootfs (I assume you have already created the Debian 4.4 rootfs on USB).
bootAnd post the entire log here.
Re: how to backup/restore your NAND patitions and full device August 09, 2016 01:26PM |
Registered: 8 years ago Posts: 91 |
Re: how to backup/restore your NAND patitions and full device August 09, 2016 07:14PM |
Registered: 8 years ago Posts: 102 |
Re: how to backup/restore your NAND patitions and full device August 09, 2016 07:28PM |
Admin Registered: 14 years ago Posts: 19,317 |
Re: how to backup/restore your NAND patitions and full device August 10, 2016 08:03PM |
Registered: 8 years ago Posts: 102 |
Re: how to backup/restore your NAND patitions and full device August 13, 2016 01:46PM |
Registered: 8 years ago Posts: 102 |
Re: how to backup/restore your NAND patitions and full device August 13, 2016 03:38PM |
Admin Registered: 14 years ago Posts: 19,317 |
Re: how to backup/restore your NAND patitions and full device August 13, 2016 08:42PM |
Registered: 8 years ago Posts: 102 |
Re: how to backup/restore your NAND patitions and full device August 21, 2016 02:58PM |
Registered: 8 years ago Posts: 102 |
Re: how to backup/restore your NAND patitions and full device August 21, 2016 04:50PM |
Admin Registered: 14 years ago Posts: 19,317 |
Quote
Updated 20 Feb 2016:
This Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 is to keep in sync with kernel Linux-4.4.0-kirkwood-tld-1.
Basic minimal Debian Kirkwood rootfs for most Kirwood plugs
suand then enter your user password. And then verify you are root
whoami
Re: how to backup/restore your NAND patitions and full device August 22, 2016 01:56AM |
Registered: 8 years ago Posts: 102 |
Re: how to backup/restore your NAND patitions and full device August 22, 2016 05:06PM |
Registered: 8 years ago Posts: 102 |
Re: how to backup/restore your NAND patitions and full device August 22, 2016 06:52PM |
Admin Registered: 14 years ago Posts: 19,317 |
Re: how to backup/restore your NAND patitions and full device August 22, 2016 09:06PM |
Registered: 8 years ago Posts: 102 |