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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Do I Read My Windows Drive From Linux

Linux Newbe

How Do I Read My Windows Drive From Linux

by  legend2b4  Posted    (Edited  )
I want to read my windows Drive from within Linux?

I have written this HOW TO for Windows users new to Linux.
It is only meant to give a very basic insight as to the way
Linux handles hardware devices and filing systems.

For the sake of simplisaty, I am making some assumptions;
Namely you started with a ôwindows machineö with one hard drive fitted .

You freed up some space and created two new partitions
for linux to reside, using tools like fips & fdisk

NOTE: LINUX MOUNTS FILING SYSTEMS NOT DEVICES

BASIC Linux Hardware devices

fd =floppy drives

hd =harddrives

cdrom =CD-Rom

All Linux Device's are stored in a directory called /dev so more properly /dev/hd

We are only concerned with /dev/hd here.
Linux will allocate a letter for each physical hard drive attached to your system starting with a

so if you have only one hard drive on your system
it would be labeled /dev/hda

this is regardless of how many partitions their are on that hard drive

Partitions

As you know, when you installed Linux on to your system
you had to create two new partitions on your hard drive
for Linux to reside.

The ROOT partition and the SWAP partition.

So including the Windows partition, you now have three partitions on your hard drive.

Linux will allocate a number to each partition on /dev/hda

/dev/hda1 Windows FAT

/dev/hda2 Linux Root ect3

/dev/hda3 Linux Swap

So /dev/hda1 is the Windows filing system

on hard drive /dev/hda

It is this Filing system that can be MOUTED by Liunx

You can use the command line to mount /dev/hda1 if you wish.

But for me, that is way too much messing about every time
I want to get photo or document from my windows drive. So tell Linux to mount it at boot.

Log on to Linux as root.

Firstly you need a place for linux to mount the files stored on /dev/hda1

Open the directory /mnt and create a new directory there, and name it windows

So /mnt/windows will be the place to look for your windows files

Now, tell Linux to mount the filing system at boot. This is done by a configuration file
called /ect/fstab. Using a text editor open the file.

It looks something like this


LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hdb3 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 owner,kudzu, ro 0 0
/dev/fd0 /mnt/floppy auto owner,kudzu 0 0

Add the Line

/dev/hda1 /mnt/windows vfat


Now save the file.

The use of vfat here, simply identify s /dev/hda1 as FAT the windows filing System

All that remains to do is to set the
permissions for /dev/hda1.
This is done by adding the line

/dev/hda1 vfat rw 00

to the configuration file /etc/mtab

Okay you're done log out and reboot





Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top