Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access to windows directory from linux

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi

I have windows and linux on same machine. How can i access windows directory from linux and linux directory from windows. can any one help me pls.

reg
 
Which version of Windows are you running?

To access a Windows partition in Linux, you must mount the partition. I need to know the filesystem in use first (FAT or NTFS).

I'm not sure if you can access the Linux partition from Windows on the same machine. Maybe third party software can do it.

ChrisP ---------------------------------------
If someone's post was helpful to you, please click the box "Click here to mark this post as a helpful or expert post".
 
thanks

i am using 2 machines one is windows98 (FAT) and another is windows2000 professional (NTFS).

How do i mount in each machine.
 
The first thing you have to do is figure out which partition and hard drive the FAT and NTFS partitions are on. From Linux, run "fdisk /dev/hda". Press 'p' when the menu comes up. This will print the partition table. Look for the FAT and NTFS partitions and write down the partition number (ie - /dev/hda1). Type 'q' to quit and 'm' for help.

How many hard drives do you have? If you only have 1, then /dev/hda is the only disk you have to run fdisk on. If you have a second disk, then you need to run "fdisk /dev/hdb" also.

Reply with the partition numbers and I'll tell you how to mount them.

ChrisP ---------------------------------------
If someone's post was helpful to you, please click the box "Click here to mark this post as a helpful or expert post".
 
Does it say which filesystem is mounted on each? Please copy and paste a screenshot of fdisk /dev/hda and then 'p'?

ChrisP ---------------------------------------
If someone's post was helpful to you, please click the box "Click here to mark this post as a helpful or expert post".
 
well u cannot use ntfs partitions in linux but u can use fat partitions. Or what u can do is if u want to access ur ntfs partitions from linux than u need to convert them from ntfs to fat, without losing your data this u can do with convert command which is like

convert <drive_name > /fs: fat32

Before u access the fat drive u need to create a folder for it in /mnt directory in ur root partition
the command for accessing fat partitions from linux is

mount -t vfat /dev/hda(number) /mnt/<name of the folder in /mnt >
 
mastguy says
&quot;well u cannot use ntfs partitions in linux but u can use
fat partitions. Or what u can do is if u want to access ur
ntfs partitions from linux than u need to convert them
from ntfs to fat,....&quot;

what do u mean when u say u cannot use ntfs paritions in linux
i have 2 HPFS/NTFS partitions, an i am able to mount them
with the following command
mount /dev/hda2 /mnt/disk

when i run the mount command alone the following line is listed
/dev/hda2 on /mnt/disk type ntfs (rw)

i hope rw stands for read and write.
 
rw does stand for read/write, while ro stands for read-only.

You can convert NTFS drives to FAT? I never heard of this. You can't even do this in Windows and those are Windows file systems. You can only convert FAT to NTFS, and once you do it, you can't go back without formatting.

ChrisP If someone's post was helpful to you, please click the box &quot;Click here to mark this post as a helpful or expert post&quot;.
 
The best way to mount windows partitions is to use the vfat filesystem driver. Compile it into your kernel if you have not got it, most distros seem to have vfat support by default. I am not sure if this will mount NTFS since I have never tried it, but it seems to work for FAT as well.

e.g. to mount first partition on first IDE drive (or C: in dos/windoze speak) try;

mount -t vfat /dev/hda1 /mnt/dos

if you add the relevant entry to /etc/fstab then you can moutn it at will with 'mount /mnt/dos' or you can have it mounted at boot time.
 
you can use NTFS partitions in linux as long as you have compiled the kernel for this most people have not done this so unless your Kernel was compiled to support NTFS you won't be able to access these drive by mounting them
 
I'm in front of a dual boot RH73/WinXP machine now, so I can answer all of your questions. Here's the output of the fdisk command...

[root@penguin root]# fdisk -l /dev/hda

Disk /dev/hda: 255 heads, 63 sectors, 2495 cylinders
Units = cylinders of 16065 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1530 12289693+ 7 HPFS/NTFS
/dev/hda2 1531 1543 104422+ 83 Linux
/dev/hda3 1544 1670 1020127+ 82 Linux swap
/dev/hda4 1671 2495 6626812+ f Win95 Ext'd (LBA)
/dev/hda5 1671 2495 6626781 83 Linux

As you can see, my NTFS partition resides on /dev/hda1. Don't worry about the HPFS you see there. Windows hasn't used HPFS since NT 3.51.

If NTFS support is compiled into the kernel, then you can run this command to mount the partition...

mount -t ntfs /dev/hda1 /mnt/windoze

ChrisP

If someone's post was helpful to you, please click the box &quot;Click here to mark this post as a helpful or expert post&quot;.
 
Im a big time Linux newbie, so i might not know what the
heck im doing, but I added the line
&quot;ntfs&quot; to the file &quot;/etc/filesystems&quot;
and added the lines
&quot;/dev/hda5 /mnt/hda5 ntfs defaults 0 0&quot;
&quot;/dev/hdb1 /mnt/hdb1 vfat defaults 0 0&quot;
(hda5 is my ntfs partition, and hdb1 is my fat32 partition)
to the file &quot;/etc/fstab&quot;
and then rebooted.
I can read and write to the fat32 partition but just read
the ntfs one (though mount says read & write)

Down with Microsoft, long live Linux, or
I HATE WINDOWS, OPEN SOURCE FOREVER!!!!!
 
Linux only supports read-only on NTFS partitions. NTFS write support is an experimental feature that you can compile into the kernel, but it will most likely destroy all of your data.


ChrisP ------------------------------------------------------------------------------
If somebody helps you, please vote for them for &quot;Tipmaster of the Week&quot; by giving them a &quot;purple star&quot;. This can be done by clicking the &quot;Mark this post as a helpful/expert post&quot; button.
 
Nice, I've never heard of that before. I'll give it a try.


------------------------------------------------------------------------------
If somebody helps you, please vote for them for &quot;Tipmaster of the Week&quot; by giving them a &quot;purple star&quot;. This can be done by clicking the &quot;Mark this post as a helpful/expert post&quot; button.
 
ya i have tried that on windows 2000 but the problem with this is that after uninstallation the drives are still listed without no contents, and takes hell lot of explorers time. otherwise it is fine.
 
Hi
You can also use Samba (Freeware) to access linux partition from WindowsNT

Cheers
Naveen
 
...not on the same machine you can't, only across the network...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top