Linux - NewbieThis 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.
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.
I am building myself a new machine at work, and I decided to make my machine dual boot with Redhat 9 and Micro$oft Window$ 2000 pro. I used Fat32 partitioning on the M$ side, in hopes that my Redhat side (the primary boot choice) can read from it.
What I would like to do ideally is run FTP servers on both operating systems, but run them on the same directory. Being an old pro at window$ I got this up with no difficulty, but now the challenge is getting the Redhat side to both a) see the M$ side and b) run an FTP server on the same directory.
The only time the machine seems to see both sides of itself is during booting, when GRUB shows both choices. Right now when I do an ls command from the root of the Linux side, it doesn't show any sign of the Window$ side, and looking at the contents of c:\ doesn't show any of my Redhat.
Right now the M$ side has c:\ftproot as it's directory for sharing, and I'd like to share the same thing from Redhat, that way I won't have to reboot the system every time somebody needs something that is on the other OS's FTP server.
Security isn't a big deal, as the machine only has a DHCP internal address, and all we tend to FTP into and out of it are files during laptop rebuilds, and sometimes the same thing for the servers.
Thanks for reading through my rambling, and I hope to get this configured with your help!
Well first of all you have to make sure you have fat support built as a module or compiled into the kernel in Redhat.
Next create a mount point in your root directory the / in your redhat install. do this by using
mkdir Windows2000
or another folder name.
now use your favorite text editor to edit /etc/mtab and etc/fstab in one of these files you will see a list of drives and partitions mounted at boot time. In the other you will see partitions or drives, and their associated mount points, like below
/dev/hdc /cdrom iso9660 defaults,noauto 0 0
While this may be cryptic it basically says device at this device location mount to this folder in the linux root, for filesystem for your 2000 instalation it will be either vfat, or fat32.
Once both of those are edited, the windows drive will mount automatically to the Windows Folder on boot. But since you have not rebooted you need to mount it. type
mount /Windows
or whatever folder you created and added to mtab, and fstab.
Finally you need to edit the config for your linux ftp server, this will vary on which ftp server you are running. Basically, however, you need edit the anonymous ftp folder or public ftp folder to be the folder on your mounted windows drive, that the windows ftp uses, or add a user that has access to that windows folder. If you logon as a registered linux user that has the correct permissions, you will be put at first in your home directory but you can then navigate to the ftp folder on the windows drive.
I'm at work now, and our developer is a Linux guru, so if I have to recompile the kernel he is willing to give me a hand. I'll try for a module that will allow reading from Fat32 first, and if I can't find one then I'll go for the recompile.
Thanks for the specific instructions, and I'll post again once I get something going or hit a wall I can't get past.
All is good! I can read every file on my Windows side through redhat now. It turns out vfat support was added way back in redhat 5.1, so I didn't have to add a module or recompile.
All it took was making a win2000 directory in the linux root, and then adding:
/dev/hda1 / vfat rw 0 0
to my /etc/mtab
and also
/dev/hda1 /win2000 vfat defaults 0 0
to my /etc/fstab
as soon as I typed in mount /win2000 I could see everything.
Now I only have to setup the FTP server on Linux, but I don't expect any great difficulty in doing that.
Hey one thing, In you mtab change the moint point for the win from / to /win2000 otherwise at boot time it will try to mount the windows partition as the root partition good luck if you have any issues with the ftp let us know
Originally posted by scheidel21 Hey one thing, In you mtab change the moint point for the win from / to /win2000 otherwise at boot time it will try to mount the windows partition as the root partition good luck if you have any issues with the ftp let us know
--Alex
Alex,
Good call on that oversight by me, but Redhat somehow corrected itself. I left Windows up overnight, rebooted to redhat this morning, and after checking the fstab and mtab, I found it had already changed the mtab file to read:
/dev/hda1 /win2000 vfat rw 0 0
instead of
/dev/hda1 / vfat rw 0 0,
which was how I left it. I didn't think Linux would change configuration for you, but it did in my case. Maybe becasue I specified /win2000 in the fstab?
FTP server config is going ok. I have VSFTP installed through an rpm. It was having problems with the permsissions on the directory I had Window$ sharing. I could read it and do chmod and chown, but it would always default back to drwxr-xr-x, and that is obviously no good, as nothing could be uploaded by anyone other than the root. What I am going to do now is create a directotry in my /win2000 directory, but have Linux create it, and give it 750 permissions, as well as changing the group ownership from root to localusers. I think that will correct the problem, but if I stumble, I'll post for help.
It can't be done the way I wanted to. The problem is in the permissions. I "can" share the same directory, but the Linux side can't modify the permissions on the Windows directory. Even though the Windows side allows read and write access to the same drive, Linux shows the permissions being drwxr-xr-x. Linux won't allow me to modify those permissions in any way.
My solution was simply to build a ftp directory on the Linux side, which I can set the permissions on. I have 15 Gig on the way across the network as I write this. I simply won't reboot into the Winblow$ side, hopefully ever.
Getting vsftpd up was a much larger pain than I had expected. It seems to be preconfigured for anonymous ftp service, but only to read, and not to write. I had to tweak my vsftpd.conf file several times, then also play with the ownership and permissions of the ftp directory. I had many errors reporting that anonymous root access was not permitted. I found that hilarious, both becasue I set up the ftp service to force a valid local user/pass, (not anonymous) and root is not allowed to log in (not root). All is good now, it just took more work than I had anticipated.
Actually I had an issue with being unable to write to my windows partition, it wouldn't allow write, check this thread here to correct it....then if you ever have to boot Windows at least it will work http://www.linuxquestions.org/questi...hreadid=132914
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.