how would i write fstab to mount a drive formatted to ntfs

drive is /dev/hdb1 and it has some file and folders stored on it i want to view.

Currently using Linux 10

Cheers Tony

fist switch to an accout that has write access to /etc/fstab

make a point dir suchs as: mkdir /mnt/ntfs_drive

open the file in your favourite editor

add this line:

/dev/hdb1 /mnt/ntfs_drive ntfs defaults 0 0

[I assume you mean SUSE 10.0, and the kern is on up to 2.6.x :wink:

Thanks for your but it didnt work.

The drive shows up as a unmounted drive in Suse 10 my computer window.
I wanted to read and write to this drive, if i try to mount it it says that mount could not find drive in fstab or mtab.

it dosnt have any label except drive F under windoze.


umm di use the mount command afterwards? : mount -a

will tell it to mount all drives mentioed in the fstab

the only “lable” you need for is hdb1, and a directory in which to mount it’s root.

defualts should give your r/w access

Its mounted but cant view its contents,

is there another way of formatting the drive and mounting it so linux can use it and windows can see it anyway?

you mean other the fat16 and fat32 ? [if i’m understanding you question correctl}

and I would be currious would the inablity to to view it’s content extend to root as well?

let try for fat32 for ease

As this is a new installation andonly one day old and i havent done anything else with it, ill will reinstall it and format the drive and set it up through the partitioning manager during setup.

Thanks for your help but this will be easier for mr.

Cheers Tony

This should be the line you need for /etc/fstab

/dev/hdb1 /mnt/your_ntfs_dir ntfs ro,nosuid,nogid,exec 0 0

this enables only read access to the root user only though. To enable your normal account to access it read only, edit /etc/sudoers and remove the # from the line %wheel ALL=(ALL) ALL and save it. Now add your normal account to the group wheel through user management.

now all you need to do is add the sudo command before any other command and it will ask for the root password, type this in and it executes the command with root priv, and this priv has a 5 min time limit until it expires.

example with the edits:
sudo mount /mnt/ntfs_dir <enter>
password: <enter root pass and enter>
sudo ls /mnt/ntfs_dir <enter>
won’t ask for password again. if the root password doesn’t work then type your user account password instead, but I believe Suse10 only uses the root password

otherwise to be able to read and write to the drive in both windows and linux fat32 is the way to go.
your /etc/fstab line should look like this then.
/dev/hdb1 /mnt/fat32_dir vfat rw,user,exec 0 0


IMFire3605, any particuall reason defualts did not work with ntfs, or is the defualts for SUSE difernet from redhat/fendora?

With windows partitions I prefer to be very explicit in the way it handles the partition. Linux in general disables exec on foreign partitions in my experience, and generally only enables read access for even fat32 I have found. I suppose defaults could work for fat32, but how I used to do it.

Write access in Linux to NTFS is flakey in the extreme, I really wouldn’t recommend it.
FAT or FAT32 are fine as far as I know so this looks like the route for you.