davidgrohl
Posts: 16
Joined: Fri Jul 31, 2020 3:02 pm

Re: Dual boot on SD Card

Tue Sep 14, 2021 3:58 pm

procount wrote:
Tue Sep 14, 2021 3:31 pm
Is the Android OS Lineage? That has been converted so should be ok. I converted an older version of Emteria some time ago.
I don’t know. Honestly that is a downloaded image. Retropie instead is configured from scratch. Tell me how can I check what kind of OS .

User avatar
Gavinmc42
Posts: 6059
Joined: Wed Aug 28, 2013 3:31 am

Re: Dual boot on SD Card

Wed Sep 15, 2021 3:40 am

those conditionals also work in the under-documented autoboot.txt file
Autoboot, never heard of it. ;)
Very interesting .
bootcode.bin and autoboot.txt must live on the 1st fat32 partition, but no other files are needed
Pi4's only need autoboot.txt?
2nd, 3rd partitions should be 256MB fats?

Will it work for USB SSD drives too?
I will need to acquire another one.
Could be fun on CM4 NVMe drives.

Best to experiment on uSD cards first ;)
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

cleverca22
Posts: 4361
Joined: Sat Aug 18, 2012 2:33 pm

Re: Dual boot on SD Card

Wed Sep 15, 2021 4:38 am

Gavinmc42 wrote:
Wed Sep 15, 2021 3:40 am
Pi4's only need autoboot.txt?
yeah, pi4 keeps bootcode.bin in the SPI flash, so you only need autoboot.txt i believe
Gavinmc42 wrote:
Wed Sep 15, 2021 3:40 am
2nd, 3rd partitions should be 256MB fats?
i think it uses the 2nd fat32 partition, not the 2nd partition overall
so you can throw in a mix of as many extended partitions as you want (or GPT on pi4), and it will only count the fat32 ones
i think only the 1st fat32 must be a primary MBR partition, but pi4 also supports GPT for everything
Gavinmc42 wrote:
Wed Sep 15, 2021 3:40 am
Will it work for USB SSD drives too?
I will need to acquire another one.
Could be fun on CM4 NVMe drives.
i believe it works on anything the firmware can boot from

of note, when using GPT, you must use either the "efi system partition" type or the "microsoft basic data" type code

davidgrohl
Posts: 16
Joined: Fri Jul 31, 2020 3:02 pm

Re: Dual boot on SD Card

Wed Sep 15, 2021 8:41 am

procount wrote:
Tue Sep 14, 2021 3:31 pm
Is the Android OS Lineage? That has been converted so should be ok. I converted an older version of Emteria some time ago.
@procount bsdtar installed. Now I start with image backup. Regarding Android OS Do I have to backup all 4 partitions?

User avatar
procount
Posts: 2558
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Dual boot on SD Card

Wed Sep 15, 2021 9:03 am

Yes, all 4.

As I said before, Android is one of those more tricky OSes to convert to a multiboot setup.

You really need to know what distro it is.
LineageOS starts up with a cyan screen with the LineageOS logo in the middle.

Lineage 16,17 and 18 required some different modifications in order to multiboot. You might be faced with some difficulties if it is not one of these.
See https://sourceforge.net/projects/pinn/f ... ge18-rpi4/ for the installation files needed for Lineage18, and parallel folders for the other versions.
Notice also that although Lineage 16 could be converted using .tar.xz files as per the tutorial, Lineage 17 & 18 required .img.xz files for the vendor and system partitions, otherwise it would not work.

These are some of the vagueries of making an OS multiboot when it wasn't originally designed to be located in a different partition layout, I'm afraid.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

davidgrohl
Posts: 16
Joined: Fri Jul 31, 2020 3:02 pm

Re: Dual boot on SD Card

Wed Sep 15, 2021 9:47 am

procount wrote:
Wed Sep 15, 2021 9:03 am
Yes, all 4.

As I said before, Android is one of those more tricky OSes to convert to a multiboot setup.

You really need to know what distro it is.
LineageOS starts up with a cyan screen with the LineageOS logo in the middle.

Lineage 16,17 and 18 required some different modifications in order to multiboot. You might be faced with some difficulties if it is not one of these.
See https://sourceforge.net/projects/pinn/f ... ge18-rpi4/ for the installation files needed for Lineage18, and parallel folders for the other versions.
Notice also that although Lineage 16 could be converted using .tar.xz files as per the tutorial, Lineage 17 & 18 required .img.xz files for the vendor and system partitions, otherwise it would not work.

These are some of the vagueries of making an OS multiboot when it wasn't originally designed to be located in a different partition layout, I'm afraid.
I understand. I could install Lineage OS 17.1 available in Pinn and then install the apk I'm interested with: right?

User avatar
procount
Posts: 2558
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Dual boot on SD Card

Wed Sep 15, 2021 9:51 am

Probably. I'm not an expert in Android.
Try it and see.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

davidgrohl
Posts: 16
Joined: Fri Jul 31, 2020 3:02 pm

Re: Dual boot on SD Card

Wed Sep 15, 2021 9:53 am

procount wrote:
Wed Sep 15, 2021 9:51 am
Probably. I'm not an expert in Android.
Try it and see.
Ok. I start preparing my retropie distro backup. Thanks.

davidgrohl
Posts: 16
Joined: Fri Jul 31, 2020 3:02 pm

Re: Dual boot on SD Card

Wed Sep 15, 2021 12:31 pm

@procount sorry for stupid question: I'm following your tutorial to prepare retropie OS backup. My distro has boot and retropie partitions and not boot and root as it's written in the guide. Can I use same name partition as reported in my sd card or do I have to use root name?

User avatar
procount
Posts: 2558
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Dual boot on SD Card

Wed Sep 15, 2021 12:47 pm

You can name partitions as you wish, provided they conform to the proper partition name format and length appropriate to the format of that partition.
But also bear in mind that the partition name you choose must also match the name in partitions.json and be the root name of the tar.xz or img.gz file that stores the data for that partition.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

davidgrohl
Posts: 16
Joined: Fri Jul 31, 2020 3:02 pm

Re: Dual boot on SD Card

Wed Sep 15, 2021 1:26 pm

procount wrote:
Wed Sep 15, 2021 12:47 pm
You can name partitions as you wish, provided they conform to the proper partition name format and length appropriate to the format of that partition.
But also bear in mind that the partition name you choose must also match the name in partitions.json and be the root name of the tar.xz or img.gz file that stores the data for that partition.
I have error when I try to download files from Retropie2 folder using wget command. I browse folder at this link "http://downloads.sourceforge.net/project/pinn/os" and there are 3 folders named Retropie1, Retropie3 and Retropie4.
Can I use files from Retropie4 folder? (I'm using retropie 4.7.x on a raspi4).

User avatar
procount
Posts: 2558
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Dual boot on SD Card

Wed Sep 15, 2021 1:45 pm

The number in the folder refers to the model of Pi, so for a Pi4, you should use the Retropie4 folder.
Look at os.json - it indicates which Pi models this OS is suitable for.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

davidgrohl
Posts: 16
Joined: Fri Jul 31, 2020 3:02 pm

Re: Dual boot on SD Card

Wed Sep 15, 2021 2:28 pm

procount wrote:
Wed Sep 15, 2021 1:45 pm
The number in the folder refers to the model of Pi, so for a Pi4, you should use the Retropie4 folder.
Look at os.json - it indicates which Pi models this OS is suitable for.
Perfect. I downloaded files, modified os.json (I changed distribution name and description) and partition.json. boot size is 50800 in my case. So 50800/1024 + 1 is about 50,6.
root.size is 197995380 in my case. So 197995380/1024 + 1 is about 193355,86.
I used following parameter:
for boot partition "uncompressed_tarball_size": 55 and "partition_size_nominal": 256
for root partition "uncompressed_tarball_size": 193500 and "partition_size_nominal": 196000
Do you think is ok?
Another question: now I have to install systems on an sd card: one is on a usb drive (retropie) and the other one has to be downloaded using Pinn (Lineage OS). How can I proceed? (The tutorial explains the case in wich both Os are on USB drive).

User avatar
procount
Posts: 2558
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Dual boot on SD Card

Wed Sep 15, 2021 2:38 pm

It doesn't matter. PINN will present you a list of all the OSes that it can find, whether they are on the internet, SD card or USB stick.
HOWEVER, if it finds 2 OSes with the same name, then it will only present the most recent one (according to the release date in os.json)
Since you have changed the distribution name of your Retropie, and Lineage is standard anyway, it shouldn't matter.
At the rightmost of each OS description is an icon that shows where PINN will install it from.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

davidgrohl
Posts: 16
Joined: Fri Jul 31, 2020 3:02 pm

Re: Dual boot on SD Card

Wed Sep 15, 2021 2:43 pm

Ok, thanks. I'll try installation as soon as possible.

Return to “Advanced users”