LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 08-11-2003, 03:17 PM   #1
zc923
LQ Newbie
 
Registered: Aug 2003
Posts: 10

Rep: Reputation: 0
Question Hdd sharing


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.

Thanks for the help in advanced
 
Old 08-11-2003, 03:24 PM   #2
codecruncher
Member
 
Registered: Aug 2003
Location: Austria
Distribution: Fedora Core release 2 (Tettnang)
Posts: 37

Rep: Reputation: 15
You have much to learn my young apprentice...

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.

regards
Klaus
 
Old 08-11-2003, 03:54 PM   #3
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
hI ZC
  1. 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.

Last edited by Skyline; 08-11-2003 at 03:57 PM.
 
Old 08-11-2003, 05:06 PM   #4
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
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.

Some LINUX documents written for Newbies
http://www.justlinux.com

Hardcore LINUX documents
http://www.tldp.org
 
Old 08-11-2003, 05:23 PM   #5
zc923
LQ Newbie
 
Registered: Aug 2003
Posts: 10

Original Poster
Rep: Reputation: 0
Can someone give a detailed discription on how to mount the drive?

Thanks
 
Old 08-11-2003, 05:51 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
You can find lots of help on beginner questions if you do a little searching yourself.

Check out this thread.
http://www.linuxquestions.org/questi...windows+drives

Redhat docs
http://www.redhat.com/docs/manuals/linux/

Last edited by michaelk; 08-11-2003 at 05:53 PM.
 
Old 08-11-2003, 06:47 PM   #7
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
Quote:
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.

Last edited by Skyline; 08-11-2003 at 06:51 PM.
 
Old 08-11-2003, 07:35 PM   #8
zc923
LQ Newbie
 
Registered: Aug 2003
Posts: 10

Original Poster
Rep: Reputation: 0
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.
 
Old 08-11-2003, 08:16 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
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.
 
Old 08-11-2003, 09:20 PM   #10
zc923
LQ Newbie
 
Registered: Aug 2003
Posts: 10

Original Poster
Rep: Reputation: 0
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?

Last edited by zc923; 08-12-2003 at 11:18 AM.
 
Old 08-12-2003, 03:51 PM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
To share files between linux PC's and Windows PC's you need to install samba. See previous thread for link.

You will also need to add TCP/IP protocol on the windows PC's.

What linux distribution are you running?
 
Old 08-12-2003, 04:25 PM   #12
zc923
LQ Newbie
 
Registered: Aug 2003
Posts: 10

Original Poster
Rep: Reputation: 0
im running samba, and I have tcp/ip protocal running on my windows pc's. Im running Red Hat Linux 9
 
Old 08-12-2003, 04:42 PM   #13
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
Have you read any of the samba documentation?

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.
 
Old 08-12-2003, 06:23 PM   #14
zc923
LQ Newbie
 
Registered: Aug 2003
Posts: 10

Original Poster
Rep: Reputation: 0
[global]
netbios name = Linux
server string = "Linux"
workgroup = MShome
security = share
log file = /var/log/samba.log
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
encrypt passwords = yes
wins support = yes

[public]
path = /tmp
guest ok = yes
writeable = yes

This is what my smb.config file looks like...yet it does not appear in my Windows network neighborhood or in the dos command result of net view.
 
Old 08-12-2003, 08:59 PM   #15
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,592

Rep: Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880Reputation: 5880
Add to your public share
Browseable = yes

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.

To flush firewall rules
iptables -F
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to add a third hard drive (hdd) and get Unable to open /dev/hdd MikeyCarter Linux - Hardware 4 12-26-2005 10:27 PM
Install directly to HDD from iso on HDD/USB, with out burning cd vivinuthappa DamnSmallLinux 7 11-16-2004 10:03 AM
How to make mirror image of linux partion to one1 HDD TO 2 HDD raj_1 Linux - General 2 11-04-2004 01:45 AM
linux sharing same HDD partition with win xp actteoh Linux - Hardware 2 05-20-2004 10:14 AM
How to format & mount 2nd hdd after FedCor1 has been installed on 1st hdd? clay394 Fedora 1 05-18-2004 01:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration