PINE64
Multiboot SD card - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111)
+--- Forum: Linux on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=114)
+--- Thread: Multiboot SD card (/showthread.php?tid=8680)



Multiboot SD card - PreMis - 01-03-2020

I have a 128GB Micro SD card and would like to use it to boot multiple OSs. It will save time from retracting and replacing SD cards  and of course save the sd card reader from being damaged.

I found an old raspberry pi post regarding something similar...

https://www.makeuseof.com/tag/how-to-install-multiple-oses-on-a-single-sd-card-for-raspberry-pi/

Does anyone know a solution for this for the Pinebook?

Thanks


Multiboot SD card - tophneal - 01-03-2020

There’s not currently an option to use anything like the OS selection at boot. There has been discussions concerning this, though.


RE: Multiboot SD card - IoSer - 01-03-2020

take a look at the implementation of Petitboot on Odroid N1


RE: Multiboot SD card - Arwen - 01-03-2020

I am able to reboot to a different partition by editing the configuration file in "/boot". The name and path escape me, and I can't boot up my Pinebook Pro right now, (PBP is fine, the desk space is occupied by old laptop chugging away at an update...)

Basically you:
- Have a more recent update to U-Boot, which prefers SD cards over eMMC
- Make 2 or more OS partitions on your SD card, each having "/etc/fstab" correctly mouting their own "/" root file system
- If you want to boot an off-line OS, edit the "/boot/x/x" file so reference the new OS partition
- Reboot

And there you have it. Clumsey, but doable.

A few gotchas. U-Boot may reference the OS by LABEL or GUID, (I can't remember which). So each root FS should have a unique LABEL and GUID. Next, make sure if you use LABELs or GUIDs to mount your root FS in "/etc/fstab", it references the correct partition's OS. Last, again make sure any LABELs and GUID are not used by the eMMC.

The biggest reason I do this, is for updates. Back in the bad old days before OpenZFS or BTRFS, I used 2 same sized partitions for my OS. The other non-OS files systems were elsewhere, (like "/home" or "/media"). So 25GB might be enough. Then when I wanted to update, I cloned the currently booted OS to the off line partition, with something like Rsync. Modified the copies' "/etc/fstab", and anything else needed. Changed Grub to prefer the newly copied OS. A simple reboot tested my cloned OS, which I then could update safely.


RE: Multiboot SD card - PreMis - 01-07-2020

Hey Thanks Arwen!

I'm having some teething problems with my PBP at the moment so i'm unable to look into this, but i will update as soon I get around to it  when am back up and running.

PreMis