Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-24-2003, 08:11 PM
|
#1
|
LQ Newbie
Registered: Aug 2003
Posts: 17
Rep:
|
HSaring files between Linux & Windows
I have just installed RedHat 9 on its own hard drive (hdb). I have Windows XP on my first drive. I made a fat32 partition on my windows drive whre I am storing all of my mp3s. I want to be able to auto-mount that partition so that I can listen to my MP3s while Im working with Linux. I have tries to mount the drive from a command prompt, but wasn't able to. Could someone tell me how you could do this? I cant even mount the parttion from the terminal. Also, do you think I could use Samba to accoplish this. Or do you have to have a Client/Server network environment for that?
|
|
|
08-24-2003, 08:30 PM
|
#2
|
Senior Member
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104
Rep:
|
Open a shell and type :
su
Then type you root password – then type :
mkdir /mnt/windows
Then - open /etc/fstab with:
kedit /etc/fstab
Then - put an entry at the bottom of your /etc/fstab file on a new line - (just substitute in your Partition and Mount point in place of my example ones)
/dev/hda1 /mnt/windows vfat defaults,umask=000 0 0
|
|
|
08-24-2003, 08:38 PM
|
#3
|
Senior Member
Registered: Apr 2002
Location: Arbovale, WV
Distribution: Slackware
Posts: 1,761
Rep:
|
1) make a directory named winxp in /mnt.
mkdir /mnt/winxp
2) Change attributes to read/write for everyone.
chmod 777 /mnt/winxp
3) add this line to the /etc/fstab
/dev/hda2 /mnt/winxp vfat uid=500,gid=500,umask=000,exec,dev,suid,rw 1 0
4) mount without reboot
mount /mnt/winxp
5) always do a search before posting a question. This has been asked many times here.
This is done assuming that the the fat32 partition is the second partition on the hard drive that windows is insstalled.
mount /mnt/winxp
|
|
|
08-24-2003, 09:40 PM
|
#4
|
LQ Newbie
Registered: Aug 2003
Posts: 17
Original Poster
Rep:
|
This is the error message I got after doing what you told me, tangle:
mount: wrong fs type, bad option, bad superblock on /dev/hda2,
or too many mounted file systems
(aren't you trying to mount an extended partition,
instead of some logical partition inside?)
The partition I am trying to mount is inside a extended partiton. Is there something else I have to do under these circumstances.
I have tried to research the problem. I can't seem to get it to work.
|
|
|
08-24-2003, 09:46 PM
|
#5
|
Senior Member
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104
Rep:
|
What's the device name of the partition youre trying to mount? Can you post your fstab entry that youre currently using?
|
|
|
08-24-2003, 10:29 PM
|
#6
|
LQ Newbie
Registered: Aug 2003
Posts: 17
Original Poster
Rep:
|
Im not sure what the device name is.
Its on hda and it is in an extended partition.
Here is the layout of the drive:
[ C: HARD DRIVE ] [ extended [ F: MP3s] ]
would that make it hda3?
|
|
|
08-24-2003, 10:35 PM
|
#7
|
Senior Member
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307
Rep:
|
Try hda1 instead.
|
|
|
08-24-2003, 11:22 PM
|
#8
|
LQ Newbie
Registered: Apr 2003
Location: india
Distribution: RedHat
Posts: 14
Rep:
|
your partition may be hda5 most probably...
try using the df command... it display all parttions with file system type.... (in linux)
in extended partion the partion start with hda5, hda6 ..... not continue after primary partions.... ie, it will not be hda3
in ur case windows C partition is hda1(primary). and most probably F will be hda5..
but where is your D & E drives..
pls attach the result of df command ..
jinujose
|
|
|
08-25-2003, 04:52 AM
|
#9
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
The fstab entry given by tangle may not work for you.
The uid= and gid= may not be correct for your setup.
First find out what your User ID and Group ID is by listing the /etc/passwd file. You may want to create a group for the purpose of file sharing. Such as a group called fileshare. Then you could set the gid= line to the number of the fileshare group.
Since the drive will contain mp3's and not code, consider the options nosuid and noexec instead.
What the suid does, is change the effective user id of the running program to that of the programs owner, which could be root. Since the directory will not contain programs, noexec is prevent programs from being executed from this directory. Just another precaution.
There is a nice mounting option called remount which you can use to make changes to a mounted drive. For example, suppose you want to add the option guid=502.
Type into a shell something like :
mount /mnt/mp3s -o guid=502
You don't have to remember the device location, or the other options since they are not changed.
Lastly, check if there is a graphical drive setup program in Red Hat. The one in Mandrake is called diskdrake, but in Red Hat I don't know what it is called.
Hope this helps!
|
|
|
08-25-2003, 07:53 AM
|
#10
|
Senior Member
Registered: Apr 2002
Location: Arbovale, WV
Distribution: Slackware
Posts: 1,761
Rep:
|
How about you do and fdisk /dev/hda and post the printout. Then do a fdisk /dev/hdb and post the printout.
|
|
|
08-25-2003, 10:44 AM
|
#11
|
LQ Newbie
Registered: Aug 2003
Posts: 17
Original Poster
Rep:
|
Here is the printout of df -ah command:
Filesystem Size Used Avail Use% Mounted on
/dev/hdb2 5.8G 4.8G 710M 88% /
none 0 0 0 - /proc
usbdevfs 0 0 0 - /proc/bus/usb
none 0 0 0 - /dev/pts
/dev/hdb3 1011M 78M 881M 9% /home
none 125M 0 125M 0% /dev/shm
It doesn't include anything from my first hd.
fdisk doesn't work for me for some reason. I typed the commands
fdisk /dev/hdb
&
fdisk -l /dev/hdb
All I get is "bash: fdisk: command not found". It says that even if I just type fdisk. cfdisk does'st work either.
|
|
|
08-25-2003, 10:50 AM
|
#12
|
Senior Member
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104
Rep:
|
With Red Hat to run the fdisk command you'll need
su -
root password
ie the su has to have a spacce after it then a hyphen then carry on as normal with the
fdisk -l /dev/hdb
etc
|
|
|
08-25-2003, 11:16 AM
|
#13
|
LQ Newbie
Registered: Aug 2003
Posts: 17
Original Poster
Rep:
|
Well, I was able to get it to auto-moiunt the drive by adding this line to /etc/fstab:
/dev/hda5 /mnt/winxp vfat uid=500,gid=500,umask=000,exec,dev,suid,rw 1 0
The only problem I am having now is that I can't play the MP3s with Noatun, Audio Player, or Kaboodle. Audio Player even goes as far as saying that it doesn't support MP3s becasue of piracy or something. The other ones will open the file but not play it.
|
|
|
All times are GMT -5. The time now is 03:24 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|