Kulim13 / alt-f

Automatically exported from code.google.com/p/alt-f
0 stars 0 forks source link

Cannot save settings #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using firmware 0.1B5 on revB1 hardware, everything works fine except i cannot 
save settings. It fails with message "Error saving settings! No flash space 
available".

any ideas? it would be nice not to have to reconfigure everything on reboot :)

oh, this happens if the firmware is flashed or not (i currently have it flashed)

Original issue reported on code.google.com by tarka.t....@gmail.com on 25 Nov 2010 at 4:57

GoogleCodeExporter commented 9 years ago
Can you please telnet/ssh the box, execute the following commands:

fsck -av /dev/mtdblock0

mkdir /mnt/mtd
mount -r /dev/mtdblock0 /mnt/mtd
ls -l /mnt/mtd
df -h /mnt/mtd
umount /mnt/mtd

loadsave_settings -ll

and post the results?

Thanks

Original comment by whoami.j...@gmail.com on 25 Nov 2010 at 6:24

GoogleCodeExporter commented 9 years ago
fsck -av /dev/mtdblock0
-------------------
/dev/mtdblock0 is clean, check is skipped

ls -l /mnt/mtd
------------

-rwxr-xr-x    1 root     root           36 May 10  2010 Certs.info
-rw-r--r--    1 root     root         1375 May 10  2010 cacert.pem
-rw-r--r--    1 root     root         1743 May 10  2010 cakey.pem
-rw-r--r--    1 root     root            0 May 11  2010 chghostname
-rw-r--r--    1 root     root          897 Nov 10 04:34 config.xml
-rwxr-xr-x    1 root     root          133 May 10  2010 ddns.conf
-rwxr-xr-x    1 root     root          230 Nov  3 20:20 email.conf
-rw-r--r--    1 root     root            9 May 11  2010 ftp_tbl
-rwxr-xr-x    1 root     root           84 Nov 10 16:29 group
-rw-r--r--    1 root     root            6 May 10  2010 hd_magic_num
-rwxr-xr-x    1 root     root           72 May 14  2010 hosts
-rwxr-xr-x    1 root     root           15 May 10  2010 language.conf
-rwxr-xr-x    1 root     root           25 Nov  3 20:20 log.conf
-rw-r--r--    1 root     root           36 May 10  2010 mediaserver.udn
-rwxr-xr-x    1 root     root          236 Nov 10 05:34 mt-daapd.conf
-rwxr-xr-x    1 root     root          249 May 10  2010 mt-daapd.playlist
-rwxr-xr-x    1 root     root           15 May 10  2010 mtdversion
-rw-r--r--    1 root     root            0 May 10  2010 newftp
-rw-r--r--    1 root     root            1 May 10  2010 onedisk
-rwxr-xr-x    1 root     root          284 Nov 10 16:29 passwd
-rwxr-xr-x    1 root     root          172 May 14  2010 pf_param.conf
-rwxr-xr-x    1 root     root          268 Oct  6 12:03 pure-ftpd.conf
-rwxr-xr-x    1 root     root           26 May 10  2010 quota
-rwxr--r--    1 root     root          512 May 10  2010 raidtab
-rwxr-xr-x    1 root     root          308 May 10  2010 raidtab2web
-rwxr-xr-x    1 root     root          239 May 14  2010 rc.init.sh
-rwxr-xr-x    1 root     root           23 May 14  2010 resolv.conf
-rwxr-xr-x    1 root     root            2 May 10  2010 rtc.conf
-rw-r--r--    1 root     root         3050 May 10  2010 server.pem
-rw-r--r--    1 root     root            0 Nov 25 17:56 
set_2010-11-25_17:56:23.tgz
-rwxr-xr-x    1 root     root          231 Nov 10 16:29 shadow
-rwxr-xr-x    1 root     root         1293 Nov  3 20:20 sib.conf
-rwxr-xr-x    1 root     root         1263 Nov  3 20:20 sib2.conf
-rwxr-xr-x    1 root     root          772 Nov  3 20:20 sib_ap.conf
-rwxr-xr-x    1 root     root         1122 Oct 20 11:36 smb.default
-rwxr-xr-x    1 root     root          312 Nov 10 16:29 smbpasswd
-rw-r--r--    1 root     root         2997 Nov 10 04:34 system.log
-rwxr-xr-x    1 root     root           89 May 10  2010 tr069.conf
-rwxr-xr-x    1 root     root         1320 May 10  2010 udhcpd.conf
-rwxr-xr-x    1 root     root         1296 May 10  2010 udhcpd.conf.def
-rw-r--r--    1 root     root           17 May 11  2010 upnp_serialnum.conf
-rw-r--r--    1 root     root           17 May 11  2010 upnpav.conf
-rwxr-xr-x    1 root     root          117 May 11  2010 upnpscript
-rw-r--r--    1 root     root            0 May 10  2010 v3.4
-rwxr-xr-x    1 root     root           32 May 10  2010 version.txt
-rwxr-xr-x    1 root     root            8 May 10  2010 version2.txt

df -h /mnt/mtd
------------
Filesystem                Size      Used Available Use% Mounted on
/dev/mtdblock0           58.0K     55.0K      3.0K  95% /mnt/mtd

loadsave_settings -ll
----------------
-rw-r--r--    1 root     root            0 Nov 25 17:56 
set_2010-11-25_17:56:23.tgz

Original comment by tarka.t....@gmail.com on 26 Nov 2010 at 12:03

GoogleCodeExporter commented 9 years ago
ok, i remounted mtdblock0 as rw and deleted system.log, this seems to have made 
just enough space for the config settings, df now reports:

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mtdblock0              58        58         0 100% /mnt/mtd

Original comment by tarka.t....@gmail.com on 26 Nov 2010 at 12:12

GoogleCodeExporter commented 9 years ago
All those files, but set_*, are from DLink firmware.
As you have not cleared settings, they are still there, occupying scarce flash 
memory space.

Alt-F doesn't automatically remove the vendor's configuration files from flash 
in the eventuality that the user wants to reflash it back.

However, the vendor's firmware keeps a backup of mtdblock0 in mtdblock1 (or the 
other way around). Alt-F only uses (for now) mtdblock0.
It would be interesting to compare the contents of these two devices, and if 
they are equal Alt-F could provide a button in its web interface to copy 
mtdblock1 contents to mtdblock0, or even do it automatically when detecting 
that the user is flashing a vendor firmware.

Are you willing to execute the following commands, after telneting/ssh the box 
as root?

mkdir -p /mnt/mtd0 /mnt/mtd1
mount -r /dev/mtdblock0 /mnt/mtd0
mount -r /dev/mtdblock1  /mnt/mtd1
diff -Nq /mnt/mtd0 /mnt/mtd1
umount /mnt/mtd0 /mnt/mtd1

This would report different and missing files between mtdblock0 and mtdblock1

Thanks

Original comment by whoami.j...@gmail.com on 26 Nov 2010 at 4:16

GoogleCodeExporter commented 9 years ago
the only different files are the missing system.log in mtd0 and 
set_2010-11-26_13:22:35.tgz from mtd1, which is the saved settings i assume.

so, i guess i am free to wipe all the dlink related settings from mtd0, and i 
can restore them if for some reason i want to go back to the original firmware.

Original comment by tarka.t....@gmail.com on 26 Nov 2010 at 4:24

GoogleCodeExporter commented 9 years ago
Good.

I will offer the possibility of recovering the original firmware settings when 
flashing a vendor's firmware (my TODO2 list) and in the settings web page.

Thanks

Original comment by whoami.j...@gmail.com on 26 Nov 2010 at 7:01

GoogleCodeExporter commented 9 years ago
Do not close issue, let others clearly see it.

Original comment by whoami.j...@gmail.com on 29 Nov 2010 at 10:10

GoogleCodeExporter commented 9 years ago
Can't be fixed -- if there is not enough flash space available, the only option 
is to clear the vendors settings, which is a no-go when reloading.

Original comment by whoami.j...@gmail.com on 7 Jan 2011 at 3:33

GoogleCodeExporter commented 9 years ago
The same issue is still true with 01B6

the mount -rw and rm system.log did the trick for me too

good worck guys 
Thnak you

Original comment by moosb...@gmail.com on 27 Feb 2011 at 7:01

GoogleCodeExporter commented 9 years ago
Now, when saving settings, the file "system.log" is removed from flash.
This will mitigate the problem, but will not solve it.

Flash space for settings is scarce (64KB) and is used simultaneously by Alt-F 
and the vendor's firmware when Alt-F uses the reload method.
When Alt-F is flashed this problem does not happens, and it is possible to 
store up to eight sets of settings, tagged with date/time of creation.

As there are two places in flash where to store settings, and Alt-F only uses 
one of them, the other always has the last vendor's settings; when re-flashing 
a vendor's firmware, Alt-F prompts you for recovering the vendor's settings 
stored in the second location into the first. It was not tested if this will in 
fact fully restore the vendor's settings.

There is nothing more that can be done, this problem will be present for all 
future Alt-F releases when it is used using the reloaded method.

Original comment by whoami.j...@gmail.com on 2 Mar 2011 at 4:14

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi
I'm also seeing this problem.  However, I've flashed with Alt-F-0.1RC3, kernel 
2.6.35.14.

At the moment, I have an 8GB USB key as the only drive in the system, running 
ext3.
It's got a 500MB swap partition

# df -h /mnt
Filesystem                Size      Used Available Use% Mounted on
rootfs                   30.0M    256.0K     29.7M   1% /
# df -h /mnt/sda2
Filesystem                Size      Used Available Use% Mounted on
/dev/sda2                 6.8G    143.9M      6.7G   2% /mnt/sda2
# df -h /mnt/USB_8G_1/
Filesystem                Size      Used Available Use% Mounted on
rootfs                   30.0M    256.0K     29.7M   1% /

what should I do?

Original comment by anonymoo...@gmail.com on 25 Jul 2013 at 12:40