Update:
(. . .and kind-of like a step backwards. OK, maybe sideways. . .)
One of the things I discovered while trying to multi-boot Charlie is that the contents of the /boot partition are distinct, different, and tightly bound to the version of Raspbian, Raspbian for Robots, and/or GoPiGo O/S you’re running in the /rootfs partition. They may LOOK totally identical, bot whoo-boy are they different!
Using the /boot files from a different release, or even a different update level of the same version, can cause all kinds of strange behaviors.
So, the problem becomes how to boot more than one operating system and yet maintain the correspondence between the /boot partition needed to load the base files, and the / (root) partition that it is associated with.
One answer appears to be a utility called PINN - a NOOBS-like boot manager than can manage more than one operating system at a time, maintaining the correspondence between the root partition and its associated boot partition.
The maintainer of PINN has been very helpful in helping me understand what PINN both can, and cannot, do. He’s also been helpful with my efforts to hardware-select the O/S to boot at power-on via jumpers/dip-switches.
Right now I have three operating systems installed on Charlie that I’m booting using PINN:
-
Raspbian for Robots, 2019-12-12, modified for my on-'bot development.
-
GoPiGo O/S 3.0.0 with a few tweaks, primarily head movement to let me know when Charlie’s ready, and some minor network customizations.
-
Raspbian O/S 64 bit beta 2020-08-20 to fuss with.
Advantages of using PINN:
-
The maintainer of PINN, (and several knowledgeable associates that help him), are available on a special, sticky, thread within the Raspberry Pi fora.
- He responds very quickly to questions and is incredibly responsive to user requests and suggestions. IMHO this is one of the biggest advantages - as program and utility maintainers are usually harder to find than honest politicians!
- He responds very quickly to questions and is incredibly responsive to user requests and suggestions. IMHO this is one of the biggest advantages - as program and utility maintainers are usually harder to find than honest politicians!
-
PINN maintains the association between the individual /boot and /rootfs partitions, and keeps them separate and distinct from other operating system partitions, so that the operating systems boot correctly and work correctly.
- Additionally, it maintains the association between /boot and /rootfs when that O/S is running so that updates - especially kernel updates - update the correct /boot partition image.
- Additionally, it maintains the association between /boot and /rootfs when that O/S is running so that updates - especially kernel updates - update the correct /boot partition image.
-
It allows you to select the O/S to boot when the robot starts up, WITHOUT having to keep track of, and fiddle with, tiny micro-SD cards.
Disadvantages of using PINN:
-
Setting up “non standard” and/or “custom” O/S images, (i.e. Anything other than the pre-built images available on line), is a royal pain because you basically have to install the image, get it running and then re-package it into the special compressed tarball format that NOOBS/PINN can install. This is a non-trivial process, (especially if you’ve never done it before), with a lot of subtle, (and not-so-subtle), “Gotcha!”'s that you need to be aware of.
- What adds insult to injury is that the documentation is not a monolithic whole. Instead it is scattered over several different forum threads, no less than two different GitHub repo’s and a Wiki.
- As a consequence, getting access to, (and keeping everything open in a browser), becomes a juggling act. Most of the pain I encountered with creating the tarballs, installing PINN, and installing the special image files to the PINN bootable media was caused by incomplete and/or contradictory instructions among all these sources.
- What adds insult to injury is that the documentation is not a monolithic whole. Instead it is scattered over several different forum threads, no less than two different GitHub repo’s and a Wiki.
-
Some of the “Gotcha!”'s are absolutely fatal to the process and result in an unusable tarball.
- For example, you need to run a special command on your installation - before making the initial tarball - to clear out each and every single “socket” file that might be in your system install.
- Not only does tar complain bitterly about sockets - if you ignore the warnings, continue to compress the tarball without removing them, and then attempt to install it, you’ll end up with either a non-working system or one that is seriously schiz in weird ways.
- For example, you need to run a special command on your installation - before making the initial tarball - to clear out each and every single “socket” file that might be in your system install.
-
You need to install a different version of tar as, allegedly, the pre-installed GNU-tar doesn’t handle certain file attributes properly. So, you need to install BSD-tar on whatever, (Linux), machine you’re building on.
-
You need to build on Linux. I can’t speak for the Mac systems, but Windows won’t cut it - unless you have Linux in a virtual machine.
-
It takes a long time to spin the images and robust hardware is a necessity. You can do it within a virtual machine - or even on a Pi - but it’s going to take much longer and you’ll definitely need extra cooling for the Pi.
- In my case, using a HP EliteBook 8570 with a native install of Linux Mint, 16+ gigs of memory, a blazing fast - and expensive! - SSD and a smokin’ hot i7 processor, it takes about 30 to 40 minutes to tar up the root partition off of the SD card and almost exactly two hours to xz-compress it locally on the system’s SSD.
- In my case, using a HP EliteBook 8570 with a native install of Linux Mint, 16+ gigs of memory, a blazing fast - and expensive! - SSD and a smokin’ hot i7 processor, it takes about 30 to 40 minutes to tar up the root partition off of the SD card and almost exactly two hours to xz-compress it locally on the system’s SSD.
-
Rinse-and-repeat for each additional operating system install:
- Boot up on the Pi and make sure it’s working and configured properly.
- Move the boot media to the build environment.
- Tar and compress the /boot and /rootfs partitions to segregated directories on the build machine. (Kiss at least 2+ hours good-bye!)
- Create, (by hand), the necessary install metadata.
-
By the time you’re finished you’ve hozed the entire day.
I’m sure that “practice makes perfect”, but it’s a long, fiddly, process that’s just begging to be automated somehow or other. -
PINN’s standard configuration expects a keyboard, mouse, and monitor to be attached to the system to access the boot menus.
- Supposedly you can access PINN “headlessly” using either VNC or SSH, but I have not tried that yet and cannot comment on it.
- Supposedly you can access PINN “headlessly” using either VNC or SSH, but I have not tried that yet and cannot comment on it.
Is it worth it? I’m not sure yet. However I haven’t found any other way to multi-boot a Raspberry Pi that’s any simpler or easier.
In PINN’s defense I have to say that I have set up many multi-boot scenarios on a number of different systems in the past, some of which were hair-raisingly complex. (Anyone want to try multi-booting a Digital Equipment Alpha 500? Me neither. It’s a pain with a capital OUCH!)
And. . . .
I can honestly say that setting up a multi-boot environment on ANY system, (including my 64 bit laptop), isn’t a trivial experience either and is also fraught with danger and pain-points. So, comparing it to any other multi-boot environment I’ve set up, it’s no more complex than most and is actually simpler than some others I’ve tried on a PC.
The bottom line is that if you are continuously swapping operating system images, (sometimes multiple times per day), as I do, it might become worthwhile. If you only swap O/S images occasionally, then it’s definitely something you may wish to avoid absent some compelling reason.
What say ye?