raspberrypi-ui / piclone

Utility to back up Pi to an SD card reader
260 stars 62 forks source link

The PARTUUID seems duplicate #11

Closed david-foo closed 7 years ago

david-foo commented 7 years ago

We clone the SD card to a USB storage device using piclone. What we want to do is to use SD card to keep the /boot partition and the USB device to keep the / patition. We change the boot=/dev/sda2 in cmdline.txt to achieve this.

We reboot the Pi for many times. Normally we see the /dev/mmcblk0p1 is mounted at /boot. But sometimes(about 20% rate) we see /dev/sda1 is mounted at /boot. It seems the PARTUUID is duplicate which caused the problerm.

So the piclone's work is: dd the Card-A to Card-B then rezise on Card-B. Am I right? Can we do it this way: fdisk -> mkfs -> rsync

spl237 commented 7 years ago

Yes, under stretch, partitions with the same PARTUUID will not both mount.

This is already fixed in the latest version of piclone - there is now a checkbox which allows you to force a new PARTUUID to be generated on the copy.

piclone already works without using dd, by the way - dd doesn't allow you to resize a card, and piclone is designed to enable this.

The new version will be released with the forthcoming stretch release of Raspbian, or you can download the latest code from this GitHub and rebuild it yourself.

david-foo commented 7 years ago

I guess there should not be dd because piclone is so fast ^_^. Thank you.