0

We have a fleet of about 100 devices that run off of linux on a bootable compact flash. Each device used a single compact flash.

For a recent update we were given a single CF drive for which we were told we could make copies for the rest of the devices.

I used dd to clone original CF, basically using the command dd if=/dev/sdb of=dev/sdc. This seemed to work fine, making exact clones, including the partition UUID (see output of *sblk -f command below )

So is there any reason that duplicate UUIDs will cause a problem in this case? If they could be a problem, is there a safe way to change them?

frank@ThinkPad2:~$ lsblk -f

sdb                                                                       
└─sdb1 ext3           c44c8412-bf87-4fa4-a6fa-8259aa78bd24  191.1M    70% /media/frank/c44c8412-bf87-4fa4-a6fa-8259aa78bd24
sdf                                                                       
└─sdf1 ext3           c44c8412-bf87-4fa4-a6fa-8259aa78bd24  191.1M    70% /media/frank/c44c8412-bf87-4fa4-a6fa-8259aa78bd241

BTW . This is a follow up to another issue I was having with this problem. For reference I included the link to a previous question.

Unable to mount cloned compact flash after using dd to clone bootable compact flash

Frank
  • 129
  • 7
  • You cannot reboot with cloned or duplicate UUIDs. But should be able to mount it after booting unless mount creates duplicate data partition also. If CF cards are in totally different independent systems they will not see each other and then should not be an issue. – oldfred Sep 03 '21 at 18:53
  • Do you have control over these devices? Can you rule out that someone will use two of them and have them interact with one another where the UUID could become a problem. For example if you export the block device over the network. Some systems that start out as identical clones simply generate unique UUIDs when they boot for the first time (like a raspberry pi image). – frostschutz Sep 03 '21 at 19:22
  • 1
    @frostschutz The devices will never interact over the network. Each device has only one CF slot, so no chance of two being in the same device. However, if it's bad practice in general, and there's a "correct way to fix it", I'd rather do that. – Frank Sep 03 '21 at 19:28
  • @Frank raspi does it by running init_resize.sh on first boot (one-off) which resizes partition to full sd card size and changes uuid. However it seems it is using PARTUUID instead of filesystem UUID for some reason, and it appears the filesystem UUID is not changed (or I missed it). I remember this differently, maybe something changed. Either way you can use it for some inspiration, if you want to fix it at all. – frostschutz Sep 03 '21 at 20:55

0 Answers0