D-Link DNS 320L works with Alt-F 0.1RC4

1,039 views
Skip to first unread message

Ephraim Gadsby Jr.

unread,
Sep 3, 2014, 9:27:40 PM9/3/14
to
Well, I took the plunge, since the D-Link firmware was terrible, and flashed the ROM on my DNS 320L. As of this moment it appears to be working fine. I was unable to install Debian, but I'll deal with that later. Right now I need to have a drink and toast the great developers who have given my NAS new life.

I'm really impressed with all the functionality the Alt-F software provides. After over 40 years in the IT business, yes I programmed my first computer with octal toggles and a submit button, you have really shown me that I still have a lot to learn. Thanks!

Alt-F 0.1RC4 with kernel 3.10.32, and flashed with Alt-F-0.1RC4, initrd.

DNS 320L  A3 FW 1.02

João Cardoso

unread,
Sep 4, 2014, 5:53:35 PM9/4/14
to al...@googlegroups.com


On Thursday, September 4, 2014 2:27:40 AM UTC+1, Ephraim Gadsby Jr. wrote:
Well, I took the plunge, since the D-Link firmware was terrible, and flashed the ROM on my DNS 320L. As of this moment it appears to be working fine.

Hope you have read this rather long topic as it fixes a lot of things.
 
I was unable to install Debian,

There is a patch available at sourceforge, search the bug report ticket section.

but I'll deal with that later. Right now I need to have a drink and toast the great developers who have given my NAS new life.

I'm really impressed with all the functionality the Alt-F software provides. After over 40 years in the IT business, yes I programmed my first computer with octal toggles

an Heathkit H8 I played with one of these. Or are you older than me? :-)
 
and a submit button, you have really shown me that I still have a lot to learn. Thanks!

Alt-F 0.1RC4 with kernel 3.10.32, and flashed with Alt-F-0.1RC4, initrd.

DNS 320L  A3 FW 1.02

Thanks for reporting back, as the DNS-320L support is still experimental an incomplete. All help is welcome.
 

Ephraim Gadsby Jr.

unread,
Sep 4, 2014, 9:24:40 PM9/4/14
to al...@googlegroups.com
Thanks for the fast reply.


On Thursday, September 4, 2014 5:53:35 PM UTC-4, João Cardoso wrote:

As of this moment it appears to be working fine.

Hope you have read this rather long topic as it fixes a lot of things.

      Not yet I just dumped all the log files I could find so I can read them in my spare time. Yes
      I need to get a life.

I was unable to install Debian,

There is a patch available at sourceforge, search the bug report ticket section.

    Great, I'll dig around for it tomorrow.


I'm really impressed with all the functionality the Alt-F software provides. After over 40 years in the IT business, yes I programmed my first computer with octal toggles

an Heathkit H8 I played with one of these. Or are you older than me? :-)

      I remember when a colleague brought an Altair 8800 into the Lab. We were in awe!
      Our previous high tech find was a paper tape machine that would allow us to record
      our octal toggles so we could 'reprogram' the mass spec without going nuts. Yeah,
      I'm older than you, but let's not go there because age is just a number, right?   lol

Thanks for reporting back, as the DNS-320L support is still experimental an incomplete. All help is welcome.
 
     Now you can consider me a new DNS 320L tester from here on out. As soon as I get my above
     assignments done I'll drop you a note and we can start work.
    
     Thanks again for all your hard work.

Ephraim Gadsby Jr.

unread,
Sep 5, 2014, 1:05:47 PM9/5/14
to

 João,

Hope you have read this rather long topic as it fixes a lot of things
 
    I  read through the thread, whew, there was a lot of stuff and here's what I gathered:

     1. I installed Putty, but I'm still digging through the docs so I don't screw something up.
         2.  Downloaded DNS320Ltar.gz and extracted sysctrl.c, sysctrl, dns320l-daemon.h,
              dns320L-daemon.c, dns320L-daemon, dns320L.h,
         3. Downloaded debian_proc.cgi,patch
         4. I was able to log into the Webgui and shut down all services.
         5.  Then I used Filezilla, on Ubuntu 14.04, to FTP copies of  sysctrl, dns320l-daemon
               and debian_proc.cgi to /usr/sbin because that's where the originals were stored, I
               hope. I didn't run any script files.
         6. Then I rebooted.
         7. Logged into the Webui and restarted services.

          Now the fan keeps pulsing and I'm still unable to install Debian.

         
          What I need to know is if I made any mistakes in the above. You can
          consider me a total noob since the last embedded programming I did
          was on a Z-80 board and I used assembler. So lead me on oh guru of the NAS
          and tell me just what I should do.

          My plan was to get everything working and then scrap the current Raid-1 and
          rebuild the two 4TB drives and UL the data from the 5TB backup drive. Is this
          a reasonable plan of attack, or should I plan on restarting from a fresh flash of
          R4?

          Attached is my Status Page and the strange fan speed and temperature.

Alt-F 0.1RC4 Status Page.html

João Cardoso

unread,
Sep 5, 2014, 6:00:53 PM9/5/14
to al...@googlegroups.com


On Friday, September 5, 2014 6:05:47 PM UTC+1, Ephraim Gadsby Jr. wrote:

 João,

Hope you have read this rather long topic as it fixes a lot of things
 
    I  read through the thread, whew, there was a lot of stuff and here's what I gathered:

     1. I installed Putty, but I'm still digging through the docs so I don't screw something up.
         2.  Downloaded DNS320Ltar.gz and extracted sysctrl.c, sysctrl, dns320l-daemon.h,
              dns320L-daemon.c, dns320L-daemon, dns320L.h,
         3. Downloaded debian_proc.cgi,patch
         4. I was able to log into the Webgui and shut down all services.
         5.  Then I used Filezilla, on Ubuntu 14.04, to FTP copies of  sysctrl, dns320l-daemon
               and debian_proc.cgi to /usr/sbin because that's where the originals were stored, I
               hope. I didn't run any script files.

That's  no so simple as that. Alt-F is not a disk based OS, so changes are temporary.
Read the "How to customize the firmware" wiki and use the bellow "user script", after copying sysctrl and dns320l-daemon from the tarball to some location on disk:


#!/bin/sh

# User script to be executed at boot time. UNTESTED.
# when the disk partiton is detected and mounted
# Be sure you know what you are doing!

case "$1" in
    start
)
        board
=$(cat /tmp/board)
       
if test "$board" != "DNS-320L-A1"; then exit 0; fi # this is only for the DNS-320L

       
# copy new sysctrl to /usr/sbin
        rcsysctrl stop
        cp
/some/location/on/disk/sysctrl /usr/sbin
        rcsysctrl start

       
# disable init from launching dns320-daemon, and terminate it
        sed
-i 's/\(.*dns320l-daemon.*\)/#\1/' /etc/inittab
        kill
-1 1
        killall dns320l
-daemon
        cp
/some/location/on/disk/dns320l-daemon /usr/sbin

       
# allow init to launch the dns320-daemon
        sed
-i 's/^[#]*[[:space:]]*\(.*dns320l-daemon.*\)/\1/' /etc/inittab
        kill
-1 1

       
;;
    stop
) : ;;
   
*) usage $0 "start|stop" ;;
esac

As for the Debian issue, you did it wrongly, you have to apply the debian-xz.patch patch 'patch -p0 -i /path/to/debian-xz.patch'


         6. Then I rebooted.
         7. Logged into the Webui and restarted services.

          Now the fan keeps pulsing and I'm still unable to install Debian.

         
          What I need to know is if I made any mistakes in the above. You can
          consider me a total noob since the last embedded programming I did
          was on a Z-80 board and I used assembler. So lead me on oh guru of the NAS
          and tell me just what I should do.

          My plan was to get everything working and then scrap the current Raid-1 and
          rebuild the two 4TB drives and UL the data from the 5TB backup drive. Is this
          a reasonable plan of attack, or should I plan on restarting from a fresh flash of
          R4?

There is no need for a reflash.
 

          Attached is my Status Page and the strange fan speed and temperature.

I only see a "Bad request/400 error"  message...

Ephraim Gadsby Jr.

unread,
Sep 5, 2014, 10:27:53 PM9/5/14
to al...@googlegroups.com
That's  no so simple as that. Alt-F is not a disk based OS, so changes are temporary.
     Ok, forehead slap time. I should have remembered that from my Z-80 days. Sheesh!
 
Read the "How to customize the firmware" wiki and use the bellow "user script", after copying sysctrl and dns320l-daemon from the tarball to some location on disk:

  OK, I finally got my telnet client to work and link to the Alt-F system. I will FTP sysctrl and dns320l-daemon to /mnt/sda4 then I edit
  the script to reflect the actual file locations after which I FTP the script file to /mnt/sda4, which is the last designated drive on my system.
  Then I telnet to the folder and execute 'chmod +x /path/to/script'.

   This is where I have a very noob question. In the 'How to customize the firmware' you state that I should:  
    "Go to Services->User->user Configure and fill-in under "Script to execute on power-up" the full patch of a executable shell script     
   that resides on disk. The script is executed when the filesystem where it resides is detected and mounted."
   So I should follow the above directions and reboot the system instead of just telneting into the system and executing the shell script?
  

#!/bin/sh

# User script to be executed at boot time. UNTESTED.
# when the disk partition is detected and mounted

# Be sure you know what you are doing!

case "$1" in
    start
)
        board
=$(cat /tmp/board)
       
if test "$board" != "DNS-320L-A1"; then exit 0; fi # this is only for the DNS-320L

       
# copy new sysctrl to /usr/sbin

        rcsysctrl stop
        cp 
/mnt/sda4/sysctrl /usr/sbin
        rcsysctrl start

       
# disable init from launching dns320-daemon, and terminate it

        sed
-i 's/\(.*dns320l-daemon.*\)/#\1/' /etc/inittab
        kill
-1 1
        killall dns320l
-
daemon
        cp 
/mnt/sda4/dns320l-daemon /usr/sbin

       
# allow init to launch the dns320-daemon

        sed
-i 's/^[#]*[[:space:]]*\(.*dns320l-daemon.*\)/\1/' /etc/inittab
        kill
-1 1

       
;;
    stop
) : ;;
   
*) usage $0 "start|stop" ;;
esac
As for the Debian issue, you did it wrongly, you have to apply the debian-xz.patch patch 'patch -p0 -i /path/to/debian-xz.patch'
      That's where I got the file so I'm good to go. Next I FTP the file to /mnt/md1, or /mnt/sda4, and then using telnet execute the
      command '
patch -p0 -i /mnt/sda4/debian_proc.cgi.patch'

There is no need for a reflash.

     Thanks for that bit of information!
 

I only see a "Bad request/400 error"  message...

    After I do all of the above correctly I'll let you know if anything is still munged.
    Thanks for taking the time to help me with this new stuff.

João Cardoso

unread,
Sep 6, 2014, 1:43:14 PM9/6/14
to al...@googlegroups.com


On Saturday, September 6, 2014 3:27:53 AM UTC+1, Ephraim Gadsby Jr. wrote:


That's  no so simple as that. Alt-F is not a disk based OS, so changes are temporary.
     Ok, forehead slap time. I should have remembered that from my Z-80 days. Sheesh!
 
Read the "How to customize the firmware" wiki and use the bellow "user script", after copying sysctrl and dns320l-daemon from the tarball to some location on disk:

  OK, I finally got my telnet client to work and link to the Alt-F system. I will FTP sysctrl and dns320l-daemon to /mnt/sda4 then I edit
  the script to reflect the actual file locations after which I FTP the script file to /mnt/sda4,

MS-Win and linux have different end of line (EOL), better to create the file in the box. Or use the 'dos2unix <file>' to convert EOL
 
which is the last designated drive on my system.
  Then I telnet to the folder and execute 'chmod +x /path/to/script'.

   This is where I have a very noob question. In the 'How to customize the firmware' you state that I should:  
    "Go to Services->User->user Configure and fill-in under "Script to execute on power-up" the full patch of a executable shell script     
   that resides on disk. The script is executed when the filesystem where it resides is detected and mounted."
   So I should follow the above directions and reboot the system instead of just telneting into the system and executing the shell script?

No, you can just execute it without rebooting by using '/path/to/yourscript start'.
The wiki wording is unfortunate, it should read  "The script will be automatically executed when... but you can test it without rebooting by just executing it."


Ephraim Gadsby Jr.

unread,
Sep 17, 2014, 11:32:37 PM9/17/14
to al...@googlegroups.com

João,
         Well, I seem to have bricked my 320L. I can no longer log into the WebUI, FTP, Telnet, or SSH into the box. It just sits there quietly raising the fan speed for 20-30 seconds and then dropping the speed down.
    When I plug in the power the power led blinks for awhile, the two drive leds turn on for a few seconds and go out then the power led stops blinking and stays on. The USB led then turns on and the fan starts going through it's high low cycle forever. I tried every reset method I could, even the reset button on the bottom, nada.
    So, I just ordered the serial to USB board and the necessary wires and connectors to set up a serial port to try and follow your directions posted somewhere on the group or wiki that details how to reflash the FW via the serial console and start over.
    I'll let you know how things go.
  Just so you know what preceded this débâcle, I just got two 5Tb drives and I wanted to see if Alt-F would recognize them. I yanked the two 4Tb drives and dropped the 5s into the NAS. That's when I discovered the inability to connect via WebUI, etc. Fans started their cycling. I pulled the plug, dropped the original 4Tb drives in and I thought everything would return to it's original status. I was wrong.
    Now I get to practice soldering and wiring.
    As soon as I have some information from the serial console I'll let you know and probably ask you for some assistance along the way.
    Thanks for your help so far.......Ephraim
   

João Cardoso

unread,
Sep 18, 2014, 9:58:24 AM9/18/14
to al...@googlegroups.com


On Thursday, September 18, 2014 4:32:37 AM UTC+1, Ephraim Gadsby Jr. wrote:

João,
         Well, I seem to have bricked my 320L.

Don't think so. You just can't access it.
 
I can no longer log into the WebUI, FTP, Telnet, or SSH into the box.

Can you "ping" it? Was it setup to use DHCP? Does your DHCP server shows an IP lease for it?
 
It just sits there quietly raising the fan speed for 20-30 seconds and then dropping the speed down.
    When I plug in the power the power led blinks for awhile, the two drive leds turn on for a few seconds and go out then the power led stops blinking and stays on. The USB led then turns on and the fan starts going through it's high low cycle forever. I tried every reset method I could,

Have you read the "about leds and buttons" wiki? Unfortunately for the 320L the leds behaviour is not the one described. But the reset or USB button procedures should work, i.e., pressed for more than 10 seconds (but less than 20) it would allow telneting the box at port 26. Of course. 'ping' has to work first for this to succeed.
 
even the reset button on the bottom, nada.
    So, I just ordered the serial to USB board and the necessary wires and connectors to set up a serial port to try and follow your directions posted somewhere on the group or wiki that details how to reflash the FW via the serial console and start over.

The described procedures are for the 323/321, not for the 320/320L/325, as these use a different kind of flash memory (NAND instead of NOR), and supports different (more flexible) u-boot commands.

 
    I'll let you know how things go.
  Just so you know what preceded this débâcle,

That's essential!
 
I just got two 5Tb drives and I wanted to see if Alt-F would recognize them. I yanked the two 4Tb drives and dropped the 5s into the NAS. That's when I discovered the inability to connect via WebUI, etc. Fans started their cycling. I pulled the plug, dropped the original 4Tb drives in and I thought everything would return to it's original status. I was wrong.

Alt-F don't need disks. Just remove all disks and power up the box.

Also, if it has been ever "hard" reset (reset or USB buttons pressed for more than 20 seconds), it will try to get an IP using DHCP and if it fails it will assign itself a free IP in the 192.168.1.254 -> 230 IP range.
This means that if you plug the box without the network cable attached, it will have 192.168.1.254 as it IP -- just wait a couple of minutes after powerup before plugging the network cable, then direct-cable connect it to a static IP computer in the 192.168.1.0.

Ephraim Gadsby Jr.

unread,
Sep 18, 2014, 9:13:20 PM9/18/14
to al...@googlegroups.com


    Well, I seem to have bricked my 320L.a

Don't think so. You just can't access it.

       I appreciate your optimism. 

Can you "ping" it? Was it setup to use DHCP? Does your DHCP server shows an IP lease for it?

     Yes I can ping it. I use DHCP, but I set the 320L to a static IP on my Linksys WRT 1900ac. The network
     map on the router shows the 320L as connected at the static IP address. 

 

Have you read the "about leds and buttons"  wiki? Unfortunately for the 320L the leds behaviour is not the one described. But the reset or USB button procedures should work, i.e., pressed for more than 10 seconds (but less than 20) it would allow telneting the box at port 26. Of course. 'ping' has to work first for this to succeed.

    Yes, I've read the about leds and buttons and I've tried the reset procedures, but I just checked and I'm unable to locate any USB button procedures. I just pressed the reset button for 12s and tried to use Putty to telnet in on port 26. I get a 'connection refused'. Ping does work. Here is what Nmap tells me:

      Starting Nmap 6.40 ( http://nmap.org ) at 2014-09-18 20:48 EDT
      Nmap scan report for EPHRAIMSCLOUD.hsd1.mi.comcast.net (192.168.1.159)
      Host is up (0.00081s latency).
      Not shown: 998 closed ports
      PORT    STATE SERVICE
      139/tcp open  netbios-ssn
      445/tcp open  microsoft-ds


The described procedures are for the 323/321, not for the 320/320L/325, as these use a different kind of flash memory (NAND instead of NOR), and supports different (more flexible) u-boot commands.

    Ok, if I do need to reflash anything via the serial port I'll look around for instructions that relate to my
    320L.
 

    I'll let you know how things go.
  Just so you know what preceded this débâcle,

That's essential!

    Thanks for not laughing.
 
I just got two 5Tb drives and I wanted to see if Alt-F would recognize them. I yanked the two 4Tb drives and dropped the 5s into the NAS. That's when I discovered the inability to connect via WebUI, etc. Fans started their cycling. I pulled the plug, dropped the original 4Tb drives in and I thought everything would return to it's original status. I was wrong.

Alt-F don't need disks. Just remove all disks and power up the box.

    Disks removed.

Also, if it has been ever "hard" reset (reset or USB buttons pressed for more than 20 seconds), it will try to get an IP using DHCP and if it fails it will assign itself a free IP in the 192.168.1.254 -> 230 IP range.
This means that if you plug the box without the network cable attached, it will have 192.168.1.254 as it IP -- just wait a couple of minutes after powerup before plugging the network cable, then direct-cable connect it to a static IP computer in the 192.168.1.0.

   Just to make sure I ran the following Nmap:
   ephraim@ephraim-Inspiron-3521:~$ nmap 192.168.1.230-254

   Starting Nmap 6.40 ( http://nmap.org ) at 2014-09-18 21:00 EDT
   Nmap done: 25 IP addresses (0 hosts up) scanned in 10.07 seconds

   So I guess it's still using the 192.168.1.159 IP address in the first Nmap.

   This is what I'm going to try next:
    1. Get my Asus Eee PC, running LinuxMint, and set it's IP address to 192.168.1.0. I will turn
        it's WiFi off.
    2. Pull the power on the 320L and unplug it's network cable.
    3. Wait a couple of minutes and grab a cold Molson Brador.
    4. Plug the 320L network cable into the Asus and see if I can get in via WebUI, Telnet, or SSH.
    5. Send you the results.

    Thanks again for all your patience with this old noob.....Ephraim
 
Message has been deleted

Ephraim Gadsby Jr.

unread,
Sep 18, 2014, 10:10:37 PM9/18/14
to al...@googlegroups.com

Here's what happened:

This is what I'm going to try next:
    1. Get my Asus Eee PC, running LinuxMint, and set it's IP address to 192.168.1.0. I will turn
        it's WiFi off.
    2. Pull the power on the 320L and unplug it's network cable.
    3. Wait a couple of minutes and grab a cold Molson Brador.
    4. Plug the 320L network cable into the Asus and see if I can get in via WebUI, Telnet, or SSH.
    5. Send you the results.

  I followed the above and I couldn't ping, Nmap, Telnet, SSH or WebUI into the 320L. It just sits there with the power and USB leds on while the fan speeds up and then slows down over and over. I tried using 192.168.1.159 and that failed as well. I was expecting something to work and when it didn't I had this feeling that I would be using a soldering iron in the very near future.

     Is there anything else I can try?

      aloha.....Ephraim

João Cardoso

unread,
Sep 19, 2014, 11:22:49 AM9/19/14
to


On Friday, September 19, 2014 2:13:20 AM UTC+1, Ephraim Gadsby Jr. wrote:


    Well, I seem to have bricked my 320L.a

Don't think so. You just can't access it.

       I appreciate your optimism. 

Can you "ping" it? Was it setup to use DHCP? Does your DHCP server shows an IP lease for it?

     Yes I can ping it. I use DHCP, but I set the 320L to a static IP on my Linksys WRT 1900ac. The network
     map on the router shows the 320L as connected at the static IP address. 

 

Have you read the "about leds and buttons"  wiki? Unfortunately for the 320L the leds behaviour is not the one described. But the reset or USB button procedures should work, i.e., pressed for more than 10 seconds (but less than 20) it would allow telneting the box at port 26. Of course. 'ping' has to work first for this to succeed.

    Yes, I've read the about leds and buttons and I've tried the reset procedures, but I just checked and I'm unable to locate any USB button procedures. I just pressed the reset button for 12s and tried to use Putty to telnet in on port 26.

I just received a donated 320L (thanks Andreas!) and I can confirm that the Reset or (front) USB buttons procedure are not working. Thus, no recovery action is possible.
 
I get a 'connection refused'. Ping does work. Here is what Nmap tells me:

      Starting Nmap 6.40 ( http://nmap.org ) at 2014-09-18 20:48 EDT
      Nmap scan report for EPHRAIMSCLOUD.hsd1.mi.comcast.net (192.168.1.159)
      Host is up (0.00081s latency).
      Not shown: 998 closed ports
      PORT    STATE SERVICE
      139/tcp open  netbios-ssn
      445/tcp open  microsoft-ds

So samba is working. The issue has to be inetd, who controls ssh, telnet, ftp, rsync, the webUI httpd ... most probably its configuration file got corrupted 
This has occurred several times in the past... it's clearly a weak point (that's why the recovery actions exists)



The described procedures are for the 323/321, not for the 320/320L/325, as these use a different kind of flash memory (NAND instead of NOR), and supports different (more flexible) u-boot commands.

    Ok, if I do need to reflash anything via the serial port I'll look around for instructions that relate to my
    320L.
 
 
    I'll let you know how things go.
  Just so you know what preceded this débâcle,

That's essential!

    Thanks for not laughing.

Talking seriously.It's very important to know the patient clinical history.
 

 
I just got two 5Tb drives and I wanted to see if Alt-F would recognize them. I yanked the two 4Tb drives and dropped the 5s into the NAS. That's when I discovered the inability to connect via WebUI, etc. Fans started their cycling. I pulled the plug, dropped the original 4Tb drives in and I thought everything would return to it's original status. I was wrong.

I can't see in the disk exchange procedure nothing related with the issue.
Have you applied the fixes discussed in the "REPORTING STUFF: D-Link DNS 320L rev A3" topic?


Alt-F don't need disks. Just remove all disks and power up the box.

    Disks removed.

Also, if it has been ever "hard" reset (reset or USB buttons pressed for more than 20 seconds), it will try to get an IP using DHCP and if it fails it will assign itself a free IP in the 192.168.1.254 -> 230 IP range.
This means that if you plug the box without the network cable attached, it will have 192.168.1.254 as it IP -- just wait a couple of minutes after powerup before plugging the network cable, then direct-cable connect it to a static IP computer in the 192.168.1.0.

  
Just to make sure I ran the following Nmap:

   ephraim@ephraim-Inspiron-3521:~$ nmap 192.168.1.230-254

   Starting Nmap 6.40 ( http://nmap.org ) at 2014-09-18 21:00 EDT
   Nmap done: 25 IP addresses (0 hosts up) scanned in 10.07 seconds

   So I guess it's still using the 192.168.1.159 IP address in the first Nmap.

   This is what I'm going to try next:
    1. Get my Asus Eee PC, running LinuxMint, and set it's IP address to 192.168.1.0. I will turn
        it's WiFi off.
    2. Pull the power on the 320L and unplug it's network cable.
    3. Wait a couple of minutes and grab a cold Molson Brador.
    4. Plug the 320L network cable into the Asus and see if I can get in via WebUI, Telnet, or SSH.
    5. Send you the results.

    Thanks again for all your patience with this old noob.....Ephraim
(...) 

 I followed the above and I couldn't ping, Nmap, Telnet, SSH or WebUI into the 320L. It just sits there with the power and USB leds on while the fan speeds up and then slows down over and overI tried using 192.168.1.159 and that failed as well. I was expecting something to work and when it didn't I had this feeling that I would be using a soldering iron in the very near future.
     Is there anything else I can try? 

Yes.

1-Format (on a linux box) a USB pen with any of ext2/3/4
2-Create the following directory hierarchy on it: '/Alt-F/etc/init.d' watchout the case, it's important, MSW can change it!
3-Put the attached inetd.conf file under /Alt-F/etc/
4-Create a file named S99recover under /Alt-F/etc/init.d/ with the content
#!/bin/sh
rcinetd restart 
# make inetd reload its configuration file, shadowed by the one in the USB pen
telnetd -p 26 -l /bin/sh # open telnet on port 26, just for safety
rcuser start # recreate the alt-f.log file. Comment to have the boot diagnostics only
5-Set execute permissions on it using 'chmod +x /Alt-F/etc/init.d/S99recover'
6-power-off the box, remove disks, attach the USB pen, power-up the box
7-Can you now access it?

[Edited: changed in S99recover from 'rcinetd reload' to 'rcinetd restart']

If you can't, try again to use telnet on port 26.

In any case, a file named alt-f.log has be created in the USB pen right after mounting, so you can examine it for further diagnostics.

To understand what is happening at step 3/4, read the "how to customize the firmware" wiki

inetd.conf

Ephraim Gadsby Jr.

unread,
Sep 20, 2014, 12:53:29 PM9/20/14
to al...@googlegroups.com


On Friday, September 19, 2014 11:22:49 AM UTC-4, João Cardoso wrote:

I just received a donated 320L (thanks Andreas!) and I can confirm that the Reset or (front) USB buttons procedure are not working. Thus, no recovery action is possible.

      Great! That means I don't have to send you mine!
 
I get a 'connection refused'. Ping does work. Here is what Nmap tells me:

      Starting Nmap 6.40 ( http://nmap.org ) at 2014-09-18 20:48 EDT
      Nmap scan report for EPHRAIMSCLOUD.hsd1.mi.comcast.net (192.168.1.159)
      Host is up (0.00081s latency).
      Not shown: 998 closed ports
      PORT    STATE SERVICE
      139/tcp open  netbios-ssn
      445/tcp open  microsoft-ds

So samba is working. The issue has to be inetd, who controls ssh, telnet, ftp, rsync, the webUI httpd ... most probably its configuration file got corrupted 
This has occurred several times in the past... it's clearly a weak point (that's why the recovery actions exists)

I can't see in the disk exchange procedure nothing related with the issue.
Have you applied the fixes discussed in the "REPORTING STUFF: D-Link DNS 320L rev A3" topic?

     I read through the post and the only thing I noticed is that the modify date on Alt-F-0.1RC4-DNS-320L-rev-A1.bin is Sat, Sep 20 2014 12:29:40 while on the one I flashed it's Fri, Sep 12 2014 20:09:11. So it seems a reflash is in order.

Alt-F don't need disks. Just remove all disks and power up the box.

    Disks removed.

Also, if it has been ever "hard" reset (reset or USB b utons pressed for more than 20 seconds), it will try to get an IP using DHCP and if it fails it will assign itself a free IP in the 192.168.1.254 -> 230 IP range.
This means that if you plug the box without the network cable attached, it will have 192.168.1.254 as it IP -- just wait a couple of minutes after powerup before plugging the network cable, then direct-cable connect it to a static IP computer in the 192.168.1.0.
     Is there anything else I can try? 

Yes.

1-Format (on a linux box) a USB pen with any of ext2/3/4
2-Create the following directory hierarchy on it: '/Alt-F/etc/init.d' watchout the case, it's important, MSW can change it!
3-Put the attached inetd.conf file under /Alt-F/etc/
4-Create a file named S99recover under /Alt-F/etc/init.d/ with the content
#!/bin/sh
rcinetd restart 
# make inetd reload its configuration file, shadowed by the one in the USB pen
telnetd -p 26 -l /bin/sh # open telnet on port 26, just for safety
rcuser start # recreate the alt-f.log file. Comment to have the boot diagnostics only
5-Set execute permissions on it using 'chmod +x /Alt-F/etc/init.d/S99recover'
6-power-off the box, remove disks, attach the USB pen, power-up the box
7-Can you now access it?

[Edited: changed in S99recover from 'rcinetd reload' to 'rcinetd restart']

If you can't, try again to use telnet on port 26.

In any case, a file named alt-f.log has be created in the USB pen right after mounting, so you can examine !it for further diagnostics.

To understand what is happening at step 3/4, read the "how to customize the firmware" wiki

I have the USB stick ready so here we go.........IT WORKED!!

You are the man!

Attached is the log file.
Should I flash the newer version of the bin file?
Enter code here...



alt-f.log

João Cardoso

unread,
Sep 20, 2014, 1:41:30 PM9/20/14
to al...@googlegroups.com


On Saturday, September 20, 2014 5:53:29 PM UTC+1, Ephraim Gadsby Jr. wrote:
(...)
     Is there anything else I can try? 

Yes.

1-Format (on a linux box) a USB pen with any of ext2/3/4
2-Create the following directory hierarchy on it: '/Alt-F/etc/init.d' watchout the case, it's important, MSW can change it!
3-Put the attached inetd.conf file under /Alt-F/etc/
4-Create a file named S99recover under /Alt-F/etc/init.d/ with the content
#!/bin/sh
rcinetd restart 
# make inetd reload its configuration file, shadowed by the one in the USB pen
telnetd -p 26 -l /bin/sh # open telnet on port 26, just for safety
rcuser start # recreate the alt-f.log file. Comment to have the boot diagnostics only
5-Set execute permissions on it using 'chmod +x /Alt-F/etc/init.d/S99recover'
6-power-off the box, remove disks, attach the USB pen, power-up the box
7-Can you now access it?

[Edited: changed in S99recover from 'rcinetd reload' to 'rcinetd restart']

If you can't, try again to use telnet on port 26.

In any case, a file named alt-f.log has be created in the USB pen right after mounting, so you can examine !it for further diagnostics.

To understand what is happening at step 3/4, read the "how to customize the firmware" wiki

I have the USB stick ready so here we go.........IT WORKED!!

Good.

The recovery is not yet done, you only have access to the box, not to the disk. And the issue might be in the disk's Alt-F directory.

Have you used telnet on port 26?

Has inetd started? ( what does 'rcinetd status' (or nmap) says?)

If inetd is not running try

rcinetd start
rcinetd status

If inetd is running you must have access to the webUI

Still with no disks execute

loadsave_settings -sf
poweroff

The box will not power-off itself (yet) but will perform a clean shutdown, so after a minute or so unplug the power cord.

Then remove the USB pen and, still without inserting disks, power-on the box. Can you still access the box?

If you can, try powering-up with the disks plugged, if you still can access the box its' done, if not further action is needed (keep the USB pen at hand, as it is your recovery method)



You are the man!

Attached is the log file.

I'm not sure if it was generated at powerup or after the recovery script executed, as it says "root: inetd stopped"
 
Should I flash the newer version of the bin file?

I don't think so, the RC4 announcement followup says
1-The DNS-320L firmware was updated a few hours after being released, because of a severe bug.
That was at 2014-06-24 and no other release was made available.

As I now have a DNS-320L I will make a new RC4.1 release just for the DNS-320L, but it will take some time.


Ephraim Gadsby Jr.

unread,
Sep 20, 2014, 2:33:30 PM9/20/14
to al...@googlegroups.com

The recovery is not yet done, you only have accessI

    I have access to the WebUI, but FTP has stopped.

Have you used telnet on port 26?

    Telnet on port 22 works.

Has inetd started? ( what does 'rcinetd status' (or nmap) says?)

    According to the WebUI only inetd and SMB are running.  
    rcinetd status returns inetd running.

If inetd is not running try

rcinetd start
rcinetd status

If inetd is running you must have access to the webUI

    Right again!

Still with no disks execute

loadsave_settings -sf
poweroff
The box will not power-off itself (yet) but will perform a clean shutdown, so after a minute or so unplug the power cord.

    Ok they executed without any error messages, or confirmation for that matter, so I'll go feed the cats and see what happens. Btw the fan is still oscillating up and down. Cats are fed so off goes the box and out comes the USB. 

Then remove the USB pen and, still without inserting disks, power-on the box. Can you still access the box?

    No. Neither WebUI, or telnet, are working without the USB drive.
 
If you can, try powering-up with the disks plugged, if you still can access the box its' done, if not further action is needed (keep the USB pen at hand, as it is your recovery method)

I pulled the plug, reinserted the disks, plugged in the power and still no connection.

Joao Cardoso

unread,
Sep 20, 2014, 3:57:49 PM9/20/14
to


On Sep 20, 2014 7:33 PM, "Ephraim Gadsby Jr. wrote:
>>
>>
>> The recovery is not yet done, you only have accessI
>
>
>     I have access to the WebUI, but FTP has stopped.
>>
>>
>> Have you used telnet on port 26?
>
>
>     Telnet on port 22 works.
>>
>>
>> Has inetd started? ( what does 'rcinetd status' (or nmap) says?)
>
>
>     According to the WebUI only inetd and SMB are running.  
>     rcinetd status returns inetd running.
>>
>>
>> If inetd is not running try
>>
>> rcinetd start
>> rcinetd status
>>
>> If inetd is running you must have access to the webUI
>
>
>     Right again!
>>
>>
>> Still with no disks execute
>>
>> loadsave_settings -sf
>> poweroff
>> The box will not power-off itself (yet) but will perform a clean shutdown, so after a minute or so unplug the power cord.
>
>
>     Ok they executed without any error messages, or confirmation for that matter, so I'll go feed the cats and see what happens. Btw the fan is still oscillating up and down. Cats are fed so off goes the box and out comes the USB. 
>>
>>
>> Then remove the USB pen and, still without inserting disks, power-on the box. Can you still access the box?
>>
>     No. Neither WebUI, or telnet, are working without the USB drive.

Reinsert the usb and try

rcinetd enable
loadsave_settings -sf

[Added:]

This must be caused by issue 328, and fix-001 fixes it (System->Utilities->Fixes)

0.1RC4-001-inetd_disable_webUI.fix: fix ticket 328: Inetd "Boot Enabled" disables itself. https://sourceforge.net/p/alt-f/tickets/328/  

>  

>>
>> If you can, try powering-up with the disks plugged, if you still can access the box its' done, if not further action is needed (keep the USB pen at hand, as it is your recovery method)
>>
>> I pulled the plug, reinserted the disks, plugged in the power and still no connection.
>

> --

Ephraim Gadsby Jr.

unread,
Sep 20, 2014, 7:50:25 PM9/20/14
to

Reinsert the usb and try

   Here we go: 

rcinetd enable

    Enabling boot execution of S41inetd 
   

loadsave_settings -sf

    No response.

[Added:]

This must be caused by issue 328, and fix-001 fixes it (System->Utilities->Fixes)

     I used the WebUI to apply fix-001

     Status page shows these two errors:
 


  • Unable to automatically fix sdb1, mounting Read Only: fsck 1.41.14 (22-Dec-2010)
    fsck.ext4: Device or resource busy while trying to open /dev/sdb1
    Filesystem mounted or opened exclusively by another program?
  • Unable to automatically fix sdc1, mounting Read Only: fsck 1.41.14 (22-Dec-2010)
    fsck.ext4: Device or resource busy while trying to open /dev/sdc1
    Filesystem mounted or opened exclusively by another program?
     
  • The fan is still oscillating.

0.1RC4-001-inetd_disable_webUI.fix: fix ticket 328: Inetd "Boot Enabled" disables itself. https://sourceforge.net/p/alt-Ff/tickets/328/  

Now I will save settings and power down the system. I hope when the system reboots all will be as it was before. 

    Well that didn't work. I'm just about to the point where I'd like to reflash the FW, reformat the 2 - 4Tb drives and start over from scratch. The constant oscillation of fan is just about driving one of our three cats nuts. Every time the fan speeds up he turns toward the NAS and meows quite pitifully.

João Cardoso

unread,
Sep 21, 2014, 10:40:30 AM9/21/14
to al...@googlegroups.com


On Sunday, September 21, 2014 12:50:25 AM UTC+1, Ephraim Gadsby Jr. wrote:

Reinsert the usb and try

   Here we go: 

rcinetd enable

    Enabling boot execution of S41inetd 
   

loadsave_settings -sf

    No response.

[Added:]

This must be caused by issue 328, and fix-001 fixes it (System->Utilities->Fixes)

     I used the WebUI to apply fix-001

After the issue appeared? That's too late.
And the fixes system has issues also! -- they are brand new in Alt-F. For some of them to persists across reboots the directory /Alt-F/usr/www/cgi-bin must exists before they are applied. DON'T create the directory yourself manually, instead install (on disk, not a removable USB pen) some Alt-F package with a webUI, such as, say, 'mediatomb'.
 

     Status page shows these two errors:
 


  • Unable to automatically fix sdb1, mounting Read Only: fsck 1.41.14 (22-Dec-2010)
    fsck.ext4: Device or resource busy while trying to open /dev/sdb1
    Filesystem mounted or opened exclusively by another program?
  • Unable to automatically fix sdc1, mounting Read Only: fsck 1.41.14 (22-Dec-2010)
    fsck.ext4: Device or resource busy while trying to open /dev/sdc1
    Filesystem mounted or opened exclusively by another program?

Do you have disks attached? Not only the USB pen? That is not in the procedure...
Don't  you have swap partitions on disks? sdx1 partitions are usually for swap, not data.
 
  •  
  • The fan is still oscillating.

That has been already covered in another thread, under the  "REPORTING STUFF: D-Link DNS 320L rev A3" topic.
The relevant links are:




0.1RC4-001-inetd_disable_webUI.fix: fix ticket 328: Inetd "Boot Enabled" disables itself. https://sourceforge.net/p/alt-Ff/tickets/328/  

Now I will save settings and power down the system. I hope when the system reboots all will be as it was before. 

    Well that didn't work.

It should. Removing the USB and rebooting without disks!
I'm assuming that only the USB pen is attached to the box.
The files in the USB pen shadow the ones in the firmware, and they only address inetd startup and configuration. As the system boots with those, the issue is there.

Also, the issue is a FAQ: "no access to webUI, ssh, telnet,... after rebooting, but samba is working". The cure is to perform a "soft reset" (>10sec pressed reset button), then telnet at port 26 and issue "rcinetd start", which gives access to the webUI, followed by boot enabling inetd, followed by "save settings" and a reboot to confirm that it is solved.
In some cases a "hard reset" (>20sec reset button pressed) is performed instead.

As the reset button is not working in the 320L, the alternative is to use a script on USB that is executed on boot, and that performs the same.functionality.

So, from the command line, after a "soft reset" the sequence of commands must be

rcinetd start # starts webUI, ssh, telnet...
rcinetd enable
# boot enable inetd
loadsave_settings
-sf # save modified files in flash
reboot
# obvious

The "hard reset" only performs

loadsave_settings -cf # clears all settings from flash, performing the equivalent of a "factory" reset
reboot


I'm just about to the point where I'd like to reflash the FW,

If there were any problem with the firmware the box would not even boot, nor the USB script executed, so that is not by itself a cure.
Depending on the Alt-F reflash options, the clear settings could also be done, but that can be replicated by the "loadsave_settings -cf" above.
Doing the "clear settings" is somehow drastic, as all your changes regarding configuration will be lost. The disk or firmware itself are NOT affected.
 
reformat the 2 - 4Tb drives and start over from scratch.

You are desperate, you are too accustomed to MS-win or the D-Link fw  ;-)
A distinct characteristic of Alt-F is that it works fine with any disk configuration/setup.

So, please review all your steps before taking such drastic (although safe) measures.

Ephraim Gadsby Jr.

unread,
Sep 25, 2014, 9:56:48 PM9/25/14
to al...@googlegroups.com


After the issue appeared? That's too late.
And the fixes system has issues also! -- they are brand new in Alt-F. For some of them to persists across reboots the directory /Alt-F/usr/www/cgi-bin must exists before they are applied. DON'T create the directory yourself manually, instead install (on disk, not a removable USB pen) some Alt-F package with a webUI, such as, say, 'mediatomb'.

       I'd like to do this, except that I'm starting to get just a bit tired of this and I think I'll hook my two 4Tb drives up to my notebook to access the extent of their inexplicable lack of proper file and directory structure.
  • Unable to automatically fix sdb1, mounting Read Only: fsck 1.41.14 (22-Dec-2010)
    fsck.ext4: Device or resource busy while trying to open /dev/sdb1
    Filesystem mounted or opened exclusively by another program?
  • Unable to automatically fix sdc1, mounting Read Only: fsck 1.41.14 (22-Dec-2010)
    fsck.ext4: Device or resource busy while trying to open /dev/sdc1
    Filesystem mounted or opened exclusively by another program?

Do you have disks attached? Not only the USB pen? That is not in the procedure...
Don't  you have swap partitions on disks? sdx1 partitions are usually for swap, not data.
 Yup, you noticed it as well.
  •  
  • The fan is still oscillating.

That has been already covered in another thread, under the  "REPORTING STUFF: D-Link DNS 320L rev A3" topic.
The relevant links are:




0.1RC4-001-inetd_disable_webUI.fix: fix ticket 328: Inetd "Boot Enabled" disables itself. https://sourceforge.net/p/alt-Ff/tickets/328/  

Now I will save settings and power down the system. I hope when the system reboots all will be as it was before. 

    Well that didn't work.

It should. Removing the USB and rebooting without disks!
I'm assuming that only the USB pen is attached to the box.
The files in the USB pen shadow the ones in the firmware, and they only address inetd startup and configuration. As the system boots with those, the issue is there.

Also, the issue is a FAQ: "no access to webUI, ssh, telnet,... after rebooting, but samba is working". The cure is to perform a "soft reset" (>10sec pressed reset button), then telnet at port 26 and issue "rcinetd start", which gives access to the webUI, followed by boot enabling inetd, followed by "save settings" and a reboot to confirm that it is solved.
In some cases a "hard reset" (>20sec reset button pressed) is performed instead.

As the reset button is not working in the 320L, the alternative is to use a script on USB that is executed on boot, and that performs the same.functionality.

So, from the command line, after a "soft reset" the sequence of commands must be

rcinetd start # starts webUI, ssh, telnet...
rcinetd enable
# boot enable inetd
loadsave_settings
-sf # save modified files in flash
reboot
# obvious

     The soft reset followed by the above commands didn't seem to do anything.
      # rcinetd start
      # Starting inetd: OK.
      # rcinetd enable
      # Enabling boot execution of S41inetd
      # loadsave_settings -sf
      #  No feedback from loadsave_settings
      # reboot
      # No feedback and it didn't reboot.   


The "hard reset" only performs

loadsave_settings -cf # clears all settings from flash, performing the equivalent of a "factory" reset
reboot


I'm just about to the point where I'd like to reflash the FW,

If there were any problem with the firmware the box would not even boot, nor the USB script executed, so that is not by itself a cure.
Depending on the Alt-F reflash options, the clear settings could also be done, but that can be replicated by the "loadsave_settings -cf" above.
Doing the "clear settings" is somehow drastic, as all your changes regarding configuration will be lost. The disk or firmware itself are NOT affected.
 
reformat the 2 - 4Tb drives and start over from scratch.

You are desperate, you are too accustomed to MS-win or the D-Link fw  ;-)

      You are so right about being accustomed to MS-win and being desperate to
       get something done. I guess that old habits die hard even for old guys like me.
 
A distinct characteristic of Alt-F is that it works fine with any disk configuration/setup.

So, please review all your steps before taking such drastic (although safe) measures.
 
So now I have a few questions:
    1. Removing the pen drive and rebooting, with or without the 2-4Tb drives
        puts me back to square one. No FTP, WebUI, SSH, or anything useful. This
        seems to indicate to me that whatever changes are being made are not being
        saved in the FW because a reboot returns to square one. Is my analysis correct?
    2. Since my 2-4Tb drives seem to be messed up what is the safest method for me to
        use which will get me back to a pristine set up where I can use Alt-F to repartition the
        drives and begin again? (By "messed up" I mean that the file structure that was there
        in the D-Link configuration is gone. Kaput. I should run some disk diagnostics on them
         to see if there's a hardware issue.)
    3. I have gone back over the forum and wiki and at this point I'm stumbling around in the
        dark. This is where I would normally have handed this off to the brightest intern working
        for me, or take the nuclear option and try to start from scratch. If you think that we can
        save and fix the current FW then I'm willing to follow your directions. So, which door
        should I choose?    


João Cardoso

unread,
Sep 26, 2014, 12:34:07 PM9/26/14
to al...@googlegroups.com


On Friday, September 26, 2014 2:56:48 AM UTC+1, Ephraim Gadsby Jr. wrote:
(...) 
Also, the issue is a FAQ: "no access to webUI, ssh, telnet,... after rebooting, but samba is working". The cure is to perform a "soft reset" (>10sec pressed reset button), then telnet at port 26 and issue "rcinetd start", which gives access to the webUI, followed by boot enabling inetd, followed by "save settings" and a reboot to confirm that it is solved.
In some cases a "hard reset" (>20sec reset button pressed) is performed instead.

As the reset button is not working in the 320L, the alternative is to use a script on USB that is executed on boot, and that performs the same.functionality.

So, from the command line, after a "soft reset" the sequence of commands must be

rcinetd start # starts webUI, ssh, telnet...
rcinetd enable
# boot enable inetd
loadsave_settings
-sf # save modified files in flash
reboot
# obvious

     The soft reset followed by the above commands didn't seem to do anything.
      # rcinetd start
      # Starting inetd: OK.
      # rcinetd enable
      # Enabling boot execution of S41inetd
      # loadsave_settings -sf
      #  No feedback from loadsave_settings
 
expected.
You can see if anything has been saved by using the command 'loadsave_settings -ll'
After a 'loadsave_settings -cf' nothing will be displayed by  'loadsave_settings -ll'.
'loadsave_settings' by itself will give a usage message

      # reboot
      # No feedback and it didn't reboot.   



not even a  "Connection to dns-320l closed by remote host." message? reboot worked for me.

The "hard reset" only performs

loadsave_settings -cf # clears all settings from flash, performing the equivalent of a "factory" reset
reboot

 
Try the above 'loadsave_settings -cf'. If 'reboot' doesn't work, pull the power cord, unplug USB and all disks and power if up again.
You should power up without any disk attached.

 
I'm just about to the point where I'd like to reflash the FW,

That's your second hypothesis.

However, if there is something wrong with the previous flash the box would not even boot. That's because at startup the u-boot bootloader (not modified by Alt-F) makes a checksum on both the flash-saved linux kernel and root filesystem and wouldn't boot them if a single *bit* is wrong. Literally.

(...) 
So, please review all your steps before taking such drastic (although safe) measures.
 
So now I have a few questions:
    1. Removing the pen drive and rebooting, with or without the 2-4Tb drives
        puts me back to square one. No FTP, WebUI, SSH, or anything useful. This
        seems to indicate to me that whatever changes are being made are not being
        saved in the FW because a reboot returns to square one. Is my analysis correct?
 
Or what is saved is not correct. That's why I asked you to try the "hard" reset.

    2. Since my 2-4Tb drives seem to be messed up

Don't know why. Only if power cycling at improper times affected them.
 
what is the safest method for me to
        use which will get me back to a pristine set up where I can use Alt-F to repartition the
        drives and begin again?

If performing a "hard" reset all settings will be lost and the first tour login wizard will be run -- don't skip it; when reaching the Disk Wizard, ask to reformat the disks.

(By "messed up" I mean that the file structure that was there
        in the D-Link configuration is gone.

You don't know that. Or you shouldn't know... you started messing up with the recommended procedure.
 
Kaput. I should run some disk diagnostics on them
         to see if there's a hardware issue.)

Disk->Utilities, Health
 
    3. I have gone back over the forum and wiki and at this point I'm stumbling around in the
        dark. This is where I would normally have handed this off to the brightest intern working
        for me, or take the nuclear option and try to start from scratch. If you think that we can
        save and fix the current FW then I'm willing to follow your directions. So, which door
        should I choose?     

Don't drink espresso coffee, count slowly from 1 to 10, deep breath, take one hour to solve the issue, be systematic, don't try to do it all in one step, and try the "hard" reset above -- no disks!

After all you are not a teenager :-)

Ephraim Gadsby Jr.

unread,
Sep 28, 2014, 4:46:23 PM9/28/14
to

Try the above 'loadsave_settings -cf'. If 'reboot' doesn't work, pull the power cord, unplug USB and all disks and power if up again.

You should power up without any disk attached.”


OK, something worked! The reboot command did nothing. Then I ran the loadsave_settings -cf and pulled the plug. After removing the drives and the pen drive I plugged it back in. To be quite honest with you I was not expecting to be able to access the WebUi as before. Well, attached is the screen shot of the status page. I was directed to the startup wizard and I began the startup process. So here I go and insert the drives and the system recognized them at the Disk Wizard page. I set them up for Raid 1 and reformatted them ext4. Then I get the awk divide by zero error. Next I'm dumped back to the disk wizard page and that's where I'm stuck. If I rerun the disk wizard I just get the same error. I know some errors are not show stoppers, but a divide by zero is usually something that one wants to avoid. So I decided to bypass the error on the Disk Wizard page and continued with the setup wizard. As I suspected things didn't go smoothly. Here's the error messages from the top of the status screen.


Unable
to automatically fix sda1, mounting Read Only: fsck 1.41.14
(22-Dec-2010)
fsck.ext4: Device or resource busy while trying
to open /dev/sda1
Filesystem mounted
or opened exclusively by another program?
  • Unable to automatically fix sdb1, mounting
    	Read Only: fsck 1.41.14 (22-Dec-2010)
fsck.ext4: Device or resource busy while trying
to open /dev/sdb1
Filesystem mounted
or opened exclusively by another program?
Since
the system seems to be resyncing the two disks I'll just go grab
myself a cold one and wait for it to complete before moving forward
and trying to get the fan oscillation problem fixed.
Don't
drink espresso coffee, count slowly from 1 to 10, deep breath, take
one hour to solve the issue, be systematic, don't try to do it all in
one step, and try the "hard" reset above -- no disks!


After all you are not a teenager :-)So true.


It's now 9:00am and the sync is at 90% so I'll go out for a bit and report back when it's finished. BTW is it me or is the edit function of Google groups really bad?

    
StatusPage.png
DiskWizard.png
DiskWizard2.png
RaidCreationandMaintenance.png
FinalStatusPage.png

João Cardoso

unread,
Sep 29, 2014, 11:26:38 AM9/29/14
to al...@googlegroups.com


On Sunday, September 28, 2014 9:46:23 PM UTC+1, Ephraim Gadsby Jr. wrote:

Try the above 'loadsave_settings -cf'. If 'reboot' doesn't work, pull the power cord, unplug USB and all disks and power if up again.

You should power up without any disk attached.”


OK, something worked! The reboot command did nothing.


I removed all patchwork from my 320L, tested the reboot command and it worked.
First, the login session was terminated with a message "Connection closed by foreign host.", then after a while the blue disk led turned on, after a while it turned off and the blue USB led turned on.
But, most important, the 'uptime' command showed that the system was up by 0 minutes, while before the reboot command it was up by several days.

When you say "did nothing", you are being vague.

 

Then I ran the loadsave_settings -cf and pulled the plug. After removing the drives and the pen drive I plugged it back in. To be quite honest with you I was not expecting to be able to access the WebUi as before. Well, attached is the screen shot of the status page. I was directed to the startup wizard and I began the startup process. So here I go and insert the drives and the system recognized them at the Disk Wizard page. I set them up for Raid 1 and reformatted them ext4. Then I get the awk divide by zero error.


That's a harmless error caused by an attempt to show the operation elapsed done percentage
 

Next I'm dumped back to the disk wizard page and that's where I'm stuck. If I rerun the disk wizard I just get the same error. I know some errors are not show stoppers, but a divide by zero is usually something that one wants to avoid. So I decided to bypass the error on the Disk Wizard page and continued with the setup wizard. As I suspected things didn't go smoothly. Here's the error messages from the top of the status screen.


There are two odd things in the screenshots:
-In the RAID page two RAID devices appear, md0, which is RAID1 and is OK, and md2, which is JBOD (linear) built from (components are) sda and sdb, which are the *whole* disk. That is wrong. Have you created a RAID in the RAID page?
-The Status page shows that swap is OK with 1GB (System section, Swap), and that md0 is also OK and a filesystem build with it; also md2 appears but is not active.

The message in the Status page regarding the unable to fix sda1/sdb1 is probably derived from the md2 device being wrong. Don't know how it appeared.

Please go to Services->User, user, StartNow to generate a new System Configuration log (no service will be started, it's a one shot event), then go to System->Utilities, View Logs,  "System Configuration", browse to the page bottom and Download and attach it.



Unable
to automatically fix sda1, mounting Read Only: fsck 1.41.14
(22-Dec-2010)
fsck.ext4: Device or resource busy while trying
to open /dev/sda1
Filesystem mounted
or opened exclusively by another program?
  • Unable to automatically fix sdb1, mounting
    	Read Only: fsck 1.41.14 (22-Dec-2010)
fsck.ext4: Device or resource busy while trying
to open /dev/sdb1
Filesystem mounted
or opened exclusively by another program?
Since
the system seems to be resyncing the two disks I'll just go grab
myself a cold one and wait for it to complete before moving forward
and trying to get the fan oscillation problem fixed.
Don't
drink espresso coffee, count slowly from 1 to 10, deep breath, take
one hour to solve the issue, be systematic, don't try to do it all in
one step, and try the "hard" reset above -- no disks!


After all you are not a teenager :-)So true.


It's now 9:00am and the sync is at 90% so I'll go out for a bit and report back when it's finished. BTW is it me or is the edit function of Google groups really bad?


All Google Groups experience is *really* bad. I just don't move out because I don't want to lose all collected user experience.
 

Ephraim Gadsby Jr.

unread,
Sep 29, 2014, 7:54:35 PM9/29/14
to al...@googlegroups.com

João,


I removed all patchwork from my 320L, tested the reboot command and it worked.

First, the login session was terminated with a message "Connection closed by foreign host.", then after a while the blue disk led turned on, after a while it turned off and the blue USB led turned on.

But, most important, the 'uptime' command showed that the system was up by 0 minutes, while before the reboot command it was up by several days.


When you say "did nothing", you are being vague.


Sorry about the vagueness of my comment. What I was trying to say was that I logged into the system using telnet (Putty) and then I issued the “reboot” command in the telnet session window. Nothing appeared after I hit the Enter key. Some commands give a status reply such as “rcinetd start” will return a “Starting inetd: OK”. The reboot command didn't give me any feedback.


I just issued the “reboot” command to see what happens to the leds. The USB blue led turned off, both HD blue

leds turned on then off and the USB blue led turned back on. My telnet session was terminated without any reply in the telnet window. Restarted telnet and “uptime” gave me 1 min. Which is what what you experienced.


Next I went to the WebUI where I logged in and then I went to Disk->Filesystems and found our old friend MD2 with no mention of MD0. Attached is the screen shot.


Dev.

Size

FS

Mnt

Label

Mount Options

FS Operations

New FS Operations

md2

7452.0GB0.5GB3725.5GB

none







sda2

3725.5GB

ext4







sdb2

3725.5GB

ext4








So being the curious guy I followed your instructions [“Please go to Services->User, user, StartNow to generate a new System Configuration log (no service will be started, it's a one shot event), then go to System->Utilities, View Logs,  "System Configuration", browse to the page bottom and Download and attach it.”] and when I try to view the System Configuration log the browser gives me a “System reset error”. That means I'm unable to see the system configuration log to determine what's happening with the Raid configuration. The original log is attached and it appeared that MD2 was stopped by the system. I have tried to recreate the system configuration log several times but I'm unable to view the log and the “System reset error” page is displayed each time I try. Should I try in Disk-->Raid to destroy the MD2 raid and then use the disk wizard to recreate MD0? Frankly this is quite curious and I'm very glad that for once I followed my own advice and backed up all my data to my 10Tb system.



There are two odd things in the screenshots:

-In the RAID page two RAID devices appear, md0, which is RAID1 and is OK, and md2, which is JBOD (linear) built from (components are) sda and sdb, which are the *whole* disk. That is wrong. Have you created a RAID in the RAID page?

-The Status page shows that swap is OK with 1GB (System section, Swap), and that md0 is also OK and a filesystem build with it; also md2 appears but is not active.


The message in the Status page regarding the unable to fix sda1/sdb1 is probably derived from the md2 device being wrong. Don't know how it appeared.


Well, something is really strange in the HD setup.


Please go to Services->User, user, StartNow to generate a new System Configuration log (no service will be started, it's a one shot event), then go to System->Utilities, View Logs,  "System Configuration", browse to the page bottom and Download and attach it.


I have attached the first System Configuration log but it doesn't look like I can create another one. I'll try to reboot and see what happens......well it didn't change anything. I'm still unable to create the log.

Well that's all the news for now. Just let me know what you think I should do next. If you want me to take the Hds out and hook them to my Linux box and wipe them I can do that.

Thanks again for your support and guidance.......Ephraim The Old
alt-f.log.txt
AfterRebootFileSysemMaintenanceScreenshot from 2014-09-29 15:10:40.png
AfterRebootRaidCreationScreenshot from 2014-09-29 15:46:15.png
PostRebootStatusScreenshot from 2014-09-29 15:33:56.png

João Cardoso

unread,
Oct 1, 2014, 10:36:29 AM10/1/14
to al...@googlegroups.com


On Tuesday, September 30, 2014 12:54:35 AM UTC+1, Ephraim Gadsby Jr. wrote:

João,


(...) 


So being the curious guy I followed your instructions [“Please go to Services->User, user, StartNow to generate a new System Configuration log (no service will be started, it's a one shot event), then go to System->Utilities, View Logs,  "System Configuration", browse to the page bottom and Download and attach it.”] and when I try to view the System Configuration log the browser gives me a “System reset error”.


I can't reproduce that.
 

That means I'm unable to see the system configuration log to determine what's happening with the Raid configuration. The original log is attached and it appeared that MD2 was stopped by the system. I have tried to recreate the system configuration log several times but I'm unable to view the log and the “System reset error” page is displayed each time I try.


Browser cache effect?

In any case, in the alt-f.log you sent (generated at power up or latter? only the logged date could tell) almost all seems to be OK
- the disks are correctly partitioned
-the disk partitions intended for RAID (sda2/sdb2) are indeed being used for RAID1 (md0)
-There exists a ext4 filesystem build on md0, and md0 is mounted.
-swap is active in the partitions intended fro them (sda1/sdb1).

The odd thing is that the whole disk (sda/sdb) is also marked for RAID-JBOD (md2), which is not normal.

The screenshots don't tell the same story.
 

Should I try in Disk-->Raid to destroy the MD2 raid


I think that it is the best option, but don't know if it will succeeds, as Alt-F don't handle RAIDs build on top of whole disks.
Start first to unmount all filesystems in Disk->Filesystems.
Then you don't need to go to the Disk Wizard again; instead, just destroy the md2 RAID, go to the Status page, see if md0 appears, go again to the RAID page and create a RAID whose components are sda2 and sdb2 -- the log says that at boot one already exists, and mounted! That isn't shown neither in the Status not the Filesystem pages.

If all that doesn't work, run the Disk Wizard right after a reboot.

Ephraim Gadsby Jr.

unread,
Oct 6, 2014, 4:39:42 PM10/6/14
to

João,

I'm sorry for the long delay in responding to your last post. I had the thought that the md2 invisible partition could be caused by a hardware malfunction on the WD RED 4Tb drive. So I pulled the drives and ran smartctrl on both drives. One gave me the readout of the drive as expected. The second drive gave me a failed to read error. So I took it back to the store where I bought it and they hooked it up to their testbed and got the same results. Now I'm waiting for the replacement to arrive which means being the nerd that I am I'm unable to wait so I drop my two 5Tb drives in the 320l and fire it up. I ran through the setup without a hitch this time and the system started a resync on the drives. It took two days to finish, but once done the drives were working as expected as a RAID 1.

I was able to install mediatomb, but I haven't had time to fiddle with it. I copied some video files from my backup successfully.

My main concern is that the fan was still oscillating and sysctrl is stopped. I've attached the Alt-F.logs and System.logs.


I telnet into the system and execute the following:

[root@dns320l]# rcsysctrl start

Starting sysctrl: Illegal instructions

Fail.

[root@dns320l]# rcsysctrl status

sysctrl stopped

[root@dns320l]# rcsysctrl restart

Restarting sysctrl

Stopping sysctrl: OK.

Starting sysctrl: Illegal instruction

Fail.

[root@dns320l]# rcsysctrl reload

Reloading sysctrl: Fail.


So I went back into Google Groups and revisited Fixes for the DNS-320L I downloaded the tar file and extracted it as instructed. I copied it to the dns320l-fixes directory, set file permissions, edited the script file and copied it to the /mnt/DeansCloud directory. I set file permissions and then executed ./dns320l-patch.sh to test it. Here's what I get in response.


[root@dns320l]# ./dns320l-patch.sh

./dns320l-patch.sh: Line 42: usage: not found


The offending line is: esac, at the bottom of the file which just closes out the Case statement. (Yes I ran Dos2Unix on the script files. I may be old, but I do eventually learn stuff.)


I tried setting the script to run at the end of the boot process by using the WebUI Services->User->User Config to add the fully pathed command line and hit Submit and then I saved the settings. Next it was reboot number two.


After the reboot the fan stopped oscillating (YEAH), but on the status screen I get the following error: awk: cmd. line:1: Unexpected end of string expr: syntax error sh: °C/°F: bad number sh: °C/°F: bad number sh: °C/°F: bad number sh: bad number sh: bad number sh: bad numbe. When I looked at WebUI->Services->User->User Config it kept the script command line. (YEAH #2)


I also telneted to see if the script file actually worked and I still get the following:


[root@dns320l]# ./dns320l-patch.sh#[J start

Stopping sysctrl: OK.

Starting sysctrl: Illegal instruction

Fail.

killall: dns320l-daemon: no process killed

[root@dns320l]#


So I'm making progress. Now if I can just figure out why sysctrl keeps turning off.


One last thing from my telnet log

[root@dns320l]# dns320l-daemon -dx help
-sh: dns320l-daemon: Permission denied
[root@dns320l]#

   Since I'm logged in as root why would Permission be denied?


Wait, there's more......when I try to start sysctrl from system->services a pop up window tells me: Starting sysctrl: Illegal instruction
Fail.


Thanks again for all your hard work. I really appreciate it!


Ephraim

First-alt-f.log
First-SystemLog.log
Second-alt-f.log
Second-SystemLog.log

João Cardoso

unread,
Oct 7, 2014, 11:35:03 AM10/7/14
to al...@googlegroups.com


On Monday, October 6, 2014 9:39:42 PM UTC+1, Ephraim Gadsby Jr. wrote:

João,

I'm sorry for the long delay in responding to your last post. I had the thought that the md2 invisible partition could be caused by a hardware malfunction on the WD RED 4Tb drive. So I pulled the drives and ran smartctrl on both drives. One gave me the readout of the drive as expected. The second drive gave me a failed to read error. So I took it back to the store where I bought it and they hooked it up to their testbed and got the same results. Now I'm waiting for the replacement to arrive which means being the nerd that I am I'm unable to wait so I drop my two 5Tb drives in the 320l and fire it up. I ran through the setup without a hitch this time and the system started a resync on the drives. It took two days to finish, but once done the drives were working as expected as a RAID 1.

I was able to install mediatomb, but I haven't had time to fiddle with it. I copied some video files from my backup successfully.

My main concern is that the fan was still oscillating and sysctrl is stopped. I've attached the Alt-F.logs and System.logs.


I telnet into the system and execute the following:

[root@dns320l]# rcsysctrl start

Starting sysctrl: Illegal instructions

Fail.

[root@dns320l]# rcsysctrl status

sysctrl stopped

[root@dns320l]# rcsysctrl restart

Restarting sysctrl

Stopping sysctrl: OK.

Starting sysctrl: Illegal instruction

Fail.

[root@dns320l]# rcsysctrl reload

Reloading sysctrl: Fail.


So I went back into Google Groups and revisited Fixes for the DNS-320L I downloaded the tar file and extracted it as instructed. I copied it to the dns320l-fixes directory, set file permissions, edited the script file and copied it to the /mnt/DeansCloud directory. I set file permissions and then executed ./dns320l-patch.sh to test it. Here's what I get in response.


[root@dns320l]# ./dns320l-patch.sh

./dns320l-patch.sh: Line 42: usage: not found



It should be:

./dns320l.sh start

 I have fixed the "usage" in the post (and added a new line, 'adjtime -restart')

The offending line is: esac, at the bottom of the file which just closes out the Case statement. (Yes I ran Dos2Unix on the script files. I may be old, but I do eventually learn stuff.)


I tried setting the script to run at the end of the boot process by using the WebUI Services->User->User Config to add the fully pathed command line


Only the full path to the command is needed, the 'start' or 'stop' argument is added automatically at boot or shutdown time

and hit Submit and then I saved the settings. Next it was reboot number two.


 
I can't reproduce none of the bellow reported issues. I can only assume that you had a bad download of the tar file. Have you downloaded and extracted it in the box, right? Not under MS-Win, right?

Please remove the files and folders and restart.

I have updated the instructions, including a check to the dns320l.tar.gz file.

Ephraim Gadsby Jr.

unread,
Oct 7, 2014, 8:45:23 PM10/7/14
to al...@googlegroups.com

João,


It should be:

./dns320l.sh start

     Correct. I was transcribing the text from the Putty window and I left off the 'start'. 

 I have fixed the "usage" in the post (and added a new line, 'adjtime -restart')

I tried setting the script to run at the end of the boot process by using the WebUI Services->User->User Config to add the fully pathed command line


Only the full path to the command is needed, the 'start' or 'stop' argument is added automatically at boot or shutdown time
  to
I can't reproduce none of the bellow reported issues. I can only assume that you had a bad download of the tar file. Have you downloaded and extracted it in the box, right? Not under MS-Win, right?

    I extracted to my Ubuntu machine and then used SSH to transfer the files to the 320l.

Please remove the files and folders and restart.

     Done.

I have updated the instructions, including a check to the dns320l.tar.gz file.

     Here's where I think the problem is located. Attached is a segment of the Putty log file where I follow your directions on downloading the file from Google and doing it from the dns320l terminal session.  As the text flew by here's what I noticed as strange.

     

    ERROR: cannot verify groups.google.com's
    certificate, issued by '/C=US/O=Google Inc/CN=Google Internet
    Authority G2':
    Issued certificate not yet valid.
    To connect to groups.google.com insecurely, use
    `--no-check-certificate'.

So I added the '--no-check-certificate' to the end of the wget line and I was able to
download the file. Next I ran the MD5 check and this is what I got:
[root@dns320l]# md5sum -c dns320l.tar.gz.md5 md5sum: WARNING: 1 of 1 computed checksums did NOT match
   
      I've done this a half dozen times and I checked and rechecked the MD5 that you use in the instructions, but I always get the same results. It appears that the file is not getting to my machine without some corruption. I've attached the Putty log for you to see. I just don't understand why I'm unable to download the file directly from your link to my Ubuntu box without corruption. Any suggestions?

    One other thing, the blue led on the front power button is constantly blinking, but the only indication of anything wrong on the WebUI is the error at the top of the Status page:
awk: cmd. line:1: Unexpected end of string expr: syntax error sh: °C/°F: bad number sh: °C/°F: bad number sh: °C/°F: bad number sh: bad number sh: bad number sh: bad numbe. 

    So it's two steps forward, one step back.
   Peace.....Ephraim
DownloadFailed.txt

João Cardoso

unread,
Oct 8, 2014, 9:31:04 AM10/8/14
to al...@googlegroups.com
I don't know what else to say, it works as described.

I ssh the box as the 'root' user, executed 'cd /tmp',
copy the instructions from the post (excluding the first 'cd' command) and paste in the ssh window:

silver:~ # ssh root@dns-320l
root@dns-320l's password: 
COLUMNS=100;LINES=54;export COLUMNS LINES;
[root@DNS-320L]# cd /tmp # next is copy/paste from the post
[root@DNS-320L]# echo -n "636c7cbec3cc770cf6fda3722dc17af6  dns320l.tar.gz" > dns320l.tar.gz.md5 # g
enerate md5sum to verify download
[root@DNS-320L]# wget -O dns320l.tar.gz https://groups.google.com/group/alt-f/attach/68d2937564df0ad
d/dns320l.tar.gz?part=0.1
Resolving groups.google.com... 2a00:1450:400c:c01::64, 173.194.78.101, 173.194.78.102, ...
Connecting to groups.google.com|2a00:1450:400c:c01::64|:443... failed: Address family not supported by protocol.
Connecting to groups.google.com|173.194.78.101|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Resolving 16189135493643817969.googlegroups.com... 2a00:1450:400c:c00::89, 74.125.195.137
Connecting to 16189135493643817969.googlegroups.com|2a00:1450:400c:c00::89|:443... failed: Address family not supported by protocol.
Connecting to 16189135493643817969.googlegroups.com|74.125.195.137|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/octet-stream]
Saving to: 'dns320l.tar.gz'

    [  <=>                                                      ] 71,438       254KB/s   in 0.3s   

2014-10-08 14:11:28 (254 KB/s) - 'dns320l.tar.gz' saved [71438]

[root@DNS-320L]# md5sum -c dns320l.tar.gz.md5 # must display "dns320l.tar.gz: OK"
dns320l.tar.gz: OK
[root@DNS-320L]# mkdir dns320l-fixes
[root@DNS-320L]# tar -C dns320l-fixes -xzf dns320l.tar.gz

then I executed the command

# cat > foo.sh

copied the boot script from the post, paste it into the ssh window, then terminate hitting CTRL-C,
edited the 'foo.sh' file, editing the top FIXDIR=...  and setting it as FIXDIR=/tmp,
then make it executeble by using the command 'chmod +x foo.sh'
and executed it using './foo.sh start':

Stopping sysctrl: OK.
Starting sysctrl: OK.
 8 Oct 14:13:06 sntp[1193]: Started sntp
2014-10-08 14:13:06.206120 (+0000) -0.00139 +/- 0.033737 secs
2014-10-08 14:13:06.215457 (+0000) -0.000691 +/- 0.020782 secs
2014-10-08 14:13:06.225638 (+0000) +0.001181 +/- 0.036209 secs
2014-10-08 14:13:06.243939 (+0000) +0.000674 +/- 0.057556 secs

This was done without any disk, so other changes of mine would not influence the result. 
Of course for the changes to persist across reboots this has to be done on disk, using a correct first 'cd /mnt/<fs>' command

Sorry I can't help more, it's just working!
Reply all
Reply to author
Forward
0 new messages