Escalating USB Thumb drive with Raspberry Pi

1

 

Raspberry Pi – Escalating USB Thumb drive with Raspberry Pi:

USB Thumb drive with Raspberry Pi

This tutorial will show you the way to organize Raspberry Pi to identify and mount USB thumb drive. This can be utilized as a media device and can be brought into use to exchange running backups and exchanging files.

Before you follow this instructable keep this in mind that your Raspberry Pi is running properly. You can utilize any of the Operating system to extend the principles.

Step 1:

Thumb Drive Formatted

Raspberry Pi: The thumb drive should be formatted.

As an MS-DOS (FAT) volume the thumb drive should be formatted, this format can be easily recognized by Raspberry Pi.

Step 2:

Raspberry Pi package updates to be run

You can use SSH to way in Raspberry Pi. Your IP address for this may differ.
On the command line after opening the terminal window, you can type:
sshpi@10.0.1.62 (Your IP Address can differ)
This step can be skipped if you are directly hooking into the monitor
You ought to have an access of the Wi-Fi to make it certain that everything is current, run the most recent updates and upgrades.
The update should be taken first:
sudo apt-get update
After the update you have to upgrade:
sudo apt-get upgrade
You will notice a bobbin of pack up updates, which will take a number of minutes of your time.

Step 3:

 

raspberry pi coding

 

Raspberry pi coding working

Raspberry Pi – for the USB drive a mounting pint has to be setup

Your power cable should be unplugged. Into the Raspberry Pi the formatted USB drive should be put and later the Raspberry Pi should be turned back on.

You can utilize the lower port of USB for the Wi-Fi dongle and the upper port for the external USB  drive/ keyboard/other things.

After waiting for few seconds you ought to SSH back into the Raspberry Pi.

sshpi@10.0.1.62 (Your IP Address can differ)

We then type in:

mkdir usbdrv

We are not setting up a mount point – which is a way to map this directory to the USB drive.

At this instant type in:

sudo blkid

The output should be checked – We are now gazing for the USB drive device info, it can be identified easily as we call on the name of GITPI when it is being initialized.

Mine reads:

/dev/sda1:LABEL=”GITPI” UUID=”6D34-1514″ TYPE=”vfat”

This must be alike on yours: /dev/sda1 is the USB thumb drive device.

To make the USB drive map into the usbdrv directory, we have to edit the file systems table.

Type in:

sudo nano/etc/fstab

We have to now modify the fstab file so that this device maps to usbdrv directory, which is a tricky part.

The following line should be added to the end of the file.

/dev/sda1/home/pi/usbdrvfatuid=pi,gid=pi,umask=0022,sync,auto,nosuid,rw,nouser00

Note:  This is a single like not broken over two lines.

What this does is to map the /dev/sda1 device — any thumb USB drive to the usbdrv directory.

Cntl-X, Y, Return to save.

Then restart:

sudo reboot

Step 4:

testing

Raspberry Pi – Test it

Navigate your usbdrv directory after you have rebooted and have gotten back into the Raspberry Pi via SSH

cd usbdrv

Generate a trouble-free text file

sudo nano test.txt

You can type whatever you want in the editor file — which can be any type of text message.
Ctrl-X, Y will save it.

The power of Raspberry Pi should be turned off and the USB drive should be pulled out.
You can check the USB drive on your computer and you text file will be shown there.

Step 5:

Raspberry Pi – Unmounting and mounting from the command line

We usually pull the drive out and the Raspberry Pi should be rebooted, you can find yourself where you want to do this and where you do not want to do this.
If you need to eject your drive, you will require unmounting the drive.
It would appear like this:
sudo umount usbdrv
If you require remounting it, i.e. put another drive in, as there is no mounting pint for the setup, with the command you will have to use the device info.
sudo mount /dev/sda1

Step 6:

Finished
It was something really easy and a super short way.

Share.

About Author

1 Comment

Leave A Reply