Distros : Puppy - Samba

Booting a PC into Puppy Linux to copy files from its hard drive to a USB stick is easy, but what if you want to copy the entire contents of a Windows Users directory or the complete Windows C: drive, how many USB keys would that take??

Have you another PC/Laptop with a decent size hard drive that you can copy these files onto, well then Puppy to the rescue again, it has Samba installed which is a universal way to share files and printers over the network.

For best results use Ethernet cables to connect the PC's via your home router or directly to each other using an Ethernet Crossover cable, this YouTube video from Cisco explains Ethernet Cables, rather than wireless which may stall during a large file transfer.

So lets get connected, plug in the Ethernet Cables in to the PC's and Router or to each other (with a crossover cable) and you should see green and orange flashing lights on the PC's Ethernet ports as they become live.

If using an Ethernet Cable to a router, puppy should automatically connect to the network however if directly connecting puppy to another PC using a crossover cable you may need to click on the connect icon on the desktop and in the Interface Tab choose the Ethernet interface....

Puppy using a Crossover Cable, click on Connect and choose the Ethernet Interface enp2s0

...then you should get confirmation that the interface has been set up.

Successful connection to wired network enp2s0

Now for some puppy housework, by default the firewall is on and needs to be tweaked to allow other computers access the samba shares so right click the Desktop and click on Network » Firewall Setup or Right Click on the Green Firewall Tray Icon and choose Firewall setup from there.

Puppy Network menu.

If puppy is connected to your router click on Your firewall is configured.. to clear it, which will allow you to click on Samba so that other PC's can access the Samba Shares and Samba Client so that you can access shares on other PC's.

Alien Bob's Easy Firewall Generator for IP Tables

If your network is a direct connection to a pc and you click on Firewall Setup you will get the warning below. I have found that even though the firewall was set up to allow access to Samba the shares are still blocked, so Right Click that Firewall Icon and turn it OFF, the Icon now becomes RED!!

Puppy Turn off the Firewall

Now to mount the partition you want to share....puppy has icons for each mountable drive on the Desktop, just hover over each of them to see its file type and size. Windows will be on the largest partition on the hard drive sda in this case /dev/sda4 which is formatted with a NTFS file system and is 359GB in size

Puppy Desktop icons for mountable partitions

So click on the sda icon for the Windows partition to mount it and then start the Samba Service by right clicking the Desktop then Network » Samba Simple Management.

Puppy Starting Samba

The first thing to note is that Samba has a default user root with the password woofwoof, you use this account to gain access to the Samba Shares.

Puppy Samba on and Share mounted

Samba by default is OFF so click on the SAMBA button to start it. In order to share the C: Drive click on the second folder icon and browse to the mounted Windows partition /mnt/sda4 and give it a sensible name like C-drive. To make life easier change the netbios name from puppypc26353 to puppy and then click Apply.

Make sure that your share is mounted, otherwise when you browse to that share you will see NOTHING!!

Now to access that samba share from another PC that is running Windows 10....

Windows Network discovery turned off.

If this is the first time you accessed shares from your PC you need to turn on Network discovery, in some versions of Windows they may be a link with the notice to that setting, if not, as in the case above, hold down the Windows Key and R, this brings up the Run Box and in that type control and hit Enter. This will bring up Windows Control Panel.

Windows Control Panel, view by small icons.

In the Control Panel choose to sort by Small icons and select Network and Sharing Centre and then Click on Advanced Sharing.

Windows: Turn on Network discovery

In the Advanced sharing settings turn on Network Discovery and also File and printer sharing and click Save changes.

Windows: Prompted for credentials to connect to PUPPY

Now you should see other computers, click on puppy to see its shares, then click on C-drive you will be asked for a username root and that super strong password woofwoof then click OK.

Windows: Connected to the Samba Share.

Now you have complete access to the Windows Partition /dev/sda4 aka C: and can copy all the data from the Users folder or the entire partition to the PC.

Accessing a samba share from a PC running Linux is easy. The file manager should have a shortcut to the Local Network, with the Mate Desktop simply click on Places » Network.

Click on Windows Network and puppy should be visible. Click on puppy to bring up its samba shares and click on C-drive which will bring up that login box.

Linux PC: Windows shares on puppy.

With some Linux file managers it may be easier to put in the network address of the pc running puppy into it's address bar as in the form..

smb://netbios_name (puppy's name) or else smb://192.168.1.3 (puppy's ip address, see below.)

smb:// is the protocol used, similar in form to this web page http://etcetera.ie/puppy/samba.php.
Linux PC: Access to c-drive on puppy.

Troubleshooting Network Issues

If you are not able to connect to the samba shares on puppy go to that PC and try the steps below:

Open a terminal by clicking on the console icon on the Desktop or right click the Desktop then Utility » LXTerminal

In the terminal type in ip addr show to find the IP address of the active network connection, below the pc is using the Ethernet Port enp2so rather than wifi and is connected to the network through a router. Typically the IP address should be in the form of 192.168.1.x which is a private IP address.

Puppy ip addr show to get its IP address.

For extra bonus points type in ip route show this will give you the router's IP address which is the Default Gateway, how you connect to the Net.

If Puppy is connected directly to another PC with a crossover cable the IP address will be similar to below..

Puppy Link Local IP Address.

IP addresses in the form of 169.254.x.x, are link local addresses, Microsoft refers to these as Automatic Private IP Addresses APIPA and are generated by a network protocol designed to give PC's IP addresses when there is no DHCP Server available, (your home router runs a DHCP Server and other services). This way the PC's on a local network can talk to each other and if a DHCP Server becomes available they will take their IP settings from that and reconnect to the outside world.

If you do not see any of the above, make sure that the Ethernet interface is active and that all connections are good.

Now go to the Windows 10 PC and to open a terminal Cmd Window by hold downing the Windows Key and then R for the run box and type cmd.

Windows: ipconfig to find its active IP address

Type in ipconfig to find the active IP address, if your are connected to the router it should be similar to puppy's in this case 192.168.1.2 and have the same Default Gateway. If you are connected directly via a crossover cable the IP address should be 169.254.x.x, if not check your connections.

Now to test the connection using the ping command. From Windows if you are connected to a router type in ping and then its IP address, probably 192.168.1.254 and you should get a reply, if not check your Ethernet cable connection, also make sure that Network Discovery is on and that the Windows Firewall is not blocking the ability to ping.

Windows: Turn off the firewall

Then try and ping puppy, if you get no reply go to puppy and turn off the firewall and from puppy try to ping the Windows PC, you should get a reply, if not and you are connected through a router try pinging that to prove that puppy's connection is OK.

Using Linux, the ping command will keep pinging until you hold down the Control Key and press C (Ctrl+C) to stop it.

Back to the Windows PC, with puppy's firewall turned off you should this time be able to ping puppy and get a reply.

As an example of what can go wrong:

Having previously accessed a puppy share from a Windows 10 PC connected via a router, I tried a direct connection between the PC's using an Ethernet crossover cable:

When I didn't see puppy listed in Windows Explorer I typed the link-local IP address into address bar, (It would have been better to ping it first, doh.) NOTHING.

I then went to puppy, checked the firewall, it was set up for Samba, however I turned it off, went back to the Windows PC CONNECTED.

Windows: Connecting using puppy's APIPA - local link - address

Then I clicked on the C-Drive share, prompted for User and Password, that's better, entered them and then tried to browse the share but NOTHING.

Then it occurred to me that although I started Samba and created the share C-drive I never mounted /dev/sda4, went back to Puppy clicked on the sda4 icon to mount it, back to Windows and SUCCESS!!!