Multi-booting Dexter's Pi-based products


As mentioned in my previous post on huge SD cards, storage for things like the Raspberry Pi is getting, (comparatively), huge.

I was able to find a couple of USB-3.n, 500 gig external SSD drives for relatively cheap.

“It should be intuitively obvious”, (as my Calculus professor used to say), that these sizes of media are way, WAY, overkill for the typical Dexter operating system - or even a normal Raspbian O/S.

This raises the immediate question of what to do with all that extra space, and the obvious answer is “multi-boot more than one operating system.”

This is what I have been researching since last October, and have finally achieved repeatable and reportable results.

I don’t want to make this article even longer by posting the technical details surrounding the multi-boot process, (I’m planning a separate article about that), suffice it to say that the only two real contenders were hand-crafted multiple partitions and installations with heavily customized config.txt files, or PINN.

I selected PINN based on the fact that - from the end-user’s point of view - it’s no more difficult than using the original NOOBS installer, and provides a wealth of benefits, including the option to backup and restore installations.

The only real kicker is that you can’t just use a plain-vanilla disk image - it has to be repackaged in a special way, (“PINNified”, so to speak), for PINN to include it in a multiple O/S installation.  PINN does all the work of creating the appropriate partitions, setting up boot pointers, and making everyone play nice together - the cost of that is the specially PINNified package - not unlike a .deb or .rpm package in the distro’s repositories.

One other caution - as noted below.  Because of the way PINN, (or any boot manager for that matter) works, you need to be especially aware of certain “gotchas” that can drive you crazy if you aren’t aware of them.

Once you get past that, you will discover that PINN is a very easy way to configure and use a multi-boot environment on the Raspberry Pi.

What you will need to begin:

  1. A relatively large device as the boot device.  It needs to be large enough to fit all the unpacked file system images and a few gigs left over for PINN’s own file system data.

  2. A USB device, (I use a SD card in a USB dongle), that will fit all the un-zipped images. They are about 2 gigs in size, so to allow for backups I would suggest 16 gigs as an absolute minimum, formatted as ext4.

  3. A monitor, keyboard and mouse for use with PINN. Eventually you will be able to dispense with this, but PINN works using the internal Raspberry Pi keyboard and monitor.

  4. (Optional) A network connection, either WiFi or hard-wired.
    If you have a working network connection attached to your Pi, (or, you configure WiFi within PINN), it will automatically connect to its own download repository and offer a whole host of other software you can download.

First of all, the specialized software:
Note that I created the special packages, I am hosting them on my own Mediafire cloud server account, and THIS HAS NOTHING TO DO WITH DEXTER INDUSTRIES OR MODULAR ROBOTICS, so please don’t bother them with questions about these images or how they work.

Also note that though I have tested them somewhat, you should report any issues to this list.

First is the special PINN software that provides the magic:

To install PINN, you need a dedicated media device for the operating systems to install on, (the bootable media), as well as another to keep the installable images, (and any backups), on.

How to install PINN to your bootable media:

  1. Take a large SD card, or USB SSD drive, (your boot device), delete all the partitions, and create a small, (100 megs or so), FAT-32 partition at the very beginning of the drive. Leave the rest unallocated.

  2. Unzip the pinn-lite zip file and copy all the files and folders to the empty partition

The PINN image, when flashed to a device, is supposed to do the same thing for you automatically, though I have not tried it.

How to set up the operating systems and prepare them to be installed:

  1. You will need a USB media device to place the image files on.
    (I use a SD card in a USB dongle.)

  2. Since it is possible for backup files to be larger than 4gb depending on O/S and how much work you have done, you should format the drive as ext4.
    (FAT-32 will also work, but is limited to files smaller that 4g, which is not guaranteed.)

  3. Download the O/S files I have prepared and copy them to your media device and unzip them in place - not to a folder. You should have a folder with the name of the operating system and inside that folder you should see a number of files, (and one folder).

I have prepared three operating system files and have uploaded them to the cloud especially for the Dexter Industries robots:

I will be happy to build other images if there is sufficient demand.

Once everything is copied to their respective devices, unpacked and ready to go, plug the bootable media into the Raspberry Pi, the USB device with the images into an unused USB port, and boot.
(Did you remember to plug in the keyboard, mouse, and monitor?)

  • On first boot PINN will load itself into memory, automagically reformat and reconfigure the boot media, re-install itself, and reboot.

  • On the second boot-up, PINN will notice that it has no operating systems installed and will boot directly into maintenance mode.  If you don’t have an active Internet connection, it will complain bitterly but - unless you want to install other software packages - you can ignore it.

Next comes the installation of the downloaded software packages:

Again, a discussion on what boot managers are, and why they do what they do in the way they do them is somewhat technical and outside the scope of this article.

  1. After PINN reboots after configuring itself, you are ready to begin installing operating systems.  Remember what I said above about pre-allocating and dividing up space?  Now you have to decide and plan for any future installations you may wish to do.

  2. You are immediately brought to the main screen where you can install whatever operating systems you want.  If you’re connected to the Internet, you will see a whole library of stuff you can install.  If not, then you will see relatively few items, most of them gathered under “Robotics” and the Project Spaces are under the “Utilities” tab.

  3. First press “clear” (the eraser icon on the top row) to make sure nothing is accidentally selected, (especially if you are connected to the Internet!), go to “Robotics” and select whatever operating systems you may wish to install.  If you plan to install other PINNified operating systems in the future, don’t forget to go to the “Utilities” tab and select enough Project Spaces to accommodate all of them.

  4. Once this is done, press the “Install” icon on the upper left side.

  5. Pay attention to, acknowledge the warning dialogs, and allow the installation to continue.

When you reboot after installation, you will be presented with a list of operating systems to boot.  If you want to boot directly into one operating system 99.99% of the time, select the check-box next to it in the boot dialog and it will automagically boot direct to that every time.

To select a different operating system to boot, (or change the “sticky” default by selecting another O/S check-box), press shift right after the rainbow screen.

If you need more complex boot logic, (using GPIO pins to select an operating system to auto-boot, for example), there is a special script you can create called that allows you to program specific boot behaviors before PINN starts.  Again, the ins-and-outs of the file are beyond the scope of this document though I hope to write an article about my use of it in the future.

PINN is a very versatile piece of work, and more extensive documentation can be found on PINN’s GitHub site, located here:

There is also a “sticky” post on the Raspberry Pi forum about PINN where the developer, (procount), lurks and provides on-going support.  It’s a worthy place to lurk and read - though I warn you it’s quite long, (58 pages!), by now.


1 Like


The finish line is at hand!

The last few posts of the companion article can be found here:

1 Like