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.
This is sort of a three in one question. Let me start with an into to my problem. My linux box is a dual boot system, win 98 SE, and red hat 9.0 personal. I have a huge drive (160 gig) on my linux box. I made fat16 (VFAT) partitions on the drive so that windows and linux could communicate with the drive. Through windows 98, I have shared the partitions. On my network, I have 4 windows PCs running. Now my question are: (1) how do I get linux to recognize my network?, (2) how do I share the partition through linux?, (3) how do I access the partitions through linux.
OK, first you need to mount your fat partitions into linux. For this check out the mount command. (Hint: mount /dev/hdXY /mnt/fat1 - where X is your disk and Y your partition).
Second - once mounted succesfully - you need to dance .samba. With which you will share your Disks in your network, and also - almost by magic - your linux machine will appear in your windows enviroment.
2 ) - - In terms of Linux - You "share" partitions between OS's by mounting the filesystem of the shared partition into your main Linux directory tree.
3 ) - - Again - you can "access" a partition when it has been mounted succesfully.
In general - to mount a Windows partition in Linux you:
Create a mount point - as Root user - mkdir /mnt/windows
Then put an entry in /etc/fstab - as Root user - Kedit /etc/fstab (or whatever editor you want to use)
/dev/hda1 /mnt/windows vfat auto,umask=000 0 0
This line would mount a FAT32 filesystem from /dev/hda1 to /mnt/windows automatically on boot up.
FAT16 cannot create more than 2 gigabytes and it waste space too (32 kilobytes per cluster). LINUX can handle FAT32 and FAT32 can create up to a two terabytes. Why you think LINUX can only handle FAT16?
Quote:
Second - once mounted succesfully - you need to dance .samba. With which you will share your Disks in your network, and also - almost by magic - your linux machine will appear in your windows enviroment.
Not true if you didn't add any samba users or you set sercurity to users in the smb.conf file.
Can someone give a detailed discription on how to mount the drive?
In terms of mounting a filesystem, I've already gave you 90% of the answer in post 3 - its all there - Its up to you if you want to adapt it to suit your FAT16 situation - or as Electro alluded to - go with FAT32 for Win98se - I'd go with FAT32.
ok, mkdir /mnt/windows, I do this, makes directory in /mnt.
When I do /etc/fstab, i get bash: etc/fstab Permission denied. Im logged in as root.
When I do /dev/hda1 /mnt/windows vfat auto,umask=000 0 0, i get the same permission denied error.
The reason Im going with fat16 is that there is a posibility for a unix server being added to the network, so I want to make sure everything runs smoothly.
What do you mean by do? You need to modify the /etc/fstab file using a text editor and add the line (/dev/hda1 /mnt/windows ...)at the end.
Then you can mount the file i.e mount /mnt/windows
Unless you are going to physically move the hard drive to the unix server it doesn't matter what file format you use. Since all the file translation is in the network filesharing drivers, a linux PC (with samba installed) can write to a NTFS filesystem just as easily as it can write to any filesystem on the linux PC itself.
You might find it easier to share a linux native filesystem with a network then trying to share a FAT filesystem if you need to use samba file permissions.
Ok, I was able to mount the drive partition. Now how do I get my linux system to appear in a Windows Enviorment. Lets call my windows workgroup "mshome". On all of my Window's pc's, i have NETBios enabled. How will I go about setting my workgroup, and NETbios in linux?
Add a samba user (login as root)
smbpasswd -a your_windows_user_name
Enter a password
This should be the same as the user / password on your windows PC's as well as an existing user on the linux PC.
Edit the /etc/samba/smb.config file and change the workgroup to match your windows workgroup. Again need to be root.
Restart samba:
service smb restart
Now in a DOS prompt on your windows PC try the following command:
net view
You should see your linux PC. Look at network neighborhood if you see the linux PC you select it and then you should see the home directory of the windows user.
On the linux PC in a console window try:
smbclient -L linux_hostname
Just press enter key when it ask for a password
(replace linux_hostname with actual computer hostname)
You should see the browseable shares being listed along with the netbios name, workgroup name and a bunch of other stuff.
To see of the samba is running
ps ax | grep smbd
&
ps ax | grep nmbd
Does it output a line
xxxx x smbd -D
&
xxxx x nmbd -D
If not look at the /var/log/samba logs and see if there are any errors.
If you selected the default firewall during install it might be blocking the windows PC from see the linux PC.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.