LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   HSaring files between Linux & Windows (https://www.linuxquestions.org/questions/linux-newbie-8/hsaring-files-between-linux-and-windows-85311/)

jhachey 08-24-2003 08:11 PM

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?

Skyline 08-24-2003 08:30 PM

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

tangle 08-24-2003 08:38 PM

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

jhachey 08-24-2003 09:40 PM

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.

Skyline 08-24-2003 09:46 PM

What's the device name of the partition youre trying to mount? Can you post your fstab entry that youre currently using?

jhachey 08-24-2003 10:29 PM

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?

Azmeen 08-24-2003 10:35 PM

Try hda1 instead.

jinujose 08-24-2003 11:22 PM

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

jschiwal 08-25-2003 04:52 AM

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!

tangle 08-25-2003 07:53 AM

How about you do and fdisk /dev/hda and post the printout. Then do a fdisk /dev/hdb and post the printout.

jhachey 08-25-2003 10:44 AM

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.

Skyline 08-25-2003 10:50 AM

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

jhachey 08-25-2003 11:16 AM

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 10:25 PM.