Boot the Raspberry Pi From USB





Introduction: Boot the Raspberry Pi From USB

Hello world, time for me to gift some raspberry pi to the people. So here's my story, I recently graduated high school and I've been working with the school's IT guy for my senior year. When I graduated, he decided to get me the latest Raspberry Pi as a graduation present (at the time of writing this, the Raspberry Pi 2 Model B). I thought it was really generous of him and I wanted to use it. Here's the problem, I've only got 2 GB SD cards and the latest Raspbian image (2015-05-05) was like 3.5 GB in size. No problem, I'm a technology guy, surely I could figure this out, and I did. So now I'm here showing a step-by-step picture guide as to how I did it.

This instructable assumes that the reader has at least some basic experience with Ubuntu, the Raspberry Pi and the GParted partition editor. If not, then this probably isn't for you. This article is also centered around doing the whole process using Ubuntu ( sorry WinDoze people :p ).

-----!!! UPDATE !!!-----

Since a few people were wondering about my RCA setup and the alligator clips on the Pi, I have taken the liberty to make an instructable all about it. Raspberry Pi 2: Quick n' Easy RCA should answer all your questions and tell you how to do it.

Step 1: Prepare the Flash Drive

Navigate to your flash drive in GParted, in my case it is drive /dev/sdb.

Unmount the flash drive so you can make changes.

Delete any partitions so you can make a new one.

Add a new partition.

Format it to fat32 and give it any name.

Apply all operations to format the flash drive.

Step 2: Burn the Image to the Flash Drive

Type "sudo -s" to get into a root shell, so you don't have to type sudo again.

The easiest way to burn the image is to type in "dd if=path/to/image of=path/to/flashdrive". In my case I found the path to the flash drive from GParted, it was /dev/sdb but it might be different for you.

If you want to know the status of the burn, you can install pv by typing in "apt-get install pv" and then using the altered command of "dd if=path/to/image | pv | dd of=path/to/flashdrive".

When the image is finished burning, the contents of the drive should look more or less like they do in the picture of the GParted screen. It should have one fat16 partition and one ext4 partition and maybe some unallocated space if your drive is big enough.

Step 3: Prepare the SD Card

Insert your SD card and navigate to it in GParted, /dev/sdc in my case.

Unmount it and delete the partition.

Add a new partition and make sure it is 56 MB in size while being labeled "boot" and being a fat16 file system. The point is to clone the boot partition on the flash drive over to the SD card because the Raspberry Pi can't completely boot from a flash drive.

Then click "manage flags" and add the "lba" flag and you're done prepping the SD card.

Step 4: Transfer the Boot Partition

Get back into your root shell to prepare the boot partition transfer.

Again, use "dd" to transfer the partitions, my boot partition is /dev/sdb1 for the flash drive and /dev/sdc1 for the SD card. Notice the 1 at the end of each, that signifies the first logical partition which I can see from the GParted screen.

The command for me is "dd if=/dev/sdb1 of=/dev/sdc1" but I used the "pv" version because I like to see how everything works out. It's the same as in the last step, only change the "if" and "of" parts.

Step 5: Set to Boot From the Flash Drive

Get into the SD card file system with your favorite file explorer and open up the file called "cmdline.txt".

We will edit the word in the line that starts with "root=" so we can tell the SD card where it's supposed to boot, in this case the flash drive.

Change the line from "root=/dev/mmcblk0p2" to "root=/dev/sda2". It is "/dev/sda2" because in GParted, it shows my flash drive root partition as being /dev/sdb2, but when the Raspberry Pi mounts it, it will be /dev/sda and I want the second partition to get booted from.

Step 6: Finish Up With the Flash Drive

Get back to GParted and navigate to the flash drive.

Delete the fat16 "boot" partition, "/dev/sdb1" in my case.

Then resize the ext4 partition by clicking "resize/move" and dragging each end of the partitions to the corresponding ends.

Apply all operations and wait quite a bit of time for the partition to grow. When it's finished, there should be only one partition, and ext4, that has the same partition path (/dev/sdb2) as the original ext4 partition.

Step 7: Set Up the Raspberry Pi

Now just insert your SD card into the Raspberry Pi along with the root flash drive that we were working on.

Plug everything you need in like power, video, keyboard/mouse and wifi and turn it on.

Step 8: Moment of Truth

If all worked well for you, then you should see the Raspberry Pi boot up normally and the setup screen come up for the first time. CONGRATULATIONS!!!

If not, then something probably went wrong and you should try to see if you can fix it by going backwards to see what went wrong or just redoing the whole process again.

I typed in "startx" and the desktop interface came up, all is well and now I can use the Pi normally.



  • Epilog Challenge 9

    Epilog Challenge 9
  • Paper Contest 2018

    Paper Contest 2018
  • Science of Cooking

    Science of Cooking

We have a be nice policy.
Please be positive and constructive.




There is no root=/dev/mmcblk0p2

Can you boot your RPI with a microSD card after you do that?

Is this method works with the PI Zero W?

So since the boot is still on sd card there is still the chance that it could become corrupted from improper shutdown? Is there anyway to completely boot from flashdrive or usb hdd?

hi all

so it works for me WITHOUT SD card (RPi 3) just the USB stick (old Transcend 16gb). the steps somewhat different. I used WinImage to create SD and USB.

1. created SD card with Jessie light (2017-07-05-raspbian-jessie-lite.img)

2. created USB stick with same image

3. booted from SD card, updated, upgraded and added on config.txt the line:


4. rebooted and checked USB boot enabled with:

vcgencmd otp_dump | grep 17:

i got the OK message : 17:3020000a

5. power-off and removed SD

6. power-on and after ~ 15 sec it came on-line, resized automatically the 2nd partition (sda2), rebooted again and it runs OK


Yes, just do the exact same thing with a USB SSD hard drive. If you use a standard hard drive you will need to provide an external power source to the hard drive.

As far as I know, no.

From what I've heard, the Pi is wired to read the SD card first, then you can have it do whatever from there.

But if I'm wrong and you find a way, then please let us know. :)

You can but it's a permanent change...

After dd to install Debian, my drive is completed unallocated and thus broken

VirtualBox_Ubuntu 16.07_12_01_2017_19_21_44.png

Try it without -s 1400M in the pv section, also sync, disconnect and reconnect your drive and see if anything changes.