PDA

Bekijk de volledige versie : need help on how to set up



mark_q4xprt
04-02-2008, 01:33
df
killall stupid-ftpd
umount /tmp/harddisk/

fdisk /dev/discs/disc0/disc

d n p 1 enter +512M <---for swap
t 1 82
n p 2 enter +200M <---for prog
n p 3 enter enter <-for downloded data

w

fdisk -l

mkswap /dev/discs/disc0/part1
mke2fs -j /dev/discs/disc0/part2
reboot
swapon /dev/discs/disc0/part1
mke2fs -j /dev/discs/disc0/part3


mkdir /opt/tmp # < enter >
mkdir /opt/tmp/ipkg # < enter >
cd /opt/tmp/ipkg
ipkg.sh update # < enter >
ipkg.sh install ipkg # < enter >
/opt/bin/ipkg update # < enter >
/opt/bin/ipkg install nano # < enter >



mkdir /usr/local < enter >
mkdir /usr/local/sbin < enter >
touch /usr/local/sbin/post-boot < enter >
touch /usr/local/sbin/post-firewall < enter >
chmod +x /usr/local/sbin/* < enter >

/opt/bin/nano /usr/local/sbin/post-boot

# test if USB disc has been attached
# if not - then insert needed modules
#
# uncoment the following 4 lines if using an USB HDD.
#if [ ! -d /dev/discs ]
#then
#insmod scsi_mod && insmod sd_mod && insmod usb-storage && sleep 5s
#fi

#Wait for /opt to mount
mount /dev/discs/disc0/part2 /opt
i=0
while [ $i -le 30 ]
do
if [ -d /opt/etc ]
then
break
fi
sleep 1
i=`expr $i + 1`
done

mount /dev/discs/disc0/part3 /tmp/harddisk/part1


# Activate swap
swapon /dev/discs/disc0/part1

# Run all active services - active means starts with S
/opt/etc/init.d/rc.unslung


================
save ctrl+O+enter ctrl+x=
=================

nano /opt/etc/init.d/rc.unslung

for i in /opt/etc/init.d/S??* ;do

# Ignore dangling symlinks (if any).
[ ! -f "$i" ] && continue

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


================
save ctrl+O+enter ctrl+x=
=================
chmod +x /opt/etc/init.d/rc.unslung

flashfs save && flashfs commit && flashfs enable && reboot


Remark: If you get a "mkdir: Cannot create directory `/opt/etc': Read-only

file system" your HDD (here the IPKG pertition) is NOT mounted.



=======
SAMBA=
=======

mkdir /opt/etc/samba # < enter >
mkdir /opt/download1 # < enter >
mkdir /opt/download2 # < enter >
nano /opt/etc/samba/smb.conf # < enter >

WORKGROUP = name of your group

[global]
workgroup = WORKGROUP
guest account = nobody
security = share
browseable = yes
guest ok = yes
guest only = no
log level = 1
max log size = 100
encrypt passwords = yes
dns proxy = no socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE

SO_SNDBUF=8192
force user = admin


[torrent]
path=/opt/download1
writeable = yes
browseable = yes

[opt]
path=/opt/download2
writeable = yes
browseable = yes

[linux]
path=/opt
writeable = yes
browseable = yes

writeable = yes
browseable = yes
=======================
ctrl o enter = save
ctrl x enter = exit
=======================

chmod 777 /opt/download1
chmod 777 /opt/download2
chmod 777 /opt/etc/init.d/
chmod 777 /opt
chmod 777 /opt/share/www/images

========================
nano /opt/etc/init.d/S97Samba # <enter>


#!/bin/sh
/usr/sbin/smbd -D -l /opt/var/log/smbd.log -s
/opt/etc/samba/smb.conf
/usr/sbin/nmbd -D -n myasus -o -l /tmp -s
/opt/etc/samba/smb.conf

======================
ctrl o enter = save
ctrl x enter = exit
======================

chmod 755 /opt/etc/init.d/S97Samba # < enter >

reboot

ps |grep "smb" < enter >


is there something wrong in what ive done ?

this is the only one that appears

ps |grep "smb"
304 admin 376 R grep smb


please feel free to edit my guide up there

mark_q4xprt
04-02-2008, 07:01
also ill be using vista

raas
04-02-2008, 11:54
What exactly is your question?

is it with the ps |grep "smb" thing? that you only see something with smb? (because you're filtering with 'smb')

Or do you have other problems.

mark_q4xprt
05-02-2008, 00:49
i cant run samba



and now im trying to run samba2 for vista compatibility but

when i tried nano

[admin@myasus root]$ nano /opt/etc/init.d/rc.unslung
Error opening terminal: linux.

raas
05-02-2008, 10:55
Are you using WLHDD or a wl500g (premium) with usb-disk attached?

I saw in your post-boot file that you've not uncommented the 4 lines in the post boot in order to prepare usb-disc before mounting.


probably, that's why discs aren't mounted and software/packages can not be started.



# test if USB disc has been attached
# if not - then insert needed modules
#
# uncoment the following 4 lines if using an USB HDD.
if [ ! -d /dev/discs ]
then
insmod scsi_mod && insmod sd_mod && insmod usb-storage && sleep 5s
fi

(uncomment last 4 lines like above)



what's your output of the command: df and mount ?
mine looks like this:
df:


[admin@NAS root]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 3008 3008 0 100% /
/dev/root 3008 3008 0 100% /
/dev/discs/disc0/part1
9851340 442712 8908204 5% /opt
/dev/discs/disc0/part3
470371152 360481756 85995924 81% /mnt


mount:

mount
/dev/root on / type squashfs (ro)
none on /dev type devfs (rw)
proc on /proc type proc (rw)
ramfs on /tmp type ramfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/discs/disc0/part1 on /opt type ext3 (rw,noatime)
/dev/discs/disc0/part3 on /mnt type ext3 (rw,noatime)


Also, which tutorial did you use to set it up. and,
which firmware do you have installed?

mark_q4xprt
05-02-2008, 11:00
im using wl-500g premium
with a usb enclosure

i manage to make the samba work by following the steps for samba2 how ever im having a problem accesing the shared folder it seems like its taking too long and sometimes hang my windows explorer


anyway ill reformat again and boot on my vista since im just experementing the router right now in windows xp sp2

so which is compatible for vista?
samba in olegs fw
samba2 or samba 3

also whats the best torrent manager so i can acces or view it anywhere when eve im not at home, also im planning to put a php+sql for joomla

any suggestions?

thank you

the link that i followed
http://wl500g.info/showpost.php?p=48593&postcount=42

fw 1.9.2.7
fw release 1.9.2.7-8

raas
05-02-2008, 11:33
Hi,

if it's taking a long time, maybe some other processes are running on the router which take up a lot of cpu time.

log on to the router and use command: top
this is some kind of 'task-manager' which will tell you which processes are taking cpu time and how much..

if total load is not high, and samba still responds slow, try priority settings for samba as described in this thread.
http://www.wl500g.info/showthread.php?t=12189&highlight=priority+settings

I've never used the samba in oleg's firmware, nor have I used samba3
samba2 is working for me, vista included.

HTH