PDA

View Full Version : Mounting NTFS in Fedora



svigneshkumars
5th April 2008, 02:23 PM
Can anyone help me in Mounting NTFS Drives of XP in Fedora Linux ???

Jongi
5th April 2008, 02:51 PM
you've done no searching at all have you.

1. yum install ntfs-3g
2. Add a line similar to the one below to your /etc/fstab



/dev/sda1 /mnt/XP ntfs-3g defaults,users 0 0

You will have to find out on what device your XP partition is on (/boot/grub/menu.lst will point you in the right direction). You will also need to make sure the directory you try to mount it on exists.

EDIT: A word advice if you want to learn linux. Use the internet. I will assure it is highly unlikely that your problem is unique. It might be, but highly unlikely. And people are more willing to help those that they think have actually tried to solve their problem.

JohnVV
5th April 2008, 04:46 PM
fedora 8 auto mounted my xp hard drive when i replaced Fedora 7 with 8 .
there was a link to it already on my desktop when i did the FIRST boot
it's on the install dvd and i think is installed by default

leenuxuser
5th April 2008, 06:32 PM
Follow the steps

step 1

yum install ntfs-3g

step 2

fdisk -l
Output of the second step would be something like this. Of course the output for you would be different

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

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2040 16386268+ 7 HPFS/NTFS
/dev/sda2 2041 9728 61753860 f W95 Ext'd (LBA)
/dev/sda5 2041 4590 20482843+ 7 HPFS/NTFS
/dev/sda6 4591 4845 2048256 7 HPFS/NTFS
/dev/sda7 4846 6412 12586896 7 HPFS/NTFS
/dev/sda8 6413 6425 104391 83 Linux
/dev/sda9 6426 9728 26531316 8e Linux LVM


From the above result, I have four NTFS partition and they are
1 /dev/sda1
2 /dev/sda5
3 /dev/sda6
4 /dev/sda7

Since I have four partitions I would need four folders for each partitions and for that I would run
step 3

mkdir /mnt/c /mnt/d /mnt/e /mnt/f

The above code would create four folders, namely c, d, e and f in /mnt folder for my four drives. If you have five ntfs drives then you need to add /mnt/g to the above code and in case you have only three ntfs drives then you need remove /mnt/f from the above code

Now that I have crreated the folders for each of my drive I can mount the ntfs drives into them. I have two ways to mount ntfs drive, If I want my ntfs drives get mounted every time I boot my fedora then I should follow the step 4 and the step 5 and If I do not want to mount ntfs drives every time I boot my fedora then I should follow the step 6

step 4

gedit /etc/fstab

The above step would open the file with the following contents. Of course the content in your case would be different unless you also have the same configuration as I.


[/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
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
/dev/VolGroup00/LogVol01 swap swap defaults 0 0


I will have to add four lines to the above output before saving the file. Here is what I would add at the above output.
step 5

/dev/sda1 /mnt/c ntfs-3g defaults,users 0 0
/dev/sda5 /mnt/d ntfs-3g defaults,users 0 0
/dev/sda6 /mnt/e ntfs-3g defaults,users 0 0
/dev/sda7 /mnt/f ntfs-3g defaults,users 0 0

Obviously, number of lines you are going to add depends on the number of ntfs drives you have.


Use step 6 only if you are not using step 4 and step 5, that is you want to mount ntfs drives temporarily.
step 6

mount /dev/sda1 /mnt/c -t ntfs -r
mount /dev/sda5 /mnt/d -t ntfs -r
mount /dev/sda6 /mnt/e -t ntfs -r
mount /dev/sda7 /mnt/f -t ntfs -r

sidebrnz
5th April 2008, 11:11 PM
I love how these fora answer questions you haven't asked yet! My sister just installed Ubuntu (She's not a geek, she just wants it to work better than Win2K, and it does.) Sometimes it mounts her Windows drive, sometimes not. I was trying to add a line to fstab to automount it and messing it up. Now I know why: the file system is ntfs-3g, not just ntfs. Thanx!

Jongi
6th April 2008, 12:30 AM
I love how these fora answer questions you haven't asked yet!

the thing is i reckon you would find at least 100 threads (note not posts) that deal with this very same issue. It's probably been the same solution since I reckon around FC6.

it might seem like i am being an a$$ when i say your problem is not unique. but you will probably solve your issue faster if you search google than post a thread.

venumus
16th April 2008, 11:29 PM
ive done all the afore mentioned steps and still am getting nothing when i boot or try to force it

sidebrnz
16th April 2008, 11:46 PM
My point, Jongi, is that I found the answer here before I had time to start looking.

JohnVV
16th April 2008, 11:51 PM
if ntfs-3g is installed
and a windows partition is dev/sda1 ( first part. on the first disk)
and there is a folder in mnt called c ( owned by user with read/wright -it might/will be a security issue )
then adding this
---
/dev/sda1 /mnt/c ntfs-3g defaults users 0 0
---
to fstab will work
this is a line from my /etc/fstab
/dev/sda1 /mnt/windows ntfs-3g defaults 0 0

venumus
17th April 2008, 05:06 PM
here is my etc/fstab



/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
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
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
/dev/sda5 /mnt/xp ntfs-g defaults, users 0 0



then i try to mount....


[venumus@localhost ~]$ su -c 'mount -a'
Password:
[mntent]: line 8 in /etc/fstab is bad

sidebrnz
17th April 2008, 05:27 PM
Well, of course it's bad. There's a typo. Change ntfs-g to ntfs-3 and it should work. Also, if you want it mounted at boot, change "defaults, users" to "auto" because what you have just allows you to mount it without being root.

Jongi
17th April 2008, 08:20 PM
ntfs-3g you mean

JohnVV
17th April 2008, 09:30 PM
other than the typo g ,3 insted of -3g
are you sure that windows c drive is sda5 the fifth partition on the disk
i can see this happening if fedora was installed first then windows was installed seconded
or win 98 installed then xp in installed then fedora
or vista then xp then fedora
or for some reason there is a odd win xp install
---
also i would say that this thread is dead svigneshkumars has not replied since the post on the 5 th 12 days ago

venumus
18th April 2008, 09:01 PM
hey guys thanx for your help i made an appointment to get my eyes checked, (no joke) these type os are killin me. i got it to mount. it was a 'weird' install because i had windows on there first, on two seperate partitions. one was windows and program files ect. the other was for media. i installed fedora over the first partion and kept the second intact to save my media.


so in short i had to force it. any way thanx for your help

jusbug
28th April 2008, 04:10 PM
please guyz, i followed exactly what leenuxuser wrote, but still nothing. i have two HD and i want one partition from the first and the two partitions from the second.
i'm using fedora 7

for the fdisk -l command, that's what i got:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 5221 41937651 7 HPFS/NTFS
/dev/sda2 5222 60800 446438317+ f W95 Ext'd (LBA)
/dev/sda5 5222 9237 32258488+ 7 HPFS/NTFS
/dev/sda6 9238 44423 282631513+ 7 HPFS/NTFS
/dev/sda7 44424 50925 52227283+ 83 Linux
/dev/sda8 50926 59467 68613583+ 83 Linux
/dev/sda9 59468 60800 10707291 82 Linux swap / Solaris

Disk /dev/sdb: 250.0 GB, 250000000000 bytes
255 heads, 63 sectors/track, 30394 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13438 107940703+ 7 HPFS/NTFS
/dev/sdb2 13439 30394 136199070 f W95 Ext'd (LBA)
/dev/sdb5 13439 30394 136199038+ b W95 FAT32

Disk /dev/sdg: 254 MB, 254803968 bytes
8 heads, 61 sectors/track, 1019 cylinders
Units = cylinders of 488 * 512 = 249856 bytes

This doesn't look like a partition table
Probably you selected the wrong device.

Device Boot Start End Blocks Id System
/dev/sdg1 ? 1594541 3933700 570754815+ 72 Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(357, 116, 40) logical=(1594540, 6, 23)
Partition 1 has different physical/logical endings:
phys=(357, 32, 45) logical=(3933699, 6, 61)
Partition 1 does not end on cylinder boundary.
/dev/sdg2 ? 345676 4312947 968014120 65 Novell Netware 386
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(288, 115, 43) logical=(345675, 2, 1)
Partition 2 has different physical/logical endings:
phys=(367, 114, 50) logical=(4312946, 1, 53)
Partition 2 does not end on cylinder boundary.
/dev/sdg3 ? 3831725 7798996 968014096 79 Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
phys=(366, 32, 33) logical=(3831724, 2, 32)
Partition 3 has different physical/logical endings:
phys=(357, 32, 43) logical=(7798995, 1, 36)
Partition 3 does not end on cylinder boundary.
/dev/sdg4 ? 1 7453333 1818613248 d Unknown
Partition 4 has different physical/logical beginnings (non-Linux?):
phys=(372, 97, 50) logical=(0, 0, 1)
Partition 4 has different physical/logical endings:
phys=(0, 10, 0) logical=(7453332, 7, 53)
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order

and then i did
mkdir /mnt/c /mnt/d /mnt/e

and for the gedit /etc/fstab

LABEL=/ / ext3 defaults 1 1
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
LABEL=/home /home ext3 defaults 1 2
LABEL=SWAP-sda9 swap swap defaults 0 0
/dev/sda6 /mnt/c ntfs-3g defaults,users 0 0
/dev/sdb1 /mnt/d ntfs-3g defaults,users 0 0
/dev/sdb5 /mnt/e ntfs-3g defaults,users 0 0

any help guys.

JohnVV
28th April 2008, 05:33 PM
did you reboot .If there is an error then the boot screen will display it
also
/dev/sdb5 13439 30394 136199038+ b W95 FAT32
is a OLD windows ,win98,2000, fat 32 partition and NOT a ntfs partition
------------------
fstab
/dev/sdb5 /mnt/e vfat defaults,users 0 0
-------
and as for /dev/sda6 it looks as it is a ntfs inside a fat extended part
fat extended 5222 60800
next ntfs 5222 9237
/dev/sda2 5222 60800 446438317+ f W95 Ext'd (LBA)
/dev/sda5 5222 9237 32258488+ 7 HPFS/NTFS
/dev/sda6 9238 44423 282631513+ 7 HPFS/NTFS

svigneshkumars
30th April 2008, 06:15 PM
Thanks a lot fellas , it took a long while for me to thank because i was not with my comp ............