open_Netcenter Forum |
Autor | Thema: OpenWRT - juhei |
---|---|
ivenae Ist öfters hier ID # 144 -979-261-40 |
Erstellt am 04. September 2009 00:23 (#1)
Zitat
PN E-Mail
Hi guys,
i've compiled openwrt with the brcm-diag patch from christoph muellner for internal harddrive support and gpio/led support. It seems to be problemfree, it is the current 8.09.1 kamikaze version with a lot of stuff inside: - nfts-3g, ntfs, ext3, ext2, vfat, reiser file system support - busybox, samba 3.024, vsftpd, dropbear - 2.6 linux kernel - openvpn dial in - WOL - lighttpd with php support - irssi - screen - mc - NO 500 GB LIMIT!! - smartctl (smartctl -a /dev/hde shows a lot of internal info about the age of your harddisk!) flash with nasload.exe, the system then uses the 10.10.10.20 netmask 255.255.255.0 IP with default-gw 10.10.10.10. - sorry, my configuration if you have questions compiling your own version. feel free to ask! it uses the internal flash(300 kb which are still free) for configuration (/etc/passwd etc. are stored here...) you have to configure a lot with this system. it is no out-of-the-box system! you also have to FORMAT THE HARDDRIVE if you want to use it! (but you can test the firmware without risk and test the file-sharing function with an usb-stick without formating the internal harddrive and re-flash WDC-3.9 or whatever you wanna use back after that!) you can also format a usb-stick / external harddisk for additional space. format harddrive with mkfs.ext2 /dev/hde maybe you first want to create a swap partition with fdisk: fdisk /dev/hde n (ew partition) p (rimary) 1 (first partition) 1 (from start sector) ## (to sector whatever you want. ~300 will give you 32 mb, that would be enough) n (ew partition) p (rimary) 2 (second partition) -empty- (from first free sector) -empty- (to last sector) t (edit partitions system label) 1 (first partition) 82 (linux swap type) w (rite changes and exit) (ALL DATA WILL BE GONE HERE!) in shell: #mkswap /dev/hde1 #swapon /dev/hde1 #mkfs.ext2 /dev/hde2 (formats the disk) (or use ext3, whatever you want) then you can change your samba.conf ... if you have had one. you can find one in my bachelor thesis... have a lot of fun with it! http://home.arcor.de/ivenae/files/openwrt-brcm47xx-squashfs.trx Edit: - Uploaded a new version with some codepages integrated which where neccessary for mounting vfat Test results: - system runs stable - the 300 kb flash are used for storing -> some configs are in there; nfs, samba and vsftpd are running fine - network and usb-speed SEEMS TO BE SLOWER! I've tested the openwrt system for a while, it seems that the openwrt firmware causes a lot of cpu load on the netcenter, that decreases the network throughput. i corrected the values in the table below. openwrt | base-firmware copy from drive 2 - 3 mb /s | 3 to 10 mb /s copy to drive 3 - 5 mb /s | 4,5 mb /s internal usb to drive 4 mb /s | 5 mb /s - hd-idle not yet installed, so the internal drive runs continuously - configuration via cli is similar -> but 2.6 kernel is the more secure system, also iptables and knockd is supported short summary: if you play around a lot with this device, i would recommend you to use openwrt (but then you are maybe able to compile it by yourself, i could give hints if you want); if you just want to use it as a network share, keep your current system! |
Beiträge: 40 | Mitglied seit: Oktober 2007 | IP-Adresse: gespeichert | |
ivenae Ist öfters hier ID # 144 -979-261-40 |
Erstellt am 11. September 2009 01:48 (#2)
Zitat
PN E-Mail
Everything runs fine now!
Only the btpd is not correct configured, i have to adopt all these little scripts. Think i'll do that tomorrow. Very cool new stuff is possible with openwrt. from reading all kind of filesystems on usb-drives to checking the SMART information of the internal harddisk (via webinterface). a nice new playground (which directly competes with my girlfriend) |
Beiträge: 40 | Mitglied seit: Oktober 2007 | IP-Adresse: gespeichert | |
RonFein Ist öfters hier ID # 11 |
Erstellt am 12. September 2009 13:06 (#3)
Zitat
PN E-Mail
That is interesting. It is "official" and available?
|
Beiträge: 21 | Mitglied seit: August 2006 | IP-Adresse: gespeichert | |
ivenae Ist öfters hier ID # 144 -979-261-40 |
Erstellt am 15. September 2009 16:28 (#4)
Zitat
PN E-Mail
yes, you can download it from the link above. what do you mean by "official"? openwrt (like the name says) is an open-source projekt and won't be ever manufacturer-official.
Even the hdd idle mode works fine: (you'll have to enter the following command _on every bootup_) hdparm -S 241 /dev/hde (for 30 min idle time) hdparm -S 242 /dev/hde (for 60 min idle time) calculate it on your own: number 1 - 240 => number x 5 in seconds idle time (240 = 20 min) number 241 - 249 => number -240 x 30 in minutes idle time (241 = 30 min) there is no program neccessary, the hdd go into standby by itself. The orange frontlight can be set after installing gpioctl: opkg install gipoctl and set with: gpioctl set 4 and unset: gpioctl clear 4 i currently don't know how to set it to blink (with old firmare: echo 2 > /...) |
Beiträge: 40 | Mitglied seit: Oktober 2007 | IP-Adresse: gespeichert | |
GREEN Kennt sich schon aus ID # 27 |
Erstellt am 25. Oktober 2009 11:23 (#5)
Zitat
PN E-Mail
Ich habe kein Erfolg mit nasload.exe gehabt.
Gibt es ein Ekvivalen fur mtd auf epias firmware? mtd -r write openwrt-brcm47xx-squashfs.trx linux Ein Backup kann ich machen: dd if=/dev/mtdblock/1 of=/tmp/backup.trx |
Beiträge: 107 | Mitglied seit: September 2006 | IP-Adresse: gespeichert | |
ivenae Ist öfters hier ID # 144 -979-261-40 |
Erstellt am 29. Oktober 2009 04:10 (#6)
Zitat
PN E-Mail
hi green,
was klappt denn nicht? lädt die firmware hoch oder scheitert es daran? dann ist sicher irgendwas falsch eingestellt oder der reset knopf wurde nicht lange genug gedrückt (die ip des netcenters ist im bootloader stets die 192.168.1.5, d.h. man benötigt eine ip aus diesem netz, um nasload zu nutzen). nach dem die firmware aufgespielt wurde, hat das netcenter dann die ip 10.10.10.20 /24. |
Beiträge: 40 | Mitglied seit: Oktober 2007 | IP-Adresse: gespeichert | |
ivenae Ist öfters hier ID # 144 -979-261-40 |
Erstellt am 04. November 2009 02:52 (#7)
Zitat
PN E-Mail
Newest Trunk of Openwrt compiled successfully: r18131
With Christoph Muellner brcm Patch IP of the device: 10.10.10.20 Netmask: 255.255.255.0 Advantages of the new image: - Additional support for some wireless devics (mine!) - ntfs-3g now works, so mounting a writeable ntfs drive is possible - increase of network speed from ~2 mb/s (8.09.1 openwrt) to 2,5 - 3,3 mb/s Download here: http://home.arcor.de/ivenae/files/openwrt-brcm47xx-squashfs-trunk.trx |
Beiträge: 40 | Mitglied seit: Oktober 2007 | IP-Adresse: gespeichert | |
GREEN Kennt sich schon aus ID # 27 |
Erstellt am 06. November 2009 14:52 (#8)
Zitat
PN E-Mail
Das vi Linux Editor Help:
Positioning the Cursor ® Move cursor one space right. ¬ Move cursor one space left. Move cursor up one line. ¯ Move cursor down one line. ctrl-F Move forward one screen. ctrl-B Move backward one screen. $ Move cursor to end of line. ^ Move cursor to beginning of line. :1 Move to first line of file :$ Move to last line of file / Search for a character string. ? Reverse search for a character string. x Delete the character at the cursor position. dd Delete the current line. p Paste data that was cut with x or dd commands. u Undo. Entering Input Mode a Add text after the cursor. i Insert text before the cursor. R Replace text starting at the cursor. o Insert a new line after the current one. Entering Command Mode esc Switch from Input mode to Command mode. Exiting or Saving Your File :w Write file to disk, without exiting editor. ZZ Save the file and exit. :q! Quit without saving. |
Beiträge: 107 | Mitglied seit: September 2006 | IP-Adresse: gespeichert | |
GREEN Kennt sich schon aus ID # 27 |
Erstellt am 06. November 2009 15:14 (#9)
Zitat
PN E-Mail
Ich habe die neue Firmware aber ich kann nicht SAMBA und FTP zu laufen bringen.
opkg install vsftpd vsftpd & Wie schreibt man einen script? cd /etc/config cat> vsftpd #!/bin/sh # vsftpd & Danach chmod 755 vsftpd? |
Beiträge: 107 | Mitglied seit: September 2006 | IP-Adresse: gespeichert | |
ivenae Ist öfters hier ID # 144 -979-261-40 |
Erstellt am 06. November 2009 21:55 (#10)
Zitat
PN E-Mail
ich selbst nutze es über xinetd.
xinetd -f /etc/default/xinetd & cat /etc/default/xinetd defaults { instances = 5 log_on_success = HOST PID log_on_failure = HOST cps = 3 30 } service ftp { disable = no wait = no protocol = tcp user = root socket_type = stream only_from = 0.0.0.0 server = /usb/bin/vsftpd server_args = /etc/vsftpd.conf } für xinetd muss die datei /etc/services existieren. hier müssen mindestens folgende zeilen drinstehen, kopiere die ganze datei am besten aus einem bestehenden linux system, von der alten firmware oder aus dem netz. cat /etc/services | grep ftp ftp-data 20/tcp ftp 21/tcp vsftpd: opkg install vsftpd cat /etc/vsftpd | grep -v ^# (keine Zeilen anzeigen, die mit "#" beginnen anonymous_enable=YES nopriv_user=nobody anon_world_readable_only=NO local_enable=YES write_enable=YES anon_max_rate=40000 anon_root=/hde/creon/ftpanon local_umask=077 anon_upload_enable=YES anon_mkdir_write_enable=YES dirmessage_enable=YES xferlog_enable=YES connect_from_port_20=YES chown_uploads=YES chown_username=nobody nopriv_user=nobody ftpd_banner=Welcome to the WD-NetCenter FTP service. secure_chroot_dir=/ chroot_local_user=YES no_anon_password=YES passwd_chroot_enable=YES use_localtime=YES check_shell=YES listen=NO wichtig: startest du nicht über xinetd, muss die unterste variable LISTEN=YES gesetzt werden! In diesem Fall startest du den mit: vsftpd /etc/vsftpd.conf & Damit das ganze beim starten funktioniert, musst du einen Startup-Dämon für xinetd oder vsftpd erstellen (oder für eine Textdatei, in der du allen möglichen Kram startest). Das ganze sieht so aus: cat /etc/init.d/mount-hdd #!/bin/sh /etc/rc.common # Example script # Copyright (C) 2007 OpenWrt.org START=10 STOP=15 start() { mount /dev/hde /hde -t ext3 sleep 10 mount /dev/sda /usb swapon /usb/ramscoop /usb/start.sh } stop() { umount /usb umount /hde swapoff /usb/ramscoop } Damit diese Datei auch gestartet wird, muss eine symbolische Verknüpfung zum starten (Sxymount-hdd) und zum Stoppen (Kxymount-hdd) (xy ist eine zweistellige Zahl und gibt die Reihenfolge an, in der die Dämons gestartet werden) erstellt werden. Diese werden erstellt über folgenden Befehl: /etc/init.d/mount-hdd enable Mount-hdd ist jetzt nur ein Beispiel, in dem ich meinen USB-Stick und meine Festplatte mounte sowie ein Skript auf dem USB-Stick starte. Hoffe geholfen zu haben. P.S.: Die Software ist natürlich auch (wie üblich) nicht ohne nervige Bugs. Ich kann Beispielsweise einige Sonderzeichen über Putty nicht tippen, außerdem ist die neue Software zwar schneller, hat aber teilweise auch eine höhere CPU Auslastung, krallt sich mehr Arbeitsspeicher und kackt dann ab, kommt dann beim Neustart aber nicht mehr richtig hoch Nichts ist perfekt. Aber es ist eine tolle Spielwiese... Ach so: ext2 +ext3 reservieren 5% des Speichers (in meinem Fall also gut 15 GB) für den Admin, z.b. damit wichtige Systembefehle noch funktionieren, wenn kein Speicher mehr frei ist. Das ist auf einer reinen Datenpartition völlig sinnfrei. opkt install tune2fs tune2fs -m 0 /dev/hde hebt die Reservierung auf, indem es die Anzahl der reservierten Sektoren auf 0 setzt. ;-) P.P.S.: Ja, Skripte, die mit cat > skript (kopieren mit rechter (Windows) oder mittlerer (Linux) Maustaste ins Fenster) STRG + C erstellt wurden, müssen sicher noch mit chmod +x skript ausführbar gemacht werden! |
Beiträge: 40 | Mitglied seit: Oktober 2007 | IP-Adresse: gespeichert | |
GREEN Kennt sich schon aus ID # 27 |
Erstellt am 07. November 2009 12:51 (#11)
Zitat
PN E-Mail
Leider klappt es nicht, kanst du bitte einen trx machen wo die SAMBA und FTP lauft.
login:root passwd: 1234 mount point mnt/hde2/new Danke |
Beiträge: 107 | Mitglied seit: September 2006 | IP-Adresse: gespeichert | |
ivenae Ist öfters hier ID # 144 -979-261-40 |
Erstellt am 25. November 2009 16:22 (#12)
Zitat
PN E-Mail
Sorry... das geht nicht so einfach.
Der aktuelle Trunk ist recht buggy, er hat ein memory leak und führt nach 1 bis 2 tagen dazu, dass man das gerät neustarten muss. sehr nervig. die kamikaze version 8.09.1 ist leider inperformant (auch wenn der trunk weit weg ist von einem wirklich schnellen system, so ist er doc 25% schneller im datentransfer) letzten endes gibts momentan keine perfekte software. die originalsoftware hat ja auch eine menge einschränkungen und bugs. ich hoffe auf ein baldiges, neues, perfektes release... config dateien mit in das image zu kopieren geht prinipiell, ist aber sehr aufwändig. auf der anderen seite hab ich das hier recht gut beschrieben, solch ein system wird niemals plug & play werden. |
Beiträge: 40 | Mitglied seit: Oktober 2007 | IP-Adresse: gespeichert | |
ivenae Ist öfters hier ID # 144 -979-261-40 |
Erstellt am 17. Januar 2010 12:23 (#13)
Zitat
PN E-Mail
the last openwrt trunk image that i posted here has a memory leak in samba. please upgrade with opkg install samba3 to solve the problem. be sure that you only start the new samba3, not that from rom.
to be 100% sure to solve it, also upgrade libpthread. |
Beiträge: 40 | Mitglied seit: Oktober 2007 | IP-Adresse: gespeichert |
| open_Netcenter Web - Infos, Handhabung, Anleitungen | Boardregeln
Tritanium Bulletin Board 1.6
© 2010–2014 Tritanium Scripts