Copy the Sd card to USB Stick or drive and boot from USB Without the SD Card Inserted

For this Guide it will be assumed that you have followed the previous guides on setting up your Sdcard and you can either SSH into the PI or use the terminal from the Desktop

The first thing you should know is Why ?, You have a nice new SD Card so why use a USB Stick
Well Your SD Card will Die at some point its not a question of If but When ?
Constant writes to the Card is bad for SD Cards but USB Sticks are much more reliable in that respect>
So this way lets you copy the entire card over to a USB Stick and boot from it , then you will still have the SD Card as a backup if anything happenes to the USB Stick.

The program we will be using is rpi-clone by billw2 , see more here

1. See our guide on how to make your Raspberry PI Boot from USB
How to Boot from USB on Raspberry PI

2 .Begin by updating the install

sudo apt-get update

sudo apt-get upgradeI

3. Insert a USB Blank Memory stick or Drive
I use these Sandisk Ultra Fit as they are small require little power and work great
Also you need to use the same size or larger as the Sd Card

Type

df -h

You should see your USB Drive listed as dev/sda1 or sda2, If not then your PI does not see your USB drive
And you will need to make sure it is formatted to fat32 and try again

4. After Reboot SSH in or Run Terminal and type

vcgencmd otp_dump | grep 17:

If the PI has been set you should see 17:3020000a appear if you see 17:1020000a then it is not USB Bootable and you will need to try again.

5. Now we will install rpi-clone

git clone https://github.com/billw2/rpi-clone.git

cd rpi-clone

sudo cp rpi-clone rpi-clone-setup /usr/local/sbin

You can test the install by typing

sudo rpi-clone-setup -t testhostname

You should see the above test completed
Now you are ready to clone the SD Card to USB

Type

rpi-clone sda

Answer Yes to “Initalize and clone to the destination disk sda (yes/no)”

Just press enter when asked “optional destination ext type file system label”

This will take a while and although it looks as if it is doing nothing you will see your Green Activity light
Flash a lot , but just have patience and it will finish

Hit enter when “Hit Enter when Ready to unmount the /dev/sda partitions”

Wait a short while and it display
unmounting /mnt/clone/boot
Unmounting /mnt/clone

And it will go back to the Prompt and thats it all done

Just shutdown the PI using

Sudo Shutdown Now

And wait a few seconds disconnect the power and remove the SD Card
Power the PI Back up and it Should now boot from the USB
Keep the SD Card safe in case there is an issue with the USB Stick as you can still boot from the SD Card anytime you need to.

If you want to ever copy the entire USB onto an SD Card for a backup just run the command

sudo rpi-clone mmcblk0

And the process is exactly the same as above only this time you are cloning the USB Stick onto a SD Card
And as before you can remove the SD Card and keep it safe for a backup.

You could of course just install PI OS onto a USB and boot it instead of the SD Card
But this way you will always have the SD Card as a backup incase the USB Fails.

Leave a Reply

Your email address will not be published. Required fields are marked *