Setting up a Linux SMB file server

godzilla525godzilla525 Western Pennsylvania Member
edited July 2007 in Science & Tech
(Difficulty: Windows LUser, Pentium II 350, 96MB, Intel740 AGP, Promise Ultra100, WD800BB (80GB) 45610H6? (45GB), Generic NE2000 ISA PnP clone) :crazy:

Yes, the NE2000 clone is coming out once this computer functions well enough for me to bother going to the store and spending $20...maybe it'll also find itself endowed with larger drives.

I'm going to be stuck with Windows for a while (for a variety of reasons, some of which are below) and after going around in circles trying to find 'reliable' external storage I looked over at the disused Pentium II box and Ultra100 card.

I really wanted to use NT 4 because I more or less know how NT works (from XP), and it is old enough to run fast with a 350MHz CPU and 96MB. It didn't get past trying to see hard drives on the Promise Ultra100 (with the latest driver disk).

I decided after searching to give Debian a shot. 12GB of torrents later I couldn't figure out how to select which packages I wanted (how DO you get the asterisk to pop up, plus doesn't work, space doesn't work, enter doesn....oops, there it goes) :rolleyes:

This left me stuck with a 640x480 desktop with Gnome which seems to love whitespace, NIC nonfunctional, NTFS volumes wouldn't mount, stuck in VGA. After fooling with it for several hours without getting anywhere except with the stuff I was trying to read running off the screen, I downloaded the Ubuntu non-live CD.

Install went similar, although I was greeted by a 1280x1024 splash screen (yay!) and dumped to an 800x600 desktop which could only be changed between 640x480 and 800x600 (WTF?!?). :mean: I checked the boot logs and it kept saying that HSYNC was out of range for all the other resolutions (funny, it used to work fine up there in Windows 98...)

Since I don't have a KVM, I'd rather set up a console via COM1 or ethernet. I don't know how to make Ubuntu do that yet since it seems to scatter key options/settings all over the place (much like Windows).

At least it's usable at that resolution. I did get Samba set up but there's apparently no way to force it to work with the NE2000. I haven't exhausted all options with that card yet, although I might just go buy a decent NIC rather than burn out my remaining sanity getting that old card to work.

(On the bright side I found out that this card can be reconfigured using the realtek utility and might work on the 386 box...) :vimp:

Comments

  • godzilla525godzilla525 Western Pennsylvania Member
    edited July 2007
    Maybe one of these days I'll post something coherent. In the meantime I'm probably just going to go get a decent NIC and see if I have an problems after that. The desktop resolution doesn't matter as much as running without rebooting for long periods of time, and I'd rather admin from another machine anyway.
  • Your-Amish-DaddyYour-Amish-Daddy The heart of Texas
    edited July 2007
    Or you could just wait more than 4 hours before you assume anything. Send Grayfox a PM. He's the resident Debian nut.
  • GrayFoxGrayFox /dev/urandom Member
    edited July 2007
    If you need help pm me I can send you my aim address and help you set everything up.

    edit: Accuracy I might write up a quick guide and post it on my website.

    edit:
    heres a rough copy of the guide.
  • godzilla525godzilla525 Western Pennsylvania Member
    edited July 2007
    I think I got it. (found out about security = share in smb.conf) I managed to figure out how to set permissions on shared folders to allow Windows machines to create/delete, read/write, etc. Working with a second mouse and a keyboard on my lap drove me nuts, so I got VNC working until I get used to how everything works. I'll probably set up a terminal server once I get used to the command set.

    This evening I copied my music files over to it and played them over the network. There's practically no latency even when it's 'busy,' and it's hard to tell it's a network share unless you try to seek.

    I have been left with a new, odd problem. There's no way to partition and format disks. gparted hasn't been installed and "isn't available for this platform (i386)"...

    ...wait, nevermind, It worked this time. (?)

    I *think* I might be OK now, although I do see mounting a freshly partitioned and formatted volume is going to be a pain... only way to learn is to hack through it :)
  • godzilla525godzilla525 Western Pennsylvania Member
    edited July 2007
    OK now I really got stuck.

    I finally got the other drive mounted using
    sudo mount /dev/hdg1 /media/54610H6
    
    (it's partitioned and formatted to FAT32)
    It's now shared and can be seen on the network, however only root has write access.

    then I tried
    sudo chmod 777 /media/54610H6
    ls -l
    

    and I get this (current directory is /media$) I have yet to see # even though stuff usually works:
    drwxr-xr-x 2 root root 16384 1969-12-31 19:00 54610H6
    lrwxrwxrwx 1 root root     6 2007-07-04 22:54 cdrom -> cdrom0
    drwxr-xr-x 2 root root  4096 2007-07-04 22:54 cdrom0
    ...
    

    For some reason it's not working. The date and time are also screwy. Same thing with gksudo nautilus (which failed to authenticate for some reason)... I can right-click/properties and try to change permissions that way, but nothing sticks.
  • GrayFoxGrayFox /dev/urandom Member
    edited July 2007
    Add it to /etc/fstab/
  • drasnordrasnor Starship Operator Hawthorne, CA Icrontian
    edited July 2007
    The mount point needs to have permission 777 before you mount the volume.

    -drasnor :fold:
  • godzilla525godzilla525 Western Pennsylvania Member
    edited July 2007
    I added this line in fstab, rebooted, and it still won't let me enable write access even though it mounted correctly.
    # (file system) (mount point)   (type)  (options)       (dump)  (pass)
    ...
    /dev/hdg1       /media/54610H6  auto    rw,user,auto    0       0
    
    I tried unmounting before and it remembers the 777 that I applied to the folder previously, but as soon as the volume mounts, it's back to read-only for all but root again.

    I also tried unmounting, deleting the folder, recreating the folder, chmod 777 (worked), then mounting with -a. Still stuck. I'm wondering if there isn't something wrong with the partition/format.
  • GrayFoxGrayFox /dev/urandom Member
    edited July 2007
    I added this line in fstab, rebooted, and it still won't let me enable write access even though it mounted correctly.
    # (file system) (mount point)   (type)  (options)       (dump)  (pass)
    ...
    /dev/hdg1       /media/54610H6  auto    rw,user,auto    0       0
    
    I tried unmounting before and it remembers the 777 that I applied to the folder previously, but as soon as the volume mounts, it's back to read-only for all but root again.

    I also tried unmounting, deleting the folder, recreating the folder, chmod 777 (worked), then mounting with -a. Still stuck. I'm wondering if there isn't something wrong with the partition/format.

    Did you chown -R usernamehere before you tryed to use it ?.

    edit: Also from your account mount it with mount /dev/hdg1 it will look in fstab and see where to put it.
  • Your-Amish-DaddyYour-Amish-Daddy The heart of Texas
    edited July 2007
    If he's using ntfs-3g, he can just run the config tool for it, and it'll do everything.
  • godzilla525godzilla525 Western Pennsylvania Member
    edited July 2007
    I unmounted, reformatted to ext3, remounted, chmod 777, and everything works like it's supposed to. My guess is Ubuntu only mounts FAT32 or NTFS as read-only to keep people from trashing their Windows installations. (In any case, it's really annoying and would potentially complicate any data recovery efforts since apparently it won't allow Windows file systems to be used. Oh well.)

    I might look into ntfs-3g since I'm still in the playing-with-it phase...
  • GrayFoxGrayFox /dev/urandom Member
    edited July 2007
    I unmounted, reformatted to ext3, remounted, chmod 777, and everything works like it's supposed to. My guess is Ubuntu only mounts FAT32 or NTFS as read-only to keep people from trashing their Windows installations. (In any case, it's really annoying and would potentially complicate any data recovery efforts since apparently it won't allow Windows file systems to be used. Oh well.)

    I might look into ntfs-3g since I'm still in the playing-with-it phase...
    Fat 32 supports full read and writing.
  • kryystkryyst Ontario, Canada
    edited July 2007
    Keep in mind though that FAT partitions are limited in size under linux (I can't remember exactly what the size is) but more annoyingly FAT is limited to a maximum file size of 2 gigs. So if you have any large ISO files they will get completely messed up.
  • Your-Amish-DaddyYour-Amish-Daddy The heart of Texas
    edited July 2007
    Yeah, and that's why Fat and Fat32 suck. NTFS is where it's at, and with Ntfs-3g, I could read and write my NTFS partition. Added two comic books during my short time with linux.
  • godzilla525godzilla525 Western Pennsylvania Member
    edited July 2007
    FAT32 read/write and NTFS read-only with Knoppix worked fine when XP went down in flames on the laptop back in Oct. '04. (One word: Travelstar. The file system was so messed up that it caused a NTFS.SYS BSoD in any Windows machine I put it in)

    I don't know whether or not Ubuntu does anything special relative to other distributions when it sees Windows file systems. ...either it does or there was something about how the drive was formatted that it didn't like. Probably the latter judging from the date/time being completely nonsensical.

    I'll give ntfs-3g and ntfsprogs a try.

    I suppose if I really needed to do data recovery on ext3 partitions I could just put the drive in an external enclosure and plug it into another normally-Windows machine with sufficient RAM running Knoppix...
  • GrayFoxGrayFox /dev/urandom Member
    edited July 2007
    Yeah, and that's why Fat and Fat32 suck. NTFS is where it's at, and with Ntfs-3g, I could read and write my NTFS partition. Added two comic books during my short time with linux.

    Writing to NTFS can still be problematic. Linux likes to screw up its journaling and corrupt the file system. (Ive been told is rare on the newer versions)
  • godzilla525godzilla525 Western Pennsylvania Member
    edited July 2007
    Aha... with ntfs-3g and ntfsprogs, I have to have this line in fstab:
    # (file system) (mount point)   (type)  (options)       (dump)  (pass)
    ...
    /dev/hdg1       /media/54610H6  ntfs-3g rw,umask=0000   0       0
    
    It seems to work and everything shows rwxrwxrwx.

    I tried ntfs-fuse by mistake and it acts goofy. Some files won't copy over SMB and return an Access Denied disk full/no permisson/write protected error.
  • drasnordrasnor Starship Operator Hawthorne, CA Icrontian
    edited July 2007
    kryyst wrote:
    Keep in mind though that FAT partitions are limited in size under linux (I can't remember exactly what the size is) but more annoyingly FAT is limited to a maximum file size of 2 gigs. So if you have any large ISO files they will get completely messed up.

    The file size limit is 4GB (2^32 bytes). The maximum partition size is 137GB (2^37 bytes, look familiar?) DVD ISOs won't fit in the filesize limit but VOBs will. FAT32 is pretty awful for large files and drives though. NTFS on Linux is a great way to play fast and loose with your data.

    Samba is really trying to tell you there's something else wrong with your config. Have you tried using SWAT or one of the other GUI tools to configure it?

    -drasnor :fold:
Sign In or Register to comment.