Jump to content

Boot from EMMC and continue to use SD for storage


downhomechunk

Recommended Posts

I solved this for myself and created an account so I could post it here.  I saw a few posts going back years which said either this can't be done on an Orange Pi 5 or they had no replies.  

 

The problem:

I wanted to boot my system from the EMMC but leave my large capacity SD card plugged in for extra storage.  The script in armbian-config worked as expected.  However, leaving the SD card inserted caused the board to continue to boot from it.  Wiping the SD prevented the board from booting at all.  I could eject the SD card, boot from the EMMC and then re-insert the SD card to use it as storage, but that's annoying.

 

The solution:

I noticed that the script in armbian-config left the boot partition on the SD card intact but removed the contents.  I used the following command to clone the updated EMMC boot partition back to the old boot partition on the SD card-

 

sudo cat /dev/mmcblk0p1 > /dev/mmcblk1p1

 

I then wiped the old root partition on the SD card like so-

sudo mkfs.btrfs -f /dev/mmcblk1p2
sudo btrfs filesystem label /dev/mmcblk1p2 SDcard

 

I rebooted and it worked!  I'll add /dev/mmcblk1p2 to fstab so it mounts at boot like a fixed drive. 

 

And I suppose future kernel updates will need to get pushed back to the SD card the same way (similar to updating your bootloader on a x86_64 system after a kernel upgrade).  Hopefully I remember this when the board won't boot after the next kernel update.  Slackware warns me to update my bootloader when slackpkg updates the kernel, but I know Ubuntu won't.  :-)

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