by PogoDancer » Sat Mar 21, 2015 12:11 am
$this->bbcode_second_pass_quote('moonman', 'N')ew uboot cannot chainload stock uboot because it is too different. I believe it is possible to chainload dockstar uboot to boot stock
Arch's uBoot lacking fsload, one would have to see whether there's a raw read from NAND or ext2load from USB (though the latter would be a cumbersome kind of rescue system) to do the trick; otherwise bodhi's uBoot should be able to boot them all.
$this->bbcode_second_pass_quote('moonman', 'I')f you want stock just stay with stock, if not - rescue system is here.
Can't stay with
what's left of stock since for my machine too it did get damaged by mount from Arch (probably rw due to bug at
viewtopic.php?f=18&t=3490&start=10#p20032) with mismatched partitioning (and after
http://archlinuxarm.org/os/armv5te/boot ... ogo_e02.sh failed to copy /dev/mtd0 to a file on what was /dev/mtd2 in stock at install, or at least to USB).
So I might as well try out your rescue system as I will have to reflash anyway at 0x000000100000-0x000008000000 (why do ARM kernels always show one byte more than actual end address of partition; shouldn't that be 0x7ffffff
), and possibly even "dedicate that particular Pogo to Arch" (rather than restore stock as a failsafe, though I resent how Arch tried to force my hand).
Is the following supposed to happen and be answered with y, or is there any benefit/need to flash_erase in advance?
$this->bbcode_second_pass_code('', 'ubiformat /dev/mtd1
ubiformat: mtd1 (nand), size 133169152 bytes (127.0 MiB), 1016 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 1015 -- 100 % complete
ubiformat: 936 eraseblocks are supposedly empty
ubiformat: warning!: 80 of 1016 eraseblocks contain non-UBI data
ubiformat: continue? (y/N)')
Just would have appreciated a clearer approach to preserve stock in the first place.
$this->bbcode_second_pass_quote('installing the rescue image', 'w')ill erase everything that was previously in NAND
This statement is hopefully just oversimplified in omitting a first 8 Mbits of difference, as /dev/mtd0 shouldn't be touched.
$this->bbcode_second_pass_quote('moonman', 'T')TL adapter is 5 bucks on ebay
...and mostly a clumsier alternative to uBoot netconsole on E02 which can't boot from serial anyway, i.e. where anything but JTAG is useless when "a brick is a brick is a brick".
by PogoDancer » Sat Mar 21, 2015 11:20 am
$this->bbcode_second_pass_quote('moonman', 'Y')es i is safe to say 'y' to erase.
There is more to it and I have taken the time to write up on further issues I found with the initial instructions, documenting the expected outputs and interactions as well (IP address subject to each user's setup of course).
As actually there's no wget in Arch by default, and Internet not necessarily up&available all the time, you'll want the following first to avoid not getting the downloader or the download half way through rewriting NAND:
$this->bbcode_second_pass_quote('ssh
root@192.168.2.94', '[')root@alarm ~]# cd ~
[root@alarm ~]# wget
https://dl.dropboxusercontent.com/u/15043728/ArchLinuxArm/kirkwood-rescue/rescue1.4.img.ubifs-bash: wget: command not found
[root@alarm ~]# pacman -S wget
resolving dependencies...
looking for conflicting packages...
Packages (1) wget-1.16.3-1
Total Download Size: 0.45 MiB
Total Installed Size: 2.29 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages ...
wget-1.16.3-1-arm 458.7 KiB 156K/s 00:03 [#########################] 100%
(1/1) checking keys in keyring [#########################] 100%
(1/1) checking package integrity [#########################] 100%
(1/1) loading package files [#########################] 100%
(1/1) checking for file conflicts [#########################] 100%
(1/1) checking available disk space [#########################] 100%
(1/1) installing wget [#########################] 100%
Optional dependencies for wget
ca-certificates: HTTPS downloads [installed]
[root@alarm ~]# wget
https://dl.dropboxusercontent.com/u/15043728/ArchLinuxArm/kirkwood-rescue/rescue1.4.img.ubifs--2015-03-21 07:27:50--
https://dl.dropboxusercontent.com/u/15043728/ArchLinuxArm/kirkwood-rescue/rescue1.4.img.ubifsResolving dl.dropboxusercontent.com (dl.dropboxusercontent.com)... 54.243.46.82, 54.243.255.237, 107.20.165.93, ...
Connecting to dl.dropboxusercontent.com (dl.dropboxusercontent.com)|54.243.46.82|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 120121344 (115M) [application/octet-stream]
Saving to: 'rescue1.4.img.ubifs'
rescue1.4.img.ubifs 100%[=======================>] 114.56M 1.14MB/s in 1m 41s s
2015-03-21 07:29:34 (1.14 MB/s) - 'rescue1.4.img.ubifs' saved [120121344/120121344]
There should be some sanity checks about addressing the proper devices&geometry too...
$this->bbcode_second_pass_quote('ssh
root@192.168.2.94', '[')root@alarm ~]# dmesg | grep 0x00
[ 1.119689] 0x000000000000-0x000000100000 : "u-boot"
[ 1.125169] 0x000000100000-0x000008000000 : "rootfs"
[root@alarm ~]# fw_printenv mtdparts
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
...before proceeding to and all along the way of...
$this->bbcode_second_pass_quote('ssh
root@192.168.2.94', '[')root@alarm ~]# ubiformat /dev/mtd1
ubiformat: mtd1 (nand), size 133169152 bytes (127.0 MiB), 1016 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 1015 -- 100 % complete
ubiformat: 936 eraseblocks are supposedly empty
ubiformat: warning!: 80 of 1016 eraseblocks contain non-UBI data
ubiformat: continue? (y/N) y
ubiformat: warning!: only 0 of 1016 eraseblocks have valid erase counter
ubiformat: erase counter 0 will be used for all eraseblocks
ubiformat: note, arbitrary erase counter value may be specified using -e option
ubiformat: continue? (y/N) y
ubiformat: use erase counter 0 for all eraseblocks
ubiformat: formatting eraseblock 1015 -- 100 % complete
[root@alarm ~]# ls -l /dev/ubi*
crw------- 1 root root 248, 0 Dec 10 22:16 /dev/ubi0
crw------- 1 root root 248, 1 Dec 10 22:16 /dev/ubi0_0
crw------- 1 root root 10, 58 Dec 10 22:16 /dev/ubi_ctrl
[root@alarm ~]# ubiattach -p /dev/mtd1
UBI device number 0, total 1016 LEBs (131088384 bytes, 125.0 MiB), available 992 LEBs (127991808 bytes, 122.1 MiB), LEB size 129024 bytes (126.0 KiB)
[root@alarm ~]# ubimkvol /dev/ubi0 -m -N rootfs
Set volume size to 127991808
Volume ID 0, size 992 LEBs (127991808 bytes, 122.1 MiB), LEB size 129024 bytes (126.0 KiB), dynamic, name "rootfs", alignment 1
[root@alarm ~]# ubiupdatevol /dev/ubi0_0 rescue1.4.img.ubifs
[root@alarm ~]# shutdown -h now
Connection to 192.168.2.94 closed by remote host.
Connection to 192.168.2.94 closed.