Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > Linux Resources > Linux Tutorials, HOWTO's & Reference Material > Access a Windows Partition on a dual boot system

Forgot Password?
 Linux Tutorials, HOWTO's & Reference Material   A useful collection of tutorials, guides and reviews compiled here for easy reference purposes.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
 
Thread Tools Display Modes
Old 08-02-2003   #1 (permalink)
Linux Engineer
 
Nerderello's Avatar
 
Join Date: Apr 2003
Location: North East England
Posts: 1,190
Access a Windows Partition on a dual boot system

Question:
I have WinXP installed on one partition of my 1st HD, and RedHat installed on the 2nd partition on the 1st HD. I have a ton of music on the 2nd HD. Can I access that HD through RedHat so I can listen to the music through the music player?

Answer:
The way to get a hold of your second drive, or ANY disk, is to mount it.

What mounting entails is :-
1) Using the 'mount' command (as either the root user or as 'su -')
2) Accessing the drive (partition, CDROM, floppy, etc. etc.) as just yet another set of sub-directories (folders).

So, what do you need to do?
First setup a sub-directory onto which you will be mounting your 2nd hard disk. This entails using the 'mkdir /mnt/secondharddisk' command (again as root/su -). Obviously you can name the mount point (as this sub-srectory is called) as anything you want (/mnt/eric or /mnt/musicfiles ...).

Once you have a sub-directory (only need to do this once) you can mount your partion onto it (you should find - a quick 'ls /mnt -alF' will show you - that you have several sub-directories already in /mnt . The standard ones are /mnt/floppy and /mnt/cdrom. I let you guess what should be mounted onto those ). I say "partition" rather than disk, as you will be mounting partions (which could be your entire disk), and that can include your XP partion.

To mount a partition you need to know the device name of your partion. These are called /dev/hd plus a letter and a number. So, the 1st partition of your first drive is called /dev/hda1 the second is called /dev/hda2 the third /dev/hda3 ... You get the drift. Now comes the slightly odd bit. Your second disk drive might be on the same IDE cable as your first disk drive, in which case the partions, on your second disk drive, are called /dev/hdb1 /dev/hdb2 /dev/hdb3 etc. However, you may find that your CDROM is the second (of two) device on your first IDE (white ribbon) cable. In which case the CDROM will be called /dev/hdb1 . If, as I have, you're second hard disk is on your second IDE cable, then it is called (assuming that it is set as the master and not the slave on the IDE) /dev/hdc1 through to however many partions you have.

So, back to the mount command. As root or su - you need to enter 'mount' followed by the device name followed by the mount point (sub-diretcory). so, if your second hard disk is the master on your second IDE (white ribbon) cable and you wanted the first partition, you would enter 'mount /dev/hdc1 /mnt/musicfiles' (where /mnt/musicfiles is the name of the sub-directory you created earlier [see above]). You may have to include a '-t' parameter in the mount command, as Linux may not detect the file system correctly (command -t are vfat for windows stuff, ext2 or ext3 for Linux stuff).

Now you have your disk mounted, you can access it via the mount point (/mnt/musicfiles), where all of the usual sub-directories (folders) can be found.

Be of a pain, having to do this mount command every time you boot, isn'y it. So edit your /etc/fstab file and add all of the partitions that you want to be mounted at boot up.

have fun

Nerderello
__________________

Use Suse 10.1 and occasionally play with Kubuntu
Also have Windows 98SE and BeOS
Nerderello is offline  


 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 10:11 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2