GAP
Posts: 108
Joined: Thu Apr 12, 2018 9:18 am
Location: New South Wales Australia

Re: Share HDD with windows and Pi

Mon Jul 16, 2018 10:25 am

LTolledo wrote:
Fri Jul 13, 2018 7:24 am
I have indicated it on my previous post though you may have missed it.

run this command

Code: Select all

~$ sudo apt-get install smbclient
after installation, run this command

Code: Select all

~$ smbtree
the output will list all available host and their share folders.

another way is using the file manager

Click on Go -- Network

It should show you a list of networks available

click on that network and it will show you the list of computers in that network (in your case the RPi and winXP)

click on your WinXP pc icon, and it should show any share folders you created in winXP.
I searched by using file manager and can see XP on the network, I can see my documents folders and the HDD connected to it.

I have also found that there are shortcuts to all shared folders/drives on Pis desktop.

This is brilliant I'm off to play with this for a bit. I'll look at a backup procedure as well.

I have half written a summary of what I think I did when I finish it I'll post it and mark this thread as solved so maybe somebody will find it useful.

GAP
Posts: 108
Joined: Thu Apr 12, 2018 9:18 am
Location: New South Wales Australia

Re: Share HDD with windows and Pi

Thu Jul 19, 2018 9:12 am

In summary this is how I went about solving this (with the a lot of help from others);
Description of setup and what I was trying to do;

At present I have 2 HDD, one is connected to the Pi and the other to the Win machine.
I am using my Pi 3B+ as a desktop and it is connected to the net
The Win machine is running XP and is not upgradable because of its age.
What I would like to do is store all my programs on the 1 HDD and open them from both machines (I have programs that will only run on Win) without unplugging the HDD.

Original question;
Is there a way for me to use an external HHD and have it accessible with both my Pi and a Win XP machine?

I was given 2 suggested options:
1. Connect the drive to your PC and share it over the local network to the Pi.
2. Connect the drive to your Pi and share it over the local network to the PC.
Option 1 will be faster but requires the PC to be turned on when accessing the drive from the Pi and consequently will consume more electricity.
Option 2 will consume less electricity but PC access to the drive will be much slower. In either case, the software used to share the drive over the network would be CIFS and Samba.

I went with number 2

Solution;
Pi and XP were connected by a single Ethernet cable (a straight through but evidently that is not an issue for PI)
After learning how to edit configuration files (I struggled with nano and found ‘leafpad’ far easier to use but that’s my personal preference) I changed the dhcpcd.conf file using "sudo nano /etc/dhcpcd.conf" and added;

interface eth0
static ip_address=192.168.1.1/24
# Not needed but if required by dhcpcd, uncomment the following:
#static routers=192.168.1.1

This changed my static IP address on the PI to 192.168.1.1
I then changed XP’s IP address to read 192.168.1.2 and was able to “ping” the Pi from it and XP from the Pi.
Next step was to install “Samba” and edit the smb.conf file
I named the HDD connected to Pi as “PI HDD” originally but the space caused all sorts of errors so I changed it to read “PiHDD”. I did this by connecting the HDD to XP and opening the properties and changing the volume label.

I then added this to the bottom of the smb.conf file (I kept all my changes together to make it easier to find them;
[pihome]
comment= Pi Home
path=/home/pi
browseable=Yes
writeable=Yes
only guest=no
create mask=0777
directory mask=0777
public=yes
I got this from an article on the net titled “Share your raspberry pis files and folders across a network”
This allowed me to see the desktop of my PI on the XP.

After a bit of trial and error I managed to access PiHDD from XP by adding this to the smb.conf file
[pimedia]
comment = Pi Media
path = /media/pi/PiHDD
browsable = yes
writeable=Yes
only guest = no
create mask = 0777
directory mask = 0777
read only = no
public=yes
force user = pi

To see XP on the PI I installed smbclient using “sudo apt-get install smbclient”
Then ran smbtree which listed the host and its share folders.

I then opened “File Manager”, clicked on Go then Network which let me see XP on the network, plus “my documents” folders and the HDD connected to it
I also found that shortcuts to all shared folders/drives on Pis had been placed on the desktop.

I now have achieved what I set out to after a 3-4 week marathon.

The next step is to organise a backup method but that is for another thread.

Hopefully I have remembered everything that happened but I would suggest reading the whole thread to see the many pitfalls I came across mostly due to my lack of knowledge and experience.
It was one hell of a steep learning curve and I sincerely thank all those people who helped me with this for your patience and understanding.

GAP
Posts: 108
Joined: Thu Apr 12, 2018 9:18 am
Location: New South Wales Australia

Re: Share HDD with windows and Pi

Thu Jul 19, 2018 9:35 am

Can somebody please change the title of this thread to "(Solved) Share HDD with windows and Pi-See summary at end."
I want this to be helpful to others who may follow so they can have some guidance.
I have tried and I am blowed if I can figure out how to do it.

ejolson
Posts: 1843
Joined: Tue Mar 18, 2014 11:47 am

Re: Share HDD with windows and Pi

Thu Jul 19, 2018 4:56 pm

GAP wrote:
Thu Jul 19, 2018 9:35 am
Can somebody please change the title of this thread to "(Solved) Share HDD with windows and Pi-See summary at end."
I want this to be helpful to others who may follow so they can have some guidance.
I have tried and I am blowed if I can figure out how to do it.
Edit your first post in the thread by clicking the pencil icon, change the subject and then press submit.

Thanks for posting the summary. It looks comprehensive.

GAP
Posts: 108
Joined: Thu Apr 12, 2018 9:18 am
Location: New South Wales Australia

Re: Share HDD with windows and Pi

Sun Aug 19, 2018 2:28 am

GAP wrote:
Mon Jul 16, 2018 10:25 am
LTolledo wrote:
Fri Jul 13, 2018 7:24 am
I have indicated it on my previous post though you may have missed it.

run this command

Code: Select all

~$ sudo apt-get install smbclient
after installation, run this command

Code: Select all

~$ smbtree
the output will list all available host and their share folders.

another way is using the file manager

Click on Go -- Network

It should show you a list of networks available

click on that network and it will show you the list of computers in that network (in your case the RPi and winXP)

click on your WinXP pc icon, and it should show any share folders you created in winXP.
I searched by using file manager and can see XP on the network, I can see my documents folders and the HDD connected to it.

I have also found that there are shortcuts to all shared folders/drives on Pis desktop.

This is brilliant I'm off to play with this for a bit. I'll look at a backup procedure as well.

I have half written a summary of what I think I did when I finish it I'll post it and mark this thread as solved so maybe somebody will find it useful.
I have now downloaded Raspbian and replaced the NOOBS version of Raspbian with it (as Recommended); I followed the instructions in this thread to set the IP address and samba and can see the Pi HDD from XP but now I cannot see the XP HDD from Pi.

smbtree shows the computers but when I try to use File Manager- Go- Network I get this error "The specified directory 'network:///smb-root' is not valid" plus there is a place that called "Laptop" that does not exist on the network displaying.
The whole display of the open file manger page is nothing like it is in NOOBS which allows me to see both HDDs (XP & Pi)

A couple of questions;
1. Is it possible to export/copy the Raspbian I have in NOOBS in toto to a new SD card?
2. If 1 is not possible is there a way for me to see exactly how the files of Raspbian in NOOBS look so I could maybe copy them into the new Raspbian.

When I started using the new Raspbian my HDD did not automount like it did in NOOBS so I guessing that the 2 versions of Raspbian may be
different even though I did the get upgrade procedure for NOOBS Raspbian.

In anothe post I have asked about moving my Desktop and Documents folders to my HDD and if that is possible then I may just use my known working NOOBS and do that.

LTolledo
Posts: 555
Joined: Sat Mar 17, 2018 7:29 am

Re: (Reopened) Share HDD with windows and Pi - See summary on Page 4

Sun Aug 19, 2018 5:42 am

Hi there!

Regarding the XP not seeing the HDD in RPi3B+, I suggest powering down all connected to the network and restarting the Ethernet/WiFi router, then power-up all those that need to connect to the network, then check again.

For exporting Raspbian Stretch out of NOOBs, there is one procedure that I have used over and over again.
Well basically its transferring from microSD to USB Flash memory, but I think its also applicable if the target is a HDD/SSD.

The link is below.

https://www.makeuseof.com/tag/make-rasp ... -boot-usb/

as you have already have an RPi3B+ proceed directly to Prepare Your USB Boot Device
just do the instructions carefully one-by-one... take your time.
and as always, make sure you have backup of the source microSD, just in case...
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

GAP
Posts: 108
Joined: Thu Apr 12, 2018 9:18 am
Location: New South Wales Australia

Re: (Reopened) Share HDD with windows and Pi - See summary on Page 4

Mon Aug 20, 2018 12:03 am

I started from scratch, downloaded the latest Raspbian to a SD card and set the IP address and the samba config to be the same as NOOBS and it is working OK

By working I can see the PiHDD from the XP and can see the XP HDD and the desktop folders from Pi albeit with a bit of messing around going via file manager.

Just need to figure out how to put an icon on the desktop so that it stays permanently and not disappear each time I shut down so I can go directly to XP

The moving the pi desktop and documents folder to the pi HDD is another matter but I have a suggestion that I will follow after backing up this SD card.

Return to “General discussion”

Who is online

Users browsing this forum: Imperf3kt and 24 guests