Tiny Core Linux

Tiny Core Extensions => TCE Tips & Tricks => Topic started by: s4brains on May 04, 2013, 11:05:08 AM

Title: HOWTO: Lightweight Mounting of Windows Shares
Post by: s4brains on May 04, 2013, 11:05:08 AM
Greetings to the TCL Community:

The space available on my multiboot USB stick for an implementation of TCL is extremely limited so I was delighted to discover that it is not necessary to install the entirety of samba3 (about 33 MB) in TCL in order to mount windows (cifs) shares.

Mounting windows shares can be accomplished with a less than 3 MB footprint.

Prerequisite extensions to install:  

"findshares.tcz"

"cifs-utils.tcz" (This will install samba3-libs.tcz, libcap.tcz, libattr.tcz, krb5.tcz, keyutils.tcz, filesystems-3.0.21-tinycore.tcz, and mtd-3.0.21-tinycore.tcz if they are not already installed.)

Steps to mount a share:


1) Run "findshares" in a terminal to identify shares available on the network and the IP address of the host offering the share.

 example output:

findshares version 1.05 Aug 3, 2011
Copyright Richard A. Rost April 23, 2011

Local Host Name  = TinyCore
Local IP Address = 192.168.0.47 on eth0

Samba/Windows Shares
--------------------------------------------------------------------------------
WIRELESS
    UNIDENTIFIED     192.168.0.1       
        VIDEO_1 (E)                   
        E$                             Default share
        IPC$                           Remote IPC
        D$                             Default share
        print$                         Printer Drivers
        SharedDocs                     
        I$                             Default share
        P4P_SYNC                       
        P4P800-Repo                   
        Mail Folder                   
        MOVIES (D)                     
        F$                             Default share
        Music                         
        VIDEO_2 (F)                   
        ADMIN$                         Remote Admin
        C$                             Default share
        Printer                        Microsoft XPS Document Writer



2) We will choose "Music" as our share which we would like to mount.

3) In a "RootShell" terminal make a mount folder to attach the desired share to.  e.g. "mkdir /mnt/ Music".

4) While in the "RootShell" terminal execute the command "mount -t cifs //192.168.0.1/Music /mnt/Music -o guest" to mount the chosen share.

5) When finished using the share and again while in a "RootShell" terminal execute the command "umount /mnt/Music"  followed by "rmdir /mnt/Music".

Notes:

 1) If the shares which you wish to mount are password protected, see the manpage for "mount.cifs" and replace the "guest" argument to the "-o" option with the appropriate syntax to supply username and password.

2) The TCL F.A.Q. discussion about mounting windows shares is not entirely correct because it makes no mention of the need for the "cifs-utils.tcz" extension.

3) A special "thank you" to Richard A. Rost for his excellent "findshares" utility.

4) Linux shares on hosts which are exported by Samba can also be mounted with this procedure.

5) One cannot export shares from your Tiny Core host with this minimal install.  That would require the entire Samba3 installation.


Best Regards,

s4



Title: Re: HOWTO: Lightweight Mounting of Windows Shares
Post by: Rich on May 04, 2013, 11:10:31 AM
Hi s4brains
Quote
3) A special "thank you" to Richard A. Rost for his excellent "findshares" utility.
You are welcome. I'm glad you found it to be useful.
Title: Re: HOWTO: Lightweight Mounting of Windows Shares
Post by: hiro on May 04, 2013, 11:51:08 AM
thanks also from me, findshares is very useful.
Title: Re: HOWTO: Lightweight Mounting of Windows Shares
Post by: Rich on May 04, 2013, 07:05:54 PM
Hi hiro
Thanks for the feedback, much appreciated.
Title: Re: HOWTO: Lightweight Mounting of Windows Shares
Post by: Lee on May 04, 2013, 09:08:40 PM
This is actually the first I've heard of findshares that I can remember.

I use samba shares for backup on my "mixed" network at home and this is turning out to be quite useful...

It seems my wife's Windows box has comedown with an "infection" so I've got it running Core for the time being, doing some last minute scanning and backups before I do something drastic - yet verrrry satisfying ;)   -  to Windows.  Being able to easily find those samba shares so easily is great.


Title: Re: HOWTO: Lightweight Mounting of Windows Shares
Post by: Rich on May 04, 2013, 09:25:00 PM
Hi Lee
The program is also useful for checking that you are not sharing something unintentionally, including those so called
hidden shares, the ones that end with a $ sign. For those not familiar with the program, it also finds NFS shares.

Title: Re: HOWTO: Lightweight Mounting of Windows Shares
Post by: hiro on May 05, 2013, 07:40:51 AM
you can't imagine how often I mounted some samba share like mount -t cifs //server/ /mnt/server and got stupid annoying meaningless "authentication errors" instead of suggesting to me to mount an actually existing share. But to find out how these shares are called this tool is very useful, and I also noted that it supports NFS shares, which I also use quite often :)