Access a Windows Partition on a dual boot system
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?
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 :lol: ). 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.