Writing USB hard disk under suse 10.3

Can anyone tell me how to mount the USB hard disk using vfat so I can both read and write to it. It works fine under Windows XP reading and writing, and it reads fine under suse 10.3, but says IT IS A READ ONLY FILE SYSTEM when I try and write to it.
When I issue a mount, I get:

/dev/sda6 on / type ext3 (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/sda7 on /home type ext3 (rw,acl,user_xattr)
/dev/sda1 on /windows/C type fuseblk (rw,noexec,nosuid,nodev,noatime,allow_other,default_permissions,blksize=4096)
/dev/sdb1 on /media/EXTERNAL type vfat (rw,noexec,nosuid,nodev,gid=100,umask=0002,utf8=true)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
securityfs on /sys/kernel/security type securityfs (rw)
/dev/sdc1 on /media/FreeAgent Drive type fuseblk (rw,nosuid,nodev,noatime,allow_other,default_permissions,blksize=4096

The disk in question is the /dev/sdb1 on /media/EXTERNAL

It’s already mounted rw (read-write). Is the directory it’s mounted to (/media/EXTERNAL) created as needed or is it permanent, i.e., you created it sometime? If so check if you have rw permissions set for it.

If not it might be a problem with udev rules. You may also try another usb drive/pendrive. Does it work?

I have tried several memory stick drives. They work fine. I think the problem is caused by the developers of suse 10.3 restricting vfat filesystems USB hard drives to READONLY, similar to what was the case for NTFS file systems. There is a fix listed for this case in this forum, but I couldn’t find one for vfat.

I don’t think so.

I have openSUSE-10.3 on my main PC. I have 3 external hard drives formatted as VFAT. I plug them in, I get a dialog popup, and after clicking on the box I have read/write as a regular user.

I did nothing special.

It just works.

oldcpu
I got the idea from your solution to the NTFS writing problem post from a while ago. Do you have any suggestions for my vfat disk?

‘hscudder’

I’m just reading this and thinking ‘oldcpu’ is correct. it should just work.

‘brunomcl’ Pointed out earlier that you have it mounting to /media/EXTERNAL
so the question is: Is EXTERNAL the dev/volume Name? or is it a folder you created within /media?

Have you tried to edit /etc/fstab ? It should not be necessary.

Just for interest post your /etc/fstab

hscudder, as was suggested in part by caf4926, with your external hard drive connected to your PC, post here the output of: cat /etc/fstab
df -Th
su -c ‘fdisk -l’ for the last command, enter root password when prompted.

I am running under root. the commands are listed below; cat /etc/fstab
/dev/disk/by-id/scsi-SATA_SAMSUNG_HD400LJS0SWJ1NP502744-part6 / ext3 acl,user_xattr 1 1
/dev/disk/by-id/scsi-SATA_SAMSUNG_HD400LJS0SWJ1NP502744-part7 /home ext3 acl,user_xattr 1 2
/dev/disk/by-id/scsi-SATA_SAMSUNG_HD400LJS0SWJ1NP502744-part1 /windows/C ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/scsi-SATA_SAMSUNG_HD400LJS0SWJ1NP502744-part2 /local ntfs-3g users,gid=users,umask=0002,utf8=true 0 0
/dev/disk/by-id/scsi-SATA_SAMSUNG_HD400LJS0SWJ1NP502744-part5 swap swap defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
/dev/fd0 /media/floppy auto noauto,user,sync 0 0
/dev/disk/by-id/usb-DMI_WD3200JB-00KFA0_0010100550A7D8F10-0:0-part1 /media/EXTERNAL vfat users,gid=users,umask=0002,utf8=true,rw 0 0
linux-uthn:/ # df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda6 ext3 20G 12G 7.4G 61% /
udev tmpfs 1.5G 104K 1.5G 1% /dev
/dev/sda7 ext3 191G 115G 67G 64% /home
/dev/sda1 fuseblk 114G 43G 71G 38% /windows/C
/dev/sdb1 vfat 299G 71G 228G 24% /media/EXTERNAL
/dev/sdc1 fuseblk 466G 382G 85G 82% /media/FreeAgent Drive
/dev/sdh1 vfat 299G 71G 228G 24% /media/EXTERNAL
/dev/sdi1 vfat 299G 71G 228G 24% /media/EXTERNAL
linux-uthn:/ # su -c ‘fdisk -l’

Disk /dev/sda: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x74856720

Device Boot Start End Blocks Id System
/dev/sda1 * 1 15206 122139515 7 HPFS/NTFS
/dev/sda2 15206 19383 33553408 c W95 FAT32 (LBA)
/dev/sda3 19384 47485 225729284 f W95 Ext’d (LBA)
/dev/sda4 47486 48641 9285570 7 HPFS/NTFS
/dev/sda5 19384 19645 2104483+ 82 Linux swap / Solaris
/dev/sda6 19646 22256 20972826 83 Linux
/dev/sda7 22257 47485 202651911 83 Linux

Disk /dev/sdi: 320.0 GB, 320072933376 bytes
240 heads, 63 sectors/track, 41345 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Disk identifier: 0x20b9746a

Device Boot Start End Blocks Id System
/dev/sdi1 1 41345 312568168+ c W95 FAT32 (LBA)
linux-uthn:/ #

I was trying to add blank lines to clarify the post when the reply was cut off becausr I exceeded 10 minutes. I don’t believe the lines in the first part /dev/sdh1 and /dev/sdi1 are relevant. I screwed up the copying somwhow.

A second try at copying the test and results:

linux-uthn:/ #
linux-uthn:/ #
linux-uthn:/ #
linux-uthn:/ #
linux-uthn:/ # cat /etc/fstab
/dev/disk/by-id/scsi-SATA_SAMSUNG_HD400LJS0SWJ1NP502744-part6 / ext3 acl,user_xattr 1 1
/dev/disk/by-id/scsi-SATA_SAMSUNG_HD400LJS0SWJ1NP502744-part7 /home ext3 acl,user_xattr 1 2
/dev/disk/by-id/scsi-SATA_SAMSUNG_HD400LJS0SWJ1NP502744-part1 /windows/C ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/scsi-SATA_SAMSUNG_HD400LJS0SWJ1NP502744-part2 /local ntfs-3g users,gid=users,umask=0002,utf8=true 0 0
/dev/disk/by-id/scsi-SATA_SAMSUNG_HD400LJS0SWJ1NP502744-part5 swap swap defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
/dev/fd0 /media/floppy auto noauto,user,sync 0 0
/dev/disk/by-id/usb-DMI_WD3200JB-00KFA0_0010100550A7D8F10-0:0-part1 /media/EXTERNAL vfat users,gid=users,umask=0002,utf8=true,rw 0 0
linux-uthn:/ #
linux-uthn:/ #
linux-uthn:/ #
linux-uthn:/ # df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda6 ext3 20G 12G 7.4G 61% /
udev tmpfs 1.5G 104K 1.5G 1% /dev
/dev/sda7 ext3 191G 115G 67G 64% /home
/dev/sda1 fuseblk 114G 43G 71G 38% /windows/C
/dev/sdb1 vfat 299G 71G 228G 24% /media/EXTERNAL
/dev/sdc1 fuseblk 466G 382G 85G 82% /media/FreeAgent Drive
/dev/sdh1 vfat 299G 71G 228G 24% /media/EXTERNAL
/dev/sdi1 vfat 299G 71G 228G 24% /media/EXTERNAL
linux-uthn:/ #
linux-uthn:/ #
linux-uthn:/ #
linux-uthn:/ # su -c ‘fdisk -l’

Disk /dev/sda: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x74856720

Device Boot Start End Blocks Id System
/dev/sda1 * 1 15206 122139515 7 HPFS/NTFS
/dev/sda2 15206 19383 33553408 c W95 FAT32 (LBA)
/dev/sda3 19384 47485 225729284 f W95 Ext’d (LBA)
/dev/sda4 47486 48641 9285570 7 HPFS/NTFS
/dev/sda5 19384 19645 2104483+ 82 Linux swap / Solaris
/dev/sda6 19646 22256 20972826 83 Linux
/dev/sda7 22257 47485 202651911 83 Linux

Disk /dev/sdi: 320.0 GB, 320072933376 bytes
240 heads, 63 sectors/track, 41345 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Disk identifier: 0x20b9746a

Device Boot Start End Blocks Id System
/dev/sdi1 1 41345 312568168+ c W95 FAT32 (LBA)
linux-uthn:/ #

Thanks. It looks to me that scsi-SATA_SAMSUNG_HD400LJS0SWJ1NP502744 parts 1 to 6 is your main hard drive. So, some questions. …

What is this external device? Does it work? I always ensure I have absolutely NO entries in my fstab for vfat USB devices. They simply hot plug mount automatically, and IMHO there is no need for an fstab entry (it can cause problems if not implemented precisely) , unless it is absolutely essential you have multiple USB devices that absolutely MUST be mounted on different specific locations.

According to this you have 3 different external drives mounted on the same mount point (/media/EXTERNAL). IMHO that is a really bad idea, and it will cause problems. Do you have 3 ? Did you try multiple manual mount attempts to cause this confusion ?

According to this you have only one external hard drive. Or did you remove external hard drives between your running “df -Th” and running “fdisk -l” ?

Also, I believe it is unusual for the number to start at /dev/sdi. Typically there will be a /dev/sdb, and /dev/sdc, and /dev/sdd, and /dev/sde, and /dev/sdf, and /dev/sdg, and /dev/sdh first.

Its important you maintain the same configuration when sending those two commands.

I recommend you start by removing the fstab entry I mentioned (and then reboot), but please also answer my questions.

Also note that fstab entries are usually for fixed devices / shares. Removable devices (USB sticks, CD/DVD-ROM’s, etc.) are mounted dynamically, and ONLY in /etc/mtab. There should be NO references to them in /etc/fstab in a standard OpenSUSE install. Of course you can define them explicitly in fstab, which would take precedence over the dynamic mount rules (udev ou hal, not sure which).

I am going to remove the NTFS drive, which works fine, and will reboot the system. The USB vfat drive in question is an Acomdata 300 GB drive. There is just one of them, and it was automatically mounted when it was plugged in. It works fine under Windows XP on another machine. It appears on the ‘df -Th’ output as /dev/sdb1. I have no idea where the /dev/sdh1 and /dev/sdi1 listings came from. I am not using the ‘fstab’ for this device.

It looks to me that your external NTFS drive was not plugged in when your ran “fdisk -l”.

But that entry in your /etc/fstab is messing up things. I still recommend you remove that entry, and then reboot.

I rebooted, with no USB disks connected, and got this result:

linux-uthn:/ # cat /etc/fstab
/dev/disk/by-id/scsi-SATA_SAMSUNG_HD400LJS0SWJ1NP502744-part6 / ext3 acl,user_xattr 1 1
/dev/disk/by-id/scsi-SATA_SAMSUNG_HD400LJS0SWJ1NP502744-part7 /home ext3 acl,user_xattr 1 2
/dev/disk/by-id/scsi-SATA_SAMSUNG_HD400LJS0SWJ1NP502744-part1 /windows/C ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_US.UTF-8 0 0
/dev/disk/by-id/scsi-SATA_SAMSUNG_HD400LJS0SWJ1NP502744-part2 /local ntfs-3g users,gid=users,umask=0002,utf8=true 0 0
/dev/disk/by-id/scsi-SATA_SAMSUNG_HD400LJS0SWJ1NP502744-part5 swap swap defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
/dev/fd0 /media/floppy auto noauto,user,sync 0 0
linux-uthn:/ #

I then plugged in the acomdata 300GB vfat formated USB hard disk.
and got for the df command:

linux-uthn:/ # df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda6 ext3 20G 12G 6.9G 64% /
udev tmpfs 1.5G 96K 1.5G 1% /dev
/dev/sda7 ext3 191G 145G 37G 80% /home
/dev/sda1 fuseblk 114G 43G 71G 38% /windows/C
/dev/sdf1 vfat 299G 71G 228G 24% /media/EXTERNAL-1
linux-uthn:/ #

for the su command:
linux-uthn:/ # su -c ‘fdisk -l’

Disk /dev/sda: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x74856720

Device Boot Start End Blocks Id System
/dev/sda1 * 1 15206 122139515 7 HPFS/NTFS
/dev/sda2 15206 19383 33553408 c W95 FAT32 (LBA)
/dev/sda3 19384 47485 225729284 f W95 Ext’d (LBA)
/dev/sda4 47486 48641 9285570 7 HPFS/NTFS
/dev/sda5 19384 19645 2104483+ 82 Linux swap / Solaris
/dev/sda6 19646 22256 20972826 83 Linux
/dev/sda7 22257 47485 202651911 83 Linux

Disk /dev/sdf: 320.0 GB, 320072933376 bytes
240 heads, 63 sectors/track, 41345 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Disk identifier: 0x20b9746a

Device Boot Start End Blocks Id System
/dev/sdf1 1 41345 312568168+ c W95 FAT32 (LBA)
linux-uthn:/ #

I then issued a mount command resulting in:

linux-uthn:/ # mount
/dev/sda6 on / type ext3 (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/sda7 on /home type ext3 (rw,acl,user_xattr)
/dev/sda1 on /windows/C type fuseblk (rw,noexec,nosuid,nodev,noatime,allow_other,default_permissions,blksize=4096)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
securityfs on /sys/kernel/security type securityfs (rw)
/dev/sdf1 on /media/EXTERNAL-1 type vfat (rw,nosuid,nodev,noatime,flush,uid=0,utf8,shortname=lower)
linux-uthn:/ #

For some reason, the USB disk has address /dev/sdf1
I still cannot write to it,

I can’t explain the /dev/sdf1. In your efforts to sort this, did you manually create directories in /dev ? (I do not think you should) That “might” explain this as one should not normally create directories there.

Also, with the drive NOT plugged in, please ensure there is NO directory called /media/EXTERNAL, nor /media/EXTERNAL-1 … If there is, with your external drive NOT plugged in, remove that directory, and try plugging in your external drive again.

Also, did you try a manual mount?

ie create a directory /windows/F (note I deliberately did not create the directory under /media).

Then plug in your drive. If it mounts under /dev/sdf1, unmount the drive with:umount /dev/sdf1

Now remount the drive manually to /windows/F with:mount -t vfat -o rw,users,uid=your-user-name /dev/sdf1 /windows/F

substitute your real user name for “your-user-name” … Its possible before you mount with that command, you may need to change the ownership on /windows/F to “your-user-name” as being the owner, and also change the group to group=users. And then the permissions to owner, group, and others to modify content.

I the directories exist and you can’t delete them, make sure there are no hidden (dot) files in it. In 10.2 (at least) the mounting system creates a hidden lock file when a drive is automounted, and these files are not removed properly if the system lock up or reboot abnormally, for example. This happened to me with a windows cd-rom and a mp3-player, so the original mount directories could not be removed and the system created directories with the same original names plus ‘-1’ appended, the same as your listing show (EXTERNAL-1).