PDA

Bekijk de volledige versie : Unable to mount FAT32 partition



biaoism
08-09-2007, 13:41
Hi

I've tried searching in the forums for an answer to my problem, but found nothing useful for my situation...

I just bought a WL500G Deluxe, and updated to use Oleg's firmware. Everything else is fine except for getting Samba to work with my USB harddisk.

I've got 2 primary partitions on my HDD, 1 NTFS and 1 FAT32.

I've done all the configuration as detailed by some of the forum posts, however, for some reason my FAT32 partition cannot be mounted (or even detected).

I have no problems accessing the NTFS partition over FTP. I have also configured the hostname for the router.

Here's my log:


Jan 1 08:00:20 kernel: VFS: Can't find ext3 filesystem on dev sd(8,0).
Jan 1 08:00:20 kernel: MSDOS FS: Using codepage 950
Jan 1 08:00:20 kernel: MSDOS FS: IO charset cp950
Jan 1 08:00:20 kernel: FAT: bogus logical sector size 64543
Jan 1 08:00:20 kernel: VFS: Can't find a valid FAT filesystem on dev 08:00.
Jan 1 08:00:20 kernel: FAT: freeing iocharset=cp950
Jan 1 08:00:20 kernel: FAT: bogus logical sector size 64543
Jan 1 08:00:20 kernel: VFS: Can't find a valid FAT filesystem on dev 08:00.
Jan 1 08:00:20 kernel: VFS: Can't find ext3 filesystem on dev sd(8,1).
Jan 1 08:00:20 kernel: MSDOS FS: Using codepage 950
Jan 1 08:00:20 kernel: MSDOS FS: IO charset cp950
Sep 8 20:15:48 kernel: FAT: Did not find valid FSINFO signature.
Sep 8 20:15:48 kernel: Found signature1 0x4e0005 signature2 0xd6e80000 sector=1.
Sep 8 20:15:48 kernel: VFS: Can't find a valid FAT filesystem on dev 08:01.
Sep 8 20:15:48 kernel: FAT: freeing iocharset=cp950
Sep 8 20:15:48 kernel: FAT: Did not find valid FSINFO signature.
Sep 8 20:15:48 kernel: Found signature1 0x4e0005 signature2 0xd6e80000 sector=1.
Sep 8 20:15:48 kernel: VFS: Can't find a valid FAT filesystem on dev 08:01.
Sep 8 20:15:48 kernel: NTFS: Warning! NTFS volume version is Win2k+: Mounting read-only
Sep 8 20:15:48 USB storage: ntfs(ro) fs mounted to /tmp/harddisk
Sep 8 20:15:48 FTP server: daemon is started
Sep 8 20:15:58 ntp client: Synchronizing time with time.nist.gov ...
Sep 8 20:16:36 nmbd[142]: [2007/09/08 20:16:36, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(405)
Sep 8 20:16:36 nmbd[142]: *****
Sep 8 20:16:36 nmbd[142]:
Sep 8 20:16:36 nmbd[142]: Samba name server ONGR is now a local master browser for workgroup ONG on subnet 192.168.1.1
Sep 8 20:16:36 nmbd[142]:
Sep 8 20:16:36 nmbd[142]: *****
Sep 8 20:16:36 nmbd[142]: [2007/09/08 20:16:36, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(405)
Sep 8 20:16:36 nmbd[142]: *****
Sep 8 20:16:36 nmbd[142]:
Sep 8 20:16:36 nmbd[142]: Samba name server ONGR is now a local master browser for workgroup ONG on subnet 218.212.223.116
Sep 8 20:16:36 nmbd[142]:
Sep 8 20:16:36 nmbd[142]: *****
Sep 8 20:18:02 login[156]: root login on `pts/0'



Can somebody kindly point the way out for me...

Thanks in advance!

biaoism
09-09-2007, 04:46
Now I am able to access Samba, by mounting the partitions in post-boot

I have another problem though - when I access via FTP, I can only see the NTFS partition - how can I configure so that my FAT32 partition can also be accessed from FTP?

KGy
09-09-2007, 08:31
Hi and sorry my English.

1) disable FTP server on web config page
2) add some line your post-boot script:



#!/bin/sh
# Load IPTABLES ext. modules
insmod ipt_recent

# test if USB disc has beeb attached
# if not - then insert needed modules
if [ ! -d /dev/discs ]
then
insmod scsi_mod
insmod sd_mod
insmod usb-storage
sleep 5s
fi
...<old script code>


3) create a new stupid-ftpd.conf file in /opt/etc (I suggest it) or tmp/harddisk/part2 (or other) or /usr/local/etc folder. If you use /etc folder, it working while you not enabled FTP server on web config page (the system owerwrite your ftp config :().

4) add some line to file


mode=daemon
serverroot=/opt/share/samba
changeroottype=virtual
motd=/opt/etc/stupid-ftpd.motd
byemsg=/opt/etc/stupid-ftpd.bye
banmsg=access denied
log=/tmp/stupid-ftpd.log
port=21
maxusers=4
login-timeout=240
timeout=360
# Format: user=<login> <passwd> <subdir> <maxlogins> <flags>
# <flags> D - download
# U - upload + making directories
# O - overwrite existing files
# M - allows multiple logins
# E - allows erase operations
# A - allows EVERYTHING(!)
#
# SEE: ATTENTION remark on the top of this file !!!
user=user1 password1 /ftp_prv/user1 2 A
user=user2 password2 /ftp_prv/user2 2 A


and change "serverroot=" line to your mounts (and ftp folder, don't forget create it). And create user folder under "serverroot" folder.

5) add start script to /opt/etc/init.d folder or add FTP start command to your post-boot script.
/opt/etc/init.d/S95sftp


#!/bin/sh

start() {
echo "Starting stupid-ftpd..."
/usr/sbin/stupid-ftpd -f /opt/etc/stupid-ftpd.conf
echo "done"
}

stop() {
echo "Shutting down stupid-ftpd..."
killall stupid-ftpd
echo "done"
}

case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 1
start
;;
*)
echo "Usage: $0 (start|stop|restart)"
exit 1
;;
esac


or in post-boot


...
/usr/sbin/stupid-ftpd -f /opt/etc/stupid-ftpd.conf
...


dont forget to change your ftp config path in commands (post-boot or S95sftp) and add +x attribute to S95sftp script.

6) create stupid-ftp.motd and stupid-ftp.bye file and fill it a message (motd and bye msg)

7) save to flash:


flashfs save
flashfs commit
flashfs enable


bye,

George