NAS 540 won't boot
BjoWis
Posts: 33 Freshman Member
Hi,
My NAS540 won't boot properly and I have hooked up the serial port and exported the bootlog. Can someone please help me fixing the problem?
Any help would be greatly appreciated, since I am quite new to this.
booting kernel of type uimage from /dev/nand0.kernel1.bb
Bad Header Checksum
Failed.
booting kernel of type uimage from /dev/nand0.kernel2.bb
Bad Header Checksum
My NAS540 won't boot properly and I have hooked up the serial port and exported the bootlog. Can someone please help me fixing the problem?
Any help would be greatly appreciated, since I am quite new to this.
booting kernel of type uimage from /dev/nand0.kernel1.bb
Bad Header Checksum
Failed.
booting kernel of type uimage from /dev/nand0.kernel2.bb
Bad Header Checksum
0
All Replies
-
As that box is fairly old, I suppose you have upgraded the box at least once, I guess? That means both 'slots' with kernels are filled, and apparently both are damaged. Don't know what that means.You can try to tftp a kernel, boot that, and then upgrade the firmware, if the webinterface comes up. If the webinterface doesn't come up, you can use a 'flash stick'To tftp a kernel you need a tftp server. Google for that, to find one for your platform. It's a small piece of software.In this post you can find the command to pull the kernel from the server, and boot it. Elsewhere in that thread you can find a download link for that kernel.BTW, seeing your log, it seems to me barebox is trying to fetch a kernel by tftp:warning: No MAC address set. Using random address 3E:25:A4:02:6E:3F
T T DHCP client bound to address 192.168.1.83
DHCP client bound to address 192.168.1.83
T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T T TThose T's are typically timeout messages from a tftp client. So if your dhcp server supports tftp (for instance a router running OpenWrt), you can simply provide the kernel with the right name (which could be found in the tftp server log) and the NAS will automagically fetch a kernel when it can't find one in flash. Network boot!
0 -
Hmm... I've now made some progress, kernel was fetched via tftp. But it runs into some problems when flashing.
I used the kernel provided by you - renamed it to uImage.520.bin from uImage.520ABAG1C0.bin
See attached log.[033mMount system partition...[0mcrw-rw---- 1 root root 10, 58 Jul 12 2012 /dev/ubi_ctrlubiattach: error!: cannot attach mtd7error 19 (No such device)mount: unknown filesystem type 'ubifs'NAND Flash Corrupt...the sys-root image /dev/mtdblock7 is currupt !!Open /dev/mtd2 voidOpen /dev/mtd2 voidchange boot image and reboot !!0 -
Hmm, there is more wrong than 'just' the kernels in flash. The commandline should specify the flash partitions, which it doesn't. Yours isconsole=ttyS0,115200n8, init=/etc/preinit pcie_gen1_only=yes mac_addr=,,it should beconsole=ttyS0,115200n8, init=/etc/preinit pcie_gen1_only=yes mac_addr=,, ip=dhcp root=ubi0:rootfs ubi.mtd=2,2048 rootfstype=ubifs rw noinitrd mtdparts=spi0.0:256k(uloader)ro,512k(barebox)ro,256k(env);comcertonand:10M(config),10M(kernel1),110M(rootfs1),10M(kernel2),110M(rootfs2),-(reserved) usb3_internal_clk=yes(Both are single lines). Here you can find a serial bootlog of a healthy 540.The commandline is build by barebox using it's environment variables. So I *think* you've got a damaged environment. And possibly your kernels aren't damaged at all. Their addresses are also stored in that environment.In this thread repairing the environment is discussed. I remember there was also a thread in which tftp was used to transfer a binary dump of a healthy environment partition, and flash is using the bootloader. But I can't find that now. This forum is at the moment painfully slow for me.
0 -
Hmm... now my barebox don't have any LAN?Unknown command 'export' - try 'help'Disabling eee function of phy 4 ...Disabling eee function of phy 6 ...Hit any key to stop autoboot: 1booting kernel of type uimage from /dev/nand0.kernel1.bbBad Header ChecksumFailed.booting kernel of type uimage from /dev/nand0.kernel2.bbBad Header Checksumwarning: No MAC address set. Using random address 6A:D6:AC:D9:E7:F7phy0: Autonegotiation timeoutPHY auto-negotiation errorI've tried the LAN cable on other devices and it's working properly. And the phy command within Barebox is a bit confusing for a noob like me.Barebox-C2K >/ phy
Usage:
phy stat show all the phy status
phy init phyno init the PHYs. For WAN, the PHY no is 4
for LAN, the PHY no to be 0 to set PHY0-3
phy read phyno reg read the PHY register
phy write phyno reg data write the PHY registerAny idea?0 -
Have you tried both ports? It is possible that a simple power recycle isn't enough to fully reset the phy. Unplug the powersupply for at least 10 seconds. If that doesn't work I don't know.When I remember well the heatsink of the SoC has to be removed to be able to connect the serial port. Did you feel if it's not getting too hot?0
-
Ok, it might have been some strange yesterday - because when I tried now it works again
So I tried copy the uImage to a specific address, but that resulted in the followingBarebox-C2K >/ eth0.ipaddr=192.168.1.191
Barebox-C2K >/ eth0.serverip=192.168.1.20
Barebox-C2K >/ tftp -f uImage.520.bin -a 30010000
tftp: invalid option -- f
tftp: invalid option -- a
warning: No MAC address set. Using random address C6:DC:65:89:74:E4
TFTP from server 192.168.1.20 ('uImage.520.bin' -> '30010000')
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#
Barebox-C2K >/ bootm 30010000
ERROR: out of memory
TFTP didn't like the options -f and -a
And I ran out of memory, trying multiple random addresses (80010000, 70010000, 60010000, 50010000) all with the same result "out of memory"0 -
faierbol found them to work, and where I pointed to.
0 -
So @faierbol did you manage to repair environment and the faulty commandline? I have run into the same issue. Any help/guildline would be appreciated.Mine isconsole=ttyS0,115200n8, init=/etc/preinit pcie_gen1_only=yes mac_addr=,,
While it should be
console=ttyS0,115200n8, init=/etc/preinit pcie_gen1_only=yes mac_addr=,, ip=dhcp root=ubi0:rootfs ubi.mtd=2,2048 rootfstype=ubifs rw noinitrd mtdparts=spi0.0:256k(uloader)ro,512k(barebox)ro,256k(env);comcertonand:10M(config),10M(kernel1),110M(rootfs1),10M(kernel2),110M(rootfs2),-(reserved) usb3_internal_clk=yes
0
Categories
- All Categories
- 415 Beta Program
- 2.4K Nebula
- 144 Nebula Ideas
- 94 Nebula Status and Incidents
- 5.6K Security
- 237 USG FLEX H Series
- 267 Security Ideas
- 1.4K Switch
- 71 Switch Ideas
- 1.1K Wireless
- 40 Wireless Ideas
- 6.3K Consumer Product
- 247 Service & License
- 384 News and Release
- 83 Security Advisories
- 29 Education Center
- 10 [Campaign] Zyxel Network Detective
- 3.2K FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 83 About Community
- 71 Security Highlight