|
|||||||
| Регистрация | FAQ | Участники | Поиск | Свежие сообщения | Пометить все разделы как прочитанные | ||||||||||||||||
| Firmware Wizard | Donate | ||||||||||||||||||||
![]() |
|
|
Опции темы |
Рейтинг:
|
Опции просмотра |
|
#1
|
|||
|
|||
|
[How To] Install and Configure Olegs firmware
Hier findest Du das originale deutsche HowTo: http://wl500g.info/showthread.php?t=8424
After some people asked me to, this is a translation of my original, german Howto. 00. News March 2010 Please use, if your hardware is supported, the "enthusiast firmware". More details later. This howto is for firmware version 1.9.2.7-9 and newer. Older versions are not supported any more. Important: I exclude any liability. This HowTo is for newbies! please contact me if you find any mistakes. 0. Premises I am working with an Asus WL-HDD. But this HowTo is known to work with other hardware where you can install olegs firmware. The WL-HDD has a weak CPU and small memory, but it does the job :-) You also need: - basic linux knowledge (cd, vi, ps, df, free, top, ...) - time. I needed about 5 hours for modifying my WL-HDD incl. dinner. So you need time. - an internet connection for downloading the software. 1. Install firmware The easiest way is the Asus Firmware Restoration Tool. Download the tool according to your hardware. ASUS WL-HDD2.5 wireless hard disk drive box utility program in English It will also work with the Asus Webinterface but be sure to have the restoration tool by hand. Download olegs firmware: Firmware Wizzard (not allways newest) or directly at http://oleg.wl500g.info Always use the newest version for your hardware model. UPDATE: There is an advanced version of oleg firmware. This one is compatible to the original and is well maintained. I recommend using this firmware if your hardware is supported. This HowTo wil only work with versions 1.9.2.7-9 and newer! Reset your Asus to factory defaults. (user:admin / pw:admin) Extract the zip. Install the Asus tool, start it and select "firmware restoration". Select the firmware (hardware_version.trx) and click upload. After the reboot browse to the Webinterface of the router and again reset to factory defaults. Again a reboot and your router has a default oleg firmware. remark: My WL-HDD does NOT act as Router in my network. It is only a client. Because of this i will not handle firewall settings within this howto. Do the following in the Webinterface: - enter the Name of the router (mine is "blechbuechse"). - enter you IP settings (IP, gateway, DNS aso.) - disable FTP, Samba, NFS - enable telnet - Change the password - do any changes as you need them. (DHCP, time zone, WLAN, aso.) - If used as router: login data, firewall, allow ping from WAN. If this did NOT work until here you will NOT be able to go on! 2. Telnet Start telnet. For Windows: Start-Execute - "telnet IPOFASUS" user:admin / pw:admin Test your internet connection: Код:
ping google.de Цитата:
If this is NOT working: Do not ping a name, ping an IP adress. If you are not able to ping an ip adress: check your network (IP, DNS) settings and cabeling. telnet is not a secure way to work on your asus. Espacially over internet. This is why you install SSH now: 3. SSH-deamon TIP: You can copy & paste all commands within telnet and putty. For Windows use ctrl-c and ctrl-v, for putty mark the text and right click. The name of the ssh daemon is dropbear. It can be activated with the Web Interface (System Setup->Services) if you use the "enthusiast firmware" (1.9.2.7-d-rxxxx). Using the new firmware you only have to generate the keys and startup scripts. Users of firmwares before 1.9.2.7-d-rxxxx need to execute the whole chapter! create startup scripts: Код:
mkdir -p /usr/local/sbin/ touch /usr/local/sbin/pre-boot touch /usr/local/sbin/post-boot touch /usr/local/sbin/post-firewall touch /usr/local/sbin/post-mount touch /usr/local/sbin/pre-mount touch /usr/local/sbin/pre-shutdown chmod +x /usr/local/sbin/* Код:
mkdir -p /usr/local/etc/dropbear Код:
dropbearkey -t dss -f /usr/local/etc/dropbear/dropbear_dss_host_key dropbearkey -t rsa -f /usr/local/etc/dropbear/dropbear_rsa_host_key Код:
echo "#!/bin/sh" >> /usr/local/sbin/post-boot echo "dropbear" >> /usr/local/sbin/post-boot Код:
dropbear Цитата:
Код:
flashfs save && flashfs commit && flashfs enable && reboot
__________________
Ьbersicht aller HowTos --- HowTo Overview (mostly german) WL-HDD mit diesem Setup. --- WL-HDD with this setup. Kein Support per PM - Frage im jeweiligen Thread! --- No support via pm - ask in the according thread! Eine wirklich gute Idee erkennt man daran, dass ihre Verwirklichung von vorne herein ausgeschlossen erscheint. (Albert Einstein) Последний раз редактировалось wengi, 29-04-2010 в 10:14. |
|
#1
|
|||
|
|||
|
#2
|
||||||
|
||||||
|
4. partition and format HDD
Important for USB Disks: Power on First HDD , second router. IMPORTANT: You will loose all the data on your HDD. Make a backup if necessary. From now on you will work with putty. Start putty, enter the IP adress of your box and select SSH. Confirm the Key. My HDD (80GB) is partitioned as follows: data (part1), IPKG (part2) und swap (part3) all primary, no extended Swap 512MB (You can also use 128MB if you want to save some space) IPKG 1GB Data the rest (~78GB) View mountpoints Цитата:
If you allready partitioned your HDD as you want (incl. swap) go to the next chapter. BUT: i recommend using fdisk because several users reported problems in mounting partitions created with third party software. You should unmount all mounts except /. Код:
umount /place/of/mountpoint If there is an error message during umount there is activity on the mount. Did you disable FTP / Samba, ...? After unmounting all it should look like this: Цитата:
Partition with fdisk: Код:
fdisk /dev/discs/disc0/disc m for help. p for view partitions. d for delete. n for new. Delete all existing partitions, if any. All data will be lost!!! create new partitons after deleting the old ones: partitions: part1 Swap 512MB type82 part2 IPKG 1024MB /opt part3 data rest /tmp/harddisk (This is a point where WL-HDD differs to others..!?!) Create swap: n -> p -> 1 -> 'return' -> +512M -> t -> 82 Create IPKG: n -> p -> 2 -> 'return' -> +1024M Create data: n -> p -> 3 -> 'return' -> 'return' Save settings by pressing w and exit. "fdisk -l" will show your partitions: Цитата:
This is a 'free' without swap: Цитата:
Код:
mkswap /dev/discs/disc0/part1 swapon /dev/discs/disc0/part1 Цитата:
Код:
mke2fs -j /dev/discs/disc0/part2 mke2fs -j -m 0 /dev/discs/disc0/part3 A remark for the newbies: The partitions are ext3 formated. This is what you want!. You do NOT need Fat or NTFS to access your data. You need to edit the file fstab to automaticaly mount the partitions a short vi Explanation: vi is an editor. You enter the insert mode with i, you leave it with ESC. You can insert the content of the clipboard by right clicking within insert mode. After leaving the insert mode you quit and save by typing ':wq'. Leaving without saving is ':q!'. This is all. Search for a vi howto for more. Edit the file /etc/fstab by typing: Код:
vi /etc/fstab Код:
#device Mountpoint FStype Options Dump Pass# /dev/discs/disc0/part1 none swap sw 0 0 /dev/discs/disc0/part2 /opt ext3 rw,noatime 1 1 /dev/discs/disc0/part3 /tmp/harddisk ext3 rw,noatime 1 1 Important: The data partition is mounted to /tmp/hardisk as in fstab. This is handled different in the firmware because of compatibility issues: The Partition is mounted to /tmp/mnt/disc0_3 and a symlink is pointing from /tmp/hardisk to /tmp/mnt/disc0_3 To save fstab for reboot: Код:
echo "/etc/fstab" >> /usr/local/.files The time zone in the firmware is not correct for middle europe. We will correct this: This issue is fixed from verison wl500g-1.9.2.7-d-r240 (2009-04-11) on. If you use any newer version you can continue with i /usr/local/sbin/pre-mount. Код:
vi /usr/local/sbin/pre-boot Код:
#! /bin/sh tz="CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00" nvram set time_zone="$tz" echo "$tz" > /etc/TZ There is a script to keep the file system clean: Код:
vi /usr/local/sbin/pre-mount Код:
#! /bin/sh
swapon -a
for i in `awk '/ext3/{print($1)}' /etc/fstab` ; do
if [ -b $i ] ; then
grep -q $i /proc/mounts || e2fsck -p $i 2>&1 | logger -t e2fsck
else
logger -t fstab "$i is not attached"
fi
done
post-mount is executed after pre-mount Код:
vi /usr/local/sbin/post-mount Код:
#! /bin/sh /opt/etc/init.d/rc.unslung start Код:
vi /usr/local/sbin/pre-shutdown Код:
#! /bin/sh
/opt/etc/init.d/rc.unslung stop
sleep 10s
for i in `cat /proc/mounts | awk '/ext3/{print($1)}'` ; do
mount -oremount,ro $i
done
swapoff -a
sleep 1s
The HDD has to be mounted before editing the next file. But the best is to save and reboot: Код:
flashfs save && flashfs commit && flashfs enable && reboot Software and services installed via IPKG write scripts to /opt/etc/init.d. You need a mechanism to start these scripts. This mechanism (a script) is triggert by post-boot. Код:
mkdir /opt/etc mkdir /opt/etc/init.d vi /opt/etc/init.d/rc.unslung Content: Цитата:
Код:
chmod +x /opt/etc/init.d/rc.unslung ![]()
__________________
Ьbersicht aller HowTos --- HowTo Overview (mostly german) WL-HDD mit diesem Setup. --- WL-HDD with this setup. Kein Support per PM - Frage im jeweiligen Thread! --- No support via pm - ask in the according thread! Eine wirklich gute Idee erkennt man daran, dass ihre Verwirklichung von vorne herein ausgeschlossen erscheint. (Albert Einstein) Последний раз редактировалось wengi, 01-06-2010 в 16:06. |
|
#3
|
|||
|
|||
|
6. IPKG
IPKG is a package management system. You can install additional software with it. IPKG works on your HDD in /opt. Thats why you created and mounted the IPKG partition in /usr/local/sbin/post-boot. By the way: The log files are written to /opt/var/log. The steps to install the package management system are: create a directory. Код:
mkdir -p /opt/tmp/ipkg cd /opt/tmp/ipkg Код:
wget http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/ipkg-opt_0.99.163-10_mipsel.ipk ipkg.sh install ipkg-opt_0.99.163-10_mipsel.ipk wget http://ipkg.nslu2-linux.org/feeds/optware/oleg/cross/stable/uclibc-opt_0.9.28-13_mipsel.ipk ipkg.sh install uclibc-opt_0.9.28-13_mipsel.ipk ipkg update Код:
ipkg list_installed Цитата:
Execute regularly: Код:
ipkg update ipkg upgrade Install MC Код:
ipkg install mc Код:
echo "export TERMINFO=/opt/share/terminfo">>/opt/etc/profile echo "alias mc=\"mc -c\"">>/opt/etc/profile Код:
chmod +x /opt/etc/profile These tools are very helpful. I recommend installing them even if they are not necessary. 1GB on the HDD is enough space, so: Код:
ipkg install coreutils ipkg install findutils ipkg install diffutils ipkg install screen ipkg install nano ipkg install procps ipkg install less ipkg install unzip ipkg install hdparm ipkg install man ipkg install man-pages ipkg install lynx ipkg install e2fslibs ipkg install e2fsprogs Cron is a task scheduler. Код:
ipkg install cron Код:
vi /opt/etc/init.d/S10cron Код:
#!/bin/sh
#
# Startup script for cron
PIDFILE=/opt/var/run/cron.pid
case $1 in
start)
/opt/sbin/cron
;;
stop)
[ -f ${PIDFILE} ] && kill `cat ${PIDFILE}` ;;
*)
echo "usage: $0 (start|stop)"
exit 1
esac
Код:
flashfs save && flashfs commit && flashfs enable && reboot Remark: If you installed procps you should execute: Код:
ps axf If you want a task to be executed you have to make an entry to the crontab (/opt/etc/crontab) Finished with cron ![]()
__________________
Ьbersicht aller HowTos --- HowTo Overview (mostly german) WL-HDD mit diesem Setup. --- WL-HDD with this setup. Kein Support per PM - Frage im jeweiligen Thread! --- No support via pm - ask in the according thread! Eine wirklich gute Idee erkennt man daran, dass ihre Verwirklichung von vorne herein ausgeschlossen erscheint. (Albert Einstein) Последний раз редактировалось wengi, 18-07-2010 в 23:35. |
|
#4
|
|||
|
|||
|
10. TRANSMISSION (The torrent Client)
You have some routine 'til here. So we start directly: Код:
ipkg install transmission ipkg install wget Код:
mkdir -p /tmp/harddisk/transmission/download mkdir -p /tmp/harddisk/transmission/config/blocklists chmod -R 770 /tmp/harddisk/transmission/ Код:
vi /tmp/harddisk/transmission/config/settings.json Код:
{
"blocklist-enabled": true,
"dht-enabled": true,
"download-dir": "/tmp/harddisk/transmission/download",
"encryption": 2,
"lazy-bitfield-enabled": true,
"open-file-limit": 64,
"peer-limit-global": 250,
"peer-limit-per-torrent": 60,
"peer-port": 51413,
"peer-port-random-enabled": false,
"peer-port-random-high": 65535,
"peer-port-random-low": 1024,
"peer-socket-tos": 8,
"pex-enabled": true,
"port-forwarding-enabled": false,
"preallocation": 1,
"proxy": "",
"proxy-auth-enabled": false,
"proxy-auth-password": "",
"proxy-auth-username": "",
"proxy-enabled": false,
"proxy-port": 80,
"proxy-type": 0,
"rpc-authentication-required": false,
"rpc-enabled": true,
"rpc-password": "",
"rpc-port": 9091,
"rpc-username": "",
"rpc-whitelist": "127.0.0.1,192.168.1.*",
"rpc-whitelist-enabled": true,
"speed-limit-down": 500,
"speed-limit-down-enabled": false,
"speed-limit-up": 20,
"speed-limit-up-enabled": true
}
Create startup script: Код:
vi /opt/etc/init.d/S90transmission-daemon Код:
#!/bin/sh
#
# Startup script for transmission
case $1 in
start)
# update blocklist
echo "updating blocklist"
cd /tmp/harddisk/transmission/config/blocklists
if wget -q -N --tries=3 --timeout=10 http://update.transmissionbt.com/level1.gz
then
if test -f level1.gz; then
rm level1
gunzip level1.gz
chmod go+r level1
fi
else
echo "Error $?. Blocklist NOT updated."
fi
# start transmission
echo "starting transmission"
nice /opt/bin/transmission-daemon -g /tmp/harddisk/transmission/config
;;
stop)
if [ -n "`pidof transmission-daemon`" ]; then
echo "stopping transmission"
kill -9 `pidof transmission-daemon`
fi
;;
restart|force-reload)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 (start|stop|restart|force-reload)"
exit 1
esac
Код:
chmod 755 /opt/etc/init.d/S90transmission-daemon /opt/etc/init.d/S90transmission-daemon start Код:
ps axf Цитата:
![]() It is a good idea to use ONE widely distributed torrent for testing transmission. Download the torrent file, click OPEN in the webinterface and select your torrent file. You will find the download in /tmp/harddisk/transmission/download. Transmission uses port 51413. More information on transmission: http://www.nslu2-linux.org/wiki/Optware/Transmission 11. Logrotate for Syslog Install logrotate Код:
ipkg install logrotate Код:
mkdir -p /opt/var/log/ Код:
vi /opt/etc/crontab Цитата:
Код:
vi /opt/etc/logrotate.conf Цитата:
Код:
vi /opt/etc/init.d/S05syslogd Код:
#!/bin/sh
#
# Startup script for syslog
#
PATH=/opt/bin:/opt/sbin:/opt/local/bin:/sbin:/bin:/usr/bin:/usr/sbin
LOGFILE=syslog.log
KERNLOGFILE=kern.log
LOG_OLD=/tmp
LOG_NEW=/opt/var/log
prefix=""
sbindir=${prefix}/sbin
NAME=syslogd
DAEMON=${sbindir}/${NAME}
DESC="syslogd"
OPTIONS="-m 0 -O $LOG_NEW/$LOGFILE -S -l 7 -s 0"
case "$1" in
start0)
printf "Starting ${DESC}: "
# Copy old syslog and create symlink to new
if [ ! -L /tmp/syslog.log ]; then
cat $LOG_OLD/$LOGFILE >> $LOG_NEW/$LOGFILE
mv $LOG_OLD/$LOGFILE $LOG_NEW/$KERNLOGFILE
ln -s $LOG_NEW/$LOGFILE $LOG_OLD/$LOGFILE
fi
${DAEMON} ${OPTIONS}
printf "${NAME}.\n"
logger -t ${NAME} "started."
;;
stop)
if [ -n "`pidof syslogd`" ]; then
printf "Stopping ${DESC}: "
killall "${NAME}"
printf "${NAME}.\n"
fi
;;
start|restart|force-reload)
$0 stop
sleep 1
$0 start0
;;
*)
printf "Usage: $0 {start|stop|restart|force-reload}\n" >&2
exit
;;
esac
exit 0
Код:
chmod +x /opt/etc/init.d/S05syslogd Код:
flashfs save && flashfs commit && flashfs enable && reboot
__________________
Ьbersicht aller HowTos --- HowTo Overview (mostly german) WL-HDD mit diesem Setup. --- WL-HDD with this setup. Kein Support per PM - Frage im jeweiligen Thread! --- No support via pm - ask in the according thread! Eine wirklich gute Idee erkennt man daran, dass ihre Verwirklichung von vorne herein ausgeschlossen erscheint. (Albert Einstein) Последний раз редактировалось wengi, 04-10-2009 в 12:25. |
|
#5
|
|||
|
|||
|
12a. original SAMBA
Samba will show your local HDD in the windows network. oleg integrated a good working samba version from firmware -9 on. You activate it in the web interface USB Application -> Samba. Simply choose "All partitions" for Samba File Shares and a Default Access Level of "read/write". Do not forget to enter your hostname and workgroup. 12b. IPKG SAMBA I recommend using samba as in the chapter above. This chapter is for the advanced users who want more flexibility. Samba has to be disabled in the webinterface! Код:
ipkg install xinetd ipkg install samba2 Код:
vi /opt/etc/init.d/S10xinetd Код:
#! /bin/sh
#
# Startup script for xinetd
#
prefix=/opt
sbindir=${prefix}/sbin
NAME=xinetd
DAEMON=${sbindir}/${NAME}
DESC="xinetd"
PIDFILE="/var/run/xinetd.pid"
OPTIONS="-pidfile $PIDFILE"
CONFDIR="/opt/etc/xinetd.d"
# installation check
test -x ${DAEMON} || exit 0
case "$1" in
start)
if [ -z "`pidof ${NAME}`" ] ; then
printf "Starting ${DESC}: "
${DAEMON} ${OPTIONS}
printf "${NAME}.\n"
fi
;;
stop)
if [ -n "`pidof ${NAME}`" ]; then
printf "Stopping ${DESC}: "
kill -SIGTERM `cat $PIDFILE`
printf "${NAME}.\n"
for i in ${CONFDIR}/* ; do
if [ -n "`grep "^[[:space:]]*disable[[:space:]]*=[[:space:]]*no" ${i}`" ] ; then
daemon="`basename $(awk -F= '/^[[:space:]]*server[[:space:]]*=[[:space:]]*.*/{print $2}' ${i})`"
printf "Stopping ${daemon}: "
kill "`pidof ${daemon}`" > /dev/null 2>&1
printf "${daemon}.\n"
fi
done
fi
;;
reload|reconfigure)
if [ -n "`pidof ${NAME}`" ]; then
printf "Reloading ${DESC}: "
kill -SIGHUP `cat $PIDFILE`
printf "${NAME}.\n"
fi
;;
restart|force-reload)
$0 stop
sleep 1
$0 start
;;
*)
printf "Usage: $0 {start|stop|reload|reconfigure|restart|force-reload}\n" >&2
exit
;;
esac
exit 0
Edit the conf for swat: Код:
vi /opt/etc/xinetd.d/swat Save... reboot... You know... i do this too often, but to be shure... Код:
flashfs save && flashfs commit && flashfs enable && reboot But samba still needs to be configured. This is done with a webinterface: Код:
http://IP.ADRESS.OF.ASUS:901 - Change "workgroup" to your workgroup. - "netbios name" is the name of your asus (for me again blechbuechse). - "hosts allow" should be your subnet e.g. "192.168.1." (leave out the last number) - "guest account" is 'admin'. Commit changes with "Commit Changes". (You never would have known this )Changes in globas need a restart to take effect! goto "Shares": - Insert "torrent" beside "create share" and press "create share". - "comment": "torrent files" - "path": "/tmp/harddisk/torrent" - "read only" NO - "guest ok" YES - "browseable" YES - Press "commit changes". The settings take effect immediately. No reboot necessary. You should see your asus in the windows network now.
__________________
Ьbersicht aller HowTos --- HowTo Overview (mostly german) WL-HDD mit diesem Setup. --- WL-HDD with this setup. Kein Support per PM - Frage im jeweiligen Thread! --- No support via pm - ask in the according thread! Eine wirklich gute Idee erkennt man daran, dass ihre Verwirklichung von vorne herein ausgeschlossen erscheint. (Albert Einstein) Последний раз редактировалось wengi, 16-12-2008 в 11:01. |
|
#6
|
||||
|
||||
|
13. NLOAD
You can see your network load with nload. Код:
ipkg install nload Код:
nload -t 200 -s 7 -i 2048 -o 256 -u H eth1 To make life easier at the command promt you will add some alias. Код:
vi /opt/etc/profile The content (Edit the nload settings!): Цитата:
Make it executable: Код:
chmod +x /opt/etc/profile Код:
flashfs save && flashfs commit && flashfs enable && reboot Цитата:
Until now you need to insert user and password for every ssh login. I assume you are as lazy as i am. So we will do this with keys. First you need to create a pair of keys. For Windows this is done with PuttyGen. Start, press generate and move your mouse until the key is generated. The field "Key comment" is used to identify the keys, if there are more than one. Insert your name here. Save the private key as file: You can save your private key with a passphrase. This is for security reasons. Enter a passphrase. Press "Save private Key" and save your private key to a file. (e.g. C:\keys\mykey.ppk) Save the public key on the Asus: Copy the content of the upper, grey field to the clipboard. The key shold look like this: Цитата:
You need a special directory to store your public key in. This is in the root/admin home directory: Код:
mkdir /usr/local/root/.ssh Код:
vi /usr/local/root/.ssh/authorized_keys Multiple keys can be inserted here and are seperated by a new line. One line for each key. This part of the filesystem is in the flash so you have to save it: Код:
flashfs save && flashfs commit && flashfs enable && reboot Configure putty: "Connection - Data" bei "Auto-login username" enter the username: admin "Connection - SSH - Auth" at "Private key file for authentication" Enter the file saved in the above step (e.g. C:\keys\mykey.ppk) Do not forget to save (Session - Save) Your login should look like this now: Цитата:
The option "dropbear -s" disables login with password. Only login with keys will be possible! Edit /usr/local/sbin/post-boot to modify the option for start. Insert a "-s" directly behind dropbear. ATTENTION: If you loose your key you are locked out! Use this with care! Do not forget to save and reboot. 16. Open SSH port to Internet (if directly connected) You have to open port 22 in your firewall to connect to your router over internet. If your Asus is directly connected to the internet and in home gateway mode you can do this directly. The firewall is iptables. Remark: This is a security risk! Be sure to set at least a strong password for your users!!! Have a look at THIS for a secure sshd config. Edit your /usr/local/sbin/post-firewall and insert: Код:
#!/bin/sh # this opens the ssh port to internet! Be sure to have strong passwords! iptables -I INPUT -m tcp -p tcp --dport 22 -j ACCEPT Hint: The iptables command above can also be used to open other ports.
__________________
Ьbersicht aller HowTos --- HowTo Overview (mostly german) WL-HDD mit diesem Setup. --- WL-HDD with this setup. Kein Support per PM - Frage im jeweiligen Thread! --- No support via pm - ask in the according thread! Eine wirklich gute Idee erkennt man daran, dass ihre Verwirklichung von vorne herein ausgeschlossen erscheint. (Albert Einstein) Последний раз редактировалось wengi, 04-10-2009 в 12:29. |
|
#7
|
|||
|
|||
|
17. Optimize performance
This chapter is for advanced users. You should not do this if you are a newbie. Your Asus is completely setup now. Only some optimization regarding the performance is to be done. This is to keep as much processor and memory free as possible. Even the WL-HDD only has 16MB RAM and a 125MHz CPU. Not that much... The goal is to start services only if they are needed. This works with xinetd. Here is a description. A) Start samba with xinetd This chapter is using the original samba of the firmware. If you installed the IPKG samba you will have to change the path /usr/sbin/ to /opt/... I only need samba for moving my torrent files. So this is rather seldom. This is why i atart samba with xinetd. To keep system resources free for transmission. Your samba must work for 100% before making this step! If xinetd is not installed until now: Код:
ipkg install xinetd Do this as it is described in chapter 12b). Only the part with the content of S10xinetd! samba comprises two daemons: Код:
vi /opt/etc/xinetd.d/netbios-ssn Цитата:
Код:
vi /opt/etc/xinetd.d/netbios-ns Цитата:
There should already be a /etc/smb.conf. If not you will have to create it. This one shares the data partition with read/write for everyone. Код:
[global]
interfaces = br0
bind interfaces only = yes
workgroup = YOURWORKGROUP
server string = YOURHOSTNAME
guest account = nobody
security = share
browseable = yes
guest ok = yes
guest only = yes
log level = 1
max log size = 100
encrypt passwords = no
preserve case = yes
short preserve case = yes
client code page = 850
[disc0_3]
path = /tmp/mnt/disc0_3
writable = yes
force user = admin
Now you have to make shure that the /etc/smb.conf is stored before a reboot: Код:
echo "/etc/smb.conf" >> /usr/local/.files && flashfs save && flashfs commit && flashfs enable and if you installed samba with IPKG you have to delete the startup file: Код:
rm /opt/etc/init.d/S80samba Attention: You should know which modules you need, before unloading them in post-boot. List all running modules: Код:
lsmod Цитата:
This is how you unload a module: Код:
rmmod MODULNAME )Try this modules: printer - printer support usb-storage - USB mass storage usb-ohci - USB host usbcore - USB main component wl - WLAN It would be nice to have a complete list of all modules here. contact me if you can provide information. Unload a module and check if all the services are still working. If there is something wrong: Do a reboot! After knowing the possible modules you can edit the post-boot and paste the unload commands. 18. Firmwareupdate If oleg releases a new firmware you should update: 1) In webinterface 'System Setup' -> 'Setting Management' click "HERE", to save your settings. 2) In webinterface 'System Setup' -> 'Flashfs Management' click "HERE", to seve the flash file system. 3) Download and extract the new firmware. You need the .trx file. Important: Wait for the reboot after every following step. 4) In webinterface 'System Setup' -> 'Firmware Upgrade' select the .trx file and click 'Upload'. 5) In webinterface 'System Setup' -> 'Setting Management' select your saved settings and click 'Upload'. 6) In webinterface 'System Setup' -> 'Flashfs Management' select your saved flashfs and click 'Upload'. The update is finished and all services should be accessible. There will be no data lost. General I try to keep this HowTo up to date. Contact me if you have some improvement or you found a mistake. There are several HowTos following this one. Soundcards, webserver, mysql and so on. FIND IT HERE: http://wl500g.info/showpost.php?p=160532&postcount=1 Known problems: - a 'find' in / results in an error "./proc/7/fd: No such file or directory". Thats normal. Thanks to: Oleg (for the firmware) marcnesium (for his premium How To) Oleo (for transmission and good help) My wife (for the patience) ![]() Martin1802 (for finding a mistake in step 4a / 4b and supporting me with the profile) hanseugen (for USB HDD und Cron-Tips) And all others who helped me improving this howto. Important links: http://www.nslu2-linux.org/wiki/Optware/Transmission (Step-by-Step Howto for transmission) http://wl500g.info/showthread.php?t=6823 (Controlling torrent downloads thru webpage) http://wl500g.info/showthread.php?t=5909 (Premium HowTo) http://www.macsat.com/macsat/content/category/3/13/29/ (MacSat Tutorials) http://wl500g.info/showthread.php?t=8010 (How to connect to dbox2) http://www.sprayfly.com/wiki/Sprayfly (Sprayfly WL-HDD Wiki) http://wl500g.info/showpost.php?p=25037&postcount=1 (summary of Olegs firmware versions) http://wl500g.info/showthread.php?t=6826 (Autocopy funktion for the photographer of you) http://wl500g.info/showthread.php?t=13785 (Information on boot files and fstab in firmwares -9 and newer) For those of you who want to be up to date with the development: http://trac.nslu2-linux.org/optware/timeline Shows all changes.
__________________
Ьbersicht aller HowTos --- HowTo Overview (mostly german) WL-HDD mit diesem Setup. --- WL-HDD with this setup. Kein Support per PM - Frage im jeweiligen Thread! --- No support via pm - ask in the according thread! Eine wirklich gute Idee erkennt man daran, dass ihre Verwirklichung von vorne herein ausgeschlossen erscheint. (Albert Einstein) Последний раз редактировалось wengi, 12-07-2010 в 14:10. |
|
#8
|
|||
|
|||
|
Happy working with your "new" Asus.
May the force be with you. wengi
__________________
Ьbersicht aller HowTos --- HowTo Overview (mostly german) WL-HDD mit diesem Setup. --- WL-HDD with this setup. Kein Support per PM - Frage im jeweiligen Thread! --- No support via pm - ask in the according thread! Eine wirklich gute Idee erkennt man daran, dass ihre Verwirklichung von vorne herein ausgeschlossen erscheint. (Albert Einstein) |
|
#9
|
|||
|
|||
|
Thanks so much, it spent me more than a week now, I couldn't finish everything without your great tutorial. Great tutorial!
|
|
#10
|
|||
|
|||
|
Happy to hear it was helpfull for you.
wengi
__________________
Ьbersicht aller HowTos --- HowTo Overview (mostly german) WL-HDD mit diesem Setup. --- WL-HDD with this setup. Kein Support per PM - Frage im jeweiligen Thread! --- No support via pm - ask in the according thread! Eine wirklich gute Idee erkennt man daran, dass ihre Verwirklichung von vorne herein ausgeschlossen erscheint. (Albert Einstein) |
|
#11
|
|||
|
|||
|
Awesome! Good work guys.
One question, there is possibility to just provide us with a config;file which has already everything integrated? ![]() Последний раз редактировалось TinyRK, 31-08-2007 в 19:42. |
|
#12
|
|||
|
|||
|
Hi,
1) I am not the guy to build firmware. So i am not your man. 2) There will never be a firmware with "everything integrated" because you never know who need which comonents and some components will never work together. 3) (And the important one) If anybody over here will provide a "all-in-one firmware" you would install it and have no idea how to use it. So the questions would start again. And there would be howtos for using the things. In my eyes its better you learn by modifying your own firmware. Learning by doing! wengi
__________________
Ьbersicht aller HowTos --- HowTo Overview (mostly german) WL-HDD mit diesem Setup. --- WL-HDD with this setup. Kein Support per PM - Frage im jeweiligen Thread! --- No support via pm - ask in the according thread! Eine wirklich gute Idee erkennt man daran, dass ihre Verwirklichung von vorne herein ausgeschlossen erscheint. (Albert Einstein) |
|
#13
|
|||
|
|||
|
From PM:
Цитата:
Цитата:
Цитата:
You can ping your Asus and connect to the Webinterface? wengi
__________________
Ьbersicht aller HowTos --- HowTo Overview (mostly german) WL-HDD mit diesem Setup. --- WL-HDD with this setup. Kein Support per PM - Frage im jeweiligen Thread! --- No support via pm - ask in the according thread! Eine wirklich gute Idee erkennt man daran, dass ihre Verwirklichung von vorne herein ausgeschlossen erscheint. (Albert Einstein) |
|
#14
|
|||
|
|||
|
Yes, I can ping,telnet and connect to the Asus Webinterface.
also can set IP Address and Gateway... my Asus is as a client in the network. the point is when i add this line: echo "nameserver IP.OF.DNS.SERVER" > /etc/resolv.conf save and reboot then use putty program SSH connect to Asus PuTTY Fatal Error network error:connection refused ![]() |
|
#14
|
|||
|
|||
|
#15
|
|||
|
|||
|
Just to be sure: You replaced the "IP.OF.DNS.SERVER" with the IP adress of your DNS server?
This line for _my_ network looks like this: Код:
echo "nameserver 192.168.201.1" > /etc/resolv.conf
__________________
Ьbersicht aller HowTos --- HowTo Overview (mostly german) WL-HDD mit diesem Setup. --- WL-HDD with this setup. Kein Support per PM - Frage im jeweiligen Thread! --- No support via pm - ask in the according thread! Eine wirklich gute Idee erkennt man daran, dass ihre Verwirklichung von vorne herein ausgeschlossen erscheint. (Albert Einstein) |