Jump to content

Orange PI PC+: multiple OS partitions in EMMC


Sodrohu

Recommended Posts

I've been reading on the forums on the possibility of having multiple OSes inside 1 EMMC for the Opi PC+. From what I understand, inside a typical EMMC  installation, it has 3 partitions:

1) Bootloader partition, which runs first and starts the main partition

2) main partition, contains OS files

3) unallocated free space

 

suppose I have 2 devices:

1. Armbian Jammy Server

2. Armbian Jammy Desktop

 

Now I want to make another device that has 2 OS partitions, like so:

1) Bootloader

2) 1st OS main partition,

3) 2nd OS main partition,

4) unallocated free space

 

I'm thinking of using DD to extract the image out from 1 OS and dd it back into the other (booting the devices using another OS from SD card).

I'm guess taking out the desktop image and put it inside the server device...

If this is done, how do I make it so that the 2nd OS is bootable? It can be like this:

1) Select which OS to boot on startup ala GRUB

2) Boot into 1st OS, then boot into 2nd OS from 1st OS.

 

I want to make this as a way to make the 2nd OS robust. 2nd OS is the work OS, 1st OS is diagnostics OS. The idea is to make the 1st OS able to fsck/remote rsync the 2nd OS OS in case the 2nd OS corrupts/needs updates.

 

Link to comment
Share on other sites

OK..so I've succeeded in creating an image with the following partitions:

1) Bootloader

2) 1st OS server partition,

3) 2nd OS desktop partition,

4) unallocated free space

 

How I did it:

1. Have an Orange PI PC+ device with OS in EMMC as development/test device

2. Compile full server image from armbian/build (legacy image). Burn in SD card A

3. Compile basic desktop image from armbian/build (legacy image). Put in SD card B

4. Boot OPI device from EMMC. insert SD card A in SD card slot. Insert SD card B from USB card reader

5. FIre up Gparted. Check OS file partition sizes of both SD cards A and B. Make sure Boot partition A + OS file partition A + OS partition B < SD card A total size. if not, use Grapted to reduce partition size.

6. Copy OS partition B into SD card A. Let Gparted run. after done, check if all looks OK

7. If no errors, you should turn off the device,take out all SD cards, then turn on again. The device should boot into 1st server partition.

 

Now the problem I'm having is how to boot the 2nd OS partition. fdisk output sayas:

1st partition /dev/mmcblk0p1

2nd partition /dev/mmcblk0p2

 

I've tried changing the boot.cm in first partition's /boot/boot.cmd to call this command:

setenv rootdev /dev/mmcblk0p2

and called mkimage to generate new boot.scr (original boot.cmd and scr renamed for backup purposes)

 

rebooting the device, I see my changes are used ( there are some echo cmds I put to make sure it's running my changes), but the device still boot from the 1st partition. how do I make it so it points to the 2nd partition?

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines