PINE64
Pinetab2: (multi)boot normal image on eMMC and some OS on SD- card - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PineTab (https://forum.pine64.org/forumdisplay.php?fid=140)
+--- Forum: General Discussion on PineTab (https://forum.pine64.org/forumdisplay.php?fid=141)
+--- Thread: Pinetab2: (multi)boot normal image on eMMC and some OS on SD- card (/showthread.php?tid=18346)



Pinetab2: (multi)boot normal image on eMMC and some OS on SD- card - Bart - 06-09-2023

Hello,

Beside the default OS from DanctNix I would like to experiment with other OSes. Documentation states simply said "... put bootable OS on an SD-card and reboot ..." but that aint't gonna work obviously.

So now I try getting grip on the boot procedure. the boot partition (EFI) on the eMMC contains files for the u-boot boot loader. It has a routine (boot.txt) that checks for the presence of a SD and two or more partitions on it. It expects /boot with Image.gz, initramfs-linux.img and .dtb files on the first, and / (root) sits as the OS on the second.

As far as I can understand (I am not familiar with u-boot), without changing things on the eMMC, if I copy the files from the eMMC to a SD-card first partition and a compatible OS to a second partition, the SD-card might be bootable but I suppose Image.gz and initramfs-linux.img will need (Q1) to be altered ?  In this setup, if no SD-card is present, my Pinetab2 boots the default OS, if SD-card is present it will boot the one (and not more than one) OS on the SD-card.

Is there an easy way with u-boot to provide a boot menu and thus possible (Q2) access to multiple OSes ?  Has Tow-Boot something to do with it ?  I found some references but I'm not sure things apply to the Pinetab2 ...

Is it possible to (Q3) let UEFI provide boot options ?  It would need the Rockchip RK3566 and it's chipset to be UEFI aware, I suppose.

If I check the danctnix factory image file, I find multiple partitions. The first two have no mountable filesystem, the third has a extlinux.conf file and the fourth has the OS files. In this post Manuel Traut uses this setup to start from and then adapts partition 3 and 4 to run another OS. But (Q4) what is the function of the first two 'mystery' partitions ?  And (Q5) could there be some risk this setup will overwrite the eMMC as is originally intended ?

Finally, the Pinetab2 ships with a debug UART adapter. Is there (Q6) more information about this adapter than what I find in the Pinetab2 Wiki ?  Can I use this adapter to change the initial boot order where the eMMC has prevalence over the SD-card ?

Anyway, I'm looking forward to the next experiments !


RE: Pinetab2: (multi)boot normal image on eMMC and some OS on SD- card - Bart - 06-09-2023

Ok, one step furher:

- made partition table of SD-card of type GPT.
- I copied partition 1 of the eMMC to a SD-card (I used the same start and end sectors).
- I copied the 4th partition of the danctnix factory image file to the SD-card as second partition.
- rebooted and got this:

        [Image: attachment.php?aid=2795]

When I choose 'Load Command Line (sh)', the root of my system is the second partition on de SD-card.

So lets see what's next ...  Can I go and install some stuff here ?


RE: Pinetab2: (multi)boot normal image on eMMC and some OS on SD- card - Bart - 06-10-2023

Been digging deeper.

In the danctnix factory image are 4 partitions. This 4th partition contains the OS (6.2 GB) and installation stuff. If you mount it, there is a directory '/root' you need to open as administrator. Inside is an 'osimage.img' file (6.0 GB). This image file has 2 partitions, one type EFI (128 MB) but no UEFI files on it, and a second one with the OS. If you restore these 2 partitions to a SD-card, Pinetab2 will boot it and run the OS from the SD-card. The eMMC is left untouched.

Next step: shrink the OS partition on the eMMC so that I have room for a Data partition and maybe more ...

After that, see if I can have a boot menu to switch between OSes. Would be nice if something Grub2-alike is possible.
To check: if 'cloning' these partitions, I have to check the UUID of the partitions. There will be duplicates and I don't think that is healty ...

Let's get up to try all kind of Linuxes !


RE: Pinetab2: (multi)boot normal image on eMMC and some OS on SD- card - KC9UDX - 06-10-2023

Don't forget the BSDs.