LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
LinkBack Search this Thread
Old 02-17-2010, 04:35 PM   #1
zermon
LQ Newbie
 
Registered: Feb 2010
Posts: 2

Rep: Reputation: 0
Mounting external usb hard drive NTFS in write mode


Hi!

I have a problem in auto mounting external usb hard drive in
write mode. I'm using Debian Etch.
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda2 / ext3 defaults,errors=remount-ro 0 1
/dev/hda6 /home ext3 defaults 0 2
/dev/hda5 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0

zermon@dem:/etc$ mount
/dev/hda2 on / type ext3 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/hda6 on /home type ext3 (rw)
/dev/sda1 on /media/Expansion Drive type ntfs (rw,noexec,nosuid,nodev,uid=1000,gid=1000,umask=077,iocharset=utf8)


dem:/media/Expansion Drive# fdisk -l

Disk /dev/hda: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 12043 96735366 7 HPFS/NTFS
/dev/hda2 12044 12894 6835657+ 83 Linux
/dev/hda3 12895 24792 95570685 5 Extended
/dev/hda5 12895 13082 1510078+ 82 Linux swap / Solaris
/dev/hda6 13083 24792 94060543+ 83 Linux
dem:/media/Expansion Drive#


Writing to etrenal USB hard drive doesn't work:


dem:/media/Expansion Drive# ls > tmp.txt
bash: tmp.txt: Read-only file system
dem:/media/Expansion Drive#


What's the problem?
 
Old 02-17-2010, 06:37 PM   #2
raju.mopidevi
Senior Member
 
Registered: Jan 2009
Location: vijayawada, India
Distribution: openSUSE 11.2, Ubuntu 9.0.4
Posts: 1,155
Blog Entries: 12

Rep: Reputation: 92
root account has write permissions. you can open a file manager with root permissions. and then try to write something to the harddisk.
 
Old 02-17-2010, 06:49 PM   #3
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Quote:
/dev/sda1 on /media/Expansion Drive type ntfs (rw,noexec,nosuid,nodev,uid=1000,gid=1000,umask=077,iocharset=utf8)
You might try installing the ntfs-3g package. However, the mount command does indicate that the regular user does have read/write access. Was this after manually mounting or automounting or aren't you the user with a UID of 1000?.

Look in /var/log/messages. If there is a problem with the filesystem, it may be mounted read-only instead, however even this isn't indicated by what you posted.

One thing to consider is relabeling the drive so it doesn't contain a space.

Could you post "ls -ld /media/*" to show the permissions of the mounted filesystem?

Last edited by jschiwal; 02-17-2010 at 06:51 PM.
 
Old 02-18-2010, 02:08 PM   #4
zermon
LQ Newbie
 
Registered: Feb 2010
Posts: 2

Original Poster
Rep: Reputation: 0
I did tried to write under root acount but I didn't work.
My UID is 1000. Mount command was keyed after plugging the Eternal hard drive. I installed ntfs-3g but It didn't work either.

When plugging external hard drive, this is written to /var/log/messages:


Quote:
Feb 18 21:20:24 dem kernel: usb 4-6: new high speed USB device using ehci_hcd and address 2
Feb 18 21:20:24 dem kernel: usb 4-6: configuration #1 chosen from 1 choice
Feb 18 21:20:24 dem kernel: SCSI subsystem initialized
Feb 18 21:20:24 dem kernel: Initializing USB Mass Storage driver...
Feb 18 21:20:24 dem kernel: scsi0 : SCSI emulation for USB Mass Storage devices
Feb 18 21:20:24 dem kernel: usbcore: registered new driver usb-storage
Feb 18 21:20:24 dem kernel: USB Mass Storage support registered.
Feb 18 21:20:29 dem kernel: Vendor: Seagate Model: Portable Rev: 0130
Feb 18 21:20:29 dem kernel: Type: Direct-Access ANSI SCSI revision: 04
Feb 18 21:20:29 dem kernel: SCSI device sda: 488397168 512-byte hdwr sectors (250059 MB)
Feb 18 21:20:29 dem kernel: sda: Write Protect is off
Feb 18 21:20:29 dem kernel: SCSI device sda: 488397168 512-byte hdwr sectors (250059 MB)
Feb 18 21:20:29 dem kernel: sda: Write Protect is off
Feb 18 21:20:29 dem kernel: sda: sda1
Feb 18 21:20:29 dem kernel: sd 0:0:0:0: Attached scsi disk sda
Feb 18 21:20:29 dem kernel: UDF-fs: No partition found (1)
Feb 18 21:20:29 dem kernel: UDF-fs: No partition found (1)
Feb 18 21:20:30 dem kernel: Unable to identify CD-ROM format.
Feb 18 21:20:30 dem kernel: Unable to identify CD-ROM format.
Feb 18 21:20:30 dem kernel: VFS: Can't find a valid FAT filesystem on dev sda1.
Feb 18 21:20:30 dem kernel: VFS: Can't find a valid FAT filesystem on dev sda1.
Feb 18 21:20:30 dem kernel: NTFS driver 2.1.27 [Flags: R/W MODULE].
Feb 18 21:20:30 dem kernel: NTFS volume version 3.1.

Here are the permissions of the mounted file systems:

Quote:
dem:/media# ls -ld /media/*
lrwxrwxrwx 1 root root 6 2008-09-26 15:13 /media/cdrom -> cdrom0
drwxr-xr-x 2 root root 4096 2008-09-26 15:13 /media/cdrom0
drwxr-xr-x 1 zermon zermon 4096 2010-02-17 23:41 /media/Expansion Drive
lrwxrwxrwx 1 root root 7 2008-09-26 15:13 /media/floppy -> floppy0
drwxr-xr-x 2 root root 4096 2008-09-26 15:13 /media/floppy0
drwxr-xr-x 2 root root 4096 2008-09-28 23:58 /media/levy
drwxr-xr-x 2 root root 4096 2008-10-01 00:49 /media/windows
dem:/media#

At first it was
Quote:
drwx------ 1 zermon zermon 4096 2010-02-17 23:41 /media/Expansion Drive
But chmod a+rx Expansion Drive didn't help.


I tried to umount and remount the hard drive but it didn't help either:

Quote:
dem:/media# mkdir /media/usbhdrive
dem:/media# umount Expansion\ Drive/
dem:/media# ls -la
total 32
drwxr-xr-x 8 root root 4096 2010-02-18 21:41 .
drwxr-xr-x 22 root root 4096 2008-09-26 16:30 ..
lrwxrwxrwx 1 root root 6 2008-09-26 15:13 cdrom -> cdrom0
drwxr-xr-x 2 root root 4096 2008-09-26 15:13 cdrom0
drwxrwxrwx 2 root root 4096 2010-02-17 00:34 Expansion Drive
lrwxrwxrwx 1 root root 7 2008-09-26 15:13 floppy -> floppy0
drwxr-xr-x 2 root root 4096 2008-09-26 15:13 floppy0
-r-s--s--- 1 root root 0 2008-09-26 13:45 .hal-mtab-lock
drwxr-xr-x 2 root root 4096 2008-09-28 23:58 levy
drwxr-xr-x 2 root root 4096 2010-02-18 21:41 usbhdrive
drwxr-xr-x 2 root root 4096 2008-10-01 00:49 windows
dem:/media# ntfs-3g /dev/sda1 /media/usbhdrive/
$MFTMirr does not match $MFT (record 3).
Failed to mount '/dev/sda1': Input/output error
NTFS is either inconsistent, or you have hardware faults, or you have a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows TWICE. The usage of the /f parameter is very
important! If you have SoftRAID/FakeRAID then first you must activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for the details.
dem:/media#
This was written to /var/log/messages:

Quote:
Feb 18 21:41:30 dem kernel: sd 0:0:0:0: Device not ready: <6>: Current: sense key: Not Ready
Feb 18 21:41:30 dem kernel: Additional sense: Logical unit not ready, initializing command required
Feb 18 21:41:30 dem kernel: end_request: I/O error, dev sda, sector 101
Feb 18 21:41:30 dem kernel: lost page write due to I/O error on sda1
Feb 18 21:41:30 dem kernel: lost page write due to I/O error on sda1
Feb 18 21:44:32 dem kernel: fuse init (API version 7.7)
 
Old 02-20-2010, 12:26 PM   #5
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
It sounds like there is a problem with the drive or the filesystem.

Did you do as suggested in the message?
Quote:
NTFS is either inconsistent, or you have hardware faults, or you have a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows TWICE. The usage of the /f parameter is very
important!

Last edited by jschiwal; 02-20-2010 at 12:46 PM. Reason: fixed typo
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto-mounting external NTFS USB hard drive. Cotobear Slackware 5 02-07-2010 02:46 AM
Cannot Write to HFS Plus USB External Hard Drive rjreding Linux - Newbie 4 04-17-2009 01:45 PM
Mounting NTFS external hard drive Th3_J3st3R Slackware 3 03-28-2008 03:46 AM
Problems Mounting USB External Drive NTFS!!! dec009 Linux - Hardware 6 08-08-2007 01:17 AM
Write to external USB hard drive Rob Roye Linux - Software 6 07-06-2004 04:15 PM


All times are GMT -5. The time now is 08:51 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration