What to do with EFI and swap in a cloned double boot drive?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Dirkoir
Level 4
Level 4
Posts: 329
Joined: Wed Jul 30, 2014 12:43 pm

What to do with EFI and swap in a cloned double boot drive?

Post by Dirkoir »

Hello, gurus:

Things are handled transparently when you just install and use your OSs, even with a double boot setup, but what when you clone the system and suddenly you must resolve UUID conflicts between clone and original? Which UUIDs can you touch and how? And what about fstab?

I specifically wonder about the EFI partition and swap partition when creating a clone of a Linux Mint and Windows 8 double booting drive of the newfangled UEFI variety. Using a Clonezilla Live CD, I cloned my internal drive which has that double boot setup to an external drive, and in the future I hope to both be able to boot with the external drive AND alternatively attach it as a removable slave drive (it's a removable USB hard drive) for file copying operations when I am already booted from the internal drive. I have already done the latter and found that all the cloned Ext4 partitions (/, /home, and "data") won't mount. I can't copy anything now, say to update the clones with rsync or restore a VM file or such if needed. Arrgh! The suspected culprit is that the UUIDs of the clones are the same as those of the originals, and - which might compound the trouble - my fstab files mount partitions by UUID.

Now, I could generate new UUIDs for all the cloned partitions and also rewrite /etc/fstab for the external drive to reflect these changes. With /home and similar file carrying partitions that should work fine. BUT I worry about EFI and swap:

1. EFI partition: If I change its UUID, will the drive still be able to boot? Perhaps GRUB or such needs its UUID to be unchanged? Perhaps Windows needs it unchanged? GRUB might be updatable, but Windows? Still, probably the two disks MUST have different UUIDs for their respective EFI partitions in order to avoid trouble when both are up and running on my PC at the same time unless the EFI partition really doesn't matter by that time? And what about fstab? Perhaps I could enter the EFI partition's label in fstab instead of the UUID like I plan on doing with the file carrying partitions (/home, "data", and ideally /), however the fstab on the external drive would probably need to use a different label for the external EFI partition to keep the two drives' partitions separate -- and, yet, Windows or GRUB can perhaps only live with the currently assigned label of "SYSTEM_DRV"? Maybe changing its label to "Ex-SYSTEM_DRV" or "SYSTEM_DRV-2" or so on the external drive would make that drive unbootable? Why does Linux even need to mount the EFI partition when booting is long done? Does anybody know anything about this?

2. Swap partition: Can I give it a label (it currently has none) and mount it in fstab using that label instead of the UUID? (it's a hell of a lot easier to rewrite and later recognize fstab files using labels instead of UUIDs, and for file containing partitions it is a lot better if their labels (their human readable names) differ, so I can always know which is which and from where to where I am copying files). I guess, changing swap's UUID should be risk free as long as fstab references it correctly somehow. No worries about Windows and GRUB there, me thinks. Still, for uniformity's sake, I'd like to reference swap in fstab by label if that's what I will be doing with all the other partitions listed in fstab. Does that work?

Also, how safe is it to change the Linux root partition's UUID (the one which mounts as "/")? Maybe GRUB has the original UUID registered and booting fails if I change it to avoid conflict with the internal drive?


P.S.: Ack! And in http://forums.linuxmint.com/viewtopic.php?f=46&t=212169 I just read that GParted (my tool of choice) works allegedly on file sysem labels as opposed to partition labels???
______________________________________________________________________________________________________
Linux Mint 17 Qiana Cinnamon installed beside a preinstalled Windows 8.1, and now I am trying to clone this correctly...
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
______
Linux Mint 17 Cinnamon 64-bit | LM19 Cinnamon | LM20.1 MATE | LM20.3 Cinnamon
cwsnyder

Re: What to do with EFI and swap in a cloned double boot dri

Post by cwsnyder »

Your problem only occurs if you try to boot from either the original or clone with the other disk connected. if you boot from Live media (CD/DVD or flash drive to access both drives and otherwise disconnect one copy, you should not have to juggle UUIDs, labels, /etc/fstab , etc.
Dirkoir
Level 4
Level 4
Posts: 329
Joined: Wed Jul 30, 2014 12:43 pm

Re: What to do with EFI and swap in a cloned double boot dri

Post by Dirkoir »

cwsnyder wrote:Your problem only occurs if you try to boot from either the original or clone with the other disk connected. if you boot from Live media (CD/DVD or flash drive to access both drives and otherwise disconnect one copy, you should not have to juggle UUIDs, labels, /etc/fstab , etc.
Thanks. It's good to have that confirmed. Still, the question remains: what are the steps necessary that would allow both to be connected and play nice when booted from one of them? That shouldn't be impossible. Hence my questions.
______
Linux Mint 17 Cinnamon 64-bit | LM19 Cinnamon | LM20.1 MATE | LM20.3 Cinnamon
Locked

Return to “Installation & Boot”