Problems flashing a Freetz image

JPAdie

Neuer User
Mitglied seit
20 Sep 2006
Beiträge
74
Punkte für Reaktionen
0
Punkte
0
Hi
I have a 7270 currently with FW 54.04.59 installed.

i have been trying to build an image using freetz, to include openvpn (as for some reason i cannot find pre-compiled binaries for this).

on ubuntu i cannot get the build process to be successful (after two days of effort). I was successful with an old version of stinkylinux however, and I now have a build image based on the .59 firmware.

However it will not flash using the online firmware updater page. no failure reasons are given (the usual 'unspecified').

Is there any advice that this forum can provide? on debugging perhaps?
or alternatively, must I downgrade to an older firmware (which may be difficult as I don't know where to find the old firware versions...).

or ... lastly ... as all i need is openVPN and bridge-utils, is anyone aware of an alternate method of installing these?

many thanks in advance
Justin
 

McNetic

Mitglied
Mitglied seit
7 Feb 2007
Beiträge
674
Punkte für Reaktionen
0
Punkte
16
If your image is bigger than 8 MB, you can only flash via adam2 bootloader or tools/push_firmware. Anyways, you could try this, as it works more reliable than other ways.
 

olistudent

IPPF-Urgestein
Mitglied seit
19 Okt 2004
Beiträge
14,779
Punkte für Reaktionen
10
Punkte
38
Hi.
1. We can only help you on finding the cause for failure if you post the error message.
2. After this error you have to connect on to the box using telnet e.g. Then you should run "/var/install" or even "sh -x /var/install". There should be some more interesting output.

Regards,
Oliver
 

JPAdie

Neuer User
Mitglied seit
20 Sep 2006
Beiträge
74
Punkte für Reaktionen
0
Punkte
0
Hi

the image is less than 8MB

neither /var/install nor sh -x /var/install produces output. this is the response

Code:
BusyBox v1.1.2 (2008.02.14-10:20+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

ermittle die aktuelle TTY
tty is "/dev/pts/0"
Console Ausgaben auf dieses Terminal umgelenkt
# /var/install
-sh: /var/install: not found
# sh -x /var/install
sh: Can't open /var/install
#
 

JPAdie

Neuer User
Mitglied seit
20 Sep 2006
Beiträge
74
Punkte für Reaktionen
0
Punkte
0
sorry. pressed 'send' too early ...

i should add that i am not familiar with the adam2 bootloader, nor with pushfirmware. but i will happily give either a try. can someone point me to instructions or am i being dim?
 

McNetic

Mitglied
Mitglied seit
7 Feb 2007
Beiträge
674
Punkte für Reaktionen
0
Punkte
16
1) You can edit your own posts.

2) Calling /var/install does only work immediately after a failed update via webinterface, before the box is restartet.

3) Using tools/push_firmware is quite self-explanatory. Just call it once without arguments; it shows you which arguments it needs, and while running, it guides you through the process.
 

olistudent

IPPF-Urgestein
Mitglied seit
19 Okt 2004
Beiträge
14,779
Punkte für Reaktionen
10
Punkte
38
There is a good chance too mess up the box with using push_firmware when normal flash function doesn't work.

If there is no /var/install after you tried to flash the firmware this means that the firmware.image was not extracted properly. Perhaps you can look around in /var/tmp for some log files.

Regards,
Oliver
 

JPAdie

Neuer User
Mitglied seit
20 Sep 2006
Beiträge
74
Punkte für Reaktionen
0
Punkte
0
well, I could not get any useful information out of the web loader.
nor could I get the push_firmware to work at all.

so I instead unpacked the firmware myself in the /var directory (in fact into /var/tmp and then moved the necessary files).

and then ran /var/install and then post_install

this is the output I got

Code:
# ./install
install: have Kernel 2.6
install: check and install new firmware ...
OEM=avm
ANNEX=B
testing acceptance for device Fritz_Box_7270 ...
install type not korrekt: ur8_8MB_xilinx_4eth_2ab_isdn_nt_te_pots_wlan_usb_host_dect_05265
testing acceptance for device Fritz_Box_7270 done
testing acceptance for device Fritz_Box_7270 ...
korrekt install type: ur8_8MB_xilinx_4eth_2ab_isdn_nt_te_pots_wlan_usb_host_dect_05265
device has installtype ur8_8MB_xilinx_4eth_2ab_isdn_nt_te_pots_wlan_usb_host_dect_05265
OK - OEM avm is supported
OK - accept this update for device Fritz_Box_7270 ...
testing acceptance for device Fritz_Box_7270 done
curr: 54.04.59  new: xx.04.59
debug: curr: 54.04.59
debug: new: "XX.04.59"
major_currFWver=54
middle_currFWver=4
minor_currFWver=59
middle_newFWver=4
minor_newFWver=59
check Firmware Version: xx.04.59
DEBUG: 4 >= 4
DEBUG: 59 >= 59
Accept Firmware Version: xx.04.59
install: 26 check files...
File doesn't contain the checksum, adding
Calculated checksum is D1843F15
Adding failed
chksum for file /var/tmp/kernel.image ok
install: 26 getting mtd to install...
install: -----------------------------------------------------
bootloader_size 0x00010000
jffs2_size 0x00060000
Kernel_without_jffs2_size 7405568
kernel_image_size 1
kernel_mtd_size 7798784
Kernel_Start_Add=268500992
Kernel_End_Addr=268500993
Kernel_without_jffs2_End_Addr=275906560
install: -----------------------------------------------------
install: kernel_size=7798784
install: kernel_update_start=268500992
install: kernel_update_len=7405568
install: 26 setting files to install...
install: /var/tmp/kernel.image to start(268500992) size(7405568)
install: check for old settings ...
set INFO led to blink (modul=7, state=4)
needless to say, the image has not worked. the 7270 kept blinking and in the end I power cycled.

any thoughts?
 

olistudent

IPPF-Urgestein
Mitglied seit
19 Okt 2004
Beiträge
14,779
Punkte für Reaktionen
10
Punkte
38
Can you please execute with "sh -x /var/install"? There is some output missing. What is the content of /var/post_install after that?

Regards
Oliver
 

JPAdie

Neuer User
Mitglied seit
20 Sep 2006
Beiträge
74
Punkte für Reaktionen
0
Punkte
0
thanks olistudent

i believe that the image has now taken properly. I downloaded the image using wget, untar'd it and then laid it out by hand in /var and /var/tmp.

but i am still having concerns. so i'll beg a little more assistance please!

the first telnet to the box asks me to change the root password. i try and this is what i get
Code:
Console Ausgaben auf dieses Terminal umgelenkt
Default password detected. Please enter a new password for 'root'.
Changing password for root
New password:
Bad password: too short
Retype password:
Password for root changed by root
mkdir: cannot create directory '/tmp/flash/': Read-only file system
cp: cannot stat 'passwd': No such file or directory
cp: cannot stat 'group': No such file or directory
cp: cannot stat 'shadow': No such file or directory
cp: cannot stat 'gshadow': No such file or directory
tar: can't open '/tmp/.save.tmp': Read-only file system
/usr/bin/modsave: line 12: cannot open /tmp/.save.tmp: no such file
/usr/bin/modsave: let: line 12: syntax error: size=
Writing /var/flash/freetz...cat: can't open '/tmp/.save.tmp': No such file or directory
done.
 bytes written.
/var/mod/root #
I'm trying to save some certificates into the openvpn settings in freetz. the web screens tell me that i don't have the right security level.

so i've tried this
Code:
echo 0 > /tmp/flash/security
modsave
but as the directory flash does not exist in tmp it fails.

Code:
/tmp # echo 0 > /tmp/flash/security
-sh: cannot create /tmp/flash/security: nonexistent directory
i've tried writing a security file directly into /var/flash too, but this does not seem to help. Any thoughts? i have concerns that the filesystem has not laid out properly.

secondly, when creating an opevpn config i get the following message

Code:
Saving settings...done.
Saving openvpn.cfg.../usr/bin/modconf: line 140: cannot create /var/tmp/flash/openvpn.diff: nonexistent directory
done.
tar: can't open '/tmp/.save.tmp': Read-only file system
/usr/bin/modsave: line 12: cannot open /tmp/.save.tmp: no such file
/usr/bin/modsave: let: line 12: syntax error: size=
cat: can't open '/tmp/.save.tmp': No such file or directory
Writing /var/flash/freetz...done.
 bytes written.
i'm not sure whether this is working properly. /var/flash/freetz is blank when examined with nvi.

further it is not clear to me whether this configurator will not automatically establish the bridge (using TAP) with the lan0 interface. i suspect it does but cannot test without uploading the certificates.

is this is a dead image? have i done something wrong perhaps? i have read that freetz does not 'officially' support firmware 59 but i would be surprised if there were that much different that might cause incompatibility such as this.

As always, your answers and advice would be very much appreciated.

tia
Justin
 

JPAdie

Neuer User
Mitglied seit
20 Sep 2006
Beiträge
74
Punkte für Reaktionen
0
Punkte
0
aha. i can see that the symlink has got messed up. and i can fix with the mount -o bind /var/tmp /tmp command.

can i integrate this into the up script or do i need to recompile?
 

JPAdie

Neuer User
Mitglied seit
20 Sep 2006
Beiträge
74
Punkte für Reaktionen
0
Punkte
0
i have now set up the openvpn config, and started the service, but cannot see the bridge created with the lan interface.

in bridge mode I would have expected the configurator to, ummm, create the bridge! or am I misunderstanding the nature of a bridge? as it stands, I would tunnel in and be assiged a local IP address in the main range but would not have access to the internal network as I'm still at a different 'physical' interface. which kind of defeats the purpose, no? or is it intended that we use routing over bridged networks? so that I should add in
Code:
10.8.7.0 255.255.255.0
to the Local Network box in the Optional routing of IP section?
or perhaps
Code:
TAP 10.8.7.0 255.255.255.0 10.8.7.2
to the remote net (it's not clear to me which way is which!).

if i have guessed right as to the routing vs bridging, is there any easy way to go back to the normal (for me) bridging method of just adding TAP0 to the bridge? can I just add the relevant brctl addif command to the /var/flash/freetz?
 

MaxMuster

IPPF-Promi
Mitglied seit
1 Feb 2005
Beiträge
6,932
Punkte für Reaktionen
0
Punkte
36
Hi,

maybe you better started a new thread or changed the title. I woudn't usually expect an OpenVPN bridging question in a thread "Problems flashing a Freetz image" ;-)

But here we go:

As long as you don't include the (optional) brctl tool, there is nothing done with your bridge interface.
If you have brctl, a config including a tap-device will allways add the tap to the "lan" interface. But even then, this is just a "hack", because normally you should decide, whether and where to include a new interface in a bridge (there might be different interfaces, different bridges and so on).

So, if you don't have brctl you may add the tap interface to the existing bridge "lan" on the box by editing the ar7.cfg and add "tap0" to the "interfaces" in the section "brinterfaces {"
just as described in the openvpn package wiki.

Jörg
 
Zuletzt bearbeitet:

JPAdie

Neuer User
Mitglied seit
20 Sep 2006
Beiträge
74
Punkte für Reaktionen
0
Punkte
0
Thank you Jorg, that's great
 

Zurzeit aktive Besucher

3CX PBX - GRATIS
Linux / Win / Cloud

Statistik des Forums

Themen
232,341
Beiträge
2,021,280
Mitglieder
349,891
Neuestes Mitglied
Kla4Taste