LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Re : [ILUG] Hard disk/CD Rom access

[ILUG] Re : [ILUG] Hard disk/CD Rom access

Miles kcolfer at iol.ie
Sun Apr 11 11:50:50 IST 1999


James Griffiths wrote:
> 

> Note :  The file /dev/hda refers to an entire disk. Each partition
> within the
> disk can be accessed via the files
> 
> /dev/hda1, /dev/hda2, /dev/hda3, /dev/hda4
> 
> for the first to fourth primary partitions. If one of these is an
> extended
> partition then the corresponding device file is just a "container" for
> further partitions and the real data will be in logical partitions which
> can
> be accessed via /dev/hda5, /dev/hda6 ...etc.
> 
> Supposing you have three primary partitions - with DOS on the first
> filesystem, the main Linux partition on the second and the Linux swap
> partition on the third, then you should be able to mount the DOS/Win
> filesystem using
> 
> mount -tvfat /dev/hda1 /mnt
> 
> - if you have already mounted the CD-ROM to /mnt, you can
> umount it before executing this command.

An easier and more intuitive way to do this is to edit a file called
fstab in your /etc directory. This holds all the filesystems that can be
mounted on your machine. 

NB if you're a new user, then you'd be very well advised to back up this
file before you do anything else. Simply copy the file to come other
name, something like 'cp fstab fstab.bak' would do.

Anyway, inside ythis fsatb file, you should see lines like:

/dev/hda2	/	ext2	defaults  1  1
and so on.
to add in your windoze drive, floppy and cdrom, just put in lines like:

/dev/cdrom	/cdrom    iso9660   user, noauto    0  0
for the CDROM,
/dev/fd0 	/floppy   vfat      user, noauto    0  0
for the floppy drive
/dev/hda1	/win	  vfat 	    user	    0  0
for your c: drive.

After doing this, go to your root directory (i.e. 'cd /') and create 3
directories, 'floppy' 'cdrom' and 'win'. This now tells the machine what
to mount, (/dev/whatever), where to mount it (/cdrom), what file type
(vfat for windows, iso9660 for CDs), who can mount it ('user' means you
don't have to be root), and when to mount it (noauto means 'dont do it
on startup, wait until I give the mount command). Now, all you have to
do to access a CD or floppy is issue the command 'mount /cdrom' or
'mount /floppy'. The windows dir should be automatically mounted when
linux boots. 

Of course, all the above is assuming that your flopy is at /dev/fd0,
your windows partition is at /dev/hda1 and so on, but on a normal system
that's where they should be. Oh, and of course, don't forget to unmount
the CD and floppy when you're finished before you take them out of the
drive, otherwise Linux might get a little confused.      
	Ciao,
		Miles (Kieran Colfer)

kcolfer at iol.ie
kieranc at bigfoot.com
http://ireland.iol.ie/~kcolfer

"The optimist believes we live in the best of all possible worlds.
The pessimist fears this is true."




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell