About multiboot

Its a technical topic, so users may take some time to digest. The script is a good way to make it easier. Thanks for that. :hugs:

I tested Radxa Debian, Slarm64, and Armbian Buster. All worked. Will test Manjaro ARM with the updated script.

Nice! Useful for automated usage. I studied and made changes manually since it was simple to compare and modify.

When you have some free time, there are tutorials to make it simple: :slightly_smiling_face:

For git: https://rogerdudler.github.io/git-guide/

For gitlab: https://about.gitlab.com/get-started/

It can help to keep track of changes, different features, documentation, issues faced, etc.

Edit-
Installed Manjaro ARM and Slarm64 using updated script 1.3a, worked fine. The FDT was written correctly for Slarm64, so I think its fixed. Nice work!

Now the link is version 1.4. Unlike previous versions, to create a new GPT you need to add the option –create-new-gpt or -c. The -t option (–test-mage) allows you to test the image. Shows boot and root sizes and contents of some files.
The -p option (–pause-before-umount) pauses both when testing the image and when creating a new OS. You can open a new terminal window and work with files in /tmp/1 and /tmp/2. Then you need to close all open files, if mc was used, go beyond the tmp/ directories, return to the first window and press Enter there to close all files.
If the script is running on rockpi, then the devices can be set by the names: emmc, microsd, nvme. for example, to create a new GPT with empty uboot you can specify the options: -d microsd -c. For backup uboot: -d emmc --backup-uboot. To install the new OS into the already existing partitions of the appropriate size from the system of the unnecessary OS: -b microsd -n 4 -r nvme -m 5 -i OSxxxx.img. Short options are provided. For hints, use -h
The script is now tested with radxa ubuntu & debian, Armbian, LibreELEC, Manjaro, slarm64 and DietPi. For these OS, you must save the original beginning of the file name. If the script does not recognize the OS by name and it does not have extlinux.conf, then the work will stop. If there is a file, then there will be an attempt to install the OS. The extlinux.conf file can be added (or replaced by an existing OS image) using the –extlinux-conf-file option.
I kind of realized all the necessary tasks for myself in the script and now I will only fix errors 
 maybe ;).

1 Like

Hi. Apologies in advance for disturbing again.
I would like to create a multiboot with Debian, Armbian and Manjaro, on an empty nvme disk. I am working on Rockpi4b.
1-download the scrip in / usr / local / sbin / and install kpartx.
2- I download all the images
3-do I have to replace something in the script? Or do I have to run the script for each operation, one by one? Thanks.

yes . Run it once with options: -d nvme -c , and then -d nvme -z 15000 -i OSxxx.img for each OS, setting instead of 15000 the required root partition size in MiB

p.s. Better to do in the sequence that you indicated. Debian first, last manjaro

2 Likes

Después de flashear funcionó, y se arrancó a la imagen de Radxa Debian!

Gracias @ rua1 !:inocente:

True, debian starts, but you cannot create a user or change a password, among other problems. Manjaro starts, but it has a bug with the wifi, the same with dietpi. the only one that works well is armbian, for now.

Blockquote

The main thing is that you have mastered the technology multiboot. Instead of an unnecessary OS, you can install another one. For example, instead of Debian, install ubuntu with options: -d nvme -n 4 -m 5 -i OSxxx.img

As is, we are learning from the patience of those who know. Thank you

Hi. I’m trying to install Twister-OS with the multiboot script, but I get the following error:

Files are copied, wait 

[Error] Unknown OS without extlinux.conf file

How do I solve it?

I don’t know how to do this.

Sorry, I’ve been busy for a long time. Today I installed Twister in multiboot. Working. If you’re still interested, I can post my extlinux.conf

Yes, it would be interesting to have your extlinux.conf

I did it this morning, maybe I need to fix something 
 but they work

LABEL Twister
  LINUX /Image
  INITRD /uInitrd
  FDT /dtb/rockchip/rk3399-rock-pi-4b.dtb
  APPEND root=UUID=539f2380-6341-4ab7-ac9e-a44f646d0d4a rw rootwait console=ttyS2,1500000  overlay_prefix=rockchip rootfstype=ext4 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u,0x1058:0x25a2:u

I already have several 512 MB partitions on the microsd, and on nmve there are several ~ 20GB partitions, on which I put systems for tests. Therefore, the installation looked like this for me:

./make_multiboot_dev.sh -b microsd -n 7 -r nvme  -m 5 -p -i Twister_OSArmbianV1-0-0.img --extlinux-conf-file extlinux_twister.conf

Renamed the image file in order for the script to make short partitions labels names.

2 Likes

To simplify the selection of a partition for loading, I made a script. To work, you need the parted utility
The partition name must contain pattern boot (case insensitive, exclude uboot). You can do it like this examples:

parted /dev/mmcblk0 name 4 boot_ubuntu
or
parted /dev/mmcblk1 name 6 myBOOTpartition

By default, the microsd device is used. Using the -d key, you can specify emmc or nvme. The script will remove all boot flags from the previous partitions and set on the selected one.
Example:

./select_boot_dev.sh -d nvme

Find boot patrinions on /dev/nvme0n1 ....

Number  Start   End     Size    File system     Name                      Flags
 4      16,8MB  554MB   537MB   fat16           boot                      msftdata

Enter number of the partition to boot: 4

Set boot flag on 4 of /dev/nvme0n1
Remove boot flag on partition 6 of /dev/mmcblk0
Remove boot flag on partition 9 of /dev/mmcblk0
Remove boot flag on partition 11 of /dev/mmcblk0
Remove boot flag on partition 12 of /dev/mmcblk0
Remove boot flag on partition 3 of /dev/mmcblk1

Number  Start   End     Size    File system     Name                      Flags
 4      16,8MB  554MB   537MB   fat16           boot                      boot, esp

Reboot from device: /dev/nvme0n1 partiton:4  (Y/y):)n

Booting from nvme trough uboot does not work for me and I brought it to demonstrate removing the boot flag from all previous devices. As a reminder, the order of loading microsd-emmc-nvme.

I made this script available for all my OS and made a shortcut on my phone using JuceSSH. Now I can very quickly reboot to any installed OS on RockPi use my phone.