Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
Hi gurus :-)
At first the story is: the samba sever was dropping the connection unexpectedly. When connected from win client, it was ok, when from Linux (Ubuntu), it was unusable - described here (http://ubuntuforums.org/showthread.php? … ht=dns+313).
As the firmware was 1.0, I decided to try upgrade - maybe it will help. Unfortunately, the upgrade failed and now the disk can't boot up, only green led is lighting. I have more than 400GB on that disk - of course, it is accessible via USB, but have no space, where to drop those data and load the system again with clickconnect and the format.
well, my questions are:
1) is there a possibility to load the system image on disk via USB? From Ubuntu, for example... without formatting the disk.
2) I read something similar regarding my samba issue here... http://dns323.kood.org/forum/t1321-drop … tion.html, nothing new?
Thanks a lot.
Offline
Yes, itīs possible.
Take the file "system.tgz" from new firmware and put it in an folder on your linux PC.
Cut the imageheader away. dd if=system.gz bs=8 skip=13 of=system_noh.gz
Unpack this: tar -xzf system_noh.gz
You get 3 files, rootfs.tgz, rd.gz and zImage.
Connect the 313 over USB to your Linux-PC. Notice, as which device it is connected,
e.g. /dev/sda or /dev/sdb.
Mount the 3rd partition (ext2 filesystem). May be, if the filesystem on this partition is wrong, you can create a new.
mkfs.ext2 /dev/sda3 (or sdb3, sdc3...)
Mount this partition again.
Create a folder /.boot (donīt forget the dot before the "b"!)
Put the files rootfs.tgz, rd.gz and zImage in this folder.
Unmount and disconnect the USB, connect network to the 313 and reboot.
Greatings, the bear.
Offline
Works like a charm!
Thank you very much for this detailed how to guide, I'm a Linux newbie and I have done it on a first attempt :-)
Regarding that samba - is there another way how to mount this NAS in Linux?
Offline
maple wrote:
Works like a charm!
Thank you very much for this detailed how to guide, I'm a Linux newbie and I have done it on a first attempt :-)
Regarding that samba - is there another way how to mount this NAS in Linux?
mount //<ipaddr>/<share> /mnt/nas -o uid=<local_uid>,username=<nas_user_name>
you'll be prompted for a password then. if you want to mount the share at the boot time, check /etc/samba/smbfstab
uid option will help you to set the owner of a files to the local regular user.
in the official install there is no other protocol support, aside from ftp. but you can install the dropbear ssh server, and mount a directory using the sshfs.
Last edited by pcp (2008-05-16 11:29:38)
Offline
Thanks a lot. I played a bit and tried to extend my box with the fun_plug 0.5 and start the NFS, which is running now perfectly with my Ubuntu (automount).
Offline
CharminBaer wrote:
Yes, itīs possible.
Take the file "system.tgz" from new firmware and put it in an folder on your linux PC.
Cut the imageheader away. dd if=system.gz bs=8 skip=13 of=system_noh.gz
Unpack this: tar -xzf system_noh.gz
You get 3 files, rootfs.tgz, rd.gz and zImage.
Connect the 313 over USB to your Linux-PC. Notice, as which device it is connected,
e.g. /dev/sda or /dev/sdb.
Mount the 3rd partition (ext2 filesystem). May be, if the filesystem on this partition is wrong, you can create a new.
mkfs.ext2 /dev/sda3 (or sdb3, sdc3...)
Mount this partition again.
Create a folder /.boot (donīt forget the dot before the "b"!)
Put the files rootfs.tgz, rd.gz and zImage in this folder.
Unmount and disconnect the USB, connect network to the 313 and reboot.
Greatings, the bear.
Stupid question: what format rd.gz and rootfs.tgz are??? Invalid magic and not gzip format error messages I got only ...
Thanks.
Offline
radir wrote:
CharminBaer wrote:
Yes, itīs possible.
Cut the imageheader away. dd if=system.gz bs=8 skip=13 of=system_noh.gzStupid question: what format rd.gz and rootfs.tgz are??? Invalid magic and not gzip format error messages I got only ...
Thanks.
there is a header containing some info for the bootloader. you must strip it off and then you can work with the file as with a regular gz archive.
Offline
pcp wrote:
radir wrote:
CharminBaer wrote:
Yes, itīs possible.
Cut the imageheader away. dd if=system.gz bs=8 skip=13 of=system_noh.gzStupid question: what format rd.gz and rootfs.tgz are??? Invalid magic and not gzip format error messages I got only ...
Thanks.there is a header containing some info for the bootloader. you must strip it off and then you can work with the file as with a regular gz archive.
Ok, how? How long is this header?
Offline
104 byte.
dd if=rd.gz bs=8 skip=13 of=rd_noh.gz ( 8*13=104 )
the rd.gz is an gzipped loop-filesystem, minix-fs, must mount on loop-device:
gunzip rd_noh.gz
mount -t minix -o loop rd_noh /mnt/...
the rootfs.tgz is a gzipped tar archive.
tar -xzf rootfs_noh.tgz (after stripping the header)
You can change both, but re-packing is a lot more difficult.
You need an 386-Linux, a tool from Dlink and an corresponding config-file for this.
Last edited by CharminBaer (2008-05-20 10:16:45)
Offline
CharminBaer wrote:
104 byte.
You can change both, but re-packing is a lot more difficult.
You need an 386-Linux, a tool from Dlink and an corresponding config-file for this.
That sounds mystical :-) So if I don't want to get overwritten everything (except user space /mnt/HD_a2) during boot time, other than getting that very special dlink tool+config file, there is no chance? Btw this tool is public or proprietary?
Offline
Yes, the complete DNS-313-Firmware is a mystery...
But not this tool. Itīs in the DNS-313 GPL sources, you can download from ftp.dlink.se:
ftp://ftp.dlink.se/Products/dns-product … 80128).tgz
(about 180MB!) file: mkimage in \DNS-313 GPL\Image\toolchain\bin (binary for Linux/x86!)
If you only need this tool, better download from here:
http://www.msbd.de/image_tools.tgz
Syntax: ./mkimage -l ARCHIVE_WITH_HEADER (List header-info)
./mkimage -f CONFIGFILE -d INFILE OUTFILE (makes FW-file / adding header)
cfg-file syntax:
MAGIC_NUMBER = 27051956
OS_TYPE = linux
#or: 4_4bsd, artos, dell, esix, freebsd, irix, lynxos, ncr, netbsd,
# openbsd, psos, qnx, rtems, sco, solaris, svr-4, u-boot, vxworks
CPU_ARCH = arm
#or: alpha, x86, ia64, m68k, microblaze, mips, mips64, ppc, s390, sh, sparc, sparc64
IMAGE_TYPE = kernel
#or: filesystem, firmware, multi, ramdisk, script, standalone, uboot
COMPRESS_TYPE = gzip
#or: none, bzip2
DATALOAD_ADDRESS = 0x00008000
ENTRY_ADDRESS = 0x00008000
IMAGE_NAME kernel.img
MODEL_NAME = DNS-313
MAC_ADDRESS = 00:80:c8:16:81:68
# je nach Version
VERSION = 1.01b12
#START_OFFSET
#END_OFFSET
#OVERWRITE
ChBear
Last edited by CharminBaer (2008-05-22 22:39:42)
Offline
mkimage tool will create system.gz including 3 items rd.gz, zImage, rootfs.tgz; or can i (de)pack any of the 3 components indiviudally?
Did you change rd.gz not to overwrite everything?
Thank you very much.
Offline
Itīs very simple:
Take the rd.gz from /.boot-directory, unpack it as described below.
Look after the file "linuxrc" (in / of the initial ramdisk, but not the linucrc~, these is not needed)
This script deletes the complete root-filesystem on every reboot! Make changes at your own wishes.
Then unmount the rd_noh-file, pack it again with gzip and add the header:
./mkimage -f kernel.cfg -d rd_noh.gz rd.gz
(I think, no matter whether taking kernel.cfg or ramdisk.cfg)
and put this rd.gz back to the /.boot-directory...
Creating a complete firmware-image, you need all the 3 files from .boot-dir. Put they into a gzipped tar archive:
tar czf system_noh.tgz rd.gz rootfs.tgz zImage
and add the header:
./mkimage -f kernel.cfg -d system_noh.tgz system.tgz
Last edited by CharminBaer (2008-05-23 13:22:57)
Offline
Thanks, I will try. If I am going to play with linuxrc anyway, any suggestion what else, other than samba, can cause continuous reading/writing to hdd prohibiting standby?
Offline
It is definitely the smb-daemon, produces permanently some output in his logfile.
Put these entries in the [global] section of smb.conf:
domain master = no
local master = no
preferred master = no
os level = 0
Offline
[global]
log level = 0
syslog is writing logs too, cron daemon is accessing disk frequently, as well the atd. you need to kill all of them to put the disk into the sleep state.
Offline
CharminBaer wrote:
file: mkimage in \DNS-313 GPL\Image\toolchain\bin (binary for Linux/x86!)
If you only need this tool, better download from here:
http://www.msbd.de/image_tools.tgz
Syntax: ./mkimage -l ARCHIVE_WITH_HEADER (List header-info)
./mkimage -f CONFIGFILE -d INFILE OUTFILE (makes FW-file / adding header)
I have the GPL source file, but neither Image\toolchain\bin\mkimage nor the version from the URL can be executed. I am using Ubuntu x64. Though the file exists I receive "No such file error" when try to start it. Is it because of 64bit linux???
By the way unpacking works :-) Thanks for guide.
Offline
Try "apt-get install ia32-libs" before...
Offline
@radir
Success?
Offline
CharminBaer wrote:
@radir
Success?
Sorry, i was net-less ...
Yes, thank you very much everything worked fine!
Now my root partition is not cleaned everytime.
Though one more question pls: do I need to add/remove header for kernel as well? I compiled a kernel but it does not start with, was wondering if it is because kernel is bad (not for this CPU or something); or because not used header?
Offline
Exactly this is the reason why....
Offline
CharminBaer wrote:
Exactly this is the reason why....
Just to clarify: need to add header to zImage too, right? As my compiled kernel does not start neither with nor without header ...
May I ask you to please send me/upload your kernel config file, if you used a customized kernel for your etch package?
Last edited by radir (2008-06-03 22:20:35)
Offline
I think (but not absolutely sure..) the bootloader compares headers of rd.gz, rootfs.tgz and zImage and strikes, when they not identical. Especially the MAGIC_NUMBER and the VERSION. So you should find out the values of the other files by using "mkimage -l ..." and put exactly these values in your config-file. (Syntax of configfile I described above...)
Offline
I checked: you were right, all 3 files using header. But still no luck with customized kernel :-( Keep trying ...
Offline
sooo, is it possible to to this via windows / os x? :>
Offline