The Bionic Cyclist E-Bike Rider
  • Home
  • Forum
  • YouTube
  • Product Reviews

Run a Raspberry Pi on a SSD or a USB Drive of any kind.

Posted on 22nd March 2017 by The Bionic Cyclist

Well… technically it won’t boot from a hard drive, it has to be the boot partition on the SD card, but that’s actually just a small script setting up the root partition of the SD card.

The raspberry Pi is brilliant and every iteration has made it better and faster, all except one thing, the SD card. It still requires an SD card to boot up and run, but now you can run Linux from an SSD!

What I will show you is how to copy the contents of this root partition to an external drive, be it a USB memory stick, USB hard drive or like I have, an external USB Solid state drive.

This is actually a VERY VERY easy thing to do and aside from copying the contents from one drive to another, very quick too.

So the first thing to do is attach the USB drive to the Pi. For easy install I’ve already partitioned and formatted the drive to linux EXT4, all I need to do is discover where it is in the file system.

sudo fdisk -l

The result is /dev/sda1 – So now I know where the drive is, simples 🙂
If you have more than one drive attached it could be another letter, eg. sda1 is mine, sdb1, sdc2 and so on. Make sure you have the correct one.

Next you need to copy the files from the SD card to the external drive.

sudo dd if=/dev/mmcblk0p2 of=/dev/sda1 bs=512

 

Now this will take about 30 minutes to complete, but when it’s done there are a few things we need to do to finish the preparation of the drive
1. sudo e2fsck -f /dev/sda1
2. sudo resize2fs /dev/sda1

The first line checks the filesystem the second resizes the new drive and makes it use the full amount of space, the copy just copied the SDCARD sector by sector, so the new drive size will also match the SD CARD, resize2fs opens the drive up

Just two edits now stand between you and a faster pi.

First edit:

sudo nano /boot/cmdline.txt

change the part that says root=/dev/mmcblk0p2 to root=/dev/sda1

Next we need to make a directory to mount the USB Drive for easier access, you don’t technically need to do this but I did.

sudo mkdir /home/60GB

you can call the folder what ever you want, I had a spare 60GB SSD so I called it 60GB

The final edit and job is to edit the fstab so it’ll be correctly mounted at boot.

sudo nano /dev/sda1/etc/fstab

edit the line that says /dev/mmcblk0p2 to /dev/sda1

At this point you can safely reboot the Pi and welcome to a way faster Raspberry Pi.

  • About Me
  • Latest Posts
  • Dylan Thomas
  • My PSN Trophies
  • Contact Me
  • The Forum

About The Bionic Cyclist

I'm a keen gamer, technophile and now a huge advocate of E-Bikes and all their benefits.

This website.
  • Learning to DJ - 3rd December 2019
  • I’ve sold my bike 🙁 - 28th August 2019
  • Raspberry Pi 4 or 3 or 2 or 1 temperature monitor via HTTP - 9th July 2019
  • E-Bike Battery Cell Replacement - 6th July 2019
  • GoPro Fusion Review - 6th July 2019
View All Posts

Dylan Thomas, 1914 - 1953

Do not go gentle into that good night,
Old age should burn and rave at close of day;
Rage, rage against the dying of the light.

Though wise men at their end know dark is right,
Because their words had forked no lightning they
Do not go gentle into that good night.

Good men, the last wave by, crying how bright
Their frail deeds might have danced in a green bay,
Rage, rage against the dying of the light.

Wild men who caught and sang the sun in flight,
And learn, too late, they grieved it on its way,
Do not go gentle into that good night.

Grave men, near death, who see with blinding sight
Blind eyes could blaze like meteors and be gay,
Rage, rage against the dying of the light.

And you, my father, there on the sad height,
Curse, bless, me now with your fierce tears, I pray.
Do not go gentle into that good night.
Rage, rage against the dying of the light.

 

[wpforms id="1926" title="false" description="false"]

https://the-bionic-cyclist.co.uk/2019/05/22/new-to-the-site-a-forum/

click here for the forum

Posted in Raspberry Pi Tutorials | Tags: raspberry pi, SSD | 5 Comments
« Raspberry Pi Custom MOTD
Raspberry Pi Ad Blocker »

5 thoughts on “Run a Raspberry Pi on a SSD or a USB Drive of any kind.”

  1. The Bionic Cyclist says:
    28th March 2017 at 8:44 am

    I’ve recently seen a daughterboard for for the Rasperry Pi that adds mSATA to the Pi.
    https://www.scan.co.uk/products/lycom-pi-102-raspberry-pi-usb-to-msata-converter-board-supports-sata-i-ii-iii-msata-ssds-includes-mo

    It may seem like a brilliant idea, but it connects to the Raspberry Pi via USB, this will reduce the data rate to USB 2 speeds (50MBs max). The Raspberry Pi only has USB 2 ports.

    So installing an mSATA will yield almost no benefit at all over hard drive (random seek will improve, consecutive reads would show no improvement), and no benefit over a solid state drive connected to a USB.
    Save your money people, don’t bother.

    The price of a 60GB 2.5inch SSD is around £30-£40 and a USB SATA adapter is around £10
    https://www.amazon.co.uk/gp/product/B011M8YACM/ £8.99
    https://shop.pimoroni.com/products/sata-hard-drive-to-usb-adapter £6

    Reply
  2. Pingback: Setup Asus Tinkerboard to boot from a Hard Drive – The Bionic Cyclist E-Bike Rider

  3. GW says:
    17th April 2017 at 7:27 am

    I wish they (the Raspberry Pi people) had made this process easier, but thank you for taking the time to explain. I shall try this soon.
    Cheers

    Geoff

    Reply
    • The Bionic Cyclist says:
      17th April 2017 at 2:46 pm

      I hope the next generation Pi has SATA built in, in fact I hope everyone who make devices like these think of SATA in future.

      Reply
  4. Pingback: In the Wake of WannaCry, how to be secure? – The Bionic Cyclist E-Bike Rider

Leave a comment Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

My dad used to say, “you look with your hands as well as your eyes”.

Tags

4k HDR ad blocker Apache2 asus tinkerboard battery care beta test bike ride carrera carrera crossfire-e cloud server crossfire-e Drone ebike encryption gran turismo halfords HTOP install lithium ion lithium polymer motd mysql news nextcloud nintendo oxenhope php playstation 4 plex power cut PSVR raspberry pi review savewizard security smoking snes SSD SSL terrorism unencryption Wainstalls wallpaper wannacry wd EX4100

Pages

  • Ascii
  • Cookies, what are they and why do I want them?
  • Did you know?
  • Forum
  • Holiday in Fort William
  • Magical Mystery Tour
  • My Youtube Channel
  • Photos from around Halifax
  • Product Reviews
  • test
  • The Movies Hit List

Archives

  • December 2019
  • August 2019
  • July 2019
  • May 2019
  • April 2019
  • March 2019
  • January 2019
  • December 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017

Categories

  • Accessories
  • Asus Tinkerboard
  • Bike Reviews
  • Cameras
  • Cycling
  • DIY
  • Drones
  • electric cars
  • EV's
  • Gaming
  • Health
  • My Videos
  • News
  • Nissan leaf
  • Raspberry Pi Tutorials
  • Reviews
  • SBC
  • Tips
  • Uncategorised
  • Videogame Reviews
March 2017
M T W T F S S
    Apr »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Pages

  • Ascii
  • Cookies, what are they and why do I want them?
  • Did you know?
  • Forum
  • Holiday in Fort William
  • Magical Mystery Tour
  • My Youtube Channel
  • Photos from around Halifax
  • Product Reviews
  • test
  • The Movies Hit List

Archives

  • December 2019
  • August 2019
  • July 2019
  • May 2019
  • April 2019
  • March 2019
  • January 2019
  • December 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017

Categories

  • Asus Tinkerboard (2)
  • Cycling (24)
  • DIY (1)
  • Drones (3)
  • electric cars (2)
  • EV's (3)
  • Gaming (6)
  • Health (4)
  • My Videos (4)
  • News (2)
  • Nissan leaf (2)
  • Raspberry Pi Tutorials (13)
  • Reviews (13)
    • Accessories (4)
    • Bike Reviews (2)
    • Cameras (2)
    • Videogame Reviews (3)
  • SBC (1)
  • Tips (5)
  • Uncategorised (20)

WordPress

  • Log in
  • WordPress

CyberChimps WordPress Themes

© The Bionic Cyclist
This website uses cookies. By continuing to browse the site, you are agreeing to our use of cookies