LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   ntfs write in opensuse (https://www.linuxquestions.org/questions/linux-hardware-18/ntfs-write-in-opensuse-613549/)

Funky91 01-14-2008 03:25 PM

ntfs write in opensuse
 
hi, i am having trouble with an ntfs hard drive. It shows in my computer and will let me read it but i cannot write onto it. the ntfs-g3 thing is installed as default- i checked that it was installed and it was.

The partition file system shows as ntfs rather than ntfs-g3.

I am rather new to linux

please help...

colucix 01-14-2008 04:20 PM

Maybe this is a typo, but it's ntfs-3g (not g3). Anyway, how the disk has been mounted? The ntfs-3g read/write support must be specified when mounting: three way to do:

1. mount the NTFS filesystem, specifying type as ntfs-3g
Code:

mount -t ntfs-3g /dev/something /path/to/mount/point
2. using the ntfs-3g utility
Code:

ntfs-3g /dev/something /path/to/mount/point
3. automatically mount at boot, adding an entry in /etc/fstab; for example
Code:

/dev/something /path/to/mount/point  ntfs-3g  user,gid=user,umask=0002  0 0

Funky91 01-15-2008 10:58 AM

I tried that and it stopped the device from mounting at all. The drive shows in my computer but it does not show the amount of space on the drive like it used to.

Please help!!!

colucix 01-15-2008 12:09 PM

What have you tried exactly? Also - please - post the output of
Code:

fdisk -l
issued as root.

Funky91 01-15-2008 02:29 PM

I rebooted and it now mounts again but still as read only

colucix 01-15-2008 03:10 PM

We cannot be helpful if you don't provide some more specific information. What is the exact mount command you tried OR the entry in /etc/fstab? Can you post the output of the following commands?
Code:

cat /etc/fstab
mount          # without any argument
fdisk -l      # run this as root

If you have ntfs-3g and libfuse2 correctly installed, it should be an issue with the mount options.

Funky91 01-16-2008 10:20 AM

1. cat /etc/fstab

/dev/disk/by-id/scsi-SATA_FUJITSU_MPC3102_01001937-part2 / ext3 acl,user_xattr 1 1
/dev/disk/by-id/scsi-SATA_FUJITSU_MPC3102_01001937-part3 /home ext3 acl,user_xattr 1 2
/dev/disk/by-id/scsi-SATA_Maxtor_6Y120L0_Y358A41E-part1 /windows/C ntfs-3g users,gid=users,fmask=133,dmask=022,locale=POSIX 0 0
/dev/disk/by-id/scsi-SATA_Maxtor_6Y120L0_Y358A41E-part5 /windows/D ntfs-3g users,gid=users,fmask=133,dmask=022,locale=POSIX 0 0
/dev/disk/by-id/scsi-SATA_FUJITSU_MPC3102_01001937-part1 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
devpts /dev/pts devpts mode=0620,gid=5 0 0


2. mount

/dev/sdb2 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/sdb3 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/sda5 on /windows/D type fuseblk (rw,noexec,nosuid,nodev,noatime,allow_other,default_permissions,blksize=2048)
securityfs on /sys/kernel/security type securityfs (rw)


3. fdisk -l


Disk /dev/sda: 122.9 GB, 122942324736 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x4b024b01

Device Boot Start End Blocks Id System
/dev/sda1 * 1 14690 117997393+ 7 HPFS/NTFS
/dev/sda2 14691 14946 2056320 f W95 Ext'd (LBA)
/dev/sda5 14691 14946 2056288+ 7 HPFS/NTFS

Disk /dev/sdb: 10.2 GB, 10240274432 bytes
255 heads, 63 sectors/track, 1244 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x827ff18c

Device Boot Start End Blocks Id System
/dev/sdb1 1 145 1164681 82 Linux swap / Solaris
/dev/sdb2 146 798 5245222+ 83 Linux
/dev/sdb3 799 1244 3582495 83 Linux

colucix 01-17-2008 05:14 AM

Hmmm... nothing strange here. What happens if immediately after boot you unmount one of the NTFS partition and remount by ntfs-3g command?. E.g. (as root)
Code:

# umount /dev/sda5
# ntfs-3g /dev/sda5 /mnt

this will mount your windows D partition under /mnt with the default options. Then try to write a file and feel free to post the error message (if any). It works for me in OpenSuSE 10.3 and if I issue the mount command (without ops) I get:
Code:

/dev/sda2 on /mnt type fuseblk (rw,nosuid,nodev,noatime,allow_other,blksize=4096)

Funky91 01-17-2008 02:51 PM

Thanks, that mounted the device with write permissions, however for some reason when i mount the 112 gig partition in my computer both the 112 gig and 2 gig partitions open up the 112 gig partition when clicked. This is not a massive issue as I do not need to access the windows d drive, only the c drive.

Also how do I make it mount windows c at startup?

Funky91 01-19-2008 10:29 AM

if you could tell me how to make opensuse mount windows c at startup that would be great thanks.

colucix 01-19-2008 10:55 AM

Hi, Funky. I missed your previous post. I don't know about the 112G and the 2G partitions issue: since it is not possible to mount the same partition on different mount points simultaneously, maybe it's a problem on how konqueror creates the links (icons).

Anyway, to mount windows partitions at startup with read/write permissions you have to put the correct entries in /etc/fstab. They're already there... that is the two NTFS partition should already be mounted at startup. At this point, simply edit /etc/fstab and modify the relevant entries (the 3rd and 4th lines in the file you've posted) as these:
Code:

/dev/disk/by-id/scsi-SATA_Maxtor_6Y120L0_Y358A41E-part1 /windows/C    ntfs-3g    defaults    0 0
/dev/disk/by-id/scsi-SATA_Maxtor_6Y120L0_Y358A41E-part5 /windows/D    ntfs-3g    defaults    0 0

I have simply changed the options with "defaults". Then you will check if they suit your needs. Note that you don't need to reboot for testing:
Code:

umount /dev/sda1  # be sure the NTFS partition is not mounted
umount /dev/sda5  # idem
#edit /etc/fstab  # apply modifications
mount -a          # mount all the not mounted partitions in /etc/fstab

Bye.

Funky91 01-19-2008 11:36 AM

sorry i am very new to linux. what command(s) do i need to use to edit /etc/fstab?

colucix 01-19-2008 12:37 PM

Uh... just simply open it with a text editor. In OpenSUSE you can choose kate (for example). Usually from the KDE menu it is under Applications --> Utilities --> Advanced text editor. But since you have to edit /etc/fstab as root (and I assume you're logged in your system as a normal user) the most convenient way is to open a terminal and run
Code:

kdesu kate /etc/fstab
in this way you can run desktop applications gaining root privileges: (a) you will be prompted for root's password, (b) kate will ask you to choose a session, (c) click Open Session and (d) enlarge the window as much as you can. Now you can start to do modification to the text file /etc/fstab, then remember to save and exit.

NOTE: it is a good habit to do a backup copy of system files before editing them. For example you can simply do, from a terminal (as root)
Code:

cp -p /etc/fstab /etc/fstab.bck
if something goes wrong you can always restore the previous original copy.

Funky91 01-19-2008 01:34 PM

thanks, that worked fine


All times are GMT -5. The time now is 01:27 PM.