welcome to PcMac in today's video I'm
going to show you how you can mount a
external drive on your espheni PI on how
we can auto mount a drive when we
restart our computer like a restart our
Raspberry Pi because if you just mount a
drive on a Raspberry Pi it will be
disconnected when we restart our
Raspberry Pi so we need to auto mount
this drive as well I'm making this video
because it is necessary for the upcoming
videos how you can mount the drives that
will be plugged in to your computer to
your Raspberry Pi for the next projects
before starting this video I would like
you to please go ahead and subscribe to
my channel and if you liked the video
please hit the like button so let's do
it
first of all let's open the wireless
network washer again to check the IP
address as we do always it's 73 the IP
address let me open the ssh tool and
it's right here 73 let's go and open it
so we are right here I have created a
document for this whole video so you can
go ahead and check that document I leave
the link in the description let me just
open the document for you the document
is it right here let me just move you
little bit down and the first thing that
we are going to do is mount external
drive so the command that we need to use
a pseudo BL kit let's just paste it here
and enter it now you can see that we
have listed all the drives that are
connected to our Raspberry Pi the first
one is the boot the second one is the
route FS and the third one is PC Mac
this is the drive I named it as PC Mac
so it's connected right here on the
location is TeV sta-1
so here is the location of this Drive
let me just highlight it for you and the
drive is formatted under NTFS form
now what we need to do is we need to
follow the second command the second
command is to create a mount folder so
we will do it on the MNT location so
what we need to do is we just need to go
ahead and create a folder let's name it
as you SP and hit enter now to check
this folder is created or not
let's just go to CD MNT and LS so we
have two folders created by hole and USB
now what we are going to do we are going
to mount the drive on this USB folder
let's go back here and to mount the
device the device is on sta-1 let's just
copy the whole command and copy it and
paste it here and type the folder name
that is USB now what this command will
do it will mount this drive devs da1 to
Amenti USB let's just hit enter now the
drive is mount on USB let's go to the
USB folder and check the content of this
strife and here is the content let's
just clear the screen and now what we
need to do we need to set a proper
permission to the drive so the command
is chmod 775 and M and T and then the
folder name so the name will be USP hit
enter so now we have the permission to
read write on our USB Drive so it's done
let's go back now so the drive is
connected but when we restart the
computer it will be disconnected from
our Raspberry Pi so we need to follow
this steps again so to resolve this
issue what we need to do we need to go
ahead and do the second step so again
sudo BL
and here is the whole command again
let's go for the second step that is we
need to add it the FS tab so let's copy
this command and type it here let's just
go back first of all and copy the
command again so here is the file that
is open so what we need to do we need to
put the command in the bottom of we need
to just end the command here the third
command that we have that is right here
UUID
we need to enter the UUID here then the
Amenti and then the drive name and we
need to follow this command so first of
all let's just copy this so we can go
ahead and fill the details let's open
the notepad let's paste it here maximize
so first of all we'd require a UUID so
let's just go back to the SSH and close
it yes
so the UUID of hard drive is this one
let's just copy it and paste it here
then we need to put the folder name here
the name that we use it's USB then we
need to enter the UID and GID to find
the UID and GID what we need to do we
need to type Heidi here let me just
remove it from here and ID and our UID
is thousand and GID is thousand as well
so let's soon change them so the command
is complete now let's just go ahead and
copy this and go back to the SSH and
added the FS tab and paste the command
here so it's done let's just save it
ctrl X ES and enter so we are right here
now let's just go back to the document
again so it's done now what we need to
do is just to reboot our Raspberry Pi so
sudo reboot so the raspberry PI's is
successfully restarted let's reconnect
again and we are connected let's go to
the MNT folder and under US v let's
check that the drive is connected or not
so the drive is connected we have all
the things here on this screen so this
is the way how you can mount the drive
onto your Raspberry Pi and if you want
to auto mount I have already shown you
all the instructions and to unmount the
drive you just need to type sudo you
mount and /mnt the folder the drive on
which the folder on which we have
mounted the drive and then you need to
put the drive name that you have created
and same then you if you want to remove
the mount folder just use this command
su
rmdir MNT and then the drive name so
that's it for today this is it this is
the tutorial on how you can automate the
drives on your Raspberry Pi if you have
any questions you can write them down in
the comment section if you liked the
video please hit the like button and do
not forget to subscribe my channel thank
you for watching have a nice day bye bye
take care
