How to share a drive on the network

Post here if you are a new Porteus member and you're looking for some help.
Post Reply
User avatar
Ed_P
Contributor
Contributor
Posts: 3398
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

How to share a drive on the network

Post#1 by Ed_P » 24 Jul 2014, 05:10

In Windows I share a drive with a script that executes the NET SHARE command. What is the Linux command for such a function?
Ed

User avatar
brokenman
Site Admin
Site Admin
Posts: 5651
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: How to share a drive on the network

Post#2 by brokenman » 26 Jul 2014, 12:16

I just typed into google: linux share drive

The first hit gives a detailed example of using samba. Honestly, there are literally thousands of webpages with examples of using samba.
http://www.howtogeek.com/176471/how-to- ... and-linux/
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 3398
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: How to share a drive on the network

Post#3 by Ed_P » 26 Jul 2014, 13:52

brokenman wrote:there are literally thousands of webpages with examples of using samba.
Yes, thank you, I found a few also. But .... viewtopic.php?f=117&t=3205&start=60#p26495
Ed

User avatar
brokenman
Site Admin
Site Admin
Posts: 5651
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: How to share a drive on the network

Post#4 by brokenman » 26 Jul 2014, 19:32

When I replied to the post you point to, I first updated USM and it ran smoothly. Perhaps the alien repo was having a problem at the moment you updated. I just tested again now and all is working.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 3398
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: How to share a drive on the network

Post#5 by Ed_P » 26 Jul 2014, 22:35

It's always something. Booting Windows was a quicker solution.

A couple of suggestions:

1. Add samba as a part of Porteus. Very users live in a single pc environment.
2. Create a USM module that can be downloaded and added to Always Fresh mode via a cheat code. The USM app would be current, the connection to numerous sites would be eliminated, Always Fresh would be current for testing USM problems.

If I knew more I would create a script that would create a module of the USM files that I have in GUI mode. I know the USM folders involved.
Ed

User avatar
Ed_P
Contributor
Contributor
Posts: 3398
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: How to share a drive on the network

Post#6 by Ed_P » 27 Jul 2014, 05:39

Ok, trying to create a USM module for Always Fresh mode this is what I've made so far..

Code: Select all

#!/bin/bash
# http://forum.porteus.org/viewtopic.php?f=117&t=3205&start=15#p24861

mkdir /tmp/usm
mkdir /tmp/usm/usr
mkdir /tmp/usm/usr/bin
mkdir /tmp/usm/usr/share
mkdir /tmp/usm/usr/share/applications
mkdir /tmp/usm/usr/share/icons
mkdir /tmp/usm/usr/share/icons/hicolor
mkdir /tmp/usm/usr/share/icons/hicolor/48x48
mkdir /tmp/usm/usr/share/icons/hicolor/48x48/apps
mkdir /tmp/usm/usr/share/usm
mkdir /tmp/usm/usr/man
mkdir /tmp/usm/usr/man/man8
mkdir /tmp/usm/etc
mkdir /tmp/usm/etc/usm
mkdir /tmp/usm/var
mkdir /tmp/usm/var/usm

cp -a --parents /usr/bin/usm                  /tmp/usm/ 
cp -a --parents /usr/bin/usmgui               /tmp/usm/ 
cp -a --parents /usr/bin/packagetools         /tmp/usm/ 
cp -a --parents /usr/share/applications/usm.* /tmp/usm/
cp -a --parents /usr/share/icons/hicolor/48x48/apps/usm*.* /tmp/usm/
cp -a --parents /usr/share/usm/*              /tmp/usm/
cp -a --parents /usr/man/man8/usm*.*          /tmp/usm/
cp -a --parents /etc/usm                      /tmp/usm/
cp -a --parents /var/usm                      /tmp/usm/

echo
echo Press Enter to create module, Ctrl+C to end.
read

dir2xzm /tmp/usm /tmp/usm.xzm
Which works but the resulting xzm module seems awfully light weight at only 11 MB.

Code: Select all

guest@porteus:~$ usmmodule.sh

Press Enter to create module, Ctrl+C to end.

gzip: /tmp/usm/usr/man/man8/usm.8 already exists;	not overwritten
Parallel mksquashfs: Using 2 processors
Creating 4.0 filesystem on /tmp/usm.xzm, block size 262144.
[===============================================================-] 569/569 100%
Exportable Squashfs 4.0 filesystem, xz compressed, data block size 262144
	compressed data, compressed metadata, compressed fragments, compressed xattrs
	duplicates are removed
Filesystem size 11197.84 Kbytes (10.94 Mbytes)
	8.55% of uncompressed filesystem size (130957.08 Kbytes)
Inode table size 1982 bytes (1.94 Kbytes)
	39.19% of uncompressed inode table size (5058 bytes)
Directory table size 970 bytes (0.95 Kbytes)
	48.60% of uncompressed directory table size (1996 bytes)
Number of duplicate files found 0
Number of inodes 94
Number of files 70
Number of fragments 11
Number of symbolic links  0
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 24
Number of ids (unique uids + gids) 2
Number of uids 2
	guest (1000)
	root (0)
Number of gids 2
	guest (1000)
	root (0)
guest@porteus:~$ ls -s /tmp/usm*.*
11200 /tmp/usm.xzm
guest@porteus:~$ 
Browsing the /tmp/usm folders everything seems to be there.


== update ==

Wow!! It works in Always Fresh mode!! :Yahoo!:
Ed

User avatar
brokenman
Site Admin
Site Admin
Posts: 5651
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: How to share a drive on the network

Post#7 by brokenman » 27 Jul 2014, 14:56

1. Add samba as a part of Porteus. Very users live in a single pc environment.
Porteus is light weight. Samba is not. It is included in Mate and will be in xfce but a highly stripped version is used.

2. Create a USM module that can be downloaded and added to Always Fresh mode via a cheat code.
Ok. I will create a module with the next release. I only use fresh mode and I create a module for myself. It's very easy (see below)

Instead of going to all that trouble below. Why not just download the latest slackware package and convert it a module?

Code: Select all

txz2xzm usm-3.1.2-noarch-1.txz
Then create a separate module for the database folders in /var/usm as these will be updated more frequently.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 3398
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: How to share a drive on the network

Post#8 by Ed_P » 28 Jul 2014, 11:04

brokenman wrote:1. Add samba as a part of Porteus. Very users live in a single pc environment.
Porteus is light weight. Samba is not. It is included in Mate and will be in xfce but a highly stripped version is used.
Please consider a similar approach for Razor then.
Instead of going to all that trouble below. Why not just download the latest slackware package and convert it a module?

Code: Select all

txz2xzm usm-3.1.2-noarch-1.txz
Then create a separate module for the database folders in /var/usm as these will be updated more frequently.
Not a bad idea. Thank you. But the script approach that I created isn't that bad either IMO in that it produces an exact copy of the USM system that I have installed which should help debug problems in Always Fresh mode, like the samba module problem I am having.

BTW $ mkdir -p is a more useful command for making the /tmp/usm directories than what I did initially. :good:
Ed

Post Reply