LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to mount windows file system (NTFS) to linux (https://www.linuxquestions.org/questions/linux-general-1/how-to-mount-windows-file-system-ntfs-to-linux-565568/)

satyalinux 06-30-2007 05:09 AM

how to mount windows file system (NTFS) to linux
 
hello,

any body could tell. How to mount the windows file system that NTFS oR FAT to linux.

jschiwal 06-30-2007 05:34 AM

I just mounted my windows partition this way:
sudo mkdir /mnt/windows
sudo mount -t ntfs /dev/hda1 /mnt/windows/ -o ro,noexec,nosuid,nodev,uid=jschiwal
Use the right device and your own username. The last part will give you access.

This is the /etc/fstab entry I use for a usb pendrive:
Code:

UID=3B69-1AFD /mnt/cr256 vfat rw,nosuid,nodev,noatime,noauto,flush,user,uid=jschiwal,utf8,shortname=lower,fmask=177,dmask=077
Being an external drive, I used the noauto option. The user option allows me to mount it without begin root.

See the man mount page for an explanation on the other options.

XavierP 06-30-2007 08:42 AM

Moved: This thread is more suitable in Linux-General and has been moved accordingly to help your thread/question get the exposure it deserves.

Setlew 06-30-2007 09:20 AM

Just a P.S. to jschiwal's post: the /etc/fstab entry will make the Linux system aware of the NTFS/FAT filesystem upon bootup. This is the way to go if you want to be able to access it every time you use Linux (without the 'noauto' option).

Junior Hacker 07-01-2007 11:20 AM

All of my Linux distributions mount my USB pen drives automatically without that complicated line in /etc/fstab that jschiwal has in his/hers /etc/fstab, actually, my /etc/fstab in all my distributions do not have an entry for USB devices, sort of a hotplug thing.
As far as mounting an ntfs file system, I install ntfs-3g and add a line to /etc/fstab like this if the ntfs partition is /dev/sda2 after making a mount directory called /windows for the partition:
Code:

/dev/sda2    /windows      ntfs-3g      default    0      0
Not only can I mount a ntfs partition with this, I can also write to it.

Junior Hacker 07-01-2007 11:28 AM

Of course, if you do not want it mounted automatically you can just issue this command to mount it in read only:
Code:

mount -t ntfs /dev/sda2 /windows
Or, if you install ntfs-3g for read write access:
Code:

mount -t ntfs-3g /dev/sda2 /windows
Or, if it is a Fat32 partition, to mount it manually:
Code:

mount -t vfat /dev/sda2 /windows
To mount a USB Fat32 partition in read write mode where the system has it in the file system as /media/volume1:
Code:

mount -o rw -t vfat /dev/sda2 /media/volume1


All times are GMT -5. The time now is 05:41 AM.