LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-14-2008, 06:08 AM   #1
screwdriver
LQ Newbie
 
Registered: Jul 2008
Posts: 13

Rep: Reputation: 0
how can i mount my windows hard drive in the Linux ?


i have two hard drives in my computer. one is sata hard drive and another one is IDE. i have installed the windows XP in the sata hard drive and the redhat linux enterprise 5 in the IDE hard drive. my SATA hard drive is in NTFS format. now i want to mount my windows hard drive in linux. how can i do it?
 
Old 07-14-2008, 06:13 AM   #2
emi_ramo
Member
 
Registered: Apr 2007
Location: Barcelona, Spain
Distribution: Debian, KUbuntu
Posts: 213

Rep: Reputation: 36
Serve it as Samba and mount it from server to a directory.
 
Old 07-14-2008, 06:14 AM   #3
rikijpn
Member
 
Registered: Jun 2007
Location: Japan
Distribution: Debian lenny, DSL, Solaris 10
Posts: 157

Rep: Reputation: 33
man mount

Did you try
Code:
sudo mount -t ntfs /dev/sda1 somedir
?
You could add something similiar in your fstab so it can be mounted automatically since boot time,etc. Also, you might try checking the manuals of mount.
 
Old 07-14-2008, 06:56 AM   #4
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
Samba? Why do you need samba server when machine is in dual boot?
This has been explained before on how to mount ntfs windows partitions in linux.
If you are not using a newest version of kernel then you might want to install ntfs-3g from www.ntfs-3g.org.
If your package manager allows to install it, then you might want to use it rather than compiling from source.
 
Old 07-14-2008, 07:00 AM   #5
kdrlx
Member
 
Registered: Feb 2006
Distribution: Ubuntu Hardy Heron
Posts: 130

Rep: Reputation: 16
For adding to /etc/fstab (assuming your ntfs drive is sda1)
1. Create a directory to use as mount point eg. /media/win_drive
2. Append the following at end of file --

/dev/sda1 /media/win_drive ntfs-3g user 0 0

Explanation --
/dev/sda1 - your partition. you can use "sudo fdisk -l" to check yourpartitions
/media/win_drive - directory used to mount the partition
ntfs-3g type of filesystem
user - one of the many options used to mount. This one means anyone can mount it.
0 - is used by dump (a backup utility) to decide if a filesystem should be backed up. If zero then dump will ignore that filesystem.
0 - is used by fsck (the filesystem check utility) to determine the order in which filesystems should be checked.
If zero then fsck won't check the filesystem.

Use nano or vim to edit /etc/fstab

Last edited by kdrlx; 07-14-2008 at 07:27 AM.
 
Old 07-14-2008, 07:07 AM   #6
emi_ramo
Member
 
Registered: Apr 2007
Location: Barcelona, Spain
Distribution: Debian, KUbuntu
Posts: 213

Rep: Reputation: 36
Sorry, I missunderstood. I thought screwdriver wanted to access it via network from another machine on XP.
 
Old 07-14-2008, 08:23 AM   #7
student04
Member
 
Registered: Jan 2004
Location: Georgia
Distribution: OS X, CentOS
Posts: 669

Rep: Reputation: 34
Quote:
Originally Posted by screwdriver View Post
i have two hard drives in my computer. one is sata hard drive and another one is IDE. i have installed the windows XP in the sata hard drive and the redhat linux enterprise 5 in the IDE hard drive. my SATA hard drive is in NTFS format. now i want to mount my windows hard drive in linux. how can i do it?
To mount the device:
Code:
# mkdir /mnt/windows
# mount -t ntfs /dev/sda1 /mnt/windows
To UNmount the device:
Code:
# umount /mnt/windows
I suppose I would check out that ntfs-3g driver, too...
 
Old 07-14-2008, 08:34 AM   #8
emi_ramo
Member
 
Registered: Apr 2007
Location: Barcelona, Spain
Distribution: Debian, KUbuntu
Posts: 213

Rep: Reputation: 36
ntfs-3g is must for NTFS. ntfs is simply obsolete and dangerous. You'll be able only to read carefully, and not always. Just install ntfs-3g and confirm that
 
Old 07-14-2008, 08:45 AM   #9
screwdriver
LQ Newbie
 
Registered: Jul 2008
Posts: 13

Original Poster
Rep: Reputation: 0
student04,

i tried your solution.but it said "unknown file system type ntfs". don't know what to do ...waiting for your reply
 
Old 07-14-2008, 08:54 AM   #10
emi_ramo
Member
 
Registered: Apr 2007
Location: Barcelona, Spain
Distribution: Debian, KUbuntu
Posts: 213

Rep: Reputation: 36
Quote:
i tried your solution.but it said "unknown file system type ntfs". don't know what to do ...waiting for your reply
it should be
Code:
mount -t ntfs-3g /dev/your_partition_name /path/to/free/dir
where your_partition_name should be something as sda1 and /path/to/free/dir /media/windows. But you need to install ntfs-3g. To do so... ¿which distro are you using (debian,redhat,suse,etc.)?
 
Old 07-14-2008, 09:02 AM   #11
screwdriver
LQ Newbie
 
Registered: Jul 2008
Posts: 13

Original Poster
Rep: Reputation: 0
well i am using the red hat Linux enterprise 5. will u also give me the solution to mount the drive if the drive is in fat32 format?
 
Old 07-14-2008, 09:15 AM   #12
emi_ramo
Member
 
Registered: Apr 2007
Location: Barcelona, Spain
Distribution: Debian, KUbuntu
Posts: 213

Rep: Reputation: 36
fat32 is much easier:
Code:
mount -t vfat /dev/your_partition_device /path/to/mount
where your_partition_name should be something as sda1 and /path/to/free/dir is an existing directory, such as /media/windows .

I don't use Redhat, so I don't know at all how is named the package manager (yum?). But if you know it, you'll probably fast find out ntfs-3g and easily install it.

emi
 
Old 07-14-2008, 09:26 AM   #13
student04
Member
 
Registered: Jan 2004
Location: Georgia
Distribution: OS X, CentOS
Posts: 669

Rep: Reputation: 34
Quote:
Originally Posted by emi_ramo View Post
ntfs-3g is must for NTFS. ntfs is simply obsolete and dangerous. You'll be able only to read carefully, and not always. Just install ntfs-3g and confirm that
I've always only had the desire to read from my NTFS partitions (too nervous to write to them). You're saying this is safer for reading, too?

Quote:
Originally Posted by screwdriver View Post
student04,

i tried your solution.but it said "unknown file system type ntfs". don't know what to do ...waiting for your reply
Try my above but substitute "ntfs" with "ntfs-3g". If that does not work you must install it with the package manager included with RedHat (as everyone is hinting towards).

Assuming you already made the directory /mnt/windows:
Code:
# mount -t ntfs-3g /dev/sda1 /mnt/windows
Check out the bottom part of NTFS-3G's homepage at http://www.ntfs-3g.org/, section "Usage".

I don't remember the syntax for installing package with the command line, but try:
Code:
# yum install ntfs-3g
Otherwise look through your menus to find the package manager, and search for this. Then try the mounting command again.

-AM
 
Old 07-14-2008, 09:30 AM   #14
screwdriver
LQ Newbie
 
Registered: Jul 2008
Posts: 13

Original Poster
Rep: Reputation: 0
emi,
now it says mount point media/windows does not exists.
 
Old 07-14-2008, 09:44 AM   #15
student04
Member
 
Registered: Jan 2004
Location: Georgia
Distribution: OS X, CentOS
Posts: 669

Rep: Reputation: 34
Quote:
Originally Posted by screwdriver View Post
emi,
now it says mount point media/windows does not exists.
So create it. The mount point is a directory on your system somewhere. 'mount' cannot mount to a non-existent directory.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving files from a Linux hard drive to a Windows Vista Premium hard drive WolfMan51 Linux - Hardware 5 07-12-2011 10:19 AM
Why can't I mount my Windows hard drive from Linux? axess_denied Linux - Hardware 23 10-24-2006 12:53 AM
Erase windows + mount the 2nd hard drive. Dan8080 Linux - Newbie 2 06-23-2006 12:46 AM
mount windows hard drive without partitioning ultrashawn Linux - Hardware 1 04-09-2005 08:19 AM
Mount Windows Hard drive in Linux burtongeek Linux - Newbie 26 03-28-2005 09:28 AM


All times are GMT -5. The time now is 10:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration