NSA325 unbricked but with corrupted UBoot environment

Ask questions about Arch Linux ARM. Please search before making a new topic.

Re: NSA325 unbricked but with corrupted UBoot environment

Postby moonman » Mon Apr 20, 2020 9:57 am

$this->bbcode_second_pass_quote('psychokiller', '
')why do you say I should uncomment the "dockstar line" in /etc/fw_env.config? Does NSA325 has the same mtd scheme as dockstar?

Because, as I mentioned in the previous post, all kirkwood devices were standartized and the address where the env is located on NSA325 is identical to dockstar (and the rest of kirkwood devices). Echoing the address and env size into the file, as summers suggested, accomplishes the same thing.

$this->bbcode_second_pass_quote('psychokiller', '
')Since I already have uboot from uboot-nsa325 flashed and it seems in the proper place (well, at the beginning of the mtd), I think I can just flash the environment using these commands:

I was a little worried that you might have reflashed a different (older) u-boot because you linked to the initial setup scripts but then I remembered that the initial script doesn't flash a new u-boot but only changes the environment (so it probably didn't do anything at all). So there is probably no need to reflash the uboot itself, not that it would hurt anything anyway.

But yes, what you wrote is what you need to do.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: NSA325 unbricked but with corrupted UBoot environment

Postby summers » Mon Apr 20, 2020 11:59 am

Looks like Zyxel has several ranges of MAC address - guess I shouldn't be surprised. [Actually yours is an NSA325, but mine a NSA325v2 - which probably explains the difference].

Only thing I not you have got wrong is:
$this->bbcode_second_pass_code('', 'fw_setenv ethaddr C8:6C:87:xx:xx:xx')
As you are not taking it from a variable. Oh yes after writing, you can always check with $this->bbcode_second_pass_code('', 'fw_printenv') - now you seen the original uboot variables, you can check that the new ethadr looks the same.

Otherwise looks good - very close to solving the problem, and make the box with a successful upgrade to uboot. Oh yes, I guess trying to look at the env variables at 0xc0000 failed - as you had a CRC variable check sum failure?
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: NSA325 unbricked but with corrupted UBoot environment

Postby psychokiller » Mon Apr 20, 2020 10:41 pm

OK, thanx to both summers and moonman my NSA325 box is running fine with current Arch Linux ARM and "U-Boot 2016.09.01-1 (Oct 10 2016 - 23:14:59 -0600) Arch Linux ARM" flashed to nand along with proper current environment.

Arch Linux ARM runs from a USB Key plugged into one of the rear ports and I am very happy with that, so now I can play with the couple of 2TB drives I have in main SATA slots to try btrfs raid vs mdadm raid.

I still have a few questions for you guys:
1) I would like to install a rescue system like described in https://archlinuxarm.org/forum/viewtopic.php?f=30&t=8383&hilit=armv5+rescue#p44875 and I think I have all the prerequisite in place for that... or am I missing/risking something?
2) would like to make the USB key installation of ALARM resilient to a power outage and I think ext2 isn't so resilient (it isn't on a few Dockstars I have and it requires fsck every time power fails...): is UBoot 2016.09 able to boot from ext4? It seems to me it isnt... or am I wrong?

Thanx for your support again.
Paolo
psychokiller
 
Posts: 40
Joined: Tue Sep 15, 2015 5:39 pm

Re: NSA325 unbricked but with corrupted UBoot environment

Postby moonman » Tue Apr 21, 2020 7:29 am

Glad it's working.
1. Yes, it should work.
2. ext4 is supported.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: NSA325 unbricked but with corrupted UBoot environment

Postby summers » Tue Apr 21, 2020 9:52 am

Yes as moonman says, 2016 can boot from ext4; also can cope with the /boot as a sub directory of root, e.g. doesn't need its own partition. ext4 will only help to a certain extent with random power off; a cow filesystems (such as btrfs) will be better - but still not immune. Best is making the root file system read only, and having directories that need to be written to as tmpfs filesystems - people do this at times, but its a hard nosed set up.

I never installed the rescue systems, as I wanted to keep the stock firware. As much as anything if the system goes ***** up, I just pull a hdd, and rewrite a root file system - and it should boot fine. uboot problems will usually need a uart to the box, but that also isn't hard (just many screws to take out).

Anyway good you have got arch with more modern uboot working.
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Previous

Return to User Questions

Who is online

Users browsing this forum: No registered users and 30 guests