OK, so let's start with replacing Raspberry Pi OS as an example.
First we will backup some files just in case things don't work out.
So you will need to plug your USB stick in again, then mount it after getting to the command shell as before:This OS is stored on partitions 15 & 16 (0x0f and 0x10 from installed_os.json). We will copy cmdline.txt and and etc/fstab to the USB stick as a precautionary measure. (I'm assuming here that your SSD is called /dev/nvme0n1. If it's not, identify its name from the list of installed devices by `ls /dev/*`)You can now remove the USB stick.
You need to delete the fresh raspios from your SSD before we replace it.Now take your original SD card with raspberry pi OS on it and plug it into the RPi's SD card slot and mount itCopy the original contents onto your SSDYou can now remove your original SD card.
We need to adapt your original raspios to its new environment.
Go back to PINN's GUI by pressing Ctrl-Alt-F1.
Press `m` twice to go to the Maintenance menu where you will see a list of your installed OSes.
Find the Raspios_armhf_full entry and select its checkbox at the left hand side.
Click the Fix button on the toolbar and check the `Re-run partition_setup.sh` then click OK.
Hopefully your OS is now adapted for multi-boot.
Press `Esc` a couple of times to get to the Boot Menu and boot raspios_armhf_full to verify it works.
First we will backup some files just in case things don't work out.
So you will need to plug your USB stick in again, then mount it after getting to the command shell as before:
Code:
cd /tmpmkdir usbmount /dev/sda1 usbCode:
mkdir 15 16mount /dev/nvme0n1p15 15mount /dev/nvme0n1p16 16mkdir -p /tmp/usb/raspioscp 15/cmdline.txt usb/raspioscp 16/etc/fstab usb/raspiosumount usbYou need to delete the fresh raspios from your SSD before we replace it.
Code:
cd /tmp/15rm -rf *cd /tmp/16rm -rf *Code:
cd /tmpmkdir boot rootmount /dev/mmcblk0p1 bootmount /dev/mmcblk0p2 rootCode:
rsync -avr boot/* 15rsync -avr root/* 16syncumount 15 16 boot rootWe need to adapt your original raspios to its new environment.
Go back to PINN's GUI by pressing Ctrl-Alt-F1.
Press `m` twice to go to the Maintenance menu where you will see a list of your installed OSes.
Find the Raspios_armhf_full entry and select its checkbox at the left hand side.
Click the Fix button on the toolbar and check the `Re-run partition_setup.sh` then click OK.
Hopefully your OS is now adapted for multi-boot.
Press `Esc` a couple of times to get to the Boot Menu and boot raspios_armhf_full to verify it works.
Statistics: Posted by procount — Fri Feb 21, 2025 12:25 am