Lacie EdMini V2 - noob review - speed question

Re: Lacie EdMini V2 - noob review - speed question

Postby swamswam_h » Tue Sep 11, 2012 9:13 pm

MiniDLNA:
That's weird. Every field had 1 space preceding the default value and it wouldn't enable the server because of errors in the 'entered' values (just clicking ok with the default values).

EEPROM and shutdown:
It restarts correctly by the way.
I read the thread again and your conclusion seems correct. But does this mean that if power is connected to the system that it is - in essence - 'always on'? CPU running, uboot active and waiting for user interaction? Even if the eeprom value is set correctly the system would be in a halted state and thus safe to shutdown (pull the plug), but it would never be turned off that way (and consume a lot of power).
I found the GPL source for the Edmini, do you have any thoughts on where i could find hints for the led and shutdown gpio's? I could start at the very first letter and work my way through, but an estimated guess at where it could be would be helpfull.

I will contact this 'ruben' from the thread and inquire if his efforts ever produced something usefull (beside the eeprom trick).

Thanks!

(I know your time is limited... i'm surprised we got this far!)
swamswam_h
 
Posts: 45
Joined: Thu Jun 28, 2012 7:07 pm

Re: Lacie EdMini V2 - noob review - speed question

Postby swamswam_h » Wed Sep 12, 2012 11:55 am

In the sources (mind you: i am new to linux and c-programming) i find several scripts (?) that refer to reboots/halts/shutdowns :

In busybox (reboot.c):

/* vi: set sw=4 ts=4: */
/*
* Mini reboot implementation for busybox
*
* Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/

#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
#include <getopt.h>
#include <sys/reboot.h>
#include "busybox.h"
#include "init_shared.h"


extern int reboot_main(int argc, char **argv)
{
char *delay; /* delay in seconds before rebooting */

if(bb_getopt_ulflags(argc, argv, "d:", &delay)) {
sleep(atoi(delay));
}

#ifndef CONFIG_INIT
#ifndef RB_AUTOBOOT
#define RB_AUTOBOOT 0x01234567
#endif
return(bb_shutdown_system(RB_AUTOBOOT));
#else
return kill_init(SIGTERM);
#endif
}

/*
Local Variables:
c-file-style: "linux"
c-basic-offset: 4
tab-width: 4
End:
*/

or in busybox (halt.c):
/* vi: set sw=4 ts=4: */
/*
* Mini halt implementation for busybox
*
* Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/

#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
#include <getopt.h>
#include <sys/reboot.h>
#include "busybox.h"
#include "init_shared.h"


extern int halt_main(int argc, char **argv)
{
char *delay; /* delay in seconds before rebooting */

if(bb_getopt_ulflags(argc, argv, "d:", &delay)) {
sleep(atoi(delay));
}

#ifndef CONFIG_INIT
#ifndef RB_HALT_SYSTEM
#define RB_HALT_SYSTEM 0xcdef0123
#endif
return(bb_shutdown_system(RB_HALT_SYSTEM));
#else
return kill_init(SIGUSR1);
#endif
}

Does this give us any clues?

thanks
swamswam_h
 
Posts: 45
Joined: Thu Jun 28, 2012 7:07 pm

Re: Lacie EdMini V2 - noob review - speed question

Postby fvdw » Wed Sep 12, 2012 4:30 pm

no this doesn't give me any clue

what i can try to do is compile the sysvinit full version of shutdown command, maybe that has some options that the busybox version doesn't have

but I think this will not solve this issue, it seems that the the edmini_v2 doesn't support the standard shutdown command. Also the spd8020 and nwsp1 don't support it and needed a special procedure and adaptations in the kernel

but we can try... ;)
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Lacie EdMini V2 - noob review - speed question

Postby fvdw » Wed Sep 12, 2012 5:06 pm

here you go the full versions of "halt" and "shutdown"

they should be installed in /sbin (rename orginal versions if present in order to be able to revert back)

on my system (nwsp2) this "shutdown" command works not completely when trying to power off, it halts the system but led remains on en network card raims active. The reboot works

I used for poweroff (the n option is required to prevent using init)
Code: Select all
/path-to/shutdown -hPn -t1 now

To reboot
Code: Select all
/path-to/shutdown -rn -t1 now


On my nwsp I could switch it off succesfully using the "halt" command
Code: Select all
/path-to/halt -fhip

also this one shuts it down
Code: Select all
/path-to/halt -fp

(the -f option is necessary to prevent that shutdown is called)

So I guess you have the biggest chance with trying to use "halt"
Code: Select all
root@fvdwsl-nwsp2:/share/1000/fvdw/sysvinit-2.88dsf/src # ./shutdown --help
./shutdown: invalid option -- -
Usage:    shutdown [-akrhPHfFnc] [-t sec] time [warning message]
                  -a:      use /etc/shutdown.allow
                  -k:      don't really shutdown, only warn.
                  -r:      reboot after shutdown.
                  -h:      halt after shutdown.
                  -P:      halt action is to turn off power.
                  -H:      halt action is to just halt.
                  -f:      do a 'fast' reboot (skip fsck).
                  -F:      Force fsck on reboot.
                  -n:      do not go through "init" but go down real fast.
                  -c:      cancel a running shutdown.
                  -t secs: delay between warning and kill signal.
                  ** the "time" argument is mandatory! (try "now") **
root@fvdwsl-nwsp2:/share/1000/fvdw/sysvinit-2.88dsf/src #


Code: Select all
root@fvdwsl-nwsp2:/share/1000/fvdw/sysvinit-2.88dsf/src # ./halt --help
usage: halt [-n] [-w] [-d] [-f] [-h] [-i] [-p]
        -n: don't sync before halting the system
        -w: only write a wtmp reboot record and exit.
        -d: don't write a wtmp record.
        -f: force halt/reboot, don't call shutdown.
        -h: put harddisks in standby mode.
        -i: shut down all network interfaces.
        -p: power down the system (if possible, otherwise halt).
root@fvdwsl-nwsp2:/share/1000/fvdw/sysvinit-2.88dsf/src #
You do not have the required permissions to view the files attached to this post.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Lacie EdMini V2 - noob review - speed question

Postby swamswam_h » Wed Sep 12, 2012 8:17 pm

I have installed the two commands in the /sbin directory. There was no shutdown command present. Halt was a symbolic link to the busybox executable. But no shutdown command present. There are:
standby-spd, reboot-spd, reboot (symbolic link) and poweroff (symbolic links also to the /bin/busybox).
Chmodded the files to 777.
swamswam_h
 
Posts: 45
Joined: Thu Jun 28, 2012 7:07 pm

Re: Lacie EdMini V2 - noob review - speed question

Postby fvdw » Wed Sep 12, 2012 8:32 pm

and do these new commands make it work to power it off ?
For instance what does
Code: Select all
/sbin/halt -fp
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Lacie EdMini V2 - noob review - speed question

Postby swamswam_h » Wed Sep 12, 2012 8:57 pm

halt -fp
SSH connection is dropped/my terminal freezes. Device is non responsive to pings, connections are broken, fan stays on, cpu is hot, network leds stay on but show no flicker when the device is pinged (they did after issuing the shutdown command from the web-interface <- probably because my router has a WOL-function where IP is binded to mac for this device).

halt -fhip
Same.

The device is unresonsive to the button after these commands, but boots automatically after a power cycle.

I have added the contents of my eeprom for reference.
You do not have the required permissions to view the files attached to this post.
swamswam_h
 
Posts: 45
Joined: Thu Jun 28, 2012 7:07 pm

Re: Lacie EdMini V2 - noob review - speed question

Postby swamswam_h » Wed Sep 12, 2012 9:03 pm

shutdown -rn -t1 now -> reboots fine, everything ok. SSH connection is terminated. Terminal responds normally.
shutdown -hPn -t1 now -> system does not respond to pings, SSH connection is terminated. Terminal responds normally, network connections dropped, fan stays on, network leds stay on, hdd is off???
swamswam_h
 
Posts: 45
Joined: Thu Jun 28, 2012 7:07 pm

Re: Lacie EdMini V2 - noob review - speed question

Postby fvdw » Thu Sep 13, 2012 8:07 am

think further then this I can not help you to solve this issue

undoubtly kernel modifications will be necessary and are possible to solve it but which one :dontknow
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Lacie EdMini V2 - noob review - speed question

Postby Jocko » Thu Sep 13, 2012 9:14 am

Maybe Fvdw, you can find some tricks in this link.

http://sequanux.org/pipermail/lacie-nas ... 00084.html

Yes, I noted it is for LaCie d2 Network ;) but like d2 Network is the "next version" of EdMini and it uses also a file /proc/edmini with the lacie kernel version, maybe the trick how modify the vanilla source may run
Jocko
Site Admin - expert
 
Posts: 11529
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

PreviousNext

Return to Lacie Internet space vs1

Who is online

Users browsing this forum: No registered users and 3 guests