Cal Cobra
06-02-2005, 22:13
I apologize in advance, I'm a total novice in linux, and sorry for the long post, just wanted to make sure I included enough info.
I have already setup my USB-HD via FTP on my wl500g, running Olegs 1.9.2.7-3c firmware, and it's working fine. I implemented alpha5's detailed how-to from here:
http://wl500g.info/showthread.php?t=1457&highlight=webserver
Followed that, and I believe I have it setup correctly:
[admin@(none) root]$ ls /usr/local/sbin/
post-boot post-firewall
[admin@(none) root]$ more /usr/local/sbin/post-boot
mount /dev/discs/disc0/part1 /tmp/harddisk -t vfat
busybox_httpd -p 81 -h /tmp/harddisk/web
[admin@(none) root]$ more /usr/local/sbin/post-firewall
iptables -D INPUT -j DROP
iptables -A INPUT -p tcp --dport 81 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 80 -j DNAT --to-destination 192.168.1.1:81
iptables -A INPUT -j DROP
Then entered the following to save the changes:
flashfs enable
flashfs save
flashfs commit
reloaded the router, but I don't see the process "busybox_httpd" (although I do see several httpd processes running?).
If I manually enter:
busybox_httpd -p 81 -h /tmp/harddisk/web
Then do a ps, I see it running:
171 admin 376 S busybox_httpd -p 81 -h /tmp/harddisk/web
Strangly when I check after a reboot, /tmp/usbmount/web is no longer present. If I try to remake it in one shot, I get:
mkdir: Cannot create directory `/tmp/usbmount/web/': No such file or directory
I can remake it, but have to make one directy, cd into it, make the next one, and then cd to it and finally make the web directory, but it's gone again after the next reboot??
From the router log:
Jan 1 00:00:20 kernel: EXT3-fs: unable to read superblock
Jan 1 00:00:20 kernel: MSDOS FS: Using codepage 950
Jan 1 00:00:20 kernel: MSDOS FS: IO charset cp950
Jan 1 00:00:20 kernel: FAT: bogus logical sector size 0
Jan 1 00:00:20 kernel: VFS: Can't find a valid FAT filesystem on dev 08:01.
Jan 1 00:00:20 kernel: FAT: freeing iocharset=cp950
Jan 1 00:00:20 kernel: FAT: bogus logical sector size 0
Jan 1 00:00:20 kernel: VFS: Can't find a valid FAT filesystem on dev 08:01.
Jan 1 00:00:20 kernel: VFS: Can't find ext3 filesystem on dev sd(8,5).
Jan 1 00:00:20 kernel: MSDOS FS: Using codepage 950
Jan 1 00:00:20 kernel: MSDOS FS: IO charset cp950
Jan 1 00:00:21 USB storage: vfat fs mounted to /tmp/harddisk
Feb 6 13:46:49 kernel: VFS: Can't find ext3 filesystem on dev sd(8,6).
Feb 6 13:46:49 kernel: MSDOS FS: Using codepage 950
Feb 6 13:46:49 kernel: MSDOS FS: IO charset cp950
Feb 6 13:46:49 USB storage: vfat fs mounted to /tmp/harddisk/part1
I'm not sure what's going on, even after manually starting 'busybox_httpd -p 81 -h /tmp/harddisk/web', if I try to browse to http://192.168.1.1:81 I get a "404 Not Found The requested URL was not found on this server" error.
Maybe because the /tmp/usbmount/web/ directory is never saved, it just bombs off from there... I dunno.
Any ideas???
TIA
Cal
I have already setup my USB-HD via FTP on my wl500g, running Olegs 1.9.2.7-3c firmware, and it's working fine. I implemented alpha5's detailed how-to from here:
http://wl500g.info/showthread.php?t=1457&highlight=webserver
Followed that, and I believe I have it setup correctly:
[admin@(none) root]$ ls /usr/local/sbin/
post-boot post-firewall
[admin@(none) root]$ more /usr/local/sbin/post-boot
mount /dev/discs/disc0/part1 /tmp/harddisk -t vfat
busybox_httpd -p 81 -h /tmp/harddisk/web
[admin@(none) root]$ more /usr/local/sbin/post-firewall
iptables -D INPUT -j DROP
iptables -A INPUT -p tcp --dport 81 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 80 -j DNAT --to-destination 192.168.1.1:81
iptables -A INPUT -j DROP
Then entered the following to save the changes:
flashfs enable
flashfs save
flashfs commit
reloaded the router, but I don't see the process "busybox_httpd" (although I do see several httpd processes running?).
If I manually enter:
busybox_httpd -p 81 -h /tmp/harddisk/web
Then do a ps, I see it running:
171 admin 376 S busybox_httpd -p 81 -h /tmp/harddisk/web
Strangly when I check after a reboot, /tmp/usbmount/web is no longer present. If I try to remake it in one shot, I get:
mkdir: Cannot create directory `/tmp/usbmount/web/': No such file or directory
I can remake it, but have to make one directy, cd into it, make the next one, and then cd to it and finally make the web directory, but it's gone again after the next reboot??
From the router log:
Jan 1 00:00:20 kernel: EXT3-fs: unable to read superblock
Jan 1 00:00:20 kernel: MSDOS FS: Using codepage 950
Jan 1 00:00:20 kernel: MSDOS FS: IO charset cp950
Jan 1 00:00:20 kernel: FAT: bogus logical sector size 0
Jan 1 00:00:20 kernel: VFS: Can't find a valid FAT filesystem on dev 08:01.
Jan 1 00:00:20 kernel: FAT: freeing iocharset=cp950
Jan 1 00:00:20 kernel: FAT: bogus logical sector size 0
Jan 1 00:00:20 kernel: VFS: Can't find a valid FAT filesystem on dev 08:01.
Jan 1 00:00:20 kernel: VFS: Can't find ext3 filesystem on dev sd(8,5).
Jan 1 00:00:20 kernel: MSDOS FS: Using codepage 950
Jan 1 00:00:20 kernel: MSDOS FS: IO charset cp950
Jan 1 00:00:21 USB storage: vfat fs mounted to /tmp/harddisk
Feb 6 13:46:49 kernel: VFS: Can't find ext3 filesystem on dev sd(8,6).
Feb 6 13:46:49 kernel: MSDOS FS: Using codepage 950
Feb 6 13:46:49 kernel: MSDOS FS: IO charset cp950
Feb 6 13:46:49 USB storage: vfat fs mounted to /tmp/harddisk/part1
I'm not sure what's going on, even after manually starting 'busybox_httpd -p 81 -h /tmp/harddisk/web', if I try to browse to http://192.168.1.1:81 I get a "404 Not Found The requested URL was not found on this server" error.
Maybe because the /tmp/usbmount/web/ directory is never saved, it just bombs off from there... I dunno.
Any ideas???
TIA
Cal