Linux How To Mount NTFS partitions in FC5 and Ubuntu

Status
Not open for further replies.

Quad Master

Herald
Hi Guys

I have successfully triple booted WinXP + FC5 + Ubuntu 6.10 using GRUB as boot loader.

But now i am having difficulty in mounting NTFS partitions in FC5 and Ubuntu
It detected and mounted my dvdwriter and all the usb devices automatically
as i plugged in.

Doubts

1.> How to mount NTFS Partition in FC5 & Ubuntu 6.10
2.> Has anyone used NTFS-3G which supports Read and Write to NTFS partitions
3.> How to disconnect USB Devices like card readers and hdds when connected via USB.

Any sort of help might be appreciated.
 
My NTFS partitions were automatically mounted (read only) in Ubuntu 7.04.

Try searching "NTFS" in the Synaptic package manager and download the NTFS driver...
 
NTFS partition, an EXT3 partition and perhaps a FAT32 partition laying about. Open up a terminal session and type the following:

sudo fdisk -l

You’re looking for the NTFS partition, my output looks like this:

Device Boot Start End Blocks Id System

/dev/sda1 * 1 2550 20480008+ 7 HPFS/NTFS

/dev/sda2 2550 7493 39707451+ f W95 Ext’d (LBA)

/dev/sda3 7494 9729 17960670 83 Linux

/dev/sda5 2550 7394 38911288+ b W95 FAT32

/dev/sda6 7395 7493 795186 82 Linux swap / Solaris

It’s /dev/sda1 that I’m interested in. Find out what yours is and write it down somewhere. A good thing to do is to write it backwards on your forehead in indelible marker.

So let’s install the stuff we’ll need to get this working.

sudo apt-get install libfuse2 fuse-utils libntfs8 ntfsprogs

Now let’s add fuse to the list of stuff that our kernel will load:

echo fuse | sudo tee -a /etc/modules

Now let’s add a group which we’ll use to control who can or can’t get access to the NTFS partition.

sudo addgroup ntfs

When this is done, you’ll get some output which will contain your GID (Group ID). It’ll look something like adding group ntfs (1001). Write down that GID, or add it to your backwards forehead list.

Now going to create a mount point for our partition. This is a folder into which this disk will be shoved. Well, metaphorically speaking anyway put it in the /media directory so it’ll show up on our desktop. then we’ll edit the fstab file to tell it to mount the NTFS partition on to the folder.

sudo mkdir /media/windows

sudo cp /etc/fstab /etc/fstab.bak

gksudo gedit /etc/fstab

Now that you’ve got the fstab file backed up and open in gedit, let’s add the following line to the bottom of it.

/dev/hda1 /media/windows ntfs-fuse auto,gid=1002,umask=0002 0 0

Here’s where you’ll need a mirror to look at the info you’ve written backwards on your forehead. The first bit ‘/dev/hda1′ is the location of your NTFS partition. If you’re is different, then change it in your fstab entry above. The second bit we’ll need is the GID of your ntfs group. If it’s not 1002 then change that as well.

Now, add your user to the ntfs group. If you’re username is ‘quadmaster‘ this is how the command would look. (If you’re username is not ’quadmaster', then type your username in place of quadmaster, or consider changing it to quadmaster’).

sudo adduser slartibartfast ntfs

Now do some quick removing and linking to fix a known bug.

sudo rm /sbin/mount.ntfs-fuse && sudo ln /usr/bin/ntfsmount /sbin/mount.ntfs-fuse

Mainly Partition get mount automatically I dunno why it is not the case with you.. Well this is the same case I suffered from when I first installed Ubuntu I asked for help in Ubuntu forum and that what I get :) Hope it works but after I installed the ubuntu 7.04 then I got automatic mount HDD this time I need not to mount using those perky codes :rofl:... Hope it helps :D
 
Thanks for the help darkstar , ntfs support is enabled in ubuntu edgy with that method , now for FC5.

Code:
[root@localhost ~]# fdisk -l

Disk /dev/hda: 26.8 GB, 26843545600 bytes

255 heads, 63 sectors/track, 3263 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/hda1   *           1         382     3068383+   7  HPFS/NTFS

/dev/hda2             383        2717    18755887+   5  Extended

/dev/hda3            2718        3263     4385745   83  Linux

/dev/hda5             383        1912    12289693+   7  HPFS/NTFS

/dev/hda6            1913        1925      104391   83  Linux

/dev/hda7            1926        2689     6136798+  8e  Linux LVM

/dev/hda8            2690        2717      224878+  82  Linux swap / Solaris

So i added the following entry to /etc/fstab

Code:
/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1

LABEL=/boot             /boot                   ext3    defaults        1 2

devpts                  /dev/pts                devpts  gid=5,mode=620  0 0

tmpfs                   /dev/shm                tmpfs   defaults        0 0

proc                    /proc                   proc    defaults        0 0

sysfs                   /sys                    sysfs   defaults        0 0

/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0

[COLOR="Blue"]/dev/hda1 /mnt/windows ntfs  defaults,umask=0222 0 0 [/COLOR]
Now when i run "mount -a" it says

Code:
[root@localhost ~]# mount -a

mount: unknown filesystem type 'ntfs'

[root@localhost ~]#

I even downloaded and installed this rpm from here

SourceForge.net: Downloading ...

for my FC5 release and just double clicked on the rpm to install it.

Is there a GUI based tool to handle ntfs partions in FC5 or NTFS-3G for FC5
 
Finally Success!!!!!!!!!!!!!!!!!!

These are the steps i followed.

Code:
[root@localhost downloads]# [COLOR="Blue"]rpm -ivh kernel-module-ntfs-2.6.15-1.2054_FC5-2.1.26-0.rr.10.0.i686.rpm[/COLOR]

Preparing...                ########################################### [100%]

   1:kernel-module-ntfs-2.6.########################################### [100%]

Code:
[root@localhost ~]# [COLOR="Blue"]/sbin/modprobe ntfs[/COLOR]

[root@localhost ~]# [COLOR="Blue"]dmesg | grep ntfs[/COLOR]

SELinux: initialized (dev hda1, type ntfs), uses genfs_contexts [COLOR="Red"][B]//this is shown as i had already made entries to /etc/fstab[/B][/COLOR]

[root@localhost ~]# [COLOR="Blue"]cat /proc/filesystems[/COLOR]

nodev   sysfs

nodev   rootfs

nodev   bdev

nodev   proc

nodev   binfmt_misc

nodev   debugfs

nodev   securityfs

nodev   sockfs

nodev   usbfs

nodev   pipefs

nodev   futexfs

nodev   tmpfs

nodev   inotifyfs

nodev   eventpollfs

nodev   devpts

        ext2

nodev   ramfs

nodev   hugetlbfs

        iso9660

nodev   mqueue

[COLOR="Red"]nodev   selinuxfs

        ext3

        ntfs[/COLOR]

nodev   rpc_pipefs

nodev   autofs

Code:
[root@localhost ~]# [COLOR="Blue"]fdisk -l[/COLOR]

Disk /dev/hda: 26.8 GB, 26843545600 bytes

255 heads, 63 sectors/track, 3263 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

[COLOR="Red"]/dev/hda1   *           1         382     3068383+   7  HPFS/NTFS[/COLOR]

/dev/hda2             383        2717    18755887+   5  Extended

/dev/hda3            2718        3263     4385745   83  Linux

[COLOR="Red"]/dev/hda5             383        1912    12289693+   7  HPFS/NTFS[/COLOR]

/dev/hda6            1913        1925      104391   83  Linux

/dev/hda7            1926        2689     6136798+  8e  Linux LVM

Code:
[COLOR="Blue"]mkdir /mnt/windows

mkdir /mnt/backup[/COLOR]

Added following to /etc/fstab

Code:
/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1

LABEL=/boot             /boot                   ext3    defaults        1 2

devpts                  /dev/pts                devpts  gid=5,mode=620  0 0

tmpfs                   /dev/shm                tmpfs   defaults        0 0

proc                    /proc                   proc    defaults        0 0

sysfs                   /sys                    sysfs   defaults        0 0

/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0

[COLOR="Blue"][B]/dev/hda1 /mnt/windows ntfs  defaults,umask=0222 0 0    

/dev/hda5 /mnt/backup ntfs  defaults,umask=0222 0 0  [/B][/COLOR]

Code:
[root@localhost ~]# mount -a
 
Great job, but for future reference...... ;)

In FC5, you can install\enable Livna.org repo, and just type in

yum install ntfs-3g

This will give you both read and write in NTFS and will install all dependencies for you too.

And then in fstab change ntfs to ntfs-3g
 
ArtfulDodger said:
This will give you both read and write in NTFS and will install all dependencies for you too.
Anyone want to comment on the *safety* of writing to NTFS partitions ?

Reading is not an issue.
 
To install Livna repo on fc5

type the folowing

rpm -ivh http://rpm.livna.org/livna-release-5.rpm

then to import the KEY

rpm --import http://rpm.livna.org/RPM-LIVNA-GPG-KEY

To install NTFS read/write support

type the following

yum install ntfs-3g

To install nvidia driver

type the following

yum install kmod-nvidia

to install Beryl

type the following

yum install beryl

when asked to install for dependencies on any of the above, make sure you say yes ;)

Btw

for fc6 just replace livna-release-5.rpm with livna-release-6.rpm

I'm curious, why did you opt for fc5 and not fc6 ?
 
  • Like
Reactions: 1 person
Anyone want to comment on the *safety* of writing to NTFS partitions ?

Been using it for some time, and have had no problems. Ntfs-3g has been through a lot of changes, and revisions, and seems to be quite stable. And let me say for the record :D it is damn nice being able to write to my Ntfs partitions :P

The fact that it is already being packaged means that it is already acquiring a much larger user base than previously.

To be honest, I used this when it was first released, and it was somewhat buggy as there were some permission issues with Fuse mounting from fstab during boot.

Since I have used the pre-packaged rpm, and installed with yum with dependencies, I have had no problems.

It is important to note that it does require a reboot or it will not work.

IF....you do get permission issues on boot, you can add the root user to the Fuse group, and it will work fine.
 
ArtfulDodger said:
To install Livna repo on fc5

type the folowing

rpm -ivh http://rpm.livna.org/livna-release-5.rpm

then to import the KEY

rpm --import http://rpm.livna.org/RPM-LIVNA-GPG-KEY

to install nvidia driver

type the following

yum install kmod-nvidia

What about Ati driver install ????

Also the package is just 8.5KB how did everything fit in 8.5KB[Ati driver + nvida driver + beryl etc...] [strange ???]

ArtfulDodger said:
I'm curious, why did you opt for fc5 and not fc6 ?

Because i feel that FC6 will be a bit heavier on my system than FC5 [Assumed]

Also can u PM me the procedure to install XGL + Compiz + Beryl with skins on my Ati X800XL GPU for Gnome and KDE.

I have gone thru various guides and so i am confused what to follow.

If its a detailed proc we will start a seperate thread.

Will livna install the ati driver , beryl , ntfs 3g on my FC5.

Plz tell me what all can be installed using livna.

Whats exactly Livna ??
 
ArtfulDodger said:
Been using it for some time, and have had no problems. Ntfs-3g has been through a lot of changes, and revisions, and seems to be quite stable. And let me say for the record :D it is damn nice being able to write to my Ntfs partitions :P
The question is directed more at what windows thinks about the writes in NTFS after they were made in *nix. Was it transparent ie windows was none the wiser that writes/updates were made by a foreign OS.

i do realise its the windows ntfs driver itself that's being used here in *nix.
 
Status
Not open for further replies.