General NAS-Central Forums

Welcome to the NAS community
It is currently Wed Aug 16, 2017 9:40 pm

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Wed Feb 27, 2013 10:40 pm 
Offline

Joined: Wed Feb 27, 2013 10:28 pm
Posts: 5
I am new to the nas firmware mods, so it took me a couple of days to figure this out. With the help of nas-central how-to, I got this info so far:
================uname======================
Code:
Linux (none) 2.6.15 #139 Fri Feb 5 10:33:18 CST 2010 armv4l unknown


================cpuinfo======================
Code:
Processor   : FA526id(wb) rev 1 (v4l)
BogoMIPS   : 262.14
Features   : swp half
CPU implementer   : 0x66
CPU architecture: 4
CPU variant   : 0x0
CPU part   : 0x526
CPU revision   : 1
Cache type   : write-back
Cache clean   : cp15 c7 ops
Cache lockdown   : format B
Cache format   : Harvard
I size      : 16384
I assoc      : 2
I line length   : 16
I sets      : 512
D size      : 8192
D assoc      : 2
D line length   : 16
D sets      : 256

Hardware   : GeminiA
Revision   : 0000
Serial      : 0000000000000000


================meminfo======================
Code:
MemTotal:       125160 kB
MemFree:         84076 kB
Buffers:         16932 kB
Cached:          19100 kB
SwapCached:          0 kB
Active:           6672 kB
Inactive:        29788 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       125160 kB
LowFree:         84076 kB
SwapTotal:      522104 kB
SwapFree:       522104 kB
Dirty:           11332 kB
Writeback:           0 kB
Mapped:           1056 kB
Slab:             3348 kB
CommitLimit:    584684 kB
Committed_AS:     9048 kB
PageTables:         72 kB
VmallocTotal:   122880 kB
VmallocUsed:     16656 kB
VmallocChunk:   105980 kB

================mtd======================
Code:
dev:    size   erasesize  name
mtd0: 00020000 00020000 "RedBoot"
mtd1: 00300000 00020000 "Kernel"
mtd2: 00600000 00020000 "Ramdisk"
mtd3: 00600000 00020000 "Application"
mtd4: 00020000 00020000 "VCTL"
mtd5: 000a0000 00020000 "CurConf"
mtd6: 00020000 00020000 "FIS directory"

================mount======================
Code:
usbfs on /proc/bus/usb type usbfs (rw)
tmpfs on /tmpmnt type tmpfs (size=30m)
/dev/hda1 on /system type ext3 (rw)
/dev/hda2 on /mnt/ide1 type ext3 (usrquota,grpquota)

================lsmod======================
Code:
Module                  Size  Used by    Tainted: P 
fuse 41428 0 - Live 0xbf049000
ufsd_lbd 293156 0 - Live 0xbf000000

================inetd======================
Code:
telnet   stream   tcp   nowait   root   /usr/sbin/telnetd   telnetd

================fstab======================
Code:
/dev/ram0 / ext2 defaults  1  1
none /proc proc defaults 0 0
/dev/hda1 /volume1 auto defaults,usrquota,grpquota 0 0
/dev/hda3  swap    swap defaults        0 0

================ps aux======================
Code:
  PID  Uid     VmSize Stat Command
    1 root        540 S   init       
    3 root            SWN [ksoftirqd/0]
    2 root            SW  [Power LED]
    4 root            SW  [watchdog/0]
    5 root            SW< [events/0]
    6 root            SW< [khelper]
    7 root            SW< [kthread]
   15 root            SW< [kblockd/0]
   18 root            SW< [khubd]
   53 root            SW  [pdflush]
   54 root            SW  [pdflush]
   56 root            SW< [aio/0]
   59 root            SW< [xfslogd/0]
   55 root            SW  [kswapd0]
   57 root            SW  [cifsoplockd]
   58 root            SW  [cifsdnotifyd]
   60 root            SW< [xfsdatad/0]
   61 root            SW< [xfsbufd]
  647 root        208 S   init       
  648 root        540 S   /bin/sh /etc/rc
  669 root        588 S   sh /etc/rc.start
  680 root            Z   [tar]
  721 root            Z   [kjournald]
  727 root            SW  [kjournald]
  772 root            SW  [kjournald]
  866 root        628 R   ps aux


It looks like this:
Image

I would like to add rsync if possible. Could you point me in the right direction?

Once I get a little further, I can post how I changed my root disk.


Top
 Profile  
 
PostPosted: Thu Feb 28, 2013 9:09 am 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6022
A Gemini! Is that a new NAS?

Anyway, I think the easiest way to get rsync running is to install FFP. Download fun_plug.tgz. Create a directory ffp on your harddisk, and extract the tarball there. (Preferably using a shell).

Now create a symlink /ffp:
Code:
ln -s /mnt/ide1/path/to/ffp /ffp
enable the rsync daemon
Code:
chmod a+x /ffp/start/rsyncd.sh
and start FFP:
Code:
/ffp/etc/rc start


You might want to exchange the root shell:
Code:
sed -i " \|^root:|s|:\bin\sh|:\ffp\bin\sh|g" /etc/passwd
Now if you login you automatically get the FFP shell (with FFP path).

If you want this permanent, you'll need to find a way to run a user script on boot, which does:
Code:
ln -s /volume1/path/to/ffp /ffp
/ffp/etc/rc start
It is possible that if you create a script /mnt/ide1/fun_plug, that it will be executed.


Top
 Profile  
 
PostPosted: Thu Feb 28, 2013 3:07 pm 
Offline

Joined: Wed Feb 27, 2013 10:28 pm
Posts: 5
This NAS came on sale to microcenter.com a few weeks ago for $50, so I picked one up. I think they're just trying to get rid of them, since they're old hardware, but nice for someone like me to tinker with.

There are several rc.start and rc.sh scripts that are all accessible so I can permanently add it to check for ffp on the sata disk and/or the usb stick.


Top
 Profile  
 
PostPosted: Thu Feb 28, 2013 3:26 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6022
jayshomebrew wrote:
There are several rc.start and rc.sh scripts that are all accessible so I can permanently add it to check for ffp

Have you tried if it won't revert?
According to your mounts there is some 30MB ramdisk, which might contain your whole rootfs. In that case you can change what you want, after a reboot it's gone.


Top
 Profile  
 
PostPosted: Thu Feb 28, 2013 4:00 pm 
Offline

Joined: Wed Feb 27, 2013 10:28 pm
Posts: 5
I just followed nas-central's instructions on how to mount the root disk, modified it, then re-uploaded the firmware. If I do it this way, it keeps my changes.

ffp works great:
Code:
scotchale login: root
Password:

BusyBox v1.00-rc3 (2010.02.05-02:33+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

scotchale> mount
usbfs on /proc/bus/usb type usbfs (rw)
/dev/hda1 on /system type ext3 (rw)
/dev/hda2 on /mnt/ide1 type ext3 (usrquota,grpquota)
/dev/sda1 on /mnt/usb1 type ext3 (rw)
scotchale> ls /mnt/usb1
ffp         lost+found
scotchale> ln -s /mnt/usb1/ffp /ffp
scotchale> chmod a+x /ffp/start/rsyncd.sh
scotchale> ls /ffp/start/
portmap.sh    kickwebs.sh   lighttpd.sh   telnetd.sh
rsyncd.sh     LOGIN.sh      SERVERS.sh    inetd.sh
nfsd.sh       sshd.sh       fp_master.sh
scotchale> chmod a+x /ffp/start/sshd.sh
scotchale> /ffp/etc/rc start
* /ffp/start/SERVERS.sh inactive
* /ffp/start/portmap.sh inactive
* /ffp/start/nfsd.sh inactive
* /ffp/start/LOGIN.sh inactive
* /ffp/start/telnetd.sh ...
WARNING: telnetd: Already running
* /ffp/start/sshd.sh ...
grep: /etc/shadow: No such file or directory
Generating public/private rsa1 key pair.
Your identification has been saved in /ffp/etc/ssh/ssh_host_key.
Your public key has been saved in /ffp/etc/ssh/ssh_host_key.pub.


Top
 Profile  
 
PostPosted: Sat Mar 02, 2013 5:15 pm 
Offline

Joined: Wed Feb 27, 2013 10:28 pm
Posts: 5
so I'm just getting around to modifying funplug.sh (http://ffp.inreto.de/ffp/0.7/oabi/fun_plug) script specifically for the CN-330.

Is $SETUP variable an error?
Code:
if [ -x $FFP_SETUP_SCRIPT ]; then
    echo "* Running $SETUP ..."
    . $FFP_SETUP_SCRIPT
fi


Also, I'm not sure why we want to remove the tarball.. or maybe I'm reading this wrong.
Code:
# install tarball
...
    rm $FFP_TARBALL
fi


Top
 Profile  
 
PostPosted: Sat Mar 02, 2013 9:56 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6022
jayshomebrew wrote:
Is $SETUP variable an error?
Yes, I think so.

Quote:
Also, I'm not sure why we want to remove the tarball.. or maybe I'm reading this wrong.
The existence of the tarball is the trigger to extract it at boot. So after extracting the tarball has either to be renamed or deleted.

The installation of FFP on the DNS323 involves writing the script fun_plug to the root of the harddisk, and the tarball. On boot the script will be executed, and the first time it extracts the tarball, and starts FFP. On subsequent boots only FFP has to be started.


Top
 Profile  
 
PostPosted: Thu Mar 07, 2013 6:30 pm 
Offline

Joined: Thu Mar 07, 2013 6:06 pm
Posts: 2
Hi all, I stumbled on this thread when I was researching how to make fuse/libntfs work properly on this NAS. I also picked up the CN-330 at the microcenter sale to use as a media store.

Could you refer me to the documentation you found on modifying/reflashing the root disk? I have a series of commands that make the NAS perfectly functional for me but I have to run them manually every time I boot the device.

BTW, the reason I'm using NTFS is due to a limitation of Samsung BD-C5500 bluray player. It will play media on an external drive formatted ONLY as FAT32 or NTFS, so ext3 is out. FAT32 won't work due to the 4gig limit.

edit: I can't believe I missed it before. http://www.nas-central.org/wiki/General ... tion_guide
Sorry for being newbish.


Last edited by fusion555 on Fri Mar 08, 2013 6:35 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Mar 08, 2013 6:29 pm 
Offline

Joined: Thu Mar 07, 2013 6:06 pm
Posts: 2
FYI - I found that even though it is not listed on the webpage, coolmax is hosting their firmware for this device which is flashable via the web interface. It could make modding the flash easier.

http://www.coolmaxusa.com/download/firm ... 30NTFS.ZIP


Top
 Profile  
 
PostPosted: Fri Mar 08, 2013 8:24 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6022
Wow. That one is easy to hack! No checksums, no nothing. The zipfile contains a gzipped ext2 image, which is the rootfs. Just mount it, change whatever you want, repack it, and upload to the NAS.

I think.

When you only need some script executed on boot, I think there is a symlink /usr/hddapp, which points to /mnt/<something>/hddapp, where /mnt/<something> is the mountpoint of a harddisk.
The executable scripts *.sh in /usr/hddapp/etc/init.d/ are executed on boot by /etc/rc.


Top
 Profile  
 
PostPosted: Sat Mar 09, 2013 4:49 am 
Offline

Joined: Wed Feb 27, 2013 10:28 pm
Posts: 5
This one works too, not sure what the diff is.
http://www.coolmaxusa.com/download/Firmware/CN-330.ZIP

I noticed that you can enable telnet just from here:
http://CN330-IP/cgi/telnet/telnet.cgi
Image

root passwd is admin


I just ended up adding
S99funplug.sh to the /etc/rc.d of the root disk, following the directions: nas-central

then I put this on my usb stick:
funplug_cn330.sh

then you should get this under your admin log: which loads ffp
Image

Also if you enable sshd funplug ver 0.7 will hang during boot. Edit the ffp script /ffp/start/sshd.sh (someone else on this forum gets credit for this help)
WAS:
Code:
if [ ! -f /etc/ssh/ssh_host_ecdsa_key ]; then

IS:
Code:
if [ ! -f /ffp/etc/ssh/ssh_host_ecdsa_key ]; then


Top
 Profile  
 
PostPosted: Fri May 03, 2013 11:12 am 
Offline

Joined: Fri May 03, 2013 11:07 am
Posts: 1
fusion555 wrote:
Hi all, I stumbled on this thread when I was researching how to make fuse/libntfs work properly on this NAS. I also picked up the CN-330 at the microcenter sale to use as a media store.

Could you refer me to the documentation you found on modifying/reflashing the root disk? I have a series of commands that make the NAS perfectly functional for me but I have to run them manually every time I boot the device.

BTW, the reason I'm using NTFS is due to a limitation of Samsung BD-C5500 bluray player. It will play media on an external drive formatted ONLY as FAT32 or NTFS, so ext3 is out. FAT32 won't work due to the 4gig limit.

edit: I can't believe I missed it before. http://www.nas-central.org/wiki/General ... tion_guide
Sorry for being newbish.

Thanks to share this informational link but your link doesn't work so please rectify it.

_________________
Mobile and Dth Recharge Services app || Recharge it now


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group