firmware upgrade broke box?

silverstr8p
Member
 
Posts: 20
Joined: Fri Sep 25, 2015 8:11 pm
Has thanked: 3 times
Been thanked: 2 times

firmware upgrade broke box?

Fri Sep 25, 2015 9:18 pm

I tried to upgrade on the DC 8-port switch from 1.3.2 -> 1.3.3, but somehow it hung while writing something and rebooted. Now I get a 404 on the GUI. I logged in via ssh and attempted to do a tftp upgrade like:

Code: Select all
 
# cmdline
admin@GK_netonix:/www# tftp 10.1.10.7 -g -r wispswitch-1.3.3.bin -l /tmp/wispswitch-1.3.3.bin
admin@GK_netonix:/www# ls /tmp
TZ fstab lock resolv.conf run sfpstatus wispswitch-1.3.3.bin
config lacpportstatus.json log resolv.conf.auto running-config.json state
admin@GK_netonix:/# firmware_upgrade /tmp/wispswitch-1.3.3.bin
tar: removing leading '/' from member names
Unpacking firmware ...
Running preflash script ...
Unlocking /dev/mtd8 ...
Writing from redboot_recovery_config to /dev/mtd8 ...
Could not open mtd device: linux
Can't open device for writing!
Error flashing kernel

ruh-roh, no? Sounds bad. Here's how my filesystem is mounted.
Code: Select all
admin@GK_netonix:/# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
tmpfs on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=600)
/dev/mtdblock6 on /jffs type jffs2 (rw)
mini_fo:/jffs on / type mini_fo (rw)
admin@GK_netonix:/#
 

Tried a reboot. Same issue. How screwed am I? How would I mount/recover that flash partition? Here's what I have:
Code: Select all
 
admin@GK_netonix:/www# cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00040000 "RedBoot"
mtd1: 00040000 00040000 "config"
mtd2: 00140000 00040000 "linux_recovery"
mtd3: 00200000 00040000 "rootfs_recovery"
mtd4: 00140000 00040000 "linux"
mtd5: 00600000 00040000 "rootfs"
mtd6: 00440000 00040000 "rootfs_data"
mtd7: 00040000 00040000 "FIS directory"
mtd8: 00001000 00001000 "RedBoot config"
mtd9: 00040000 00040000 "Redundant FIS"
 

User avatar
Eric Stern
Employee
Employee
 
Posts: 532
Joined: Wed Apr 09, 2014 9:41 pm
Location: Toronto, Ontario
Has thanked: 0 time
Been thanked: 130 times

Re: firmware upgrade broke box?

Fri Sep 25, 2015 9:38 pm

This should be recoverable.

tftp the upgrade file as you did before, then issue these commands:

cd /tmp
tar -xjf wispswitch*.bin
mtd -p write kernel.img /dev/mtd4
mtd -q write fisdir /dev/mtd7
mtd -q write redundant_fisdir /dev/mtd9
mtd -p write rootfs.img /dev/mtd5
mtd -q write redboot_config /dev/mtd8
reboot

Then you should be back up and running.

silverstr8p
Member
 
Posts: 20
Joined: Fri Sep 25, 2015 8:11 pm
Has thanked: 3 times
Been thanked: 2 times

Re: firmware upgrade broke box?

Sun Sep 27, 2015 12:54 am

The weird thing is I logged back in and there doesn't seem to be much mounted space, so:

Code: Select all
 
admin@GK_netonix:/www# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 1.2M 1.2M 0 100% /
/dev/root 1.2M 1.2M 0 100% /rom
/dev/mtdblock6 4.3M 796.0k 3.5M 18% /jffs
mini_fo:/jffs 1.2M 1.2M 0 100% /
 


So I get write errors now when trying to write to /tmp now. Tried reboot and same mount df -h scenario. Is there some way I can mount some filesystem to use temporarily while I restore stuff and/or create a blank part of the filesystem on the flash somewhere?

User avatar
Eric Stern
Employee
Employee
 
Posts: 532
Joined: Wed Apr 09, 2014 9:41 pm
Location: Toronto, Ontario
Has thanked: 0 time
Been thanked: 130 times

Re: firmware upgrade broke box?

Sun Sep 27, 2015 9:24 am

/tmp is, well, temporary, and should be cleared after each reboot, so you should have plenty of space. /tmp doesn't show up in df, its limited by the amount of RAM.

silverstr8p
Member
 
Posts: 20
Joined: Fri Sep 25, 2015 8:11 pm
Has thanked: 3 times
Been thanked: 2 times

Re: firmware upgrade broke box?

Mon Sep 28, 2015 3:07 am

Right, well when I tried tftp to the /tmp folder, it just timed out, will re-attempt. Edit: it looks like I was having routing issues to my tftp server, so it didn't write the file to /tmp because it didn't get it off the server.

In case anyone else is trying this, here's what it looks like. Some of the steps take a few minutes to complete, hence the progress percentage:
Code: Select all
 
admin@GK_netonix:/tmp# tar -xjf wispswitch-1.3.3.bin
admin@GK_netonix:/tmp# ls
TZ kernel.img postflash.sh redundant_fisdir run version.txt
config lacpportstatus.json preflash.sh resolv.conf running-config.json wispswitch-1.3.3.bin
fisdir lock redboot_config resolv.conf.auto sfpstatus
fstab log redboot_recovery_config rootfs.img state
admin@GK_netonix:/tmp# mtd -p write kernel.img /dev/mtd4
Unlocking /dev/mtd4 ...
Writing from kernel.img to /dev/mtd4 ...
23%
46%
69%
93%
100%
admin@GK_netonix:/tmp# mtd -q write fisdir /dev/mtd7
Unlocking /dev/mtd7 ...
Writing from fisdir to /dev/mtd7 ...
admin@GK_netonix:/tmp# mtd -q write redundant_fisdir /dev/mtd9
Unlocking /dev/mtd9 ...
Writing from redundant_fisdir to /dev/mtd9 ...
admin@GK_netonix:/tmp# mtd -p write rootfs.img /dev/mtd5
Unlocking /dev/mtd5 ...
Writing from rootfs.img to /dev/mtd5 ...
4%
8%
12%
17%
21%
25%
29%
34%
38%
42%
46%
51%
55%
59%
63%
68%
72%
76%
80%
85%
89%
93%
97%
100%
admin@GK_netonix:/tmp# mtd -q write redboot_config /dev/mtd8
Unlocking /dev/mtd8 ...
Writing from redboot_config to /dev/mtd8 ...
admin@GK_netonix:/tmp# reboot
 

Note: in general, it takes a couple minutes to do a full reboot, so have patience. On another note, I think this process reset my network settings, so since I'm remote, I'll have someone reset it to what I had so I can continue configuration.

silverstr8p
Member
 
Posts: 20
Joined: Fri Sep 25, 2015 8:11 pm
Has thanked: 3 times
Been thanked: 2 times

Re: firmware upgrade broke box?

Sat Oct 03, 2015 3:03 pm

After the reboot, I can't seem to login to the unit on the default 192.168.1.20 or the IP I set it to of 10.1.10.x. At this point do I need to get console? If so, do I need a standard serial cable, or a crossover? Hopefully I can get this unit working again.

User avatar
sirhc
Employee
Employee
 
Posts: 7420
Joined: Tue Apr 08, 2014 3:48 pm
Location: Lancaster, PA
Has thanked: 1609 times
Been thanked: 1326 times

Re: firmware upgrade broke box?

Sat Oct 03, 2015 3:10 pm

silverstr8p wrote:After the reboot, I can't seem to login to the unit on the default 192.168.1.20 or the IP I set it to of 10.1.10.x. At this point do I need to get console? If so, do I need a standard serial cable, or a crossover? Hopefully I can get this unit working again.


You need a crossover serial cable.
Support is handled on the Forums not in Emails and PMs.
Before you ask a question use the Search function to see it has been answered before.
To do an Advanced Search click the magnifying glass in the Search Box.
To upload pictures click the Upload attachment link below the BLUE SUBMIT BUTTON.

silverstr8p
Member
 
Posts: 20
Joined: Fri Sep 25, 2015 8:11 pm
Has thanked: 3 times
Been thanked: 2 times

Re: firmware upgrade broke box?

Sat Oct 03, 2015 3:13 pm

ok, and what should I be looking for once I login? Should I just use ifconfig to try to set the IP (assuming my filesystem seems basically sane) and try to login via web, or should I try something specific?

User avatar
sirhc
Employee
Employee
 
Posts: 7420
Joined: Tue Apr 08, 2014 3:48 pm
Location: Lancaster, PA
Has thanked: 1609 times
Been thanked: 1326 times

Re: firmware upgrade broke box?

Sat Oct 03, 2015 3:19 pm

You will be in the CLI when you console in
Just use the "?" for help

I would assume you would want to look at the running config

Here is a screen grab of a recent topic where the user could not seem to find how to change from DHCP to Static mode in the CLI so I helped with this picture of how easy it is.

CLICK IMAGE TO VIEW FULL SIZE
CLI IP Mode.jpg
CLI IP Mode.jpg (237.57 KiB) Viewed 23811 times
Support is handled on the Forums not in Emails and PMs.
Before you ask a question use the Search function to see it has been answered before.
To do an Advanced Search click the magnifying glass in the Search Box.
To upload pictures click the Upload attachment link below the BLUE SUBMIT BUTTON.

silverstr8p
Member
 
Posts: 20
Joined: Fri Sep 25, 2015 8:11 pm
Has thanked: 3 times
Been thanked: 2 times

Re: firmware upgrade broke box?

Sun Oct 25, 2015 9:47 pm

finally got my female/female 9-pin serial null modem from Amazon.

I have a Tripp-Lite Keyspan USA-19HS USB -> Serial 9-pin converter. (in case anyone else is trying this)

I connected (after installing the Windows driver for the USB -> serial converter) using PuTTY with

115200 baud
COM3

(BTW, normal Mac screen /dev/tty.USA19H141P1.1 115200 doesn't work like it works on Cisco console, in case anyone tries that)

and now I have a prompt that says:

Code: Select all
 
RedBoot>
 


'diag' passed fine. 'version' shows 1_18_Vitesse

So I tried 'reset' and it shows:

Code: Select all
 
RedBoot> reset
+M25PXX : Init device with JEDEC ID 0x202018.
Luton26 board detected (VSC7425 Rev. D).

RedBoot(tm) bootstrap and debug environment [ROMRAM]
Non-certified release, version 1_18-Vitesse - built 05:56:33, Jan 31 2014

Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
RedBoot is free software, covered by the eCos license, derived from the
GNU General Public License. You are welcome to change it and/or distribute
copies of it under certain conditions. Under the license terms, RedBoot's
source code and full license terms must have been made available to you.
Redboot comes with ABSOLUTELY NO WARRANTY.

Platform: VCore-III (MIPS32 24KEc) LUTON26
RAM: 0x80000000-0x88000000 [0x80021b68-0x87fafffc available]
FLASH: 0x40000000-0x40ffffff, 64 x 0x40000 blocks
== Executing boot script in 1.000 seconds - enter ^C to abort
RedBoot> fis load -d linux
** Warning - checksum failure. stored: 0x3b80fc8b, computed: 0x917a5131
** Use -f to force decompress despite CRC error.
decompression error: CRC failure
RedBoot> go
No entry point known - aborted
 


Should I force the decompress, or how would I get an updated image for 'fis' linux? tftp doesn't seem to be working as a command.

Here's what 'fis' thinks it has available:

Code: Select all
 
RedBoot> fis list
Name              FLASH addr  Mem addr    Length      Entry point
.FisValid         0x00000000  0x00000000  0x00000000  0x00000000
RedBoot           0x40000000  0x40000000  0x00040000  0x00000000
config            0x40040000  0x00000000  0x00040000  0x00000000
linux_recovery    0x40080000  0x80100000  0x00140000  0x80100000
rootfs_recovery   0x401C0000  0x00000000  0x00200000  0x80021C00
linux             0x403C0000  0x80100000  0x00140000  0x80100000
rootfs            0x40500000  0x00000000  0x00600000  0x80021C00
rootfs_data       0x40B00000  0x00000000  0x00440000  0x00000000
Redundant FIS     0x40F40000  0x40F40000  0x00040000  0x00000000
RedBoot config    0x40F80000  0x40F80000  0x00001000  0x00000000
FIS directory     0x40FC0000  0x40FC0000  0x00040000  0x00000000
 

Next
Return to General Discussion

Who is online

Users browsing this forum: No registered users and 45 guests