Hello DietPi users!
I’ve been using the newest x64 release with my Raspberry Pi 3B+ for over a month - works flawlessly!
My setup runs without any SD card since the DietPi is installed onto a 64GB USB pendrive.
My second USB device connected is a Seagate 2TB storage formatted to ex4.
I was thinking about getting rid of the initial 64GB USB pendrive and migrating with all the data to a 2TB storage device.
I’ve already moved the userdata and swapfile folders onto the Seagate 2TB thanks to Drive manager.
Is it possible, however, to move the boot partition as well so I will be able to completely disconnect 64GB pendrive? If yes, how to do it without messing my storage device data structure (maybe adding a small, additional ext4 partition within it?)
Any help will be appreciated.
PS I’ve laso created a backup of the DietPi that is stored on the Seagate Drive.
many thanks for your message. Well that’s not that simple like just copy files from A to B. At the moment, your 64GB USB pendrive contains 2 partitions. First one is the BootFS (FAT) and the second one is the RootFS (ext4). Both would need to be cloned to your 2TB storage device. Means you would need to move the exiting partition of the 2TB storage device to the end and create 2 new partitions at the beginning. Ideally they would match between pendrive and HDD. A tool like GParted can be used to achieve this.
Once done you need to clone data from pendrive to HDD.
For this you might have a look to rpi-clone tool: https://github.com/billw2/rpi-clone
Especially example 7 should fit to your scenario: https://github.com/billw2/rpi-clone#7-clone-sd-card-to-usb-disk-with-extra-partitions
I need to say, I never did it myself and there will be no grantee that it is working this way.
Whatever you do, perform a backup of all your storage device before, to avoid data loss. Our recommendation is always to start with a fresh copy of DietPi and have it flashed directly to the target device.
Thanks for the comment.
However, it seems to be a bit of a hussle, so I will probably pass on this idea, especially due to the fact that in two weeks I will get a brand new Raspberry Pi 4 and I will try to first install a new DietPi image on the previously formatted 2TB storage, and later on restore the DietPi with the current backup. Will it work this way, even though I switch from Raspberry Pi 3 to Pi 4?
Well moving from RPi3 to RPi4 should work. At least you would need to ensure to have latest firmware/bootloader installed on the RPi4 before moving. Once moved, you need to install RPi4 EEPROM. Should be possible via dietpi-config.
Restoring the backup could be tricky as well. Because you will restore all setting, including /etc/fstab. Means it would contain entries from the old system and would need to be adjusted to fit to knew environment. If I understood correct, yoou have data stored on the 2TB disk atm. Means, after restoring the backup, your system would expect data located on the 2TB disk. Therefore you would need to move all data back before.