Updated: September 18, 2003
(Transferred from Wiki by Peter)
Okay - You have loaded linux along with MS Windows as a dual boot system and and now you wish to access al those MP3 files on the MS Windows partions. Perhaps the installer negelcted to do this automatically and if it did do it you have no idea of how to use it. This PET is how to get access to all those files.
- Look at the file /etc/fstab. This file is responsbile for automating the mounting of different files systems, it handles file systems on the local hard dirves and networked filesystems. Here is an example:
/dev/hdb1 / ext3 defaults 1 1
/dev/hda5 /backup ext3 defaults 1 2
/dev/hda1 /c vfat noauto,defaults 0 0
none /dev/pts devpts gid=5,mode=620 0 0
/dev/hdb3 /home ext3 defaults 1 2
/dev/hdb4 /mp3s ext3 defaults 1 2
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hdb2 /usr/local ext3 defaults 1 2
/dev/hda6 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro,user 0 0
/dev/cdrom1 /mnt/cdrom1 iso9660 noauto,owner,kudzu,ro,user 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu,user 0 0
sparches:/tmp /net/stmp nfs rw,hard,intr,noauto 0 0
pookie:/tmp /net/tmp nfs rw,hard,intr 0 0
//sparches/c /net/sparches smbfs username=pbharris,password=thisisabadpassword,noauto 0 0
Now this has networked drives from other linux machines and a SMB share (i.e. a MS Windows network shared drive) which it can mount. It also has the ability to mount an MS Windows FAT32 (also know as vfat) based drive. It is mounted at boot time and can be unmounted with the command umount /c and remounted with the command mount /c. The /etc/fstab file knows this is a FAT32 drive and mounts it (i.e. makes it accessible) accordingly. If there is no entry for vfat or ntfs then you will need to create one, if there is and vfat or ntfs entry in the 3rd column then it should be as simple as typing mount /<mountpoint> where mount point is the directory listed in the 2nd column next to the line which had the entry for vfat or ntfs. An example of this is seen above.
- If you don't have an entry for vfat or ntfs then you can create one or simply mount the partition. You need to know what paritition the vfat or ntfs file system is on, you should know this from when you set up you hard drive(s). nine times out of ten this will be /dev/hda1, the first partition on the master hardrive connected to the primary hard drive controller. The rest of this PET will assume it is there.
- Create a mount point, i.e. an empty directory which will be the point at what which files can be accessed. Lets call this dos. to do this open a terminal and type mkdir /dos.
- Edit the file /etc/fstab and add a line which looks like this: For a Fat32 partition:
/dev/hda1 /dos vfat noauto,defaults 0 0
Mounting a MS Windows NT/2000/XP drive so that all users can access it
And for a ntfs partition:
/dev/hda1 /dos ntfs noauto,defaults 0 0
Thanks to SpookyEddy and Griobhta for providing this tip If you wish for all users to be able access the NT partion add the umask and group id to the fstab entry as shown in the example below.
Save the file and type mount /dos. You should now be done, you can browse to this directory with you favorite file manager. In this example the MS Windows partition is not mounted automatcally, to have it get mounted automatically at bootup remote the noauto word.
/dev/hda1 /dos ntfs defaults,user,ro,umask=002,gid=100 0 0
A note on ntfs filesystems: You may not have support for NTFS in your kernel, if this is the check out the kernel compiling PET and this artilcle.
http://www.getlinuxonline.com/omp/di...at/ompntfs.htm Also note, NTFS support under linux is *READONLY*. I don't use NTFS, these are things I have read.
Also there are precompiled modules for RedHat located here: http://linux-ntfs.sourceforge.net/, this removes the need to compile your kernel.
Download the appropriate module for your kernel, to determine your kernel version open a terminal and type uname -a. This will return several items, including the current running kernel version.
If there is an error, or you have a suggestion for this PET please contact me here at linux junior or email me at: email@example.com
The forums and I are not responsible for any problems, errors, or anything else which may happen as a result of this PET.