Are you a spammer

Please note, that the first 3 posts you make, will need to be approved by a forum Administrator or Moderator before they are publicly viewable.
Each application to join this forum is checked at the Stop Forum Spam website. If the email or IP address appears there when checked, you will not be allowed to join this forum.
If you get past this check and post spam on this forum, your posts will be immediately deleted and your account inactivated.You will then be banned and your IP will be submitted to your ISP, notifying them of your spamming. So your spam links will only be seen for an hour or two at most. In other words, don't waste your time and ours.

This forum is for the use and enjoyment of the members and visitors looking to learn about and share information regarding the topics listed. It is not a free-for-all advertising venue. Your time would be better spent pursuing legitimate avenues of promoting your websites.

NAS programming....

Source code I have written openly published for your viewing pleasure.


NAS programming....

Postby TheeMahn » Fri Aug 24, 2012 1:27 pm

Thur Oct 24, 2013: Been a minute since I revised this tool:
# Change-log:
# 1.7.1-5 initial public release
# 1.7.1-6 Added net-mask detection, not all routers etc assign 192.168.1.*
# 1.7.1-7 Began implementation of NFS (Network File System)
# Added reusable code in Version function
# Added injection / auto-mounting of NFS to fstab
# Added error handling routines to inform end user
# 1.7.1-8 Added auto-mount of NFS file-systems.
# Code cleanup using a tool I wrote.
# Wrote bash auto completion handler.
# Added active interface detection, should have been priority #1
# 1.7.2-1 Fixed help systems
# Added report switch
# Fixed bash auto-completion
# Tossed wifi interfaces to the curb.
# Bumped version # to comply with other tools being released.
# Adjusted dependencies determined from bash-depends application
# 1.9.8 Added support for Western Digital My Cloud NAS Drives.
#
# ==============================================================================

Lintian error free and shellcheck error free.
ultimate-edition-nas-tools_1.9.8_all.deb
Ultimate Edition NAS Tools 1.9.8
(15.17 KiB) Downloaded 4 times


Also supports for sure the following drive under Ultimate Edition 5.0 & 5.2 with the above deb.
Fri Aug 24, 2012 1:27 pm:
I have BEGAN writing a program to make what my NAS is currently to be those of you that possess one your NAS. For those of you that do not understand what a NAS is don't feel bad I too did not know and bought it solely for the space provided and backup. Solid Gigabit in house so no bottleneck. The device in question. I want to bring you up to date as learned, it is basically a computer w/o a video card. My end users purchased it for me to back up operating systems I write. The drive is faulty when sitting on the docking bay due to power-savings and shutting down and starting up - runs super hot. I ripped the drive out hard mounted it to my system, dropped in a Solid State Disk (SSD) and went to work.

A SSD is not plagued by things as a mechanical hard disk is. It was in my best interest to do so until I can get into what is causing the heating issues. I could also get into the 2TB barrier, but is beyond the scope of what I am here to educate people of.

Many flaws in design I have had in simple tasks such as knowing what it's IP is. Support for windows is shaky at best compared to what I have done for this device in our world of Linux in which the device lives in. Grant you at current time of posting a rpm based red-hat Linux. Once again fret not I will work any system to cater to our users. I present to you at current time junk, however a step in the right direction.

We once again BEGIN

Lets's not screw around and break out "Some" source code this is the programming section right?
Thursday DEC 06, 2012 - The Junk statement above, begins to phase out:
Code: Select all
#!/bin/bash
NASUPVERSION="1.7.1-7"
BUILDDATE="12/06/12"
# title      :nasup
# description   :Detect and auto mount Seagate Go Flex line of NAS.
# author   :Glenn Cady <theemahn@ultimateedition.info>
# date      :12/06/2012
# version   :1.7.1-7   
# usage      :nasup --help
# notes      :See change-log below for further information.
# bash_version   :4.2.8(1)-release
# ==============================================================================
# Change-log:
# 1.7.1-5    initial public release
# 1.7.1-6   Added net-mask detection, not all routers etc assign 192.168.1.*
# 1.7.1-7   Began implementation of NFS (Network File System)
#      Added reusable code in Version function
#      Added injection / auto-mounting of NFS to fstab
#      Added error handling routines to inform end user
# ==============================================================================
# Nasup(c) 2012 Glenn Cady under GNU GPL v2.0+ by
# Glenn Cady <theemahn@ultimateedition.info> written explicitly for the
# Seagate Go-flex line of NAS.
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
#
PASSWORD=''      # Your Password to mount the NAS
MOUNTPOINT='/media/NAS'   # Example: /media/NAS_3TB
NASIP=''      # Example: 192.168.0.105 not specifying an IP will search for the NAS
SLASH="/"

# You should not have to change any of the below. Actually none of the above as of 1.7.1-6.
# set colors so errors etc. stand out.

txtblk='\e[0;30m'   # Black - Regular
txtred='\e[0;31m'   # Red
txtgrn='\e[0;32m'   # Green
txtylw='\e[0;33m'   # Yellow
txtblu='\e[0;34m'   # Blue
txtpur='\e[0;35m'   # Purple
txtcyn='\e[0;36m'   # Cyan
txtwht='\e[0;37m'   # White
bldblk='\e[1;30m'   # Black - Bold
bldred='\e[1;31m'   # Red
bldgrn='\e[1;32m'   # Green
bldylw='\e[1;33m'   # Yellow
bldblu='\e[1;34m'   # Blue
bldpur='\e[1;35m'   # Purple
bldcyn='\e[1;36m'   # Cyan
bldwht='\e[1;37m'   # White
unkblk='\e[4;30m'   # Black - Underline
undred='\e[4;31m'   # Red
undgrn='\e[4;32m'   # Green
undylw='\e[4;33m'   # Yellow
undblu='\e[4;34m'   # Blue
undpur='\e[4;35m'   # Purple
undcyn='\e[4;36m'   # Cyan
undwht='\e[4;37m'   # White
bakblk='\e[40m'      # Black - Background
bakred='\e[41m'      # Red
badgrn='\e[42m'      # Green
bakylw='\e[43m'      # Yellow
bakblu='\e[44m'      # Blue
bakpur='\e[45m'      # Purple
bakcyn='\e[46m'      # Cyan
bakwht='\e[47m'      # White
txtrst='\e[0m'      # Text Reset

# obtain IP Net-mask
IPBLOCK=$(ifconfig -a | grep 'inet addr' | awk -F: '{ print $2 }' | awk '{ print $1 }' | sed 's/127.0.0.1//g' | sed '/^$/d' | sed "s/-[^-]*$//" | sed '/^$/d' | cut -f 1-3 -d.)

#Dump version info and exit.
function VERSION() {
echo -e "${undwht}nasup $NASUPVERSION, Build date: "$BUILDDATE${txtrst}"
GNU nasup home page: <http://www.ultimateedition.info/>.
E-mail bug reports to: <theemahn@ultimateedition.info>.
Be sure to include the word nasup somewhere in the Subject: field."
echo -e "${txtrst}"
}

function Scan {
# Initiate header
VERSION

# Command switch check for NFS
if [[ $2 == "-nfs" ]];then
   if [[ $3 == "" ]];then
      #Invalid switche(s) provided dump error, example usage and exit.
      echo -e "${bldred}Missing switch --nfs requires add or remove:"
      echo -e "Example:${bldwht}$0 --scan --nfs add${txtrst}"
      exit 0;
   fi
fi

# Begin Scan for NAS drive(s)
echo -e "${undcyn}Scanning $IPBLOCK.* for Go-flex IP..${txtrst}"
NASIP=`nmap --system-dns -sP $IPBLOCK.0/24 | awk /report/ | grep 'GoFlex' | cut -f2 -d'(' | sed 's/)//g'`

# -->Additional scanning code will go here for freenas, netgear etc.<--

# Whoopee no NAS found
if [[ $NASIP == "" ]];then
   echo -e "${bldred}Unable to determine NAS IP address. Please manually provide IP. man $0 for more info.${txtrst}"
   exit 0
fi

# Define & report how many NAS drive(s) were detected.
NDRIVES=$(echo "$NASIP" | wc -l)
echo -e "${undwht}$NDRIVES NAS Drive(s) detected.${txtrst}"

# NAS(S) detected create mount-point for each if multiple and mount.
for CURRENT in $NASIP
do
# if NFS switch is implemented set default mount-points as such.
if [[ $2 == "-nfs" ]]; then
   MOUNTPOINT='/media/NFS'
fi
# report discovered NAS
echo -e "${bldgrn}NAS Host exists at $CURRENT.${txtrst}"
# create mount-point & set permissions if it does not exist.
if [[ $3 != "remove" && $2 != "-report" ]];then
   if [ ! -d $MOUNTPOINT$count$SLASH ]; then
      echo -e "${bldwht}Mount point does not exist, creating $MOUNTPOINT$count$SLASH.${txtrst}"
      sudo mkdir -p $MOUNTPOINT$count$SLASH > /dev/null 2>&1 || echo -e "${bldred}Error: Can not create $MOUNTPOINT$count$SLASH.${txtrst}";
      sudo chown $USER:$USER $MOUNTPOINT$count$SLASH > /dev/null 2>&1 || echo -e "${bldred}Error: Can not chown $MOUNTPOINT$count$SLASH to $USER.${txtrst}";
      sudo chmod 777 -R $MOUNTPOINT$count$SLASH > /dev/null 2>&1 || echo -e "${bldred}Error: Can not chmod $MOUNTPOINT$count$SLASH.${txtrst}";
      else
      echo $MOUNTPOINT$count$SLASH" exists."
   fi
fi
# cifs mode, no nfs switch provided.
if [[ $2 != "-nfs" && $2 != "-report" ]]; then
   echo -e "${bldgrn}Entering cifs mode:${txtrst}"
   echo -n "Username: "
   read -e USERNAME
   read -s -p "Password: " PASSWORD
   echo -e "${bldgrn}Mounting NAS from $CURRENT to $MOUNTPOINT$count$SLASH${txtrst}"
   sudo mount -t cifs '//'$CURRENT'/GoFlex Home Personal' $MOUNTPOINT$count$SLASH -o username=$USERNAME,password=$PASSWORD,iocharset=utf8,file_mode=0777,dir_mode=0777 > /dev/null 2>&1 || echo -e "${bldred}Error: Can not mount $CURRENT, is Username & Password correct?";
else

# Assign varible to what will be output to /etc/fstab
SS=$CURRENT":/home/0common     "$MOUNTPOINT$count$SLASH" nfs rsize=8192,wsize=8192,timeo=14,intr"

# Check for prior existence in fstab.
TESTIT=$(cat /etc/fstab | grep $CURRENT)

if [[ $TESTIT != "" ]]; then
# existance
   if [[ $3 == "add" ]]; then
      echo -e "${bldred}Error: $CURRENT is already in the /etc/fstab; Nothing to do.${txtrst}"
   fi

   if [[ $3 == "remove" ]]; then
      echo "Removing $CURRENT from /etc/fstab"
      sudo sed -i "/$CURRENT/d" /etc/fstab
      sudo sed -i "/#Entry added via Nasup/d" /etc/fstab
      echo -e "${bldgrn}Unmounting $CURRENT:/home/0common${txtrst}"
      sudo umount $CURRENT:/home/0common > /dev/null 2>&1 || echo -e "${bldred}Error: Can not unmount $CURRENT.${txtrst}";
      
   fi

else
# non existance
   if [[ $3 == "add" ]]; then
   echo -e "${bldgrn}Adding the following to your /etc/fstab:${txtrst}"
      sudo echo "#Entry added via Nasup" | sudo tee -a /etc/fstab
      sudo echo $SS | sudo tee -a /etc/fstab
   fi

   if [[ $3 == "remove" ]]; then
      echo -e "${bldred}Error: $CURRENT is not in /etc/fstab. Nothing to remove.${txtrst}"
   fi
fi

fi
# count number of NAS(s) detected.
count=`expr $count + 1`
# Close loop
done

# Mount / unmount based on add / remove / cifs all detected NAS Drive(s), report errors if any.
if [[ $2 != "-nfs" && $2 != "-report" ]]; then
   echo -e "${bldgrn}Mounting / un-mounting NAS Drive(s)${txtrst}"
   sudo mount -a > /dev/null 2>&1 || echo -e "${bldred}Error: Can not mount $CURRENT, is Username & Password correct?${txtrst}";
fi
}

# Currently unimplemented code.
function MountNAS() {
echo "mount -t cifs '//'$1'/GoFlex Home Personal' $4 -o username=$2,password=$3,iocharset=utf8,file_mode=0777,dir_mode=0777"
sudo mount -t cifs '//'$1'/GoFlex Home Personal' $4 -o username=$2,password=$3,iocharset=utf8,file_mode=0777,dir_mode=0777
}

# Grab Header and dump usage to end user. / need cleanup here much has changed
# since beginning
function Help {
VERSION
   echo -e "${bldwht}
Usage: nasup -<COMMAND> [option]

   possible commands...      

   -v   --version      Dump version info
   -s   --scan         Scans for NAS drive on network.
   -h   --help         This help message

   Usage Version;
   nasup -v
   
   Displays nasup's version number and exits.
   
   Usage Scan;
   nasup -s [-nfs <add/remove>] [-report]

   Scans LAN for NAS drive on network. The mount-point will be
   created at /media/NAS/, NAS1 etc. if multiple NAS's are detected. Not
   using -nfs will be mounted as cifs.
   
   If [report] switch is used will only display detected NAS'(s) IP'(s) and
   exit.

   If the optional --nfs switch is used after completion and successfully
   finding the NAS''(s) will add the drive to the fstab for mounting as
   /media/NFS/, /media/NFS1/ etc. on boot-up.

   Usage Help;
   nasup -h

   Displays this message. For further information please refer to the man-pages.
   
   man nasup   
   
   Examples (case sensitive):
   nasup --scan -report
   nasup --scan
   nasup --scan -nfs add
   "
   echo -e "${txtrst}"
   exit 0
}

# Command switch interpreter
    case "$1" in
      -h|--help|-\?) Help; exit 0;;
      -v|--version) VERSION; exit 0;;
      -V|--verbose) Build $1 $2; exit 0;;
      -s|--scan) Scan $1 $2 $3; exit 0;;
      -m|--mount-nas) MountNAS $2 $3 $4 $5; exit 0;;
      *) Help; exit 0;;
    esac

ultimate-edition-nas-tools_1.7.1-7_all.deb
ultimate-edition-nas-tools_1.7.1-7
(11.36 KiB) Downloaded 341 times

When I wrote this initially I wanted only to find the IP of my NAS drive on my network. Expanded; the software does not care how many NAS drives you have will find them all and set them up for you. I have not touched on what it will do once it obtains that information, once again expansion is coming. I am sure you guys have seen on facebook the end results of what it brings. I refuse to release shoddy software until I see it trough beginning until the end. Even though the script allows for entry for IP password etc. totally unnecessary. It will obtain info w/o intervention. The password must be intervened, we are not a hacker right ;) We do not want to obtain access to our neighbors NAS right lol.

You deserve a sneak peak (I should explain why the screen is so wide I have dual 28" monitors higher then HD. I wrote software for that too):

1 monitor to write software on the other to watch it execute. I am all about productivity when it comes to programming.

nas.png

sneak.png
Software being loaded into the NAS. Information must be provided prior to this event.


NFS will hit the mix once I have the ability for your comp and NAS to communicate openly. I do not want Joe Schmucatelli to be able to do so, so a delema enters the mix. I want to have the answer. Many issues that you will find here are due to newbies no pun intended. I want to remove all barriers, but have to think things through. Please give me time to resolve all issues.

Do not think it will not find 2 or 255 NAS drives even with current code. I am enhancing it to allow you to know which drive you are looking at. Goliath also has a 3TB NAS also on the same network. He leaves his off because of heat. When turned on picks it right up and allows me to mount it.
Code: Select all
theemahn@JackHammer:~$ nasup -s
nasup 1.7.1-7, Build date: 12/06/12
GNU nasup home page: <http://www.ultimateedition.info/>.
E-mail bug reports to: <theemahn@ultimateedition.info>.
Be sure to include the word nasup somewhere in the Subject: field.

Scanning 192.168.0.* for Go-flex IP..
2 NAS Drive(s) detected.
NAS Host exists at 192.168.0.100.
Mount point does not exist, creating /media/NAS/.
Entering cifs mode:
Username: John
Password: Mounting NAS from 192.168.0.100 to /media/NAS/
NAS Host exists at 192.168.0.102.
Mount point does not exist, creating /media/NAS1/.
Entering cifs mode:
Username: theemahn
Password: Mounting NAS from 192.168.0.102 to /media/NAS1/
Mounting / un-mounting NAS Drive(s)
theemahn@JackHammer:~$


Working into the future of nasup:
road.png
Downloading a torrent directly to the nas. At this point I can turn off my comp and it will continue to pull it down to be found in the NAS's Downloads folder.

nasup.png
Loading in the software to the NAS. In the future entirely handled by nasup.

later.png
Frontend to bring all the features together is also in the works.

Change-log:
  • 1.7.1-5 initial public release
  • 1.7.1-6 Added net-mask detection, not all routers etc assign 192.168.1.*
  • 1.7.1-7 Began implementation of NFS (Network File System)
    Added reusable code in Version function
    Added injection / auto-mounting of NFS to fstab
    Added error handling routines to inform end user
DISCLAIMER:
I take 0 responsibility if you hose your NAS drive. This "how-to" is not intended for the common user.

NFS is HERE!!! a primer:
What is NFS? In the world of Network Attached Storage (NAS) a mass bonus over CIFS or any other Network based file system that I have tried. It is approximately 20% faster and auto-mounts the drives on boot up, so in essence run this tool one time with the -nfs add switch and technically you no longer need the tool.

Let's man up:
Code: Select all
man nasup

nasup(1) nasup(1)

NAME
nasup - Please edit this file.

SYNOPSIS
nasup

DESCRIPTION
nasup - This manpage was auto-generated using repomaster <http://ultimateedition.info/>. Please edit this file.

OPTIONS
-v Display version number.

-h Show help.

BUGS
nasup Homepage: http://ultimateedition.info/. E-mail bug reports to: Ultimate Edition Team <TheeMahn@ultimateedition.info> including this bug.

AUTHOR
Ultimate Edition Team <TheeMahn@ultimateedition.info>

Debian/GNU Linux December 2012 nasup(1)

Damn ;) more work. Alrighty then;
Code: Select all
nasup -h

nasup 1.7.1-7, Build date: 12/06/12
GNU nasup home page: <http://www.ultimateedition.info/>.
E-mail bug reports to: <theemahn@ultimateedition.info>.
Be sure to include the word nasup somewhere in the Subject: field.


Usage: nasup -<COMMAND> [option]

possible commands...

-v --version Dump version info
-s --scan Scans for NAS drive on network.
-h --help This help message

Usage Version;
nasup -v

Displays nasup's version number and exits.

Usage Scan;
nasup -s [-nfs <add/remove>] [-report]

Scans LAN for NAS drive on network. The mount-point will be
created at /media/NAS/, NAS1 etc. if multiple NAS's are detected. Not
using -nfs will be mounted as cifs.

If [report] switch is used will only display detected NAS'(s) IP'(s) and
exit.

If the optional --nfs switch is used after completion and successfully
finding the NAS''(s) will add the drive to the fstab for mounting as
/media/NFS/, /media/NFS1/ etc. on boot-up.

Usage Help;
nasup -h

Displays this message. For further information please refer to the man-pages.

man nasup

Examples (case sensitive):
nasup --scan -report
nasup --scan
nasup --scan -nfs add

In order to be able to utilize the "-nfs add" switch you must run aionas located in the deb on the "server". In this case the NAS drive, but I don't know the NAS's IP no problem:
Code: Select all
theemahn@JackHammer:~$ nasup -s -report
nasup 1.7.1-7, Build date: 12/06/12
GNU nasup home page: <http://www.ultimateedition.info/>.
E-mail bug reports to: <theemahn@ultimateedition.info>.
Be sure to include the word nasup somewhere in the Subject: field.

Scanning 192.168.0.* for Go-flex IP..
2 NAS Drive(s) detected.
NAS Host exists at 192.168.0.100.
NAS Host exists at 192.168.0.102.
theemahn@JackHammer:~$

Well now, that sucks which drive is which? Yes indeed it does. I intend to enhance it further to display more information in the future. Let's move on. We will say 192.168.0.100 is my target. Open your browser and goto http://192.168.0.100/:
login.png
Login to your nas

Click the little "About Go-flex Home" in the bottom left corner. and take note of your product key you will need it later:
note.png
Obtain the key

Let the fun begin:
Crack open a terminal:
in format:
Code: Select all
ssh USERNAME_hipserv2_seagateplug_YOUR-KEY-GOES-HERE@IP.NAS.UP.DISCOVERED

Example (note lowercase on user name):
Code: Select all
ssh john_hipserv2_seagateplug_BLAH-BLAH-BLAH-BLAH@192.168.0.100

If all went well you should be greeted with:
Code: Select all
The authenticity of host '192.168.0.100 (192.168.0.100)' can't be established.
RSA key fingerprint is 7c:a8:25:21:13:a2:eb:00:a6:c1:76:ca:6b:48:6e:bf.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.101' (RSA) to the list of known hosts.
GoFlex Home version 10.0.x
john_hipserv2_seagateplug_PGYW@192.168.0.100's password:
-bash-3.2$

Time to root up(using the password for your NAS):
Code: Select all
-bash-3.2$ sudo passwd

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

Password:
audit_log_user_command(): Connection refused #You can ignore this.
Changing password for user root.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
-bash-3.2$ su
Password:
bash-3.2#

This post is already long, I am now going to copy and paste from the terminal both the commands and output of said commands. First we need a package manager otherwise we can't install squat. Hard to install a package manager without a package manager. We are not going to let that deter us; Let's roll:
Code: Select all
bash-3.2# wget http://downloadue.info/NAS/Firmware/ipkg-opt_0.99.163-10_arm.ipk
--06:50:52--  http://downloadue.info/NAS/Firmware/ipkg-opt_0.99.163-10_arm.ipk
Resolving downloadue.info... 50.63.124.125
Connecting to downloadue.info|50.63.124.125|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 74474 (73K) [application/vnd.shana.informed.package]
Saving to: `ipkg-opt_0.99.163-10_arm.ipk'

100%[===================================================================================================================================================>] 74,474       257K/s   in 0.3s   

06:50:53 (257 KB/s) - `ipkg-opt_0.99.163-10_arm.ipk' saved [74474/74474]
bash-3.2# tar xfv ipkg-opt_0.99.163-10_arm.ipk
./debian-binary
./data.tar.gz
./control.tar.gz
bash-3.2# tar xfv data.tar.gz
./
./opt/
./opt/bin/
./opt/bin/ipkg
./opt/bin/ipkg-opt
./opt/bin/update-alternatives
./opt/etc/
./opt/etc/ipkg.conf
./opt/lib/
./opt/lib/libipkg.so
./opt/lib/libipkg.so.0
./opt/lib/libipkg.so.0.0.0
./opt/share/
./opt/share/ipkg/
./opt/share/ipkg/intercept/
./opt/share/ipkg/intercept/depmod
./opt/share/ipkg/intercept/ldconfig
./opt/share/ipkg/intercept/update-modules
bash-3.2# cp -R opt/ /
bash-3.2# #clean up we are somewhat limited on space
bash-3.2# rm control.tar.gz
bash-3.2# rm data.tar.gz
bash-3.2# rm debian-binary
bash-3.2# rm ipkg-opt_0.99.163-10_arm.ipk
bash-3.2#
bash-3.2# #strip #signs from repositories, so we get all the software...
bash-3.2# sed -i 's/# src/src/g' /opt/etc/ipkg.conf
bash-3.2# ./opt/bin/ipkg update
Downloading http://ipkg.nslu2-linux.org/feeds/optware/nslu2/cross/stable/Packages
Updated list of available packages in /opt/lib/ipkg/lists/nslu2
Downloading http://ipkg.nslu2-linux.org/feeds/optware/fsg3/cross/stable/Packages
Updated list of available packages in /opt/lib/ipkg/lists/fsg3
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages
Updated list of available packages in /opt/lib/ipkg/lists/ddwrt
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages
Updated list of available packages in /opt/lib/ipkg/lists/xwrt
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages
Updated list of available packages in /opt/lib/ipkg/lists/whiterussian
Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/Packages
Updated list of available packages in /opt/lib/ipkg/lists/oleg
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ts72xx/cross/stable/Packages
Updated list of available packages in /opt/lib/ipkg/lists/ts72xx
Downloading http://ipkg.nslu2-linux.org/feeds/optware/openwrt-brcm24/cross/unstable/Packages.gz
Inflating http://ipkg.nslu2-linux.org/feeds/optware/openwrt-brcm24/cross/unstable/Packages.gz
Updated list of available packages in /opt/lib/ipkg/lists/openwrt-brcm24
Downloading http://ipkg.nslu2-linux.org/feeds/optware/openwrt-ixp4xx/cross/unstable//Packages.gz
Inflating http://ipkg.nslu2-linux.org/feeds/optware/openwrt-ixp4xx/cross/unstable//Packages.gz
Updated list of available packages in /opt/lib/ipkg/lists/openwrt-ixp4xx
Successfully terminated.
bash-3.2#


Let's get the magic flowing, you can either use the aionas from the deb (probably newer) in /usr/share/ultimate_edition/ or yank one directly from the web which is faster / easier:
Code: Select all
bash-3.2# cd /bin/
bash-3.2# wget http://downloadue.info/NAS/aionas
--07:03:13--  http://downloadue.info/NAS/aionas
Resolving downloadue.info... 50.63.124.125
Connecting to downloadue.info|50.63.124.125|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 20846 (20K) [text/plain]
Saving to: `aionas'

100%[===================================================================================================================================================>] 20,846       116K/s   in 0.2s   

07:03:13 (116 KB/s) - `aionas' saved [20846/20846]

bash-3.2# chmod +x aionas
bash-3.2# ./aionas

I suggest the same options as I have selected at least at this time:
Code: Select all
#################################################################
Welcome to the TheeMahn's Goflex NAS all-in-one setup script...
#################################################################

What would you like to do?

1. Swap the ssh daemon? (y/n): n
2. Install Kernel NFS? (y/n): y
3. Install the IPKG package manager? (y/n): y
4. Move /opt to the harddrive (recommended if non NTFS drive)? (y/n): n
5. Remove Access Patrol (highly recommended)? (y/n): y
6. Setup the PATH variable (a must)? (y/n): y
7. Install NZBget? (y/n): n
8. Install NZBget-server? (y/n): n
9. Install Mediatomb server? (y/n): y
10. Kill unecessary service cupsd printer daemon? (y/n): y
11. Install transmission torrent daemon and client? (y/n): y
12. Enable Secure FTP? (y/n): n
13. Install common tools (nano, bash etc) & codecs? (y/n): y

14. Install pyload?Note: Requires above option move to /opt/ to be selected
and the NAS drive to be formated in a linux based format
EXT3, EXT4, XFS etc. (y/n):
n

Path has be set to:
/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/sbin:/opt/sbin:/usr/sbin:/sbin
Installing IPKG...
--07:05:59--  http://downloadue.info/NAS/Firmware/ipkg-opt_0.99.163-10_arm.ipk
Resolving downloadue.info... 50.63.124.125
Connecting to downloadue.info|50.63.124.125|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 74474 (73K) [application/vnd.shana.informed.package]
Saving to: `/tmp/ipkg.ipk'

100%[=====================================================================================================================================================>] 74,474       262K/s   in 0.3s   

07:06:00 (262 KB/s) - `/tmp/ipkg.ipk' saved [74474/74474]

Downloading http://ipkg.nslu2-linux.org/feeds/optware/nslu2/cross/stable/Packages
Updated list of available packages in /opt/lib/ipkg/lists/nslu2
Downloading http://ipkg.nslu2-linux.org/feeds/optware/fsg3/cross/stable/Packages
Updated list of available packages in /opt/lib/ipkg/lists/fsg3
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages
Updated list of available packages in /opt/lib/ipkg/lists/ddwrt
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages
Updated list of available packages in /opt/lib/ipkg/lists/xwrt
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/Packages
Updated list of available packages in /opt/lib/ipkg/lists/whiterussian
Downloading http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/Packages
Updated list of available packages in /opt/lib/ipkg/lists/oleg
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ts72xx/cross/stable/Packages
Updated list of available packages in /opt/lib/ipkg/lists/ts72xx
Downloading http://ipkg.nslu2-linux.org/feeds/optware/openwrt-brcm24/cross/unstable/Packages.gz
Inflating http://ipkg.nslu2-linux.org/feeds/optware/openwrt-brcm24/cross/unstable/Packages.gz
Updated list of available packages in /opt/lib/ipkg/lists/openwrt-brcm24
Downloading http://ipkg.nslu2-linux.org/feeds/optware/openwrt-ixp4xx/cross/unstable//Packages.gz
Inflating http://ipkg.nslu2-linux.org/feeds/optware/openwrt-ixp4xx/cross/unstable//Packages.gz
Updated list of available packages in /opt/lib/ipkg/lists/openwrt-ixp4xx
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable/Packages
Updated list of available packages in /opt/lib/ipkg/lists/seagateplug-stable
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/Packages
Updated list of available packages in /opt/lib/ipkg/lists/seagateplug-unstable
Successfully terminated.
Error: Your NAS drive is formatted in NTFS which does not support permissions for /opt useage.
Setting up Kernel NFS...
--07:06:20--  http://downloadue.info/NAS/Firmware/nfs-utils_GFH_tar.gz
Resolving downloadue.info... 50.63.124.125
Connecting to downloadue.info|50.63.124.125|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 265251 (259K) [text/plain]
Saving to: `/tmp/nfs.tar.gz'

100%[=====================================================================================================================================================>] 265,251      480K/s   in 0.5s   

07:06:21 (480 KB/s) - `/tmp/nfs.tar.gz' saved [265251/265251]

nfsd                  104116  1
exportfs                4512  1 nfsd
nfs_acl                 3136  1 nfsd
--07:06:22--  http://downloadue.info/NAS/Firmware/nfslock
Resolving downloadue.info... 50.63.124.125
Connecting to downloadue.info|50.63.124.125|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2656 (2.6K) [text/plain]
Saving to: `nfslock'

100%[=====================================================================================================================================================>] 2,656       --.-K/s   in 0s     

07:06:22 (70.3 MB/s) - `nfslock' saved [2656/2656]

Starting portmap:                                          [  OK  ]
Starting NFS services:  exportfs: failed to lock /var/lib/nfs/etab
                                                           [  OK  ]
Starting NFS daemon:                                       [  OK  ]
Starting NFS mountd:                                       [  OK  ]
Starting NFS statd:                                        [  OK  ]
Starting NFS statd:                                        [  OK  ]
/home/0common    192.168.0.100/255.255.255.0(rw,wdelay,no_root_squash,no_subtree_check)
To mount the NFS share on the client ie Ultimate Edition, Ubuntu etc:
sudo mkdir -p /media/NASNFS
sudo mount 192.168.0.100:/home/0common /media/NASNFS

To mount on boot add the following to your /etc/fstab/:
192.168.0.100:/home/0common /media/NASNFS nfs rsize=8192,wsize=8192,timeo=14,intr

Disabling Access Patrol...
Stopping access-patrol:                                    [  OK  ]

Installing mediatomb media server...
Installing mediatomb (0.11.0-5) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/mediatomb_0.11.0-5_arm.ipk
Installing file (5.09-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/file_5.09-1_arm.ipk
Installing zlib (1.2.5-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/zlib_1.2.5-1_arm.ipk
Installing libexif (0.6.19-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libexif_0.6.19-1_arm.ipk
Installing libstdc++ (6.0.9-6) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libstdc++_6.0.9-6_arm.ipk
Installing ossp-js (1.6.20070208-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/ossp-js_1.6.20070208-1_arm.ipk
Installing sqlite (3.7.14.1-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/sqlite_3.7.14.1-1_arm.ipk
Installing readline (6.1-2) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/readline_6.1-2_arm.ipk
Installing ncurses (5.7-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/ncurses_5.7-1_arm.ipk
Installing expat (2.0.1-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/expat_2.0.1-1_arm.ipk
Installing taglib (1.6.3-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/taglib_1.6.3-1_arm.ipk
Configuring expat
Configuring file
Configuring libexif
Configuring libstdc++
Configuring mediatomb
Configuring ncurses
update-alternatives: Linking //opt/bin/clear to /opt/bin/ncurses-clear
Configuring ossp-js
Configuring readline
Configuring sqlite
Configuring taglib
Configuring zlib
Successfully terminated.
Starting mediatomb: ok
sed: -e expression #1, char 46: unknown option to `s'
Shutting down mediatomb: ok
Starting mediatomb: ok
Killing cups and preventing from startup...
Installing Transmission torrent client and daemon...
--07:07:19--  http://downloadue.info/NAS/Firmware/transmission-1_92_ARM_Stora_tar
Resolving downloadue.info... 50.63.124.125
Connecting to downloadue.info|50.63.124.125|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 962560 (940K) [text/plain]
Saving to: `transmission-1_92_ARM_Stora_tar'

100%[=====================================================================================================================================================>] 962,560      970K/s   in 1.0s   

07:07:20 (970 KB/s) - `transmission-1_92_ARM_Stora_tar' saved [962560/962560]

transmission/
transmission/init.d/
transmission/init.d/transmission-daemon
transmission/README
transmission/web/
transmission/web/images/
transmission/web/images/favicon.ico
transmission/web/images/favicon.png
transmission/web/images/progress/
transmission/web/images/progress/Makefile.am
transmission/web/images/progress/Makefile.in
transmission/web/images/progress/progress.png
transmission/web/images/progress/Makefile
transmission/web/images/webclip-icon.png
transmission/web/images/graphics/
transmission/web/images/graphics/logo.png
transmission/web/images/graphics/Makefile.am
transmission/web/images/graphics/Makefile.in
transmission/web/images/graphics/chrome.png
transmission/web/images/graphics/Makefile
transmission/web/images/graphics/transfer_arrows.png
transmission/web/images/graphics/filter_icon.png
transmission/web/images/graphics/filter_bar.png
transmission/web/images/graphics/iphone_chrome.png
transmission/web/images/buttons/
transmission/web/images/buttons/Makefile.am
transmission/web/images/buttons/Makefile.in
transmission/web/images/buttons/info_trackers.png
transmission/web/images/buttons/info_files.png
transmission/web/images/buttons/info_general.png
transmission/web/images/buttons/tab_backgrounds.png
transmission/web/images/buttons/Makefile
transmission/web/images/buttons/torrent_buttons.png
transmission/web/images/buttons/file_priority_buttons.png
transmission/web/images/buttons/toolbar_buttons.png
transmission/web/images/buttons/file_wanted_buttons.png
transmission/web/images/buttons/cancel.png
transmission/web/images/buttons/info_activity.png
transmission/web/index.html
transmission/web/stylesheets/
transmission/web/stylesheets/iphone.css
transmission/web/stylesheets/common.css
transmission/web/stylesheets/ie6.css
transmission/web/stylesheets/ie7.css
transmission/web/javascript/
transmission/web/javascript/jquery/
transmission/web/javascript/jquery/jquery.min.js
transmission/web/javascript/jquery/jquery.transmenu.min.js
transmission/web/javascript/jquery/jquery.contextmenu.min.js
transmission/web/javascript/jquery/json.min.js
transmission/web/javascript/jquery/jquery.form.min.js
transmission/web/javascript/transmission.remote.js
transmission/web/javascript/menu.js
transmission/web/javascript/dialog.js
transmission/web/javascript/common.js
transmission/web/javascript/torrent.js
transmission/web/javascript/transmission.js
transmission/transmission-daemon
Starting transmission-daemon:                              [  OK  ]
john     15440     1  1 07:07 ?        00:00:00 /usr/local/bin/transmission-daemon -g /home/john/.config/transmission-daemon/
Shutting down transmission-daemon:                         [  OK  ]
--07:07:27--  http://downloadue.info/NAS/Firmware/blocklist.bin
Resolving downloadue.info... 50.63.124.125
Connecting to downloadue.info|50.63.124.125|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1816640 (1.7M) [application/octet-stream]
Saving to: `blocklist.bin'

100%[=====================================================================================================================================================>] 1,816,640   1.25M/s   in 1.4s   

07:07:28 (1.25 MB/s) - `blocklist.bin' saved [1816640/1816640]

Starting transmission-daemon:                              [  OK  ]
rm: cannot remove `transmission-1_92_ARM_Stora_tar': No such file or directory
rm: cannot remove `transmission': No such file or directory
Installing common tools...
Installing nano (2.2.6-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/nano_2.2.6-1_arm.ipk
Installing bash (3.2.49-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/bash_3.2.49-1_arm.ipk
Installing faad2 (2.6-3) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/faad2_2.6-3_arm.ipk
Installing ffmpeg (0.svn20080409-3) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/ffmpeg_0.svn20080409-3_arm.ipk
Installing flac (1.2.1-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/flac_1.2.1-1_arm.ipk
Installing libogg (1.2.1-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libogg_1.2.1-1_arm.ipk
Installing freetype (2.3.6-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/freetype_2.3.6-1_arm.ipk
Installing fribidi (0.10.9-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/fribidi_0.10.9-1_arm.ipk
Installing liba52 (0.7.4-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/liba52_0.7.4-1_arm.ipk
Installing libdvbpsi (0.1.5-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libdvbpsi_0.1.5-1_arm.ipk
Installing libdvdnav (0.1.10-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libdvdnav_0.1.10-1_arm.ipk
Installing libdvdread (0.9.7-2) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libdvdread_0.9.7-2_arm.ipk
Installing libid3tag (0.15.1b-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libid3tag_0.15.1b-1_arm.ipk
Installing libmad (0.15.1b-4) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libmad_0.15.1b-4_arm.ipk
Installing libmpcdec (1.2.6-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libmpcdec_1.2.6-1_arm.ipk
Installing libmpeg2 (0.4.1-2) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libmpeg2_0.4.1-2_arm.ipk
Package libogg (1.2.1-1) installed in root is up to date.
Installing libpng (1.2.44-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libpng_1.2.44-1_arm.ipk
Installing libshout (2.2.2-2) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libshout_2.2.2-2_arm.ipk
Installing libvorbis (1.3.2-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libvorbis_1.3.2-1_arm.ipk
Installing speex (1.2rc1-2) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/speex_1.2rc1-2_arm.ipk
Installing libupnp (1.6.6-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libupnp_1.6.6-1_arm.ipk
package libupnp suggests installing ushare
Package libvorbis (1.3.2-1) installed in root is up to date.
Installing libxml2 (2.7.8-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libxml2_2.7.8-1_arm.ipk
Installing ncursesw (5.7-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/ncursesw_5.7-1_arm.ipk
Package speex (1.2rc1-2) installed in root is up to date.
Installing avahi (0.6.30-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/avahi_0.6.30-1_arm.ipk
Installing libdaemon (0.14-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libdaemon_0.14-1_arm.ipk
Installing dbus (1.2.16-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/dbus_1.2.16-1_arm.ipk
Installing adduser (1.10.3-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/adduser_1.10.3-1_arm.ipk
Installing x264 (0.0.20090220-svn2245-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/x264_0.0.20090220-svn2245-1_arm.ipk
Configuring adduser
update-alternatives: Linking //opt/bin/su to /opt/bin/adduser-su
Configuring avahi
Configuring bash
Configuring dbus
No messagebus user found, creating it... done
Configuring faad2
Configuring ffmpeg
Configuring flac
Configuring freetype
Configuring fribidi
Configuring liba52
Configuring libdaemon
Configuring libdvbpsi
Configuring libdvdnav
Configuring libdvdread
Configuring libid3tag
Configuring libmad
Configuring libmpcdec
Configuring libmpeg2
Configuring libogg
Configuring libpng
Configuring libshout
Configuring libupnp
Configuring libvorbis
Configuring libxml2
Configuring nano
Configuring ncursesw
Configuring speex
Configuring x264
Successfully terminated.
--07:09:18--  http://downloadue.info/NAS/Firmware/html.tar.gz
Resolving downloadue.info... 50.63.124.125
Connecting to downloadue.info|50.63.124.125|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 534648 (522K) [application/x-tar]
Saving to: `html.tar.gz'

100%[=====================================================================================================================================================>] 534,648      691K/s   in 0.8s   

07:09:19 (691 KB/s) - `html.tar.gz' saved [534648/534648]

html/index.php
html/deb.png
html/favico.ico
html/header.html
html/images.png
html/premium.png
html/README
html/style.css
html/arrow.gif
html/arrow_over.gif
html/back.gif
html/back.png
html/bg.gif
html/bg.png
html/bg-1.jpg
html/button1a.gif
html/button4.gif
html/chrome.js
html/chromebg.png
html/chromestyle.css
html/Co-Brand-Logos-Stora.png
html/doc.png
html/down.gif
html/folder.png
html/footer.html
html/gears.png
html/hover.gif
html/iso.gif
html/media.png
html/pantallazo3.png
html/run.png
html/stora.png
html/userContent.css
html/Co-Brand-Logos-Seagate.png
html/
15. Reboot NAS drive? (y/n): y

Broadcast message from root (pts/0) (Thu Dec  6 07:09:47 2012):

The system is going down for reboot NOW!
bash-3.2# exit
exit
-bash-3.2$ exit
logout
Connection to 192.168.0.100 closed.
theemahn@JackHammer:~$


For those interested in the code executed on the NAS. Now go and hook your NAS up to your PS3 / Bluray Player or stream movies to your PC. Go grab a few torrents and put it to work ;) If you opted for TheeMahn's Consolidated interface it will be at http://YOURNASIP/index.php in my case http://192.168.0.100/index.php. if you want your old interface, it is available both through the interface as well http://YOURNASIP/ w/o the index.php
results.png
Results, of the fruits of my labor ;)

Yes, I know the NAS drives do not show up on my conky, I am working on that.
Attachments
ultimate-edition-nas-tools_1.7.1-6_all.deb
Revised, please see changelog
(10.8 KiB) Downloaded 293 times
ultimate-edition-nas-tools_1.7.2-1_all.deb
(13.51 KiB) Downloaded 364 times
Home of Ultimate Edition. Got a question? Please review the F.A.Q. Browse the How to section.

Main O/S: Builder of O/S Guess.
Mainboard: ASUS Sabertooth 990FX TUF (The Ultimate Force) R2.0
CPU: AMD FX 8150 Bulldozer Eight Core Black Edition
Ram: 16 GB GSkill Ripjaws Dual Channel DDR3 2133
Video: 2 X ATI 7770HD GHZ Edition 1GB PCI 3.0 Crossfire (main cards) various others for testing
Hard Disks: Over 30 TB Mechanical and Multiple SSD's. (Sans Digital 32TB raid tower - dual Esata)
Raid: Onboard 10 sata / e-sata ports, HighPoint RocketRAID 640 PCI-Express 2.0 x4 SATA III (6.0Gb/s)
custom software mirrored - tmbackup
Monitors: 4K Samsung 28", HannsG HH281, Various others
730 Watt modular PSU
700 Watt Amp & 4 X 600 Watt speakers
User avatar
TheeMahn
Site Admin
 
Posts: 4193
Joined: Fri Oct 12, 2007 10:02 am
Location: U.S.A.
Age: 46
Operating System: Ultimate Edition Developer



Re: NAS programming....

Postby Micro » Thu Sep 13, 2012 5:04 pm

Is that really a NAS or a Device Attached Storage? Just got done building a older workstation into a NAS using FreeNAS. Great OS for its purpose with a nice Web UI and ZFS. Thought about buying a DAS for the wife. And now since you wrote some new software i guess im forced to do so. Cant wait to check it out. Keep up the good work and cant wait to see whats next. Possibly an Ultimate Edition Android OS would be fun. Hooah...
Image
https://www.linkedin.com/in/josephperrello
Thermaltake Series Core X9 SPCC E-ATX Cube Case
CORSAIR Vengeance LPX 64GB Quad Channel DDR4
EVGA 120-G1-0750-XR 80 PLUS GOLD 750W PSU
APC BR1300G Back-UPS Pro 780W/1300VA UPS
ASRock X99 Extreme4 LGA X99 Motherboard
OC-Intel Core i7-5820K @ 4.1GHz × 12
Corsair H100i V2 CPU Cooler. 240mm
Kernel Linux 4.6.4-1-ARCH x86_64
MATE Desktop Environment 1.12.1
OS - SAMSUNG 950 PRO M.2 512GB
DATA - 2 SSD 840 EVO RAID 0
MEDIA - 4 HDD 3TB RAID 0
NVIDIA GeForce GTX750 Ti
ViewSonic PJD7820HD
OS - Filesystem F2FS
Arch Linux
User avatar
Micro
Site Admin
 
Posts: 485
Joined: Tue Apr 24, 2012 1:16 pm
Age: 39
Operating System: Other Linux



Re: NAS programming....

Postby Micro » Thu Sep 13, 2012 5:37 pm

WOW it really is a NAS. Time to go shopping...
Image
https://www.linkedin.com/in/josephperrello
Thermaltake Series Core X9 SPCC E-ATX Cube Case
CORSAIR Vengeance LPX 64GB Quad Channel DDR4
EVGA 120-G1-0750-XR 80 PLUS GOLD 750W PSU
APC BR1300G Back-UPS Pro 780W/1300VA UPS
ASRock X99 Extreme4 LGA X99 Motherboard
OC-Intel Core i7-5820K @ 4.1GHz × 12
Corsair H100i V2 CPU Cooler. 240mm
Kernel Linux 4.6.4-1-ARCH x86_64
MATE Desktop Environment 1.12.1
OS - SAMSUNG 950 PRO M.2 512GB
DATA - 2 SSD 840 EVO RAID 0
MEDIA - 4 HDD 3TB RAID 0
NVIDIA GeForce GTX750 Ti
ViewSonic PJD7820HD
OS - Filesystem F2FS
Arch Linux
User avatar
Micro
Site Admin
 
Posts: 485
Joined: Tue Apr 24, 2012 1:16 pm
Age: 39
Operating System: Other Linux



Re: NAS programming....

Postby TheeMahn » Tue Sep 25, 2012 10:24 am

Micro wrote:Is that really a NAS or a Device Attached Storage? Just got done building a older workstation into a NAS using FreeNAS. Great OS for its purpose with a nice Web UI and ZFS. Thought about buying a DAS for the wife. And now since you wrote some new software i guess im forced to do so. Cant wait to check it out. Keep up the good work and cant wait to see whats next. Possibly an Ultimate Edition Android OS would be fun. Hooah...



Why not work it into the mix:
nas.jpg
The PC far right on the floor is running freenas. There is a nas on the desk and one in the other room.


But freenas is not detected right?
Code: Select all
theemahn@JackHammer:~/Music/ultimate-edition-nas-tools_1.7.1-7_all/bin$ ./nasup -s
Nasup 1.7.1-7
=============
GNU nasup home page: <http://www.ultimateedition.info/>.
E-mail bug reports to: <theemahn@ultimateedition.info>.
Be sure to include the word nasup somewhere in the Subject: field.

Local IP block detected, and scanning 192.168.0.* please wait...
================================================================
6 Local Host(s) detected.
=========================
Digging deeper to determine if any of the above is
Network Attached Storage.

A Seagate GoFlex Nas has been detected at 192.168.0.102.
A Seagate GoFlex Nas has been detected at 192.168.0.103.
A Freenas host has been detected at 192.168.0.105.

Total NAS Drives detected: 3
theemahn@JackHammer:~/Music/ultimate-edition-nas-tools_1.7.1-7_all/bin$


Will drop the raid controller from my pc in it and cram it full of hard disks ;) Frees my machine up & still have access to the same amount of information, actually much more. Sorry I am a slob when it comes to computer stuff. Functionality rates much higher then beauty in my department. Good thing not all the computers and phones were not on the six hosts detected would have been broader. All solid gigabit. Yes, NAS is the future. Buy another 10 TB of storage backup all my info to the freenas & implement ZFS? Sounds like alot of overtime that I hate ;) A bunch of money I currently do not have. 3DFX hits count on it immediately & eminently.

I would not care if I made a million a yr. I am a simple man, my needs met. I push to meet our users needs. Do not think I will ever sell out on you. I have been offered $255,000 for just one site and turned it down. Think about that you see the conditions I live in. Sure tons of electronics, write software for devices. No mansion. A humble abode. Efficiency, I do not have a pot to piss in.

Will buy a pogoplug, Netgear NAS and the list goes on.

Can I tell you a story, I broke up with my better half; a great woman. I live where I work typically, not to mention she works a different shift. In essence we have no life together. A man has needs and they were not being met, we are attempting to reconcile our differences. I sound needy or greedy by reading that statement, now w/o understanding prior conditions of punitive damage I would concur. A man does not live by bread alone. I have tons of bread, I wonder if that was the statements intention. Our users also have needs. Juggling my time is failure at best. I better shut the flaphole. I do feel better I got some of it off my chest.

Cryptic Cady,
Home of Ultimate Edition. Got a question? Please review the F.A.Q. Browse the How to section.

Main O/S: Builder of O/S Guess.
Mainboard: ASUS Sabertooth 990FX TUF (The Ultimate Force) R2.0
CPU: AMD FX 8150 Bulldozer Eight Core Black Edition
Ram: 16 GB GSkill Ripjaws Dual Channel DDR3 2133
Video: 2 X ATI 7770HD GHZ Edition 1GB PCI 3.0 Crossfire (main cards) various others for testing
Hard Disks: Over 30 TB Mechanical and Multiple SSD's. (Sans Digital 32TB raid tower - dual Esata)
Raid: Onboard 10 sata / e-sata ports, HighPoint RocketRAID 640 PCI-Express 2.0 x4 SATA III (6.0Gb/s)
custom software mirrored - tmbackup
Monitors: 4K Samsung 28", HannsG HH281, Various others
730 Watt modular PSU
700 Watt Amp & 4 X 600 Watt speakers
User avatar
TheeMahn
Site Admin
 
Posts: 4193
Joined: Fri Oct 12, 2007 10:02 am
Location: U.S.A.
Age: 46
Operating System: Ultimate Edition Developer



Re: NAS programming....

Postby Micro » Tue Sep 25, 2012 2:42 pm

I definately thought about it, but changed my direction and now have been converting (P2V) my excess custom desktop servers. I too have a similar looking setup, but have been trying to clean house a little. Or shall i say, been forced to clean house. lol. I now have my owncloud server virtualized and on the micronet. Great software and love the calendar and music player. The wife has been using it for a few weeks and likes the web interface, and the android app too. Was a simple build. Used the debian business card image with an expert setup to allow a true debain sid install. Installed MySQL and Owncloud and all was complete. Added IP to my A Records and she can access it anywhere. Just wish they included a video player in owncloud. My work around was to add my FTP server links to the own file directory, allowing to play movies from my server in the web browser. I am not a programmer, just a System Admin. Otherwise i would have written the snap in. Its hard working in my environment with all the cool stuff i will never be able to afford (Dell r910's, HP SAN's, Nexus Switches) But i will get bye just like i always have. Keep up the good work and looking forward to 3.5. I'm sure it will put you in back in the Distrowatch top ten...
Image
https://www.linkedin.com/in/josephperrello
Thermaltake Series Core X9 SPCC E-ATX Cube Case
CORSAIR Vengeance LPX 64GB Quad Channel DDR4
EVGA 120-G1-0750-XR 80 PLUS GOLD 750W PSU
APC BR1300G Back-UPS Pro 780W/1300VA UPS
ASRock X99 Extreme4 LGA X99 Motherboard
OC-Intel Core i7-5820K @ 4.1GHz × 12
Corsair H100i V2 CPU Cooler. 240mm
Kernel Linux 4.6.4-1-ARCH x86_64
MATE Desktop Environment 1.12.1
OS - SAMSUNG 950 PRO M.2 512GB
DATA - 2 SSD 840 EVO RAID 0
MEDIA - 4 HDD 3TB RAID 0
NVIDIA GeForce GTX750 Ti
ViewSonic PJD7820HD
OS - Filesystem F2FS
Arch Linux
User avatar
Micro
Site Admin
 
Posts: 485
Joined: Tue Apr 24, 2012 1:16 pm
Age: 39
Operating System: Other Linux



AIONAS Script

Postby TheeMahn » Thu Dec 06, 2012 1:30 pm

In case anyone was wanting to see the source for what is executed on the NAS:
Code: Select all
#/!/bin/sh
#AIONAS - All in one NAS script
# Script via TheeMahn <theemahn@ultimateedition.info>
#
# This script preform multiple tasks to make the most
# out of your Seagate Goflex NAS.
#
# please ssh into your NAS as root and execute this
# script.

# TODO: add ionice, pyload
## Version control
AIONAS="1.7.0-7"

## set colors so errors etc. stand out.
txtblk='\e[0;30m' # Black - Regular
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
txtylw='\e[0;33m' # Yellow
txtblu='\e[0;34m' # Blue
txtpur='\e[0;35m' # Purple
txtcyn='\e[0;36m' # Cyan
txtwht='\e[0;37m' # White
bldblk='\e[1;30m' # Black - Bold
bldred='\e[1;31m' # Red
bldgrn='\e[1;32m' # Green
bldylw='\e[1;33m' # Yellow
bldblu='\e[1;34m' # Blue
bldpur='\e[1;35m' # Purple
bldcyn='\e[1;36m' # Cyan
bldwht='\e[1;37m' # White
unkblk='\e[4;30m' # Black - Underline
undred='\e[4;31m' # Red
undgrn='\e[4;32m' # Green
undylw='\e[4;33m' # Yellow
undblu='\e[4;34m' # Blue
undpur='\e[4;35m' # Purple
undcyn='\e[4;36m' # Cyan
undwht='\e[4;37m' # White
bakblk='\e[40m'   # Black - Background
bakred='\e[41m'   # Red
badgrn='\e[42m'   # Green
bakylw='\e[43m'   # Yellow
bakblu='\e[44m'   # Blue
bakpur='\e[45m'   # Purple
bakcyn='\e[46m'   # Cyan
bakwht='\e[47m'   # White
txtrst='\e[0m'# Text Reset

# Get Directory aionas was executed in.
CURRENT=$PWD

temp="/tmp" ; # this is where temporary files are downloaded to
nzb_home="/home/nzbget" ; # this is where nzbget will setup it's files
nfs_kernel_check="2.6.22.18" ; # minimum version needed for NFS

# package locations
SSHD_LOCATION="http://www.streetster.co.uk/dl/stora/sshd.tar.gz"
IPKG_LOCATION="http://downloadue.info/NAS/Firmware/ipkg-opt_0.99.163-10_arm.ipk"
NFS_LOCATION="http://downloadue.info/NAS/Firmware/nfs-utils_GFH_tar.gz"
NZBGETWEB_LOCATION="http://www.streetster.co.uk/dl/stora/nzbgetweb-1.4.zip"
NZBGETD_LOCATION="http://www.streetster.co.uk/dl/stora/nzbgetd"
RPCLIB_LOCATION="http://www.streetster.co.uk/dl/stora/xmlrpc-2.2.2.tar.gz"

######################################################
#### You should not need to edit below this line. ####
######################################################

# check that we are root before starting

if [ $(whoami) != "root" ]
then
echo ""
echo -e "${bldred}Error: You must have root privileges to run this script."
echo ""
echo "Try again using 'sudo $0'."
echo -e"${txtrst}"
# Bail out
exit 1
fi

# clear the screen
clear
echo -e "${bldwht}#################################################################"
echo " Welcome to the TheeMahn's Goflex NAS all-in-one setup script... "
echo "#################################################################"
count=1
echo ""
echo -e "${bldgrn}What would you like to do?${txtwht}"
echo ""
echo -n "$count. Swap the ssh daemon? (y/n): "
read -e SSHD_SUBSTITUTION
count=`expr $count + 1`
echo -n "$count. Install Kernel NFS? (y/n): "
read -e KERNEL_NFS
count=`expr $count + 1`
echo -n "$count. Install the IPKG package manager? (y/n): "
read -e INSTALL_IPKG
count=`expr $count + 1`
echo -n "$count. Move /opt to the harddrive (recommended if non NTFS drive)? (y/n): "
read -e MOVE_OPT_TO_HDD
count=`expr $count + 1`
echo -n "$count. Remove Access Patrol (highly recommended)? (y/n): "
read -e DISABLE_ACCESS_PATROL
count=`expr $count + 1`
echo -n "$count. Setup the PATH variable (a must)? (y/n): "
read -e SET_PATH
count=`expr $count + 1`
echo -n "$count. Install NZBget? (y/n): "
read -e INSTALL_NZBGET
count=`expr $count + 1`
echo -n "$count. Install NZBget-server? (y/n): "
read -e INSTALL_NZBGETWEB
count=`expr $count + 1`
echo -n "$count. Install Mediatomb server? (y/n): "
read -e INSTALL_MEDIATOMB
count=`expr $count + 1`
echo -n "$count. Kill unecessary service cupsd printer daemon? (y/n): "
read -e KILL_CUPS
count=`expr $count + 1`
echo -n "$count. Install transmission torrent daemon and client? (y/n): "
read -e TRANSMISSION
count=`expr $count + 1`
echo -n "$count. Enable Secure FTP? (y/n): "
read -e SECURE_FTP
count=`expr $count + 1`
echo -n "$count. Install common tools (nano, bash etc) & codecs? (y/n): "
read -e COMMON_TOOLZ
count=`expr $count + 1`
echo ""
echo -n "$count. Install pyload?"
echo -e "${bldred}Note: Requires above option move to /opt/ to be selected"
echo "and the NAS drive to be formated in a linux based format"
echo -e "EXT3, EXT4, XFS etc.${txtrst} (y/n): "
read -e PYLOAD
count=`expr $count + 1`
echo ""
echo -n "$count. Install TheeMahn's consolidated web interface?"
read -e WEBFACE
count=`expr $count + 1`
echo ""

# === End prompting === #

#### now we are ready to go! ####

# Setup PATH
if [ "$SET_PATH" = "y" ]
then
# setup new path variable

NEW_PATH="/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/sbin:/opt/sbin:/usr/sbin:/sbin"
# set the environment
echo "PATH=$NEW_PATH" > /etc/environment
echo "PATH=$NEW_PATH" > /etc/profile
PATH="/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/sbin:/opt/sbin:/usr/sbin:/sbin"

# export the path too
export PATH=$NEW_PATH
echo -e "${bldgrn}Path has be set to:${bldwht}"
echo -e "$NEW_PATH${bldwht}"

#load path into current shell
/etc/profile
fi

## SSHd Substitution
if [ "$SSHD_SUBSTITUTION" = "y" ]
then
echo -e "${bldgrn}Replacing SSH Daemon...${txtwht}"

# download
wget -O $temp/sshd.tar.gz $SSHD_LOCATION 

# check file exists
if [ -s $temp/sshd.tar.gz ]
then
# extract
tar -xzf $temp/sshd.tar.gz -C $temp/

# backup original
cp /usr/sbin/sshd /usr/sbin/sshd.original
chmod -x /usr/sbin/sshd.original
   
# replace and make executable
mv $temp/sshd /usr/sbin/sshd
chmod +x /usr/sbin/sshd

# restart daemon
/etc/init.d/sshd restart

# clean-up
rm $temp/sshd.tar.gz
else
echo ""
echo -e "${bldred}Error: Unable to download SSHd.${txtrst}"
echo ""
fi
fi

## Install IPKG
if [ "$INSTALL_IPKG" = "y" ]
then
echo -e "${bldgrn}Installing IPKG...${txtwht}"

# download
wget -O $temp/ipkg.ipk $IPKG_LOCATION
# check file exists
if [ -s $temp/ipkg.ipk ]
then

# extract
tar -xzf $temp/ipkg.ipk -C $temp/
tar -xzf $temp/data.tar.gz -C /

# setup sources
sed -i 's/# src/src/g' /opt/etc/ipkg.conf
echo 'src seagateplug-stable http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable' >> /opt/etc/ipkg.conf
echo 'src seagateplug-unstable http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable' >> /opt/etc/ipkg.conf
/opt/bin/ipkg update

# clean-up
rm $temp/ipkg.ipk
rm $temp/data.tar.gz
rm $temp/control.tar.gz
rm $temp/debian-binary
else
echo ""
echo -e "${bldred}Error: Unable to download IPKG.${txtrst}"
echo ""
fi
fi

## Move /opt to HDD
if [ "$MOVE_OPT_TO_HDD" = "y" ]
then
#Implement check for filesystem type
if [[ `file -sL /dev/sda1 | grep "NTFS"` == "" ]]; then
echo -e "${bldgrn}Moving /opt to HDD...${txtwht}"
# copy everything
mkdir -p /home/$USER/GoFlex\ Home\ Personal/.opt/
cd /opt/
cp -R * /home/$USER/GoFlex\ Home\ Personal/.opt/

# rename old
mv /opt /opt-old

# Clean up
rm -R /opt-old
# symbolic link to hdd
ln -s /home/$USER/GoFlex\ Home\ Personal/.opt/ /opt
#FILE="/opt/"
#echo -e "${bldgrn}Scaning for executables in $FILE Stage 1.${txtwht}"
#find $FILE -name "DEBIAN" -prune -o -type f -exec sh -c 'test "$(head -c 2 "$1")" = "#!"' sh {} \; -print -exec chmod 755 {} \;
#No header, no problem
#find $FILE -name "*.sh" -exec chmod 755 {} \;
#find $FILE -name "*.py" -exec chmod 755 {} \;
#Nonstandard? spaces ( " etc.  sed 's/\([ "(){}$#\&~'"'"']\)/\\\1/g'
#echo "${bldgrn}Scaning for executables in $FILE Stage 2.${txtwht}"
#find $FILE -type f -executable -exec sh -c "file -i '{}' | grep -q 'x-executable; charset=binary'" \; -exec chmod 755 {} \;
cd $CURRENT
fi
else
echo -e "${bldred}Error: Your NAS drive is formatted in NTFS which does not support permissions for /opt useage."
fi

## Setup Kernel NFS
if [ "$KERNEL_NFS" = "y" ]
then
echo -e "${bldgrn}Setting up Kernel NFS...${txtwht}"

if [ `uname -r` = "$nfs_kernel_check" ]
then
# download
wget -O $temp/nfs.tar.gz $NFS_LOCATION

# check file exists
if [ -s $temp/nfs.tar.gz ]
then
# extract
tar -xzf $temp/nfs.tar.gz -C /

# load/check module
/sbin/depmod -a
/sbin/modprobe nfsd
/sbin/lsmod | grep nfsd

# NFS Lock
cd /etc/init.d/
wget http://downloadue.info/NAS/Firmware/nfslock
chmod 755 /etc/init.d/nfslock

# add default share to Server's IP (detect it)
SERVERIP=$(/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')
echo "/home/0common "$SERVERIP"/255.255.255.0(rw,sync,no_root_squash,no_subtree_check)" > /etc/exports

# remove v4 support
mv /etc/sysconfig/nfs /etc/sysconfig/nfs.original
cat /etc/sysconfig/nfs.original | sed 's/^#RPCNFSDARGS="-N\ 4"/RPCNFSDARGS="-N\ 4"/' > /etc/sysconfig/nfs

# start daemons
/etc/init.d/portmap start
/etc/init.d/nfs start
service nfslock start

# Set daemons to start at boot
/sbin/chkconfig --add portmap
/sbin/chkconfig --level 235 portmap on
/sbin/chkconfig --add nfs
/sbin/chkconfig --level 235 nfs on
service nfslock start
# check to make sure all is good
/sbin/exportfs -v

# clean-up
rm $temp/nfs.tar.gz
echo -e "${bldwht}To mount the NFS share on the client ie Ultimate Edition, Ubuntu etc:${bldgrn}"
echo "sudo mkdir -p /media/NASNFS"
echo "sudo mount "$SERVERIP":/home/0common /media/NASNFS"
echo ""
echo -e "${bldwht}To mount on boot add the following to your /etc/fstab/:${bldgrn}"
echo $SERVERIP":/home/0common /media/NASNFS nfs rsize=8192,wsize=8192,timeo=14,intr"
echo -e "${txtwht}"
else
echo ""
echo -e "${bldred}Error: Unable to download NFS.${txtrst}"
echo ""
fi
else
# wrong kernel version
echo -e "${bldred}Error: Wrong Kernel, please upgrade to $nfs_kernel_check.${txtrst}"
fi
fi

## Setup NZBget
if [ "$INSTALL_NZBGET" = "y" ]
then
echo -e "${bldgrn}Installing NZBget...${txtwht}"
if [ -e /opt/bin/ipkg ]
then
/opt/bin/ipkg install nzbget
/opt/bin/ipkg install unrar
# set home directory, umask to 0000 and parcheck to 1.
cat /opt/share/doc/nzbget/nzbget.conf.example | sed -e "s#~/download#$nzb_home#"\
-e "s#UMask=1000#UMask=0000#"\
-e "s#DirectWrite=no#DirectWrite=yes#"\
-e "s#PostProcess=#PostProcess=$nzb_home/postprocess.sh#"\
-e "s#ParCheck=no#ParCheck=yes#" > /usr/etc/nzbget.conf
# copy example post-process script
cp /opt/share/doc/nzbget/postprocess-example.sh $nzb_home/postprocess.sh

# setup nzbget daemon
wget -O $temp/nzbgetd $NZBGETD_LOCATION
mv $temp/nzbgetd /etc/init.d/nzbgetd
chmod +x /etc/init.d/nzbgetd

# start at boot
/sbin/chkconfig --add nzbgetd
/sbin/chkconfig --level 235 nzbgetd on

# start daemon
/etc/init.d/nzbgetd start
else
echo -e "${bldred}Error: IPKG not found."
echo ""
echo -e "Please install IPKG in order to download additional packages.${txtrst}"
fi
fi

## Setup NZBget-web
if [ "$INSTALL_NZBGETWEB" = "y" ]
then
echo -e "${bldgrn}Setting up NZBGET-web...${txtwht}"

# download
wget -O $temp/nzbgetweb.zip $NZBGETWEB_LOCATION
wget -O $temp/xmlrpc.tar.gz $RPCLIB_LOCATION
# grab unzip if we dont have it already
if [ ! -e /opt/bin/unzip ]
then
/opt/bin/ipkg install unzip
fi

# we can share the http server by placing files in /var/www/
/opt/bin/unzip -d /var/www $temp/nzbgetweb.zip 

# we also need the PHP RPC library
tar -xzf $temp/xmlrpc.tar.gz -C $temp/
cp -r $temp/xmlrpc-2.2.2/lib /var/www/nzbgetweb/lib

# set permissions
chgrp -R www /var/www/nzbgetweb/
chmod -R 755 /var/www/nzbgetweb/
chown -R apache /var/www/nzbgetweb/

# setup the alias
cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.original
echo 'Alias /nzbgetweb/ "/var/www/nzbgetweb/"' >> /etc/httpd/conf/httpd.conf
# restart httpd daemon
/sbin/service httpd reload

# clean-up
rm $temp/nzbgetweb.zip
rm $temp/xmlrpc.tar.gz
rm -r $temp/xmlrpc-2.2.2
fi

## Disable Access Patrol service
if [ "$DISABLE_ACCESS_PATROL" = "y" ]
then
echo -e "${bldgrn}Disabling Access Patrol...${txtwht}"
# stop service
/etc/init.d/access-patrol stop
echo ""
echo ""
# remove from boot
/sbin/chkconfig --levels 2345 access-patrol off
# remove executable flag
chmod a-x /usr/sbin/access-patrol
fi

## Setup Mediatomb
if [ "$INSTALL_MEDIATOMB" = "y" ]
then
echo -e "${bldgrn}Installing mediatomb media server...${txtwht}"
/opt/bin/ipkg install mediatomb
echo "MT_ENABLE=true" > /opt/etc/default/mediatomb
/opt/etc/init.d/S90mediatomb start
cd /etc/init.d
# Set eth0 as default port
sed -i 's/MT_OPTIONS=""/MT_OPTIONS="-e eth0"/g' /opt/etc/mediatomb.conf
# Set decoding options etc.
sed -i 's/<name>MediaTomb<\/name>/<name>'$USER's NAS<\/name>/g' /opt/etc/mediatomb/config.xml
sed -i 's/<protocolInfo extend="no".*/<protocolInfo extend="yes" samsung-hack="yes"\/>/g' /opt/etc/mediatomb/config.xml
sed -i 's/<add header=".*/<add header="transferMode.dlna.org: Streaming"\/><add header="contentFeatures.dlna.org: DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01500000000000000000000000000000"\/>/g' /opt/etc/mediatomb/config.xml
sed -i 's/<\/scripting>/<\/scripting><autoscan use-inotify="auto"><directory location="\/home\/'$USER'\/GoFlex\ Home\ Personal\/" mode="timed" interval="3600" level="full" recursive="yes" hidden-files="no"\/><\/autoscan>/g' /opt/etc/mediatomb/config.xml
sed -i 's/<!-- <map from="avi" to="video/avi"\/> -->/<map from="avi" to="video/avi"\/>/g' /opt/etc/mediatomb/config.xml
ln -s /opt/etc/init.d/S90mediatomb
/sbin/chkconfig --add S90mediatomb
/sbin/chkconfig --levels 2345 S90mediatomb on
/opt/etc/init.d/S90mediatomb
fi

## Setup Kill unneeded service, why wast valuable resources, we only have 128Mb of ram and no printer.
if [ "$KILL_CUPS" = "y" ]
then
echo -e "${bldgrn}Killing cups and preventing from startup...${txtwht}"
chmod -x /usr/sbin/cupsd
killall cupsd
fi

## Transmission?
if [ "$TRANSMISSION" = "y" ]
then
echo -e "${bldgrn}Installing Transmission torrent client and daemon...${txtwht}"
PKGURL="http://downloadue.info/NAS/Firmware/transmission-1_92_ARM_Stora_tar" 
BINPATH="/usr/local/bin"
WEBPATH="/usr/share/transmission"
SCRIPTPATH="/etc/init.d"
SETTINGSPATH="/home/$USER/.config/transmission-daemon"
DLPATH="/home/$USER/GoFlex Home Personal/Downloads"
#WTPATH="$DLPATH/Torrents"
JSONDLPATH="\\\\\/home\\\\\/.config\\\\\/transmission-daemon\\\\\/Downloads"
JSONWTPATH="\\\\\/home\\\\\/.config\\\\\/transmission-daemon\\\\\/myTorrentFolder"
#ipkg install transmission
temp=$(sed -i "s/^.*download-dir.*/\"download-dir\": \"$DLPATH\",/g" $SETTINGSPATH/settings.json 2>&1)
sed -i "s/supportsTransmission=0/supportsTransmission=1/g" /etc/features.conf
cd /tmp/
wget http://downloadue.info/NAS/Firmware/transmission-1_92_ARM_Stora_tar
tar xfv transmission-1_92_ARM_Stora_tar
cd transmission
mv transmission-daemon /usr/local/bin
cp -R web /usr/share/transmission/
cd init.d
mv transmission-daemon /etc/init.d/
sed -i 's/DAEMON_USER="user"/DAEMON_USER="'$USER'"/g' /etc/init.d/transmission-daemon
#sed -i 's/TRANSMISSION_HOME=\/home\/.config\/transmission-daemon/TRANSMISSION_HOME=\/home\/'$USER'\/.config\/transmission-daemon//g' /etc/init.d/transmission-daemon
#sed -i 's/.*TRANSMISSION_HOME=.*/TRANSMISSION_HOME=\/home\/'$USER'\/.config\/transmission-daemon//g' /etc/init.d/transmission-daemon
sed -i 's/TRANSMISSION_HOME=.*/TRANSMISSION_HOME=\/home\/'$USER'\/.config\/transmission-daemon\//g' /etc/init.d/transmission-daemon
mkdir -p /home/$USER/.config/transmission-daemon
chmod 777 /home/$USER/.config/transmission-daemon/
/etc/init.d/transmission-daemon start
ps -ef |grep transmission-daemon
/etc/init.d/transmission-daemon stop

#set blocklist
cd /home/$USER/.config/transmission-daemon/blocklists/
wget http://downloadue.info/NAS/Firmware/blocklist.bin
sed -i 's/"blocklist-enabled": false,/"blocklist-enabled": true,/g' /home/$USER/.config/transmission-daemon/settings.json

#Modify settings.json
sed -i 's/"rpc-whitelist": "127.0.0.1"/"rpc-whitelist": "*.*.*.*"/g' /home/$USER/.config/transmission-daemon/settings.json
sed -i 's/"rpc-whitelist-enabled": true/"rpc-whitelist-enabled": false/g' /home/$USER/.config/transmission-daemon/settings.json
#sed -i 's/"rpc-enabled": true/"rpc-enabled": false/g' /home/$USER/.config/transmission-daemon/settings.json
sed -i 's/"speed-limit-up": 100/"speed-limit-up": 0/g' /home/$USER/.config/transmission-daemon/settings.json
sed -i 's/"speed-limit-up-enabled": false/"speed-limit-up-enabled": true/g' /home/$USER/.config/transmission-daemon/settings.json
sed -i 's/"download-dir": ".*/"download-dir": "\/home\/'$USER'\/GoFlex Home Personal\/Downloads\/",/g' /home/$USER/.config/transmission-daemon/settings.json
sed -i 's/"incomplete-dir": ".*/"incomplete-dir": "\/home\/'$USER'\/GoFlex Home Personal\/Incomplete\/",/g' /home/$USER/.config/transmission-daemon/settings.json
sed -i 's/"incomplete-dir-enabled": false,/"incomplete-dir-enabled": true,/g' /home/$USER/.config/transmission-daemon/settings.json
mkdir -p /home/$USER/GoFlex\ Home\ Personal/Torrentz/
mkdir -p /home/$USER/GoFlex\ Home\ Personal/Downloads/
mkdir -p /home/$USER/GoFlex\ Home\ Personal/Incomplete/
chmod -R 777 /home/$USER/GoFlex\ Home\ Personal/
sed -i 's/}//g' /home/$USER/.config/transmission-daemon/settings.json
sed -i 's/"upload-slots-per-torrent": 14/"upload-slots-per-torrent": 14,/g' /home/$USER/.config/transmission-daemon/settings.json
#Delete if old setting exists before appending to file
sed -i 's/"watch-dir.*//g' /home/$USER/.config/transmission-daemon/settings.json

echo '"watch-dir":"/home/'$USER'/GoFlex Home Personal/Torrentz/",' >> /home/$USER/.config/transmission-daemon/settings.json
echo '"watch-dir-enabled": true
}' >> /home/$USER/.config/transmission-daemon/settings.json

#autostart daemon
/etc/init.d/transmission-daemon start
/sbin/chkconfig --add transmission-daemon
/sbin/chkconfig --levels 2345 transmission-daemon on

#Cleanup
cd $temp
rm transmission-1_92_ARM_Stora_tar
rm -R transmission
fi

#Secure FTP?
if [ "$SECURE_FTP" = "y" ]
then
echo -e "${bldgrn}Installing Secure FTP...${txtwht}"
sed -i 's/ssl_enable=NO/ssl_enable=YES/g' /etc/vsftpd/vsftpd.conf
sed -i 's/#ftpd_banner=.*/ftpd_banner=Welcome to '$USER's secure FTP service./g' /etc/vsftpd/vsftpd.conf
/etc/init.d/vsftpd restart
fi

#Common Tools?
if [ "$COMMON_TOOLZ" = "y" ]
then
echo -e "${bldgrn}Installing common tools...${txtwht}"
ipkg install nano bash faad2 ffmpeg flac freetype fribidi liba52 libdvbpsi libdvdnav libdvdread libid3tag libmad libmpcdec libmpeg2 libogg libpng libshout libupnp libvorbis libxml2 ncursesw speex avahi x264
fi

#Pyload?
if [ "$PYLOAD" = "y" ]
then
echo -e "${bldred}Pyload subfunction has not been written yet. Please stay tuned.${txtrst}"
#echo -e "${bldgrn}Installing Pyload...${txtwht}"
#add check to see if user has moved opt...
#/opt/bin/ipkg install python py25-crypto py25-curl libcurl py25-openssl py25-django tesseract-ocr unzip sqlite wget-ssl py25-pil unrar ossp-js
#cd /opt/
#wget http://get.pyload.org/get/src/
#/opt/bin/unzip pyload-src*.zip
#rm pyload-src-*.zip
#cd /opt/pyload/
#python pyLoadCore.py --changedir --configdir=/opt/pyload/.pyload
#python pyLoadCore.py -s
fi

#WEB Interface
if [ "$WEBFACE" = "y" ]; then
SERVERIP=$(/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')
echo -e "${bldgrn}Setting up TheeMahn's consolidated web interface${txtrst}"
cd $TEMP
wget http://downloadue.info/NAS/Firmware/html.tar.gz
tar xfv html.tar.gz
cd html
#don't sweat permissions, folder to be copied to will keep all at bay.
chmod 777 -R *
sed -i "'s/NASIP/$SERVERIP/g" index.php
cp -R * /var/www/html/html/

#Reboot?
fi
echo -n "$count. Reboot NAS drive? (y/n): "
read -e REBOOT_NAS
if [ "$REBOOT_NAS" = "y" ]
then
/sbin/reboot
fi
#EOF
Home of Ultimate Edition. Got a question? Please review the F.A.Q. Browse the How to section.

Main O/S: Builder of O/S Guess.
Mainboard: ASUS Sabertooth 990FX TUF (The Ultimate Force) R2.0
CPU: AMD FX 8150 Bulldozer Eight Core Black Edition
Ram: 16 GB GSkill Ripjaws Dual Channel DDR3 2133
Video: 2 X ATI 7770HD GHZ Edition 1GB PCI 3.0 Crossfire (main cards) various others for testing
Hard Disks: Over 30 TB Mechanical and Multiple SSD's. (Sans Digital 32TB raid tower - dual Esata)
Raid: Onboard 10 sata / e-sata ports, HighPoint RocketRAID 640 PCI-Express 2.0 x4 SATA III (6.0Gb/s)
custom software mirrored - tmbackup
Monitors: 4K Samsung 28", HannsG HH281, Various others
730 Watt modular PSU
700 Watt Amp & 4 X 600 Watt speakers
User avatar
TheeMahn
Site Admin
 
Posts: 4193
Joined: Fri Oct 12, 2007 10:02 am
Location: U.S.A.
Age: 46
Operating System: Ultimate Edition Developer



Re: NAS programming....

Postby Micro » Thu Dec 06, 2012 8:58 pm

Mediatomb, transmission. Sick... 8-)
Image
https://www.linkedin.com/in/josephperrello
Thermaltake Series Core X9 SPCC E-ATX Cube Case
CORSAIR Vengeance LPX 64GB Quad Channel DDR4
EVGA 120-G1-0750-XR 80 PLUS GOLD 750W PSU
APC BR1300G Back-UPS Pro 780W/1300VA UPS
ASRock X99 Extreme4 LGA X99 Motherboard
OC-Intel Core i7-5820K @ 4.1GHz × 12
Corsair H100i V2 CPU Cooler. 240mm
Kernel Linux 4.6.4-1-ARCH x86_64
MATE Desktop Environment 1.12.1
OS - SAMSUNG 950 PRO M.2 512GB
DATA - 2 SSD 840 EVO RAID 0
MEDIA - 4 HDD 3TB RAID 0
NVIDIA GeForce GTX750 Ti
ViewSonic PJD7820HD
OS - Filesystem F2FS
Arch Linux
User avatar
Micro
Site Admin
 
Posts: 485
Joined: Tue Apr 24, 2012 1:16 pm
Age: 39
Operating System: Other Linux



Re: NAS programming....

Postby TheeMahn » Tue Dec 17, 2013 9:13 am

Micro wrote:Is that really a NAS or a Device Attached Storage? Just got done building a older workstation into a NAS using FreeNAS. Great OS for its purpose with a nice Web UI and ZFS. Thought about buying a DAS for the wife. And now since you wrote some new software i guess im forced to do so. Cant wait to check it out. Keep up the good work and cant wait to see whats next. Possibly an Ultimate Edition Android OS would be fun. Hooah...

This is the exact make and model. I bought mine from Newegg.

Today I downloaded Copy from their website, and whoa and behold an ARM based version of Copy Application. Clinical trials begin ;)
Code: Select all
theemahn@JackHammer:~/Music$ nasup --scan

nasup 1.7.2-1, Build date: 10/24/13
GNU nasup home page: <http://www.ultimateedition.info/>.
E-mail bug reports to: <theemahn@ultimateedition.info>.
Be sure to include the word nasup somewhere in the Subject: field.
Network interfaces detected
eth0
lo
Scanning for active
Interface eth0: up
Active Network So far: eth0
Interface lo: unknown
Active Network So far: eth0
ACTIVE NETWORK: eth0
IP BLOCK: 192.168.24.*
Scanning 192.168.24.* for Go-flex IP..
1 NAS Drive(s) detected.
NAS Host exists at 192.168.24.104.
Mount point does not exist, creating /media/NAS/.
[sudo] password for theemahn:
Entering cifs mode:
User-name: theemahn
Password: Mounting NAS from 192.168.24.104 to /media/NAS/
Mounting / un-mounting NAS Drive(s)
theemahn@JackHammer:~/Music$


Good to see nasup still works, now to ssh in and load in Copy's Application.

Slapped an 80GB Sata drive in from a PS3 Formatted it, time to goto work:
80in.png

Code: Select all
theemahn@JackHammer:~/Music$ ssh theemahn_hipserv2_seagateplug_BLAH-BLAH-BLAH-BLAH@192.168.24.104

The authenticity of host '192.168.24.104 (192.168.24.104)' can't be established.
RSA key fingerprint is 7c:a8:25:21:13:a2:eb:00:a6:c1:76:ca:6b:48:6e:bf.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.24.104' (RSA) to the list of known hosts.
GoFlex Home version 10.0.x
theemahn_hipserv2_seagateplug_@192.168.bash-3.2# 192.168.24.104's password:
-bash-3.2$ su
Password:
bash-3.2#

Code: Select all
cd /tmp/
bash-3.2# wget http://downloadue.info/NAS/copy.armv6h.tar.gz
--09:31:59--  http://downloadue.info/NAS/copy.armv6h.tar.gz
Resolving downloadue.info... 50.62.226.1
Connecting to downloadue.info|50.62.226.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6044797 (5.8M) [application/x-tar]
Saving to: `copy.armv6h.tar.gz'

100%[=====================================================================================================================================================================================================>] 6,044,797   1.50M/s   in 4.5s   

09:32:13 (1.28 MB/s) - `copy.armv6h.tar.gz' saved [6044797/6044797]

bash-3.2#


Moving right along ;)
Code: Select all
bash-3.2# tar xfv copy.armv6h.tar.gz
armv6h/libgcc_s.so.1
armv6h/libstdc++.so
armv6h/ca-bundle.crt
armv6h/libCloudMount.so
armv6h/libAgentSync.so
armv6h/libgcc_s.so
armv6h/libCloudSync.so
armv6h/libstdc++.so.6
armv6h/CopyCmd
armv6h/libstdc++.so.6.0.17
armv6h/CopyConsole
armv6h/libBrt.so
armv6h/
bash-3.2#

Looking good so far, let get it rocking:
Code: Select all
bash-3.2# cd armv6h/
bash-3.2# ls
CopyCmd  CopyConsole  ca-bundle.crt  libAgentSync.so  libBrt.so  libCloudMount.so  libCloudSync.so  libgcc_s.so  libgcc_s.so.1   libstdc++.so  libstdc++.so.6  libstdc++.so.6.0.17
bash-3.2# CopyCmd
bash: CopyCmd: command not found
bash-3.2# chmod 755 CopyCmd
bash-3.2# ./CopyCmd
bash: ./CopyCmd: /lib/ld-linux-armhf.so.3: bad ELF interpreter: No such file or directory
bash-3.2# uname -a
Linux axentraserver.theemahn.seagateshare.com 2.6.22.18 #16 Thu Jun 17 01:37:53 EDT 2010 armv5tejl armv5tejl armv5tejl GNU/Linux
bash-3.2#


Hrmm ARM5 and ARM6 must be incompatible, or is it something I am not doing right. Google is your buddy. The investigation begins. I have just started entering the ARM world, I guess I can learn here before the MK809III arrives:
Code: Select all
bash-3.2# readelf -l CopyCmd

Elf file type is EXEC (Executable file)
Entry point 0x3d760
There are 8 program headers, starting at offset 52

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  EXIDX          0x1a6788 0x001ae788 0x001ae788 0x02c98 0x02c98 R   0x4
  PHDR           0x000034 0x00008034 0x00008034 0x00100 0x00100 R E 0x4
  INTERP         0x000134 0x00008134 0x00008134 0x00019 0x00019 R   0x1
      [Requesting program interpreter: /lib/ld-linux-armhf.so.3]
  LOAD           0x000000 0x00008000 0x00008000 0x1a9424 0x1a9424 R E 0x8000
  LOAD           0x1a9424 0x001b9424 0x001b9424 0x193b0 0x1c9b0 RW  0x8000
  DYNAMIC        0x1b92e0 0x001c92e0 0x001c92e0 0x00148 0x00148 RW  0x4
  NOTE           0x000150 0x00008150 0x00008150 0x00020 0x00020 R   0x4
  GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RW  0x4

Section to Segment mapping:
  Segment Sections...
   00     .ARM.exidx
   01     
   02     .interp
   03     .interp .note.ABI-tag .hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .ARM.extab .ARM.exidx .eh_frame
   04     .init_array .fini_array .jcr .data.rel.ro .dynamic .got .data .bss
   05     .dynamic
   06     .note.ABI-tag
   07     
bash-3.2#

Not much info, lets grab some processor info. Reminds me of assembly language
Code: Select all
bash-3.2# cat /proc/cpuinfo
Processor   : ARM926EJ-S rev 1 (v5l)
BogoMIPS   : 1192.75
Features   : swp half thumb fastmult edsp
CPU implementer   : 0x56
CPU architecture: 5TE
CPU variant   : 0x2
CPU part   : 0x131
CPU revision   : 1
Cache type   : write-back
Cache clean   : cp15 c7 ops
Cache lockdown   : format C
Cache format   : Harvard
I size      : 16384
I assoc      : 4
I line length   : 32
I sets      : 128
D size      : 16384
D assoc      : 4
D line length   : 32
D sets      : 128

Hardware   : Feroceon-KW
Revision   : 0000
Serial      : 0000000000000000
bash-3.2#


If I am reading that correctly, the MK809III is the same processor family as the GoFlex NAS. A9 Cortex is the MK809. I am sure a single core and a whole lot slower. I am thinking at this point that the app is a GTK app and what is causing the failure. The NAS drive is a headless system.
Home of Ultimate Edition. Got a question? Please review the F.A.Q. Browse the How to section.

Main O/S: Builder of O/S Guess.
Mainboard: ASUS Sabertooth 990FX TUF (The Ultimate Force) R2.0
CPU: AMD FX 8150 Bulldozer Eight Core Black Edition
Ram: 16 GB GSkill Ripjaws Dual Channel DDR3 2133
Video: 2 X ATI 7770HD GHZ Edition 1GB PCI 3.0 Crossfire (main cards) various others for testing
Hard Disks: Over 30 TB Mechanical and Multiple SSD's. (Sans Digital 32TB raid tower - dual Esata)
Raid: Onboard 10 sata / e-sata ports, HighPoint RocketRAID 640 PCI-Express 2.0 x4 SATA III (6.0Gb/s)
custom software mirrored - tmbackup
Monitors: 4K Samsung 28", HannsG HH281, Various others
730 Watt modular PSU
700 Watt Amp & 4 X 600 Watt speakers
User avatar
TheeMahn
Site Admin
 
Posts: 4193
Joined: Fri Oct 12, 2007 10:02 am
Location: U.S.A.
Age: 46
Operating System: Ultimate Edition Developer



Re: NAS programming....

Postby TheeMahn » Tue Dec 17, 2013 11:15 am

Micro wrote:I definately thought about it, but changed my direction and now have been converting (P2V) my excess custom desktop servers. I too have a similar looking setup, but have been trying to clean house a little. Or shall i say, been forced to clean house. lol. I now have my owncloud server virtualized and on the micronet. Great software and love the calendar and music player. The wife has been using it for a few weeks and likes the web interface, and the android app too. Was a simple build. Used the debian business card image with an expert setup to allow a true debain sid install. Installed MySQL and Owncloud and all was complete. Added IP to my A Records and she can access it anywhere. Just wish they included a video player in owncloud. My work around was to add my FTP server links to the own file directory, allowing to play movies from my server in the web browser. I am not a programmer, just a System Admin. Otherwise i would have written the snap in. Its hard working in my environment with all the cool stuff i will never be able to afford (Dell r910's, HP SAN's, Nexus Switches) But i will get bye just like i always have. Keep up the good work and looking forward to 3.5. I'm sure it will put you in back in the Distrowatch top ten...


Brother, have you seen owncloud? Check this out: TheeMahn's owncloud Unlimited storage and encryption 100% under my control, all 100% opensource software. I guess you have seen it, just read "owncloud" in your post ;)
Home of Ultimate Edition. Got a question? Please review the F.A.Q. Browse the How to section.

Main O/S: Builder of O/S Guess.
Mainboard: ASUS Sabertooth 990FX TUF (The Ultimate Force) R2.0
CPU: AMD FX 8150 Bulldozer Eight Core Black Edition
Ram: 16 GB GSkill Ripjaws Dual Channel DDR3 2133
Video: 2 X ATI 7770HD GHZ Edition 1GB PCI 3.0 Crossfire (main cards) various others for testing
Hard Disks: Over 30 TB Mechanical and Multiple SSD's. (Sans Digital 32TB raid tower - dual Esata)
Raid: Onboard 10 sata / e-sata ports, HighPoint RocketRAID 640 PCI-Express 2.0 x4 SATA III (6.0Gb/s)
custom software mirrored - tmbackup
Monitors: 4K Samsung 28", HannsG HH281, Various others
730 Watt modular PSU
700 Watt Amp & 4 X 600 Watt speakers
User avatar
TheeMahn
Site Admin
 
Posts: 4193
Joined: Fri Oct 12, 2007 10:02 am
Location: U.S.A.
Age: 46
Operating System: Ultimate Edition Developer


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest