[Frage] Not enough space in 7390

frater

Mitglied
Mitglied seit
23 Nov 2008
Beiträge
455
Punkte für Reaktionen
3
Punkte
18
Until the 7490's arrived I have always been fighting the small space available.
On all Fritzboxes I need the Zabbix agent.
This forces me to remove parts of the software, but this is not enough for the 7390.

Since Sierra arrived I can't use Windows Server's PPTP and I'm forced to use the Fritz!box IPSEC. So I stopped removing the VPN-module

Only recently I added the package stunnel and this is too much.
Although it only needs 150 KB, it is just not available and I can't get a flashable firmware for the 7390.


With ncdu I started going through /home/freetz/trunk/build/modified/filesystem/ and noticed some "large" files in /etc/default.Fritz_Box_7390/avme

Because these tars will be compressed later I need to remove more than a Megabyte to reach that 150 KB I need.

If I could remove some of these files:
Code:
  616.0KiB [##########]  providers-0352.tar
  484.0KiB [#######   ]  providers-049.tar
  344.0KiB [#####     ]  providers-031.tar
  176.0KiB [##        ]  providers-039.tar
  176.0KiB [##        ]  providers-0385.tar
  164.0KiB [##        ]  providers-043.tar
  164.0KiB [##        ]  providers-032.tar
  156.0KiB [##        ]  providers-064.tar

I assume the providers-031.tar is for "the Netherlands" where I come from and my boxes are intended to be used there.

I modified fwmod_custom and now I have enough space left...
Well... actually... it's a snug fit (0 bytes left)

Code:
all() {
        dummy=0
        rm ./filesystem/etc/default.Fritz_Box_7390/avme/providers-0352.tar
        rm ./filesystem/etc/default.Fritz_Box_7390/avme/providers-049.tar
        rm ./filesystem/etc/default.Fritz_Box_7390/avme/providers-039.tar
        rm ./filesystem/etc/default.Fritz_Box_7390/avme/providers-0385.tar
        rm ./filesystem/etc/default.Fritz_Box_7390/avme/providers-043.tar
        rm ./filesystem/etc/default.Fritz_Box_7390/avme/providers-032.tar
        rm ./filesystem/etc/default.Fritz_Box_7390/avme/providers-064.tar
        rm ./filesystem/etc/default.Fritz_Box_7390/avme/providers-0264.tar
        rm ./filesystem/etc/default.Fritz_Box_7390/avme/providers-0357.tar
        rm ./filesystem/etc/default.Fritz_Box_7390/avme/providers-041.tar
        rm ./filesystem/etc/default.Fritz_Box_7390/avme/providers-0372.tar
        rm ./filesystem/etc/default.Fritz_Box_7390/avme/providers-061.tar
        ln -s providers-031.tar ./filesystem/etc/default.Fritz_Box_7390/avme/providers-0352.tar
        ln -s providers-031.tar ./filesystem/etc/default.Fritz_Box_7390/avme/providers-049.tar
        ln -s providers-031.tar ./filesystem/etc/default.Fritz_Box_7390/avme/providers-039.tar
        ln -s providers-031.tar ./filesystem/etc/default.Fritz_Box_7390/avme/providers-043.tar
        ln -s providers-031.tar ./filesystem/etc/default.Fritz_Box_7390/avme/providers-0385.tar
        ln -s providers-031.tar ./filesystem/etc/default.Fritz_Box_7390/avme/providers-032.tar
        ln -s providers-031.tar ./filesystem/etc/default.Fritz_Box_7390/avme/providers-064.tar
        ln -s providers-031.tar ./filesystem/etc/default.Fritz_Box_7390/avme/providers-0264.tar
        ln -s providers-031.tar ./filesystem/etc/default.Fritz_Box_7390/avme/providers-0357.tar
        ln -s providers-031.tar ./filesystem/etc/default.Fritz_Box_7390/avme/providers-041.tar
        ln -s providers-031.tar ./filesystem/etc/default.Fritz_Box_7390/avme/providers-0372.tar
        ln -s providers-031.tar ./filesystem/etc/default.Fritz_Box_7390/avme/providers-061.tar
}

I think I will take the chance to flash this on a box....
I would appreciate it if a developer could chime in and tell me it's OK....

Code:
merging kernel image
  kernel image size: 14.9 MB, max 14.9 MB, free 0.0 MB (15360 bytes)
  WARNING: Not enough free flash space for answering machine!
adding checksum to kernel.image
packing images/7390_06.83-freetz-devel-14382M.en_20170811-145733.image
  image file size: 18.2 MB
done.
 
Zuletzt bearbeitet:
Thanks opto, but I have not much use for a link with generic info.
I have trimmed down the 7390 to the max for years and I wanted to know how I could trim it down a little bit more specific to my needs.
It seems I can get another 180 KB of the firmware by emptying the provider files of other countries. I saw empty files for France (033), so it seems the firmware can handle that properly. That's why I now just make 0-byte files of them.
I want to keep my own country. There is no option for this using the menu-system.

The thing I wrote earlier has now been modified to this:

snippet of fwmod_custom
Code:
all() {
        dummy=0
        COUNTRY=031
        COUNTRY_FILE="providers-${COUNTRY}.tar"
        find ./filesystem/etc/ -mindepth 3 -type f -name providers\*.tar -size +10 | grep -v ${COUNTRY_FILE} >/tmp/fwmod_custom.remove
        while read PROVIDER_TAR ; do
          echo -n '' >${PROVIDER_TAR}
        done</tmp/fwmod_custom.remove
}

Code:
merging kernel image
  kernel image size: 14.8 MB, max 14.9 MB, free 0.0 MB (35840 bytes)
  WARNING: Not enough free flash space for answering machine!
adding checksum to kernel.image
packing images/7390_06.83-freetz-devel-14382M.en_20170811-193042.image
  image file size: 18.1 MB
done.
 
Zuletzt bearbeitet:
As far as I remember you can also do the same trick with /etc/default.${COUNTRY_PREFIX} dirs. Keep /etc/default.${YOUR_COUNTRY_PREFIX}, symlink all other dirs to your-country-dir.

You can also remove /etc/htmltext_${LANG}.db (all except htmltext_en.db), don't forget to switch the language to English before.
 
As far as I remember you can also do the same trick with /etc/default.${COUNTRY_PREFIX} dirs. Keep /etc/default.${YOUR_COUNTRY_PREFIX}, symlink all other dirs to your-country-dir.

You can also remove /etc/htmltext_${LANG}.db (all except htmltext_en.db), don't forget to switch the language to English before.
Thanks....
I will investigate how much I can save with that...

Still...
I never investigated why I have so much problems with space after only adding Zabbix, sudo and dropbear....
I'm removing a lot, like umts, nas, USB-ip, home automation....

I still can't make a flashable firmware for the 7360. Maybe I can after removing the files you proposed.

Another thing...
I now have a 6.5x firmware for the 7390, but I first tried a 6.8x firmware.
That one was working, but it behaved strange.
Changing the password with CLI didn't survive a reboot. Adding a new portforward in the Freetz webif for a specific port resulted in a forward from port 22 to 22 (the default).
I was unable to remove all the lame LAN-clients (the main reason for the upgrade to the newer interface.

I know they are experimental, but that's 6.53 as well. Is 6.83 less stable?
I'm running several 7490's with 6.8x and they work fine.
I'm of course using less "removal features" because I have so much more space.

Are the previously described symptoms known?
Is it more related to the small space than to the firmware itself?
 
Zuletzt bearbeitet:
As far as I remember you can also do the same trick with /etc/default.${COUNTRY_PREFIX} dirs. Keep /etc/default.${YOUR_COUNTRY_PREFIX}, symlink all other dirs to your-country-dir.

You can also remove /etc/htmltext_${LANG}.db (all except htmltext_en.db), don't forget to switch the language to English before.
I investigated this...
By default I only have a /etc/htmltext_en.db of 684 KB, no other languages are available.
I will do the /etc/default.xxx , but I don't expect much gain. These files are only 112 KB and after compression that's probably 15 KB... Still... all extra space is welcome, so I will do that modification....

I will report here how much space I gained.


EDIT: I do have a htmltext_it.db, htmltext_fr.db, htmltext_es.db & htmltext_de.db. Because they were much smaller they didn't show in that ncdu window.... Will target that next...
 
Zuletzt bearbeitet:
Well, I think I nailed it....
I won 192 KB, which is just enough to be able to add the 150 KB of the stunnel.
:):):):)

The 7360's firmware is still too big.
I need to investigate why
:(:(:(:(

EDIT:
By using the option "[*] Remove 2nd Annex firmware" I was able to create a flashable firmware for the 7360 as well. I expected the folder "/build/modified/filesystem/lib/modules/2.6.32.61/kernel/drivers/isdn" to become empty, but this is not the case.
Am I misunderstanding this option? It did remove something, though. The image is significantly smaller and flashable :)
However, I don't dare to flash this file on a remote Fritzbox.:(

I'm already quite glad with the many 7390's I can upgrade now to 6.5x

EDIT 2:
I'm not using "kernel replace" which is most probably the reason why there is no change there. Is that right??? But it is removing ISDN is it??? I'm a bit confused with the ambiguous "2nd Annex". I'm used to "Annex A" and "Annex B".
Is "2nd Annex" the same as "Annex B"? Is this always the case or is it dependant of another option? I have the feeling this ambiguity is deliberate because we have boxes that can do both and some older boxes that only can do one.

AFAIK I have removed ISDN by using this option on a 7360 or 7390. This is really the information I need.

@PeterPawn Can you give me some more hints to minimize space and answers to some questions I placed here? Thanks in advance....

Here's a compilation without the modified fwmod_custom
Code:
creating filesystem image (SquashFS3-lzma)
  SquashFS block size: 64 kB (65536 bytes)
merging kernel image
  kernel image size: 14.9 MB, max 14.9 MB, free -0.1 MB (-70656 bytes)
ERROR: kernel image is 70656 bytes too big. See http://freetz.org/wiki/FAQ#Filesystemimagetoobig for details.
make: *** [firmware-nocompile] Error 1

This is with customization:
Code:
creating filesystem image (SquashFS3-lzma)
  SquashFS block size: 64 kB (65536 bytes)
merging kernel image
  kernel image size: 14.8 MB, max 14.9 MB, free 0.1 MB (125952 bytes)
  WARNING: Not enough free flash space for answering machine!
adding checksum to kernel.image
packing images/7390_06.53-freetz-devel-14382M.en_20170812-114350.image
  image file size: 17.5 MB
done.


Here's the code:

Code:
all() {
        dummy=0
        COUNTRY=031
        LANGUAGE=en

        CUSTOM_REMOVALS=true
        # CUSTOM_REMOVALS=       # uncomment this line to remove these customizations

        if [ ${CUSTOM_REMOVALS} ] ; then

          # removing providers-xxx.tar
          COUNTRY_FILE="providers-${COUNTRY}.tar"
          find ./filesystem/etc/ -mindepth 3 -type f -name providers\*.tar -size +10 | grep -v ${COUNTRY_FILE} >/tmp/fwmod_custom.remove
          while read PROVIDER_TAR ; do
            echo "  Zapping ${PROVIDER_TAR} to save space"
            echo -n '' >${PROVIDER_TAR}
          done</tmp/fwmod_custom.remove

          # removing folders default.xxx
          COUNTRY_DIR="default.${COUNTRY}"
          if [ -d ./filesystem/etc/${COUNTRY_DIR} ] ; then
            find ./filesystem/etc/ -maxdepth 1 -mindepth 1 -type d -name default.\* | egrep '\.[0-9]+$' | grep -v ${COUNTRY_DIR} >/tmp/fwmod_custom.remove

            while read COUNTRY_DISCARD ; do
              echo "  Replacing ${COUNTRY_DISCARD} with a symlink to ${COUNTRY_DIR} to save space"
              rm -rf ${COUNTRY_DISCARD}
              ln -s ${COUNTRY_DIR} ${COUNTRY_DISCARD}
            done</tmp/fwmod_custom.remove
          fi

          # replacing files htmltext_xx.db with a symlink
          LANGUAGE_FILE="htmltext_${LANGUAGE}.db"
          if [ -f ./filesystem/etc/${LANGUAGE_FILE} ] ; then
            find ./filesystem/etc/ -maxdepth 1 -mindepth 1 -type f -name htmltext_\*.db | grep -v ${LANGUAGE_FILE} >/tmp/fwmod_custom.remove

            while read LANGUAGE_DISCARD ; do
              echo "  Replacing ${LANGUAGE_DISCARD} with a symlink to ${LANGUAGE_FILE} to save space"
              rm -f ${LANGUAGE_DISCARD}
              ln -s ${LANGUAGE_FILE} ${LANGUAGE_DISCARD}
            done</tmp/fwmod_custom.remove
          fi
        fi

}
 
Zuletzt bearbeitet:

Zurzeit aktive Besucher

Statistik des Forums

Themen
246,472
Beiträge
2,252,661
Mitglieder
374,238
Neuestes Mitglied
Bfkfifnfb
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.