PDA

View Full Version : Fedora 9: Cannot access NTFS drives



sawson
19th May 2008, 04:44 PM
I'm new to Linux and just installed Fedora 9, so I'm lost. In my computer, I do see my Windows NTFS drives but when I try to open them nothing comes up. I want to access my files w/ read/write capability on Windows NTFS drives from Fedora 9 Linux.

Help? Thanks.

hammel
19th May 2008, 04:49 PM
You have to enable it in System -> Preferences -> System -> Authorizations -> storage.

CraigWatson
19th May 2008, 05:49 PM
The way I have mine set up is though fstab mounting. This is just a quick run-through, all commands within "code" blocks should be run in a terminal window - any questions, just ask :)

First, enter root mode so you can run all commands, and then list all disks and partitions attached to the machine:

su -
[Your root password]
fdisk -l

Find the device ID of your NTFS partition - it will look something like "/dev/sda2", you can tell which is your Windows partition because it'll have "HPFS/NTFS" on the right-hand side.

Once you have that, make a folder for the drive to be mounted in (Linux doesn't have the concept of drive letters):

mkdir /mnt/windows

Then open /etc/fstab and add a line to mount the partition when you boot - the "umask=000" bit makes sure it's accessible to all users:

gedit /etc/fstab
[Make a new line and add the following:]
/dev/sda2 /mnt/windows ntfs umask=000,defaults 0 0

Give the machine a reboot and you should be done :)

sawson
20th May 2008, 02:47 AM
fstab worked like a charm. Thanks!

sidebrnz
20th May 2008, 05:18 AM
You don't need to reboot after editing fstab.

mount -a

will remount everything in fstab right away. (Nice and convenient if/when you typo someting.) BTW, if that new line's the last one in the file, be sure to hit return at the end. You'll get an error from mount if you don't.

robtpt
24th June 2008, 11:41 PM
Thank you all, this was a most helpful thread!

Bandworthy
7th July 2008, 11:13 AM
I split my nvidia raid into 2 normal drives so I could use them in linux but they are not mounted,
I'm very new but when using the fdisk command I get this

bash: fdisk: command not found

I would really like to get these 2 drives mounted... oh they are NTFS, I need them to stay that way.

robtpt
7th July 2008, 11:24 AM
I'm new to this too, but I just checked at the terminal myself and I had to use the command '/sbin/fdisk' to get at the fdisk utility. I don't know why, but I have to do that for a lot of commands. Sadly, I can't give you much help on what to do with fdisk.

scotty38
7th July 2008, 01:26 PM
@ robtpt and bandworthy

Try using "su -" rather than "su"

The - not only gives you root's power but also its environment which means you'll have the path to some of those commands that don't appear to work.

Bandworthy
8th July 2008, 01:21 AM
ah yes su - works nicely! ty I get

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xc2dfa6c4

Device Boot Start End Blocks Id System
/dev/sda1 * 1 25 200781 83 Linux
/dev/sda2 26 14593 117017460 8e Linux LVM

**This should be my fedora drive


Disk /dev/dm-0: 117.7 GB, 117708947456 bytes
255 heads, 63 sectors/track, 14310 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 2080 MB, 2080374784 bytes
255 heads, 63 sectors/track, 252 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x30307800

Disk /dev/dm-1 doesn't contain a valid partition table
** Are these the 2 missing drives?, is this because when I installed
Fedora they were raid?.. they are perfectly fine (Split as single drives now) looking at them
in XP, why doesnt linux detect the hardware change?.

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x5b6ac646
Device Boot Start End Blocks Id System
/dev/sdb1 1 30401 244196001 c W95 FAT32 (LBA)

**This is actually a usb hard drive and yet it mounted this automatically??

Disk /dev/sdc: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x2396c1e3

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 20188 162160078+ 7 HPFS/NTFS
/dev/sdc2 20189 24321 33198322+ f W95 Ext'd (LBA)
/dev/sdc5 20189 24145 31784571 83 Linux
/dev/sdc6 24146 24321 1413688+ 82 Linux swap / Solaris

**My old xp install with a Ubuntu install that simply wont boot.. soon to be formated

I'm getting the impression fedora thinks the drives are still a raid as they were when
I first installed, should I try mounting anyway or this a bad idea?. IF so how do I get
this to be seen as two new drives instead?.

robtpt
8th July 2008, 06:08 AM
Thanks Scotty. Linux is a bit of an adventure, but it's great to have people around that can help.

scotty38
8th July 2008, 09:36 AM
ah yes su - works nicely! ty I get

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xc2dfa6c4

Device Boot Start End Blocks Id System
/dev/sda1 * 1 25 200781 83 Linux
/dev/sda2 26 14593 117017460 8e Linux LVM

**This should be my fedora drive


Disk /dev/dm-0: 117.7 GB, 117708947456 bytes
255 heads, 63 sectors/track, 14310 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 2080 MB, 2080374784 bytes
255 heads, 63 sectors/track, 252 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x30307800

Disk /dev/dm-1 doesn't contain a valid partition table
** Are these the 2 missing drives?, is this because when I installed
Fedora they were raid?.. they are perfectly fine (Split as single drives now) looking at them
in XP, why doesnt linux detect the hardware change?.

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x5b6ac646
Device Boot Start End Blocks Id System
/dev/sdb1 1 30401 244196001 c W95 FAT32 (LBA)

**This is actually a usb hard drive and yet it mounted this automatically??

Disk /dev/sdc: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x2396c1e3

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 20188 162160078+ 7 HPFS/NTFS
/dev/sdc2 20189 24321 33198322+ f W95 Ext'd (LBA)
/dev/sdc5 20189 24145 31784571 83 Linux
/dev/sdc6 24146 24321 1413688+ 82 Linux swap / Solaris

**My old xp install with a Ubuntu install that simply wont boot.. soon to be formated

I'm getting the impression fedora thinks the drives are still a raid as they were when
I first installed, should I try mounting anyway or this a bad idea?. IF so how do I get
this to be seen as two new drives instead?.


Probably completely lost in translation but which of these drives are you trying to mount and can't?

I'm assuming:
/dev/sda is your Fedora9 which is ok
/dev/sdb is your usb drive which is ok
/dev/sdc is the one you're having problems with seeing in F9 where sdc1 is XP and sdc5 is Ubuntu in a windows extended partition?

I've never set my machine up like that but I'm not sure that having your Linux partition in a Windows extended partition will work too well (hence your problems) but I'll let someone who does have experience of that give you a definitive answer.

sidebrnz
8th July 2008, 05:46 PM
AFAIK, an extended partition is an extended partition. It doesn't matter if it was set up by Windows, Linux or BeOS. What matters is the file system on the logical partitions inside it.

Bandworthy
10th July 2008, 08:05 AM
Probably completely lost in translation but which of these drives are you trying to mount and can't?

I'm assuming:
/dev/sda is your Fedora9 which is ok
/dev/sdb is your usb drive which is ok
/dev/sdc is the one you're having problems with seeing in F9 where sdc1 is XP and sdc5 is Ubuntu in a windows extended partition?

I've never set my machine up like that but I'm not sure that having your Linux partition in a Windows extended partition will work too well (hence your problems) but I'll let someone who does have experience of that give you a definitive answer.


Actually I've found the problem .. actually it answers alot of them, why didnt they auto mount, why wont ubuntu ever boot. Why did fedora sit for 5 min at start dev.. I'll go over it for the benefit of anyone else who reads this with a similar error,

Disk /dev/dm-0: 117.7 GB, 117708947456 bytes
255 heads, 63 sectors/track, 14310 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 2080 MB, 2080374784 bytes
255 heads, 63 sectors/track, 252 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x30307800

Disk /dev/dm-1 doesn't contain a valid partition table

these were the two drives, I dont know why it thinks the dm-1 is a 2gig when its 120. They are old ide drives I needed to work on sata so they both had these sata ide converter things works fine in windows which is why I didnt click onto it right away. But it seems linux has a problem with using these ide to sata plugs.

So prob best to not have these plugs!!

Just bought a 750gig and ripped both out, guess what, auto mounted, no pause at fedora loading, and I havent tried it but I'm betting ubuntu will boot now. and I get alot more space in the end anyway!. Thank you all for trying to help me I still come out with a few new commands learnt either way :)

scotty38
15th October 2008, 08:37 PM
Here's my line from fstab that mounts the NTFS partition:

/dev/sda1 /mnt/windows ntfs defaults 0 0

Not sure you need those extra backslashes, and just spotted you perhaps need umask....

kingcoras
15th October 2008, 08:54 PM
rakeshchhikara:

It's an easy fix you just have too many characters in the line


/dev/sda5 /mnt/windows /ntfs /unmask=000, defaults 0 0

is your line


/dev/sda5 /mnt/windows ntfs unmask=000,defaults 0 0


in this line I removed the slashes in front of ntfs and defaults as linux thought they were pathnames and took out the space in front of defaults, as that makes Linux think it is moving to the next field.

go ahead and try that I hope it works for you!

scotty38
15th October 2008, 08:56 PM
rakeshchhikara:

It's an easy fix you just have too many characters in the line


Don't forget the "n"

sidebrnz
15th October 2008, 09:04 PM
I guarantee that mount will always complain about that line because it's not properly formed. What you want is this:

/dev/sda5 /mnt/windows ntfs-3g auto,umask=0000 0 0

and, if it's the last line in the file, be sure to hit Enter at the end because mount expects every line to be properly terminated. Note that I'm specifying ntfs-3g instead of just ntfs because that's the driver that allows read/write access and that I'm not using default because I want to avoid conflicts with the specified umask.

rakwaraz
7th May 2009, 04:32 AM
I guarantee that mount will always complain about that line because it's not properly formed. What you want is this:

/dev/sda5 /mnt/windows ntfs-3g auto,umask=0000 0 0

and, if it's the last line in the file, be sure to hit Enter at the end because mount expects every line to be properly terminated. Note that I'm specifying ntfs-3g instead of just ntfs because that's the driver that allows read/write access and that I'm not using default because I want to avoid conflicts with the specified umask.

i got message....


[root@XFactor ~]# /dev/sda5 /mnt/windows ntfs-3g auto,umask=0000 0 0
-bash: /dev/sda5: Permission denied


can anyone help to disable .."permission denied"

thanks

sidebrnz
7th May 2009, 04:37 AM
You left out one, very important thing: if you're doing that from the command line, you have to use the mount command, and the syntax is different. Add that line to /etc/fstab and save your work. Then, still as root, you can type:

mount /dev/sda5

and it will work if you've done everything right.

rakwaraz
7th May 2009, 04:47 AM
^^ sidebrnz


[root@XFactor ~]# fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0009dbf8

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20482843+ 7 HPFS/NTFS
/dev/sda2 2551 5931 27157882+ f W95 Ext'd (LBA)
/dev/sda3 5932 7755 14651280 83 Linux
/dev/sda4 7756 9700 15623212+ 83 Linux
/dev/sda5 2551 5737 25599546 7 HPFS/NTFS
/dev/sda6 5738 5931 1558273+ 82 Linux swap / Solaris

[root@XFactor ~]# /etc/fstab
-bash: /etc/fstab: Permission denied


What should i do more.......

sidebrnz
7th May 2009, 05:19 AM
You don't execute text files, you edit them:

nano /etc/fstab

is what you want.

rakwaraz
7th May 2009, 05:27 AM
UUID=2ede4c33-10a9-47d6-b342-b2d9022f078d / ext2 defau$
UUID=f76d01a6-0cf7-408e-879a-71dd6139e98b /usr/local ext3 defau$
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
UUID=6eeabc60-7276-4aa8-81cf-0e0921b335d4 swap swap defau$


i cant see ntfs...............

sidebrnz
7th May 2009, 07:33 AM
You don't see the lines because you haven't followed my instructions and added them.