Raspberry PI 3 - Using a small microSD card to boot from USB drive

Raspberry is so fun that you might like me end up out of microSD`s! Especially big and fast ones. Than come the diabolic question: What happens when you want to experiment something new? Choose one of your precious images/microSDs to destroy?

Well, the idea here is have an small (nowadays useless) microSD card (mine is just 1GB), and use it to "redirect the boot" to the USB drive. Instead of booting and running everything from the SD card, it will just read it, and goes to the USB drive and from there continue the boot and run the system. You might even use and External Hard Drive if you want! 

My setup:

- 1 small-slow-old-1GB microSD card - To read and redirect the boot-up to USB.

- 1 USB flash drive 16GB - Where the actual system that I want to run resides.

The procedure is quite simple.

Using Ecther, I wrote an small image in my 1GB microSD. I`m using DietPI, it`s about 87Mb download, and installation fit in my small microSD (although if you run it, it will complain that you need at least 500Mb free).

Again using Echer, I wrote Ubuntu Mate 5GB image in my USB drive. This is the system I actually want to run. Choose your favorite flavor here.

Well, plug back the small microSD, it will show you the boot partition. First and important, backup cmdline.txt. This is the file we gonna change.

Now that the backup is done, open cmdline.txt and change where it boot from. Original it will have something like in the image bellow.

Change it to /dev/sda2. Save. Eject the microSD card.

Plug the flash drive in the USB, and the microSD card in the slot. Power it on! It will read the microSD and boot from USB. Done.

Notice almost at the bottom of the image where it shows "Set hostname to <DietPi>". So it started the boot from microSD.

A bit later! voilá! Now you have it!

2018-04-15 17:51:00
Computers and science as a way to live

As you may know, I`m a programmer, I work most in web projects, but not only. This area is a mess! Each day you have to recycle what you know in many ways. The thing is, a knowledge that change so often can`t afford wait to be translated to Portuguese for instance, at that time, the known will be already deprecated. English to me is a functional requirement. I can`t imagine my daily life without it. I have been studding English for serious since 2009. In this section you can see what I`m working on. Have fun as I do.
RSS Feed
"A vida é curta demais para ser pequena / The live is so short to be small / Das leben zu kurz sind für kleine sein". (Benjamin Disraeli)