PDA

Bekijk de volledige versie : [HowTo] Getting started (Firmware upgr, Storage, Samba, SSH)



hezik
22-03-2005, 14:45
I recently bought me an Asus WL-500g and a LaCie 200Gb mobile harddrive (USB2.0). I intented to use them as router (DUH) and as samba-storage on my home network. Speed wasn't really an issue, so that the Asus uses USB1.0 instead of 2.0 i can live with. Maybe, in a year or so, I'll replace it with an Asus version which has USB 2.0.

Anyways, on installing the 'damn' thing I encountered many small problems. Thanks to this forum, i overcame them all, but it took some search effort. Especially 'the little facts' are scattered all over the place, making something which i think is very common (using your router as a router and attaching storage to it) harder than it needs to be.

Therefore I made this post. Goal of this post is to explain how to accomplish attaching your asus as a router with storage, including all the little details.

In this howto I assume you got the router bit working already, and know how to set it up again, if needed. If not, you might start working on that first ;) Also I do not take any responsibility; if you screw over your asus, your computer or your harddrive (or anything, for that matter) I'm not responsible. Use at your own risk.

First thing that becomes obvious after the installation of the WL500G is that the Asus firmware just doesn't cut it, at least not if you want to use Samba (Samba = windows based file sharing). I knew it was possible, since I researched that subject before purchasing the device. So I came here, and downloaded one of Oleg's excellent firmware images, to be precise, i downloaded this one:
http://files.wl500g.info/asus/custom/oleg/1.9.2.7-4/
(choose the one applicable for your device)

Then to upgrade the firmware. Step one is to reset your router to factory defaults. I didn't do this at first go, and got stuck with a router that wouldn't respond (luckily pressing the reset button like 6 seconds did the trick). To reset the router to factory defaults, visit the router homepage (usually http://192.168.1.1), select 'system setup', then select 'factory defaults' and click the 'restore' button.
http://www.tweakers.net/ext/f/55047/full.jpg

Note that this will most likely lose you your internet connection, so if you're planning on using guides from the internet (like this one), have them open in your browser, or print them.

After your router comes back up (you might have to re-establish the connection yourself, see the last part of this howto for an explanation), go to the homepage again, select 'system setup', then select 'Firmware Upgrade'.
http://www.tweakers.net/ext/f/55048/full.jpg
click the 'browse' button, select the firmware you downloaded, and click 'upload'. Your router will now upload and install the firmware, this might take a minute or so.

After your router is back up, visit the homepage again. Go back to 'system setup', select 'Firmware Upgrade' and check if the numbers given correspond with the version you uploaded. If so, the firmware is succesfully updated. If not, you might want to try again.

Now restore the settings needed for your internet connection, and save them. Also, if you want to use samba, enable the FTP under the 'USB Applications' section in the web interface. Though this is not strictly needed, without doing this the smb.conf doesn't exist.

The new firmware comes with a telnet and ssh daemon. Telnet is a simple command-line interface. You can use it by doing 'start->run->telnet 192.168.1.1'. SSH is basically the same, but then over a secure channel. To use SSH on windows, i recommend downloading putty (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html).

Before you can use SSH, you need to generate 'keys'. These are used to encrypt the connection. To do so, telnet to your router. Log in as 'admin' with password 'admin'. Type the following to generate the keys:


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
mkdir -p /usr/local/sbin/
echo "#!/bin/sh" >> /usr/local/sbin/post-boot
chmod +x /usr/local/sbin/post-boot
echo "dropbear" >> /usr/local/sbin/post-boot
dropbear


After this, the SSH daemon is running and you can connect to it with putty. Notice that we haven't saved these changes yet, so if you reboot your router now, you lose these settings. To save settings, do:


flashfs save
flashfs commit
flashfs enable


Connecting the remote storage (USB HDD/USB-stick/etc) is the next step. Simply plug in the device. Now for some thoughts on file-systems. Most likely your device is formatted with the NTFS filesystem. Though linux does have write support for NTFS (in contradiction to what i've seen people say on this board), the write support wasn't enabled in the firmware. So if your drive uses an NTFS filesystem, you won't be able to write to it. The logical choice for filesystem would be EXT2 or EXT3, since they are the native linux filesystems. Drawback of this would be that you can't use your USB HDD on a windows machine anymore. If the device is smaller than 32Gb, you could format it with a 'FAT32' filesystem. Both windows and the Asus can use this filesystem, and read/write from/to it. The easiest way to do this, is to connect your drive to your windows system and format it, choosing 'FAT32' as file system.

If your device is bigger than 32Gb however, you can't use FAT32 for the whole device, since FAT32 has a limit of 32Gb. You could create several 32Gb FAT32 partitions (use windows to do this), or you could do what i did: create one 32Gb Fat32 partition, and use the rest as an EXT3 partition. That way you don't get a lot of partitions, but you will be able to use your device on both windows and the asus (note: on windows you'll only be able to use the 32Gb partition).To do this, connect the device to your Asus router and do the following:


fdisk /dev/scsi/host0/bus0/target0/lun0/disc

fdisk is the disk partitioner linux uses. use 'p' to print out the partition table, use 'n' to create a partition, use 'd' to delete a partition, use 'w' to write the partition table to the disk and use 'q' to quit fdisk. The /dev/scsi[..] part tells fdisk where your disk is. First print all partitions using 'p'. Notice the partitions have numbers. Then use 'd' to delete the partitions. After deleting all the partitions, first create your 32Gb windows partition. Type 'n', select 'primary', press enter (start block=1), type +32000M as the end block. This will result in a partition roughly 30Gb big. Now create another partition, select 'extended' and press enter on all questions. Then create the ext3 partition, by selecting 'n', 'logical' and press enter on the size questions. Then save your work by typing 'w' and quit fdisk by typing 'q'.

Your disk has now been partitioned, but the Asus kernel doesnt know this. To let it know, reboot your device. You can do this by typing 'reboot' at the command prompt. Notice that unsaved changes will be lost, so it might be wise to save your changes (see above on how to do that). Fdisk changes won't be lost.

After your router is rebooted, telnet of ssh back into it. Now to format the partitions. The trick to this is that the Asus doesn't have enough memory to format the biggest partition (at least, it didn't for my 200Gb drive). To be able to format this partition, you need to create a swap. You can temporarely use the windows partition to do this. Type:


mkeswap /dev/scsi/host0/bus0/target0/lun0/part1
swapon /dev/scsi/host0/bus0/target0/lub0/part1


Now we'll create a ext3 file system on the logical partition:


mke2fs -j /dev/scsi/host0/bus0/target0/lub0/part5


Depending on the size of your disk, this might take a while. After this is done, you can use the partition. To format the 30Gb windows partition, the most easy way is to connect the drive back to your windows computer, delete the swap partition and create a primary partition. Be sure to format it as FAT32!. (you can do this by using the disk manager, start->settings->control panel->administrative tools->computer management->disk manager).

Now that your drive is partitioned and formatted, the asus will be mounting the two partitions automatically. If you telnet to the device, you'll vind there's a 'harddisk' in the /tmp/ folder. This contains the first (FAT32) partition. In this harddisk folder there's also a subdirectory called 'part1', containing your second (EXT3) partition.

Now to enable Samba (=windows file sharing). Edit your smb.conf by typing


vi /etc/smb.conf

Vi is an editor. If you want to start typing into the file, press the 'i' key (=insert) on the location where you want to add stuff. If you're done typing press the <ESC> button to get back to command mode. To save your work, type :w. To exit vi, type :q. To exit without saving, type :q!.

Probably the easiest thing to do is to just erase any existing config. Then start by typing in:


[global]
workgroup = <workgroup name>
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


this section contains the global parameters for your samba setup. Replace <workgroup name> by the name your windows workgroup uses. If you're using windows 98 or older, you might want to set 'encrypt passwords' to no.

hezik
22-03-2005, 14:48
I take it the posts are moderated before they are actually posted. However, this means I can't add the second part of the howto to the thread. Here it is:

Now you can set up your shares. I kept it simple, and made two shares, one for the fat32 partition, and one for the EXT3 partition:


[fat32]
path=/tmp/harddisk
writeable = yes
browseable = yes
force user = admin
[ext3]
path=/tmp/harddisk/part1
path=/tmp/harddisk
writeable = yes
browseable = yes
force user = admin


After you have created the smb.conf, make sure the system saves it when you save changes. To do this, do:


echo /etc/smb.conf >> /usr/local/.files


Now to make sure samba is started whenever your router is started.


echo "/usr/sbin/smbd -D" >> /usr/local/sbin/post-boot
echo "/usr/sbin/nmbd -D" >> /usr/local/sbin/post-boot

and save your changes, and reboot:


flashfs save
flashfs commit
flashfs enable
reboot


After your router rebooted, you're ready! Type \\192.168.1.1 in your internet explorer to explore the shares on your Asus!

jago25_98
30-03-2005, 13:40
I also found I had to manually add my hostname (set by cable modem DHCP via ISP), to /etc/hosts by copying it off the commandline and next to localhost.

Spot
02-04-2005, 07:35
Hi hezik, greet howto!

I'm a little bit confused when you speek about 32GB limit in fat32.

I'm using Acronis Partition Expert under WinXP and I have partitioned my 120GB disk when connected to my PC like this:

first partition: FAT32 / 20GB / primary
second partition: FAT32 / 99GB / logical
third partition: EXT3 / 1GB / logical

... and it seems to work fine when plugged to the wl-500g! All partition are recognized and I have read/write access.

So, do I miss something?

tomilius
02-04-2005, 08:10
I got worried when I read that, thinking that perhaps I would soon have problems--I converted a 120GB external hard drive from NTFS to FAT32 using PartitionMagic or some such to work with the router with write support a while back... Anyway, here's what I found.


"While the FAT32 file system can support drives up to a standard theoretical size of 2 terabytes, (it 'can' be jury-rigged under Windows Millennium Edition to support partitions of up to 8 TB). Windows 2000 Professional and XP Professional cannot FORMAT a volume larger than 32 GB in size using their native FAT32 file system.

"The FastFAT driver can mount and support volumes larger than 32 GB that use the FAT32 file system, such as those created locally by Windows 98 or ME in dual boot configuration, (subject to other limits listed here for Windows 98, ME and 2000 and here for Windows XP), but you cannot CREATE one using the Format tool from within either Windows 2000 Professional or XP Professional. If you attempt to format a FAT32 partition larger than 32 GB, the format fails near the end of the process with the following error message:

Logical Disk Manager: Volume size too big."

jago25_98
02-04-2005, 14:33
Personally I use ext3 and a Windows ext2/3 driver when need be.

I'm still looking for a native filesystem for Windows other than NTFS or FAT without using some driver... and I've yet to find one. Until then I can't seem to share my ext3 partition with Windows filesharing.

Spot
02-04-2005, 23:17
I got worried when I read that, thinking that perhaps I would soon have problems--I converted a 120GB external hard drive from NTFS to FAT32 using PartitionMagic or some such to work with the router with write support a while back... Anyway, here's what I found.


Do you know if there is a "technical reason" for that 32GB limit with the native formating tool under win 2k and xp ?

Styno
03-04-2005, 10:37
Do you know if there is a "technical reason" for that 32GB limit with the native formating tool under win 2k and xp ?No, it's a political decision MS made. Technically FAT32 is able to support 2TB, but then the FAT table would be some GB's big, also the cluster size would be 64 kb so small files would increase the 'slack' (unusable space) a lot. Up to a few hundred GB FAT32 works fine especially with large files. Otherwise NTFS is a better choice, also because of the better fault tolerance rate and security options.

kuka
09-04-2005, 19:39
Hi, great HowTo!

I succesfully created the partitions with fdisk.
But there's no way to create the Swap on Windows partition.

[admin@(none) root]$ mkeswap /dev/scsi/host0/bus0/target0/lun0/part1
-sh: mkeswap: not found

Is it possible only to create one big ext3 partition? How?

I'm a noob in unix.
Can you help me, please?!

jago25_98
11-04-2005, 07:24
Windows doesn't use ext2 or ext3. Geberally you're stuck with NTFS and FAT to use for Windows itself. Even though there's a thing for this called `LFS` there isn't really a free version that's safe to rely on other than read-only.

You might be able to format partitions though safely from Windows though. You could use Paragons ExtAnywhere. Maybe something like this has a utility to format a drive - http://uranus.it.swin.edu.au/~jn/linux/explore2fs.htm.

Then again you could just format it from the router if that's what you're trying to do.

Another way would be to use something like Knoppix.

Lots of info here hope I haven't confused but I'm in a rush

dankan
13-04-2005, 14:03
To kuka :

Actually the command is mkswap and not mkeswap.....this will fix it!
;) ;) ;)

oxytocin
17-04-2005, 17:34
You could also just partition the whole drive as FAT32 either using Linux or a Windows Version of mkdosfs - just search google for it and you will be successful. I use my 200GB wit a single FAT32 partition and without any problems...

Tuur
25-04-2005, 20:36
Tidbit - I didn't have a '/usr/local/sbin/' directory (1.9.2.7 on a 500gx) for the post-boot file. The howto for that is right here (http://wl500g.info/showthread.php?t=2004).

I also found out I had to enable the FTP Server, because otherwise the Asus wouldn't look for my drive when booting ('/tmp/harddisk' missing).

Can anyone confirm that?

cmtsau
19-05-2005, 02:39
echo /etc/smb.conf >> /usr/local/.files



Thank you, it's a great howto.

Would somebody please tell me why I input "echo /etc/smb.conf >> /usr/local/.files", the system replies "no such file or directory" ?

Did I do something wrong ?

Thank you

jago25_98
19-05-2005, 04:14
You need to make your smb.conf file. Make sure you're using the lates custom oleg firmware too.

You can make it with `vi` (good luck!) or upload it with ftp

Here's what mine looks like:



[admin@censored root]$ cat /etc/smb.conf
[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

[rshare]
path=/tmp/harddisk
writeable = yes
browseable = yes
force user = admin


It says this in a guide somewhere so it sounds like you've missed that.

DocSnyder
20-05-2005, 04:38
I am very new to linux. I did not get the NFS thing to work. If I enable NFS Demo into the web interface I can see my files but I cannot read or write them.
Now I did the things above but I cannot access the directory for postboot file. I have an ASUS 500g deluxe. My hdd is partitioned to 116gb FAT32 (one part) and it works for ftp.

So in someones smb.cfg there is rshare in others fat32 , what is right?

And how can I delete whole lines with vi?

Can someone give me a detailed step-by-step description on how to get it done or what could be wrong on my side? (500gx)

Thanks a lot
Peter

jago25_98
20-05-2005, 06:15
vi:

I don't really know how to use vi but i know the absolute basics:
press `a` to add text,
go rightwards to the end of the line using the `right arrow`,
use backspace to delete

when finished press escape to stop editing text,
then use `:` (shift + ;) to issue the command `w` and press return - this saves the file

to exit use `:` (shift + ;) to issue the command `q` and press return - this quits vi


another way is to upload the file with ftp

NOT ALL VERSIONS OF THE FIRMWARE INCLUDE SMB

Go to update firmware and tell me what version you're running

DocSnyder
20-05-2005, 07:16
It's 1.9.2.7-5a. And it's a Deluxe.

jago25_98
20-05-2005, 21:54
can anyone else tell me if that's definiately Oleg firmware?

read http://wl500g.info/showthread.php?t=1984



Limited samba support
Since 1.7.5.6-5 Samba 1.9.17p5 is included but, not enabled by default.
Important notice: the samba is totally unsupported, use on your own risk!

Small how-to:

* Be sure you've specified hostname in the LAN IP Setting (this name will used be by samba)
* add the following to your /usr/local/sbin/post-boot script):

/usr/sbin/smbd -D
/usr/sbin/nmbd -D

Once you've rebooted your wl500g should appear in workgroup called WORKGROUP and present you a share named "share". This share is read-only view of your usb drive (/tmp/harddisk/). There is also second invisible share called "share$" which is in the fact the read/write view of /tmp/harddisk/. No other access restriction present.

There are log files available for samba - /var/log/nmb and /var/log/smb, they could be examined if something does not work.

from http://wl500g.dyndns.org/

Tuur
26-05-2005, 21:02
That's Oleg's alright.

Should work - remember that after each upgrade you should use 'flashfs enable' again to get your samba settings back...

Re: post-boot - read my post on the first page.

Oh - and use 'dd' to delete a line in vi.

Edit: Google is your friend - VI faq (http://www.roxanne.org/vi.html)

guch79
27-05-2005, 14:08
So u just make txt file and rename it to smb.conf, and ftp it to the root af the drive and that it???


You need to make your smb.conf file. Make sure you're using the lates custom oleg firmware too.

You can make it with `vi` (good luck!) or upload it with ftp

Here's what mine looks like:



[admin@censored root]$ cat /etc/smb.conf
[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

[rshare]
path=/tmp/harddisk
writeable = yes
browseable = yes
force user = admin


It says this in a guide somewhere so it sounds like you've missed that.

guch79
28-05-2005, 12:59
Man i have follewede this guide to the letter... but when i get to this point:

mkeswap /dev/scsi/host0/bus0/target0/lun0/part1
swapon /dev/scsi/host0/bus0/target0/lub0/part1

It gives this feedback:
[jolly79@AJOLLYWIRELESS root]$ mkeswap /dev/scsi/host0/bus0/target0/lun0/part1
-sh: mkeswap: not found
[jolly79@AJOLLYWIRELESS root]$ swapon /dev/scsi/host0/bus0/target0/lub0/part1
swapon: cannot stat /dev/scsi/host0/bus0/target0/lub0/part1: No such file or directory
[jolly79@AJOLLYWIRELESS root]$ $ ls -l /usr/local/
-sh: $: not found


This is how it looks in fdisk when i type P:

Command (m for help): p

Disk /dev/scsi/host0/bus0/target0/lun0/disc: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/scsi/host0/bus0/target0/lun0/part1 3890 7780 31254457+ 83 Linux
/dev/scsi/host0/bus0/target0/lun0/part2 1 3889 31238361 5 Extended
/dev/scsi/host0/bus0/target0/lun0/part5 1 3889 31238329+ 83 Linux

Partition table entries are not in disk order

Am i doing somthing wrong, my linux is really bad.... but i want the samba server to work.

macsat
28-05-2005, 14:24
Hi

The command is mkswap, not mkeswap.

It IS a bit odd, considering that the command for making ext3 is mke2fs :-)

guch79
30-05-2005, 12:48
So if i use this code:

mkswap /dev/scsi/host0/bus0/target0/lun0/part1
swapon /dev/scsi/host0/bus0/target0/lub0/part1

Then i should work?? Like i said it followede the guide to the letter.





Hi

The command is mkswap, not mkeswap.

It IS a bit odd, considering that the command for making ext3 is mke2fs :-)

macsat
30-05-2005, 13:17
Yes - I think that would do the trick :-)

Well...the guy who made the guide must have made a little typo there, no one is 100% perfect :-)

guch79
30-05-2005, 13:25
Do u know if i can use ftp and samba at the same time...

I mean upload it by samba and download it by ftp??

Will samba automatically register in "my computer" as a network drive?? or have i misunderstod the concept of samba

macsat
30-05-2005, 13:37
SAMBA and ftp can run at the same time, that is no problem at all.

It will not automaticly show up, you will have to "search" for network places from your windows.

guch79
30-05-2005, 14:37
Hey again..

Having problems with the new code u gave me, check the log here:

[jolly79@AJOLLYWIRELESS root]$ mkswap /dev/scsi/host0/bus0/target0/lun0/part1
mkswap: warning: truncating swap area to 524284kB
Setting up swapspace version 1, size = 536862720 bytes
[jolly79@AJOLLYWIRELESS root]$ swapon /dev/scsi/host0/bus0/target0/lub0/part1
swapon: cannot stat /dev/scsi/host0/bus0/target0/lub0/part1: No such file or directory
[jolly79@AJOLLYWIRELESS root]$




Yes - I think that would do the trick :-)

Well...the guy who made the guide must have made a little typo there, no one is 100% perfect :-)

guch79
30-05-2005, 16:23
Sorry to bug u again...

I got everything working on the samba and the ftp... i have have 2 partitons one callede ext3 and one callede fat32.

When i put something on ext3 i also can se it on fat32, how can this be?? should it be on both, when i just uploaded to one of them??


SAMBA and ftp can run at the same time, that is no problem at all.

It will not automaticly show up, you will have to "search" for network places from your windows.

guch79
30-05-2005, 17:27
Here is how my smb.conf file looks, that should be ok right??
But it´s like i only connect to one partion, since the the same files are on both shares.
Pleas somebody help, im so close to getting this to work right.

[global]
workgroup = AJOLLYWIRELESS
guest account = nobody
security = share
browseable = yes
guest ok = yes
guest only = no
log level = 1
max log size = 100
encrypt passwords = yes
preserve case = yes
short preserve case = yes

[fat32]
path=/tmp/harddisk
writeable = yes
browseable = yes
force user = jolly79
[ext3]
path=/tmp/harddisk/part1
path=/tmp/harddisk
writeable = yes
browseable = yes
force user = jolly79

lebeno
30-05-2005, 21:30
Correct me if I'm wrong, but shouldn't your [ext3] section have only one "path" line?

So probably, you should only have

path=/tmp/harddisk/part1
and not

path=/tmp/harddisk/part1
path=/tmp/harddisk

guch79
30-05-2005, 22:01
Yes i know.. i have corrected that to.
That was why i keept endning up the same place.

Do u know if i can make one big ext3 partiton, maybe in partition magic.
and just use that. or do i have to format the hd by the router, for it to be reconizede by the router.
It´s stupid having a fat32 and a ext3 partition



Correct me if I'm wrong, but shouldn't your [ext3] section have only one "path" line?

So probably, you should only have

path=/tmp/harddisk/part1
and not

path=/tmp/harddisk/part1
path=/tmp/harddisk

sup
11-06-2005, 21:11
It is mentioned somewhere in this thread but I somehow missed it and it took me an hour to find out what was wrong. Your unit needs to have assigned a host name - you need Oleg´s 1.9.2.7-5a (or later, if available:-)) firmware for that (it is bugged in earlier versions, as I understood) and you can do it through the webinterface (IP Config >> WAN & LAN >> LAN IP Setting >> Host Name). You can tell the difference whether it is assigned or not from the telnet command line(or how to call it:-)) - if it is like this:
[admin@wl500g root]$ where wl500g stands for the name and admin for the user name, you ale alright, if it is like this: [admin@(none) root]$, you need to fix something up.
I hope this helps somebody, it would have saved some time to me:-).

mortis, md
11-06-2005, 21:26
seems to me that you only have one path (path=/tmp/harddisk) with a subdirectory in it (part1).

if you mount /tmp/harddisk as an ext3 partitiosn then /tmp/harddisk/part1 is a directoty in that partition

you should have something like this instead:

/tmp/harddisk/part1 (for ext3)
/tmp/harddisk/part2 (/for fat32)

sharky123
22-06-2005, 20:26
Hello,

to anyone who uses an usb storage device on their asus with samba. Do you experience problems with writing 'big' (>100mb) files to the device? I tried all Oleg firmware versions without result. Currently running 1957-5a. I'm using an 80gb fat32 drive.

And what's more, as i aproach the drive through my asus, it's recognised as an 4gb hd? While when i connect it directly through usb on my pc, it's recognised as 80 gb. Anyone a hint? Should i try make an ext3 partition?

tnx

Tuur
06-07-2005, 20:59
With the newer versions of samba (and the firmware), it's better to use

encrypt passwords = no

as default, otherwise you get errors.

You can also choose to create a password file for samba (search the forum).

double j
08-07-2005, 18:00
I am also having a problem with writing big files to my hd with samba....


With the newer versions of samba (and the firmware), it's better to use

encrypt passwords = no

as default, otherwise you get errors.

You can also choose to create a password file for samba (search the forum).

Does a newer firmware help? Or is this a reply to an other post :confused:

de_dolf
23-07-2005, 16:40
sometimes during the tutorial i get "permission denied". do i need to change that? and if i need to, how?

tnx

tatnat
01-08-2005, 09:33
Hi,

similar problem here. I use a 80GB drive formatted with ext3. When mounting from a Linux-PC only 4 GB are shown as available and 0 used. Actually perhaps 10GB are used. My first guess is that the samba version used in the Asus is old. But I couldn't find something on samba lists.

tatnat


Hello,

to anyone who uses an usb storage device on their asus with samba. Do you experience problems with writing 'big' (>100mb) files to the device? I tried all Oleg firmware versions without result. Currently running 1957-5a. I'm using an 80gb fat32 drive.

And what's more, as i aproach the drive through my asus, it's recognised as an 4gb hd? While when i connect it directly through usb on my pc, it's recognised as 80 gb. Anyone a hint? Should i try make an ext3 partition?

tnx

SeverusSnape
08-08-2005, 12:41
Hi, great HowTo!

I succesfully created the partitions with fdisk.
But there's no way to create the Swap on Windows partition.

[admin@(none) root]$ mkeswap /dev/scsi/host0/bus0/target0/lun0/part1
-sh: mkeswap: not found

Is it possible only to create one big ext3 partition? How?

I'm a noob in unix.
Can you help me, please?!

read my friend

mkswap is the correct command, it is written some pages below me

Fresh
25-09-2005, 21:25
i have managed to start samba and stuff, but now i have a problem...
i can acces the share$ folder, and i can copy stuff from it, but i cannot write/erase enything in windows?!?!
Can anyone tell me whats going on?
I have all the settings in smb.conf like it should be, so i really dont know why this thing dosent work!?!
Anyone?
Fresh :(

MatB
28-09-2005, 23:00
Thanks a lot hezik for this howto, ssh and samba work like a charm.
If only everything was this easy...

nieman426
22-10-2005, 22:21
Great post, but it looks like I haven’t got a /post-boot dir.

When I try: “echo "/usr/sbin/smbd -D" >> /usr/local/sbin/post-boot” I receive the following error message:

-sh: cannot create /usr/local/sbin/post-boot: Directory nonexistent

Any ideas?

(firmware: WL500gx-1.9.2.7-6b)

Styno
22-10-2005, 22:33
post-boot is a file.

Make sure you use a recent firmware from Oleg and then execute (if the /usr/local/sbin dir doesn't exist):
- flashfs enable
- mkdir /usr/local/sbin
- touch post-boot
- touch pre-boot
- touch post-firewall
- touch post-mount
- flashfs save
- flashfs commit

®ol@nd
11-12-2005, 02:39
Can't get the samba share working, what's going wrong?

I did try this tutorial to enable a samba share at my external usb harddisk, but i can't access it through a share. What's going wrong?

Here is all my information:

[admin@(none) root]$ cat /etc/smb.conf
workgroup = WERKGROEP
server string = OpenWRT Samba Server
wins support = no
dns proxy = no
name resolve order = lmhosts hosts bcast
log file = /opt/var/log/samba/log.%m
max log size = 1000
syslog = 0
security = share
encrypt passwords = true
obey pam restrictions = yes
guest account = nobody
passwd program = /usr/bin/passwd %u
load printers = no

[share]
comment = /tmp/harddisk
path = /tmp/harddisk
writeable = yes
browseable = yes
force user = admin

[admin@(none) root]$ ps
PID Uid VmSize Stat Command
1 admin 700 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]
41 admin 292 S telnetd
46 admin 392 S httpd eth1
49 admin 340 S klogd
53 nobody 428 S dnsmasq
54 admin 388 S syslogd -m 0 -O /tmp/syslog.log -S -l 7
56 admin 500 S nas /tmp/nas.lan.conf /tmp/nas.lan.pid lan
59 admin SW [khubd]
69 admin 276 S lpd
71 admin 260 S p9100d -f /dev/usb/lp0 0
73 admin 260 S p9101d -f /dev/printers/0 1
76 admin 340 S waveservermain
78 admin 348 S rcamdmain
82 admin SW [usb-storage-0]
83 admin SW [scsi_eh_0]
93 admin 324 S infosvr br0
94 admin 480 S watchdog
96 admin 340 S ntp
104 admin 428 S dropbear
113 admin SW [kjournald]
115 admin 404 S stupid-ftpd
117 admin 744 R dropbear
118 admin 528 S -sh
124 admin 392 R ps

[admin@(none) root]$ cat /usr/local/sbin/post-boot
#!/bin/sh
dropbear
/usr/sbin/smbd -D
/usr/sbin/nmbd -D

What is going wrong? It look to me that Samba is not started, but howcome?

Any help apriciated.

Tnx,
Roland

®ol@nd
11-12-2005, 18:39
Already did try some more things, with the same result, it looks again that Samba is not starting. I followed the above tutorial, and also try the tutorial from www.macsat.com

This is my post boot file at the moment:

[admin@(none) root]$ cat /usr/local/sbin/post-boot
#!/bin/sh
dropbear
mount -t ext3 /dev/discs/disc0/part1 /opt
mount -t ext3 /dev/discs/disc0/part3 /tmp/harddisk
swapon /dev/discs/disc0/part2
# remove audio module
killall waveservermain
rmmod audio
rmmod soundcore
# And printer
killall p910nd
killall lpd
killall infosvr
rmmod printer
# start Samba
/usr/sbin/smbd -D
/usr/sbin/nmbd -D

Please help, got stuck....

Roland

bartgrefte
17-07-2006, 20:22
well, thanx alot:mad: . this howto won't let my router be reachable anymore....
it boots, but i can't reach it by 192.168.1.1 and can't get internet to. so i plugged the wan cable direct in my pc and internet works again....
but the router not.... i pushed the resetbutton several times and now i unplugged the powercable with the hope of a total reset.

i've got an 500gdeluxe with oleg's 1.9.2.7-6b
HD: a WD 160GB in a sitecom md200 (old version) casing formatted as EXT3 as 1 big partition, works with ftp but has appearantly a 2GB filesize limit since uploading of 2GB< files always failes. WHY??

what i did:
i put this in smb.conf
[global]
workgroup = MSHOME
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
and saved it--> \\192.168.1.1 gave "incorrect path" in windows so samba didnt work (yet)

then i added this to smb.conf:
[ext3]
path=/tmp/harddisk
writeable = yes
browseable = yes
force user = admin
then i did this:
echo /etc/smb.conf >> /usr/local/.files

and this:
echo "/usr/sbin/smbd -D" >> /usr/local/sbin/post-boot
echo "/usr/sbin/nmbd -D" >> /usr/local/sbin/post-boot
this first didn't work since the sbin directory didn't exist. I created that and the postboot with some other howto from this site.

and last:
flashfs save
flashfs commit
flashfs enable
reboot

what did i wrong to make my router not reachable anymore and why did't samba work????

unicorn
18-08-2006, 04:47
You don't write what modifications did you do with your router except samba configuration. Without this info it is not possible to say why is your asus not routing to internet. Definitely it is not caused by samba.

For your samba "problem" - it looks like you didn't make the post-boot script executable and forgot to put #!/bin/sh at begining of the file :eek:

You can fix it with following commands:

echo "#!/bin/sh" > /usr/local/sbin/post-boot
echo "/usr/sbin/smbd -D" >> /usr/local/sbin/post-boot
echo "/usr/sbin/nmbd -D" >> /usr/local/sbin/post-boot
chmod +x /usr/local/sbin/post-boot
flashfs save
flashfs commit
flashfs enable
reboot
I presume you have only 2 lines in post-boot right now. If you added other lines to your post-boot, just add the first line using vi editor.

bartgrefte
18-08-2006, 17:45
You don't write what modifications did you do with your router except samba configuration. Without this info it is not possible to say why is your asus not routing to internet. Definitely it is not caused by samba.

For your samba "problem" - it looks like you didn't make the post-boot script executable and forgot to put #!/bin/sh at begining of the file :eek:

You can fix it with following commands:

echo "#!/bin/sh" > /usr/local/sbin/post-boot
echo "/usr/sbin/smbd -D" >> /usr/local/sbin/post-boot
echo "/usr/sbin/nmbd -D" >> /usr/local/sbin/post-boot
chmod +x /usr/local/sbin/post-boot
flashfs save
flashfs commit
flashfs enable
reboot
I presume you have only 2 lines in post-boot right now. If you added other lines to your post-boot, just add the first line using vi editor.
i already did a full reset and now the router is working fine. i dont think i'll try samba again unless i know exactly what i'm doing,

matt
18-08-2006, 19:01
mkeswap /dev/scsi/host0/bus0/target0/lun0/part1
swapon /dev/scsi/host0/bus0/target0/lub0/part1

Now we'll create a ext3 file system on the logical partition:

mke2fs -j /dev/scsi/host0/bus0/target0/lub0/part5
Should be, after typos corrected in mkswap and the last two paths:

mkswap /dev/scsi/host0/bus0/target0/lun0/part1
swapon /dev/scsi/host0/bus0/target0/lun0/part1

Now we'll create a ext3 file system on the logical partition:

mke2fs -j /dev/scsi/host0/bus0/target0/lun0/part5

Hope that helps. Just finishing of the rest of the tutorial myself.

matt

ookmich
21-08-2006, 15:07
Hi! I've been working on a configuration as described in this thread, but I'm running into difficulties. Could someone please help?

I have formatted my usb drive as described, with a big fat32 and an ext3 partition. On the command line I don't see any problems. But these drives don't work properly in Windows.

At first, I got it working. But when I started editing the name of the shared drive and the names of the shared folders, things went wrong. Now I can't see any drive in my network neigbourhood. All my XP machines give an error messages: "Windows - System error / A duplicate name exists on the network"

Does anyone have a clue?

Thanks for your help! ye, Michiel.

unicorn
23-08-2006, 05:06
What do you mean by
editing the name of the shared drive

Perhaps now you have 2 computers with the same name on net, therefore you have also the error message
"Windows - System error / A duplicate name exists on the network"

ookmich
23-08-2006, 21:29
I have solved my problem with "Windows - System error / A duplicate name exists on the network".
The machine name of my router was the same as my workgroup name. After I changed the name of my router, this message was gone and I could see my workgroup again.

Now i'm just struggling with users and passwords, so I'm one step further...

Thanks for your help, Michiel

ROBBY
28-08-2006, 17:26
hello
excuse my bad english :o
I have WL 500g Deluxe
With your excellent tutorial, I had install WL 500gx-1.9.2.7-4.trx. it run very well
I have an extern hard disk (Western Digital 250 Go). I do tutorial enterily... but samba want not run

In /var/log/smb :
Get_Hostbyname : Unknown host (none) .
Get_Hostbyname : Unknown host (none) .
No interface found for adress xxx.xxx.xxx.xxx (I don't know what is this adress, it's not IP adress of my router, it's not IP adress of my network and it's not my internet IP !)
Get_Hostbyname : Unknown host (none) .

In /var/log/nmb
1970/01/01 00:00:11 netbios name server version 1.9.18p10 started
Copyright Andrew Tridgell 1994_1997
Get_Hostbyname : Unknown host (none) .
Unable to get my hostname - exiting.

What is hapened ? What can I do to repare this? please help me
I had do my /etc/smb.conf like in tutorial and I can see my hard disk like
ftp server but not like a share device...
Thank you very much for your help

Antiloop
28-08-2006, 18:10
hello
excuse my bad english :o
I have WL 500g Deluxe
With your excellent tutorial, I had install WL 500gx-1.9.2.7-4.trx. it run very well
I have an extern hard disk (Western Digital 250 Go). I do tutorial enterily... but samba want not run

In /var/log/smb :
Get_Hostbyname : Unknown host (none) .
Get_Hostbyname : Unknown host (none) .
No interface found for adress xxx.xxx.xxx.xxx (I don't know what is this adress, it's not IP adress of my router, it's not IP adress of my network and it's not my internet IP !)
Get_Hostbyname : Unknown host (none) .

In /var/log/nmb
1970/01/01 00:00:11 netbios name server version 1.9.18p10 started
Copyright Andrew Tridgell 1994_1997
Get_Hostbyname : Unknown host (none) .
Unable to get my hostname - exiting.

What is hapened ? What can I do to repare this? please help me
I had do my /etc/smb.conf like in tutorial and I can see my hard disk like
ftp server but not like a share device...
Thank you very much for your help

set the hostname on your Asus device then try again

ROBBY
28-08-2006, 18:31
thanks for your help
what "name" I put ? the name of workgroup ? or what ?
thanks

ROBBY
28-08-2006, 18:40
ohhhh! thank you:eek:
thankyou very very veeerrryyy MUCH!!!
IT'S RUN LIKE A CHARM!!!!!:) :)

JaJoah
30-08-2006, 07:49
Okay,

I managed to get SSH, WWW, Samba and RRD working but got stuck with the VSFTPd.

When I installed VSFTPd, I just couldn't connect to it (LAN side). It refused connection every f#cking time. I tried to shutdown the HDD and then reconnect it (as mentioned here (http://www.macsat.com/macsat/content/view/25/29/))


...One of my readers have brought to my attention, that after following the guide, the ftp server kept rejecting him to login. He then reconnected his harddrive, and after that it worked. Maby worth a try if you are having problems getting it to work....

but this didn't solve the problem. It stayed unreachable. So I've given up on that and gone back to stupid-ftpd for now.

Any insight in what went wrong here is appreciated.

ROBBY
30-08-2006, 17:38
I use the 1.9.2.7 -7e with Samba
it goes well with a disk USB but in the Windows explorer I have:

- my first partition named “fat32” and inside the second partition “ext3” show like a repertory “part1” !!

- my second partion “ext3” and inside also I still have a repertory “part1” which is the copy of “fat3”!!

How could I avoid that? I followed your tutoriel exactly…

Still a second question pleaqe: how I can mount a second disc USB on the router ? and how I must declare it in smb.conf?

when I connect it on the router, I see it well like:
/dev/scsi/host1/bus0/target0/lun0/disc
/dev/scsi/host1/bus0/target0/lun0/part1

thank you very much of your assistance.

ookmich
30-08-2006, 21:21
Just a tip for people who have problems getting things working:

I my situation, I couldn't get SSH working, because the port 22 wasn't visible on the outside.

It appeared to be the following problem: My post-firewall script wasn't executable. After I made it executable, everything works fine!

Making a script executable:
type 'chmod +x /usr/local/sbin/post-firewall'

Michiel

JaJoah
30-08-2006, 23:30
Just a tip for people who have problems getting things working:

I my situation, I couldn't get SSH working, because the port 22 wasn't visible on the outside.

It appeared to be the following problem: My post-firewall script wasn't executable. After I made it executable, everything works fine!

Making a script executable:
type 'chmod +x /usr/local/sbin/post-firewall'

Michiel

that's not the case here ... both post-boot as post-firewall were made executable.

An other thing I've just noticed is that after a while (as in: after an hour or so) the thttpd shuts down :confused: Anyone had this problem aswell ?

Ow, and I disconnected the webcam as it utilized the cpu quite heavily (50% to 96% at peaks).

XtR3m3
16-01-2007, 20:46
Hi,

thats my smb.conf

[global]
workgroup = WORKGROUP
guest account = nobody
security = share
writeable = yes

browseable = yes
guest ok = yes
guest only = no
log level = 1
max log size = 100
encrypt passwords = yes

dns proxy = no

What should i do, to mount my USB Stick. Its formatted with Fat32. Sry but dont have much knowledge in Linux.
Second question: How can i start the nmbd and smbd at the Routerstart?
I did it like here, but it doesnt work. Thx 4 help. Sry 4 my bad english ;)

BugBoy
02-05-2007, 20:12
I always used Samba file sharing on my WL-500gx box to use offline files. This works fine, but in Windows Vista the synchronization fails. I don't exactly know what is happening, but I get the following errors in the SMBD.log file:


smbd/nttrans.c:map_share_mode(443) map_share_mode: Incorrect value 100000 for desired_access to file

I heard that older Samba versions are not compatible with Vista. Has anyone a compile up-to-date Samba binary for the WL-500gx? I am curious why a very old Samba version is used. Is it true that the WL-500gx is not capable to use Samba 3?

[UPDATE] I just read on The Filing Cabinet (http://blogs.technet.com/filecab/archive/2007/03/16/using-offline-files-with-samba-emc-servers-nas-devices.aspx) that you need at least Samba v3.0.22 to be able to use Offline files with Windows Vista. I guess using Offline files won't be possible in the near future.

Patrik1974
12-06-2007, 09:11
I have problem with connect HDD to my WL500gP ,samba is running ok I have a laptop with winxp home edition .With ftp is HDD working ok.(ping to router is ok too).
Another laptop is with win xp profesional HDD working very good as ftp and as network HDD.
Here are attached configurations my samba and error window.
Thanks.

sven7
24-08-2007, 09:51
Hi all, does anyone can help to allow NTFS write permission with 500gP ? As i lost everything and not able to recover when using ext2. : (

thanks a lot

holla
26-08-2008, 11:52
I have a very simple question. Is wireless client working properly on the latest fw??

I tried a lot of configs and I didn't manage to get it working.

access point mode.
same ssid and same encryption (wpa2 +aes)
extended mode (ethernet bridge and station)


Does anyone have the correct configuration for this to work?