LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How can I mount the window partition? (https://www.linuxquestions.org/questions/linux-newbie-8/how-can-i-mount-the-window-partition-402074/)

yinglcs 01-11-2006 11:16 AM

How can I mount the window partition?
 
How can I mount the window partition so that I can read/copy files from window partition to linux partition?

Bruce Hill 01-11-2006 11:24 AM

First, the Windows partition needs to be a FAT filesystem,
and not a NTFS filesystem; because writing to a NTFS filesystem
is still not considered stable and reliable from Linux.

To mount a FAT filesystem from Linux, edit your /etc/fstab to
look like this:
Code:

/dev/sda2        /Shared          vfat        users,umask=1000,rw,auto  1  0
and it will mount read/write as user when you boot your system.

NB: You must change /dev/sda2 to your partition, and /Shared
to your mount point. If you don't have a mount point in Linux,
you will need to create one (as root). You may issue and read
"man mount" and "man fstab" for more detailed instructions.

Dngrsone 01-11-2006 11:52 AM

You can read from an NTFS partition, if you have no intent to write to it from Linux. In that case, the filesystem type would ntfs vice vfat.

Bruce Hill 01-11-2006 12:00 PM

Yes, I didn't address if you just want to read NTFS files and copy to Linux.
In that case, you would setup your /etc/fstab line like this:
Code:

/dev/sda1        /WinXP          ntfs        ro              1  0
You still need to change partitions and mount points from my entries to yours as previously stated. Thanks Dngrsone.

Which distribution of Linux are you using? Put that in your LQ UserCP so we can help you better.

Slackware sets these things up correctly by default when you install, if you allow it.

yinglcs 01-11-2006 02:00 PM

Can I just use the mount command instead of modify the /etc/fstab file?
if yes, how to use the mount command?

Bruce Hill 01-11-2006 02:02 PM

Did you issue and read "man mount" yet?

Yes, you can do it. Please read and see if you can
understand how. If not, post what you read, what
you tried, how it didn't work, please...

yinglcs 01-11-2006 03:44 PM

I add this to my /etc/fstab file:
Code:

/dev/sda2        /WinXP          ntfs        ro              1  0
When I try to mount at the command prompt, both fail.
Code:

[root]# mount /WinXP
mount: mount point /WinXP does not exist
[root]# mount /dev/sda2
mount: mount point /WinXP does not exist

Thanks for any help.
my complete /etc/fstab file
Code:

# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/VolGroup00/LogVol00 /                      ext3    defaults        1 1
LABEL=/boot            /boot                  ext3    defaults        1 2
/dev/devpts            /dev/pts                devpts  gid=5,mode=620  0 0
/dev/shm                /dev/shm                tmpfs  defaults        0 0
/dev/proc              /proc                  proc    defaults        0 0
/dev/sys                /sys                    sysfs  defaults        0 0
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
/dev/hdc                /media/cdrecorder      auto    pamconsole,exec,noauto,managed 0 0
/dev/sda1              /media/Windows          ntfs    pamconsole,exec,noauto,managed 0 0
/dev/sda5              /media/LINUXDATA        ext3    pamconsole,exec,noauto,managed 0 0
/dev/sda2        /WinXP          ntfs        ro              1  0


Dtsazza 01-11-2006 04:07 PM

You can only mount to a directory that already exists. It should have been noted that there was nothing special about "/WinXP" in the bits of code you were given, and that it was just an example. The mount command fails because the directory doesn't exist, and will work if you first create the directory with
Code:

mkdir /WinXP    (you'll need to be root)
or alternatively, substitute the name of another existing directory in /etc/fstab (e.g. /mnt/windows).

Bruce Hill 01-11-2006 08:15 PM

Quote:

Originally Posted by Dtsazza
It should have been noted that there was nothing special about "/WinXP" in the bits of code you were given, and that it was just an example.

Thanks, it was noted. It seems there is a "lack of reading" problem...

Dtsazza 01-12-2006 06:18 AM

I meant noted as in noticed by the reader - no slur on your help!

Bruce Hill 01-12-2006 09:12 AM

Quote:

Originally Posted by Dtsazza
I meant noted as in noticed by the reader - no slur on your help!

And I meant the same thing, meaning, the OP needs to read more carefully.
Didn't mean your post, sorry for the confusion.

Dtsazza 01-12-2006 10:46 AM

And I meant... never mind ;)

Dngrsone 01-12-2006 01:24 PM

Gah! For a moment there I thought I was in couples-therapy again. :D


All times are GMT -5. The time now is 12:37 AM.