Pinetab2: (multi)boot normal image on eMMC and some OS on SD- card
#1
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 !
  Reply
#2
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 ?


Attached Files Thumbnail(s)
   
  Reply
#3
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 !
  Reply
#4
Don't forget the BSDs.
:wq



[ SRA accepts you ]
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Someone is interested for a PineTab2 8GB in Mexico? genobraker 0 174 03-06-2024, 07:22 PM
Last Post: genobraker
  Bricked my PineTab2 using Jumpdrive? jkboyd 2 310 02-24-2024, 07:14 PM
Last Post: jkboyd
  Castle Game Engine on PineTab2 now officially available michalis 1 802 12-14-2023, 12:22 AM
Last Post: tllim
  PinePhone or PineBook USB-C hubs on Pinetab2? Evergreen 1 674 11-05-2023, 10:20 AM
Last Post: WEF
  Pinetab2 screen issue. screen does not power on at all bluemage 5 1,324 09-25-2023, 08:29 PM
Last Post: bluemage
  What's the MAX RAM you can install to PineTab2? Ptab2newb 2 938 09-12-2023, 12:38 PM
Last Post: Ptab2newb
  Booting from SD card on Pinetab2 samochimaaron 10 2,905 08-23-2023, 09:38 AM
Last Post: diederik
  Pinetab2 without Wifi a comfort extra? Schlucker 8 3,091 07-14-2023, 03:09 AM
Last Post: gregb49
  PineTab2 virtual keyboard: symbols instead of numbers clemfandango 5 1,955 07-12-2023, 05:32 AM
Last Post: mtomaschett
  Pinetab2 not booting. elix 10 2,893 07-09-2023, 02:42 PM
Last Post: elix

Forum Jump:


Users browsing this thread: 1 Guest(s)