#41 2008-10-18 20:54:36
Re: ASUS WL-500gP BT下载
vi /opt/etc/samba/smb.conf
[global]
display charset = UTF-8
unix charset = UTF-8
dos charset = UTF-8
workgroup = Workgroup
guest account = admin
security = share
browseable = yes
guest ok = yes
guest only = no
log level = 1
max log size = 100
encrypt passwords = no
dns proxy = no
[Wl 500gP]
path=/opt/bt/
writeable = yes
browseable = yes
guest ok = Yes
[USB Disk]
path = /tmp/mnt/disc1
默认的目录,应该是指向新插的u盘
path=/opt/share/amule/.aMule/Incoming/
path=/opt/ftp_pub
path=/opt/bt/
根据需要可以自己定义目录,来满足方便自己使用
writeable = yes
browseable = yes
guest ok = Yes
離線
#44 2008-11-06 16:44:20
Re: ASUS WL-500gP BT下载
无法进入USB。只能再次改机。可是改后还是无法进入USB。已经插入了上下两个U盘。请问这是为何?
telnet进入后显示:
WL-0018F34D312C login: admin
Password:
[admin@WL-0018F34D312C root]$ ps
PID Uid VmSize Stat Command
1 admin 632 S /sbin/init
2 admin SW [keventd]
3 admin SWN [ksoftirqd_CPU0]
4 admin SW [kswapd]
5 admin SW [bdflush]
6 admin SW [kupdated]
7 admin SW [mtdblockd]
59 admin 328 S telnetd
64 admin 380 S httpd vlan1
67 admin 408 S syslogd -m 0 -O /tmp/syslog.log -S -l 7
74 admin 364 S klogd
76 nobody 464 S [dnsmasq]
77 admin SW [khubd]
86 admin 276 S lpd
88 admin 260 S p9100d -f /dev/usb/lp0 0
91 admin 340 S waveservermain
95 admin SW [usb-storage-0]
96 admin SW [scsi_eh_0]
106 admin 428 S udhcpc -i vlan1 -p /var/run/udhcpc0.pid -s /tmp/udhcp
107 admin 692 S pppd file /tmp/ppp/options.wan0
109 admin 312 S infosvr br0
110 admin 476 S watchdog
112 admin 344 S ntp
130 admin SW [kjournald]
138 admin 1000 S /usr/sbin/smbd -D -l /opt/var/log/smbd.log -s /opt/et
140 admin 976 S /usr/sbin/nmbd -D -n ASUS_500GP -o -l /tmp -s /opt/et
143 admin 468 S dropbear
153 admin 444 S upnp -D -L br0 -W ppp0
198 admin 548 S -sh
201 admin 396 R ps
[admin@WL-0018F34D312C root]$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 3072 3072 0 100% /
/dev/scsi/host0/bus0/target0/lun0/part1 1834180 36104 1704904 2% /opt
[admin@WL-0018F34D312C root]$ free
total used free shared buffers
Mem: 30164 20128 10036 0 5336
Swap: 192772 0 192772
Total: 222936 20128 202808
[admin@WL-0018F34D312C root]$[admin@WL-0018F34D312C root]$ fdisk -l
Disk /dev/scsi/host0/bus0/target0/lun0/disc: 2110 MB, 2110255104 bytes
255 heads, 63 sectors/track, 256 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id
System
/dev/scsi/host0/bus0/target0/lun0/part1 1 232 1863508+
83 Linux
/dev/scsi/host0/bus0/target0/lun0/part2 233 256 192780
82 Linux swap
[admin@WL-0018F34D312C root]$
改机过程如下:WL-0018F34D312C login: admin
Password:
[admin@WL-0018F34D312C root]$ umount /tmp/harddisk
umount: Couldn't umount /tmp/harddisk: No such file or directory
[admin@WL-0018F34D312C root]$ killall stupid-ftpd
killall: stupid-ftpd: no process killed
[admin@WL-0018F34D312C root]$ free
total used free shared buffers
Mem: 30172 12632 17540 0 1588
Swap: 0 0 0
Total: 30172 12632 17540
[admin@WL-0018F34D312C root]$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 3008 3008 0 100% /
[admin@WL-0018F34D312C root]$ fdisk /dev/scsi/host0/bus0/target0/lun0/disc
Command (m for help): p
Disk /dev/scsi/host0/bus0/target0/lun0/disc: 2110 MB, 2110255104 bytes
65 heads, 62 sectors/track, 1022 cylinders
Units = cylinders of 4030 * 512 = 2063360 bytes
Device Boot Start End Blocks Id
System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1022, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1022, default 1022): +1900M
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (923-1022, default 923):
Using default value 923
Last cylinder or +size or +sizeM or +sizeK (923-1022, default 1022):
Using default value 1022
Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): 82
Changed system type of partition 2 to 82 (Linux swap)
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[admin@WL-0018F34D312C root]$ mkswap /dev/scsi/host0/bus0/target0/lun0/part2
Setting up swapspace version 1, size = 206331904 bytes
[admin@WL-0018F34D312C root]$ swapon /dev/scsi/host0/bus0/target0/lun0/part2
[admin@WL-0018F34D312C root]$ mke2fs -j /dev/scsi/host0/bus0/target0/lun0/part1
mke2fs 1.38 (30-Jun-2005)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
232320 inodes, 464449 blocks
23222 blocks (5.00%) reserved for the super user
First data block=0
15 block groups
32768 blocks per group, 32768 fragments per group
15488 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[admin@WL-0018F34D312C root]$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 3008 3008 0 100% /
[admin@WL-0018F34D312C root]$ free
total used free shared buffers
Mem: 30172 9436 20736 0 284
Swap: 201492 592 200900
Total: 231664 10028 221636
[admin@WL-0018F34D312C root]$ mount /dev/scsi/host0/bus0/target0/lun0/part1 /opt
[admin@WL-0018F34D312C root]$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 3008 3008 0 100% /
/dev/scsi/host0/bus0/target0/lun0/part1 1828588 32828 1702872 2% /opt
[admin@WL-0018F34D312C root]$ free
total used free shared buffers
Mem: 30172 9548 20624 0 308
Swap: 201492 592 200900
Total: 231664 10140 221524
[admin@WL-0018F34D312C root]$ mkdir /opt/tmp
[admin@WL-0018F34D312C root]$ mkdir /opt/tmp/ipkg
[admin@WL-0018F34D312C root]$ ipkg.sh update
Downloading http://wl500g.dyndns.org/ipkg/Packages ...
Connecting to wl500g.dyndns.org[158.250.11.254]:80
Packages 100% |*****************************| 754 00:00 ETA
Done.
Updated list of available packages in /opt/lib/ipkg/lists/wl500g
Downloading http://ipkg.nslu2-linux.org/feeds/optwa … e/Packages
...
Connecting to ipkg.nslu2-linux.org[140.211.169.169]:80
Packages 100% |*****************************| 415 KB 00:00 ETA
Done.
Updated list of available packages in /opt/lib/ipkg/lists/optware
[admin@WL-0018F34D312C root]$ ipkg.sh install ipkg-opt
Downloading http://ipkg.nslu2-linux.org/feeds/optwa … e/uclibc-o
pt_0.9.28-13_mipsel.ipk ...
Connecting to ipkg.nslu2-linux.org[140.211.169.169]:80
uclibc-opt_0.9.28-13 100% |*****************************| 832 KB 00:00 ETA
Done.
Unpacking uclibc-opt...Done.
Configuring uclibc-opt...Updating /opt/etc/ld.so.cache
Done.
Downloading http://ipkg.nslu2-linux.org/feeds/optwa … e/ipkg-opt
_0.99.163-10_mipsel.ipk ...
Connecting to ipkg.nslu2-linux.org[140.211.169.169]:80
ipkg-opt_0.99.163-10 100% |*****************************| 75796 00:00 ETA
Done.
Unpacking ipkg-opt...Done.
Configuring ipkg-opt...Done.
[admin@WL-0018F34D312C root]$ mkdir -p /usr/local/sbin
[admin@WL-0018F34D312C root]$ touch /usr/local/sbin/post-boot
[admin@WL-0018F34D312C root]$ touch /usr/local/sbin/post-firewall
[admin@WL-0018F34D312C root]$ chmod +x /usr/local/sbin/*
[admin@WL-0018F34D312C root]$ mkdir -p /usr/local/etc/dropbear
[admin@WL-0018F34D312C root]$ dropbearkey -t dss -f /usr/local/etc/dropbear/drop
bear_dss_host_key
Will output 1024 bit dss secret key to '/usr/local/etc/dropbear/dropbear_dss_hos
t_key'
Generating key, this may take a while...
Public key portion is:
ssh-dss AAAAB3NzaC1kc3MAAACBAO3DQI0P7dqisr/IIlZtSqEcJFkmVIwDFz9KqabAQ9tC4rTqyLUM
wydEPrsvxnyyY/WLMfw243V8GMGOIpxr+1qAXnOdAAIS4a1qvevVVGSTDkoS81G8JgZgg1O0dwzA4Y+G
CrV9kxYvgfb6oJl/bx4XeJNVce38DagzRzyWOlEfAAAAFQCo8O8U6fx+tCJ1FwkGkOGmTdLjqwAAAIAn
jSZ5Gj97XD30Chz/8knqmVXcgNfVD4V5uXdxEIMp49YazNqT26uQYh+v2hEK1n/UU+hMYUm25c130NEV
K+5vQzm0TzP0KkGI25yMti6NJV1Ps2HOhRYkyY+IE23VY/FeRBH+3AzvzUeXLYUX1LgWy72axa2ywmW8
EsOy4Xmf/wAAAIEAuT0vmZzCCKR/Gdc5WYolEJAFWVK55IEmdH5xbJT4FmeIq27bp3i7DT30lQ7eXq/6
ha1CJctw1ozJllEAxcjWGOCXcvuTT8gqiQjleI5GGCkPoUGwf+S3n7Lz+nh9G6py9hst3JIatL9Iyy+7
VYkN0RBJNGPdPfSY0C5KwN1frrk= admin@WL-0018F34D312C
Fingerprint: md5 be:17:4b:06:fd:cc:a9:8c:9a:2b:f6:d4:96:67:80:a1
[admin@WL-0018F34D312C root]$ dropbearkey -t rsa -f /usr/local/etc/dropbear/drop
bear_rsa_host_key
Will output 1024 bit rsa secret key to '/usr/local/etc/dropbear/dropbear_rsa_hos
t_key'
Generating key, this may take a while...
Public key portion is:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgwCIQR0BTPTMdREA8RH9LOJHRzMfRHTHO3s/YO9xywqp
9rblQ/CWDJUcrUxVmvsQpHMu2awhBChKAB2VdOrXjSGdLm8fVffVo+dshq1VLtQ86qF72ApsW21EpP7e
tYfVyfZ89F1ppHQrIfL0PP4TDE/lAIrg4RJHg0vHWcRQG93EHDIR admin@WL-0018F34D312C
Fingerprint: md5 ad:63:46:c8:5f:27:f9:08:6e:16:6e:10:cb:4b:8e:73
[admin@WL-0018F34D312C root]$vi /usr/local/sbin/post-boot
#!/bin/sh
sleep 2
# wait for /opt/to mount
mount /dev/scsi/host0/bus0/target0/part1 /opt
i=0
while [ $i -le 30 ]
do
if [ -d /opt/etc ]
then
break
fi
sleep 1
i=`expr $i + 1`
done
# Activate swap
swapon /dev/scsi/host0/bus0/target0/lun0/part2
# Run all active services - active means starts with S
/opt/etc/init.d/rc.unslung
# Start SHH deamon
dropbear
~
~
[admin@WL-0018F34D312C root]$ flashfs save
tar: Removing leading '/' from member names
tmp/local/
tmp/local/etc/
tmp/local/etc/dropbear/
tmp/local/etc/dropbear/dropbear_rsa_host_key
tmp/local/etc/dropbear/dropbear_dss_host_key
tmp/local/sbin/
tmp/local/sbin/post-firewall
tmp/local/sbin/post-boot
tmp/local/root/
-rw-r--r-- 1 admin root 1509 Nov 6 08:44 /tmp
Check saved image and type "/sbin/flashfs commit" to commit
[admin@WL-0018F34D312C root]$ flashfs commit
.
Committed.
[admin@WL-0018F34D312C root]$ flashfs enable
[admin@WL-0018F34D312C root]$ mkdir -p /opt/etc/samba
[admin@WL-0018F34D312C root]$vi /opt/etc/samba/smb.conf
[global]
workgroup = Workgroup
guest account = admin
security = share
browseable yes
guest ok = yes
guest only = no
log level = 1
max log size = 100
encrypt passwords = yes
dns proxy = no
[Share]
path=/opt/share
writeable = yes
browseable = yes
[USB]
path=/tmp/mnt/disc1
writeable = yes
browseable = yes
[admin@WL-0018F34D312C root]$ mkdir -p /opt/etc/init.d
[admin@WL-0018F34D312C root]$ vi /opt/etc/init.d/S97samba
[admin@WL-0018F34D312C root]$ vi /opt/etc/init.d/S97samba
#!/bin/sh
/usr/sbin/smbd -D -l /opt/var/log/smbd.log -s /opt/etc/samba/smb.conf
/usr/sbin/nmbd -D -n ASUS_500GP -o -l /tmp -s /opt/etc/samba/smb.conf
[admin@WL-0018F34D312C root]$ chmod +x /opt/etc/init.d/S97samba
[admin@WL-0018F34D312C root]$ vi /opt/etc/init.d/rc.unslung
#!/bin/sh
# Start all init scripts in /opt/etc/init.d
# executing them in numerical order.
#
for i in /opt/etc/init.d/S??* ;do
# Ignore dangling symlinks (if any).
[ ! -f "$i" ] && contunue
case "$i" in
*.sh)
# Source shell script for speed.
(
trap -INT QUIT TSTP
set start
. $i
)
;;
*)
# No sh extension, so fork subprocess.
$i start
;;
esac
done
[admin@WL-0018F34D312C root]$ chmod +x /opt/etc/init.d/rc.unslung
[admin@WL-0018F34D312C root]$reboot
请问这有错吗?
最後修改: etlyw518 (2008-11-06 16:49:40)
離線
#45 2008-11-06 17:40:27
Re: ASUS WL-500gP BT下载
etlyw518 提到:
(恕刪)
[admin@WL-0018F34D312C root]$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 3072 3072 0 100% /
/dev/scsi/host0/bus0/target0/lun0/part1 1834180 36104 1704904 2% /opt
[admin@WL-0018F34D312C root]$ free
total used free shared buffers
Mem: 30164 20128 10036 0 5336
Swap: 192772 0 192772
Total: 222936 20128 202808
[admin@WL-0018F34D312C root]$[admin@WL-0018F34D312C root]$ fdisk -l
Disk /dev/scsi/host0/bus0/target0/lun0/disc: 2110 MB, 2110255104 bytes
255 heads, 63 sectors/track, 256 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id
System
/dev/scsi/host0/bus0/target0/lun0/part1 1 232 1863508+
83 Linux
/dev/scsi/host0/bus0/target0/lun0/part2 233 256 192780
82 Linux swap
您了解上述指令的意義嗎? 如果了解, /dev/scsi/host0/bus0/target0/lun0/disc既有出現, 不知您所謂無法進入USB是何意?
etlyw518 提到:
(恕刪)
[admin@WL-0018F34D312C root]$ umount /tmp/harddisk
umount: Couldn't umount /tmp/harddisk: No such file or directory
[admin@WL-0018F34D312C root]$ killall stupid-ftpd
killall: stupid-ftpd: no process killed
同樣的, 請您了解為何會出現這些訊息.
etlyw518 提到:
(恕刪)
请问这有错吗?
還不知您的需求. 如果您想將二個USB HD都使用上, 請確認
1. 二者皆在 /dev內呈現.
2. 二者的磁區皆已格式化.
3. 二者分別mount在不同目錄.
建議您了解每個命令的作用, 否則, 照抄範例使用, 未必能符合您的環境需求.
離線
#46 2008-11-07 08:56:50
Re: ASUS WL-500gP BT下载
谢谢大侠的回复。对不起!是我没说清楚。
1我是用一个2G的U盘插在下面的USB口改机。改机后进入网上网上邻居,查看工作组计算机,看见Samba2.0.10-security-rollup(Asus_500gp)及Www-e81100acaa6,进入Samba2.0.10-security-rollup(Asus_500gp),有Share及USB两个目录,能进入Share,但是无法进入USB目录(我已在上面的USB口上插入了一个8G的U 盘,我试过USB硬盘)。提示是\\Asus_500gp\USB无法访问,你可能没有权限使用网络资源。这不是说我的上面的USB口就费了?
2[admin@WL-0018F34D312C root]$ umount /tmp/harddisk
umount: Couldn't umount /tmp/harddisk: No such file or directory
[admin@WL-0018F34D312C root]$ killall stupid-ftpd
killall: stupid-ftpd: no process killed
这意思我不懂,我是按版主的说明一步一步做的。这次工程大了。一将我的2GU盘的分区全部删除。二将路由器的BIOS刷回华硕,再刷回Oleg's,三按版主的的方法来做。版主说这是关闭stupid-ftpd及缷载USB DISK。我看见我的提示和版主的一样就继续做下一步了。
3—2请问我的想插在上口的盘可以格式化成那几种分区?应该是FAT/FAT32/Ext2/Ext3格式的都可以存取
3-1 二者皆在 /dev內呈現3-3. 二者分別mount在不同目錄。这两样如何做?再次谢谢!!
最後修改: etlyw518 (2008-11-07 10:17:57)
離線
#47 2008-11-08 01:30:52
Re: ASUS WL-500gP BT下载
etlyw518 提到:
(恕刪)有Share及USB两个目录,能进入Share,但是无法进入USB目录
無法進入USB目錄, 這要看您的samba設定檔如何設定. 請先了解smb.conf的設定
etlyw518 提到:
2[admin@WL-0018F34D312C root]$ umount /tmp/harddisk
umount: Couldn't umount /tmp/harddisk: No such file or directory
[admin@WL-0018F34D312C root]$ killall stupid-ftpd
killall: stupid-ftpd: no process killed
这意思我不懂
這些錯誤訊息, 請先想辦法理解.
etlyw518 提到:
我是按版主的说明一步一步做的。这次工程大了。一将我的2GU盘的分区全部删除。二将路由器的BIOS刷回华硕,再刷回Oleg's,三按版主的的方法来做。版主说这是关闭stupid-ftpd及缷载USB DISK。我看见我的提示和版主的一样就继续做下一步了。
環境不同, 操作方式就不同. 範例內的每個過程皆是站長本身的配備所舉例. 若您的配備與站長不同, 請先理解每個命令的用意, 再適當修改命令, 符合您的環境需求.
etlyw518 提到:
3—2请问我的想插在上口的盘可以格式化成那几种分区?应该是FAT/FAT32/Ext2/Ext3格式的都可以存取
建議ext3
etlyw518 提到:
3-1 二者皆在 /dev內呈現
ls /dev/discs/disc0/
ls /dev/discs/disc1/
請先了解上述命令的含意, 再了解輸出結果的含意.
etlyw518 提到:
3-3.二者分別mount在不同目錄
mount /dev/discs/disc0/part5 /opt
mount /dev/discs/disc1/part5 /mnt
以上是我的環境的做法, 未必與您的相同. 同樣請您先了解上述命令的含意. 命令的使用, 請參考這篇.
很多東西並不是照抄就能達到您要的結果, 在修改的過程中, 才能體會學習的樂趣. 若您只要結果而不管過程, 建議您將機器交由專人處理會比較妥當.
離線
#49 2008-11-08 17:21:16
Re: ASUS WL-500gP BT下载
提供我的WL-500gx在DD-WRT上掛載的, 請您參考.
# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 2.8M 2.8M 0 100% /
/dev/root 2.8M 2.8M 0 100% /
/dev/mtdblock/4 28.7M 4.8M 22.4M 18% /jffs
/dev/discs/disc0/part5
28.7M 4.8M 22.4M 18% /jffs
/dev/discs/disc1/part5
1.9G 432.2M 1.4G 23% /opt
/dev/discs/disc2/part5
18.3G 130.3M 17.3G 1% /mnt
/dev/discs/disc3/part5
269.5M 43.0M 212.6M 17% /mmc
接了四顆USB儲存設備. 所以, 在Oleg也是同樣道理, 可將您的硬碟分別mount不同目錄.
離線
#50 2008-11-08 20:43:24
Re: ASUS WL-500gP BT下载
我的是:
[admin@WL-500GP root]$ df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 3.0M 3.0M 0 100% /
/dev/scsi/host0/bus0/target0/lun0/part1 1.7G 35.3M 1.6G 2% /opt
/dev/discs/disc1/part1 111.8G 79.4G 32.4G 71% /tmp/mnt/disc1_1
可是我网络邻居还是进不了USB-HDD。谢谢!
離線
相關討論主題
主題 | 回覆 | 點閱 | 最後發表 |
---|---|---|---|
ASUS RT-N66U刷Shibby 140 MultiWAN後設定為無線AP 作者 lcjh20516
|
0 | 2355 | 2022-08-26 12:56:28 作者 lcjh20516 |
|
159 | 383229 | 2022-08-14 06:06:27 作者 lcjh20516 |
|
21 | 83352 | 2022-08-14 05:54:54 作者 lcjh20516 |
置頂 |
132 | 372877 | 2022-06-07 10:13:50 作者 dennys |
|
45 | 139712 | 2022-05-06 14:32:17 作者 max7441 |