0

I'm looking to dual boot between two root partitions. I want to upgrade the other partition and then modify /boot/cmdline.txt to reboot on the newly upgraded partition.

There can be different kernel versions on the two root partitions.

In /boot/config.txt I can configure the path to kernel8.img

kernel=part2/kernel8.img

where part2 is a folder on the boot partition.

I assume the overlay folder must match the build of kernel8.img.

Where do I place the overlay folder? in /boot/overlay or /boot/part2/overlay ?

Can the overlay location be customized?

2
0

Here's the solutions so far*
The goal is to make the system upgrade as atomic as possible. Before these steps a new full Linux system is unpacked onto a separate partition that will be referenced in cmdline.txt below.

  1. Create a folder for new update: /boot/linux2

  2. Copy the following files from /boot/linux2

    /boot/.dtb
    /boot/overlay/
    /boot/kernel
    .img
    /boot/cmdline.txt

  3. Update /boot/linux2/cmdline.txt to include the path to the root partition. I use these rather than the GUID version to make sure it works across multiple instances.

    ... root=/dev/mmcblk0p2 ...

  4. Critical step, update /boot/config.txt

    Add the line:

    os_prefix=linux1/

  5. Reboot

Notes

In addition to step 4 above there is also a few more critical steps in updating all files directly under /boot/ , I have no solution for this so far.

1
  • Although this answer works as described there are still files directly in /boot that would need to be shared between dual booting. In the end I decided to use dual boot partitions which was not trivial but that's a different question..
    – hultqvist
    Apr 7 '21 at 11:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.