I want to run 2 versions of Linux Mint. I have one set up and heavily tweaked and I would like to clone the tweaked version to another partition on my GPT drive. I could create a copy of the partition but then I think what I need is to create a new EFI system partition entry and change the UUID. I don't know what things would need to change in the EFI system partition entry.
One idea is to install a basic version of Linux Mint on a new partition so that the EFI entry is set up and it has a new UUID. Now I create a copy of the tweaked partition in a third area and temporarily add it to the second system's boot edit. This will allow me to mount it and modify the UUID of this partition. At that point I will have 2 partitions with the same second system's UUID then I can use BiU to overwrite the original one with the modified copy.
Does this make sense or maybe there's a better way such as directly editing some appropriate files.
Cloning a system to the same GPT drive
Re: Cloning a system to the same GPT drive
rustleg, amazing. Your thoughts mirror the following method. The following is a slight adaptation of a Terabyte Support's post from a few years ago. I've only used it with Ubuntu and Mint.
Boot into IFL. Copy the Linux booting files to a new folder. Use tbosdt (list hd) to find the drive containing the ESP. Mine was HD 0. 0 0x01 was the ESP.
tbosdt
list hd 0
open fs 0: 0 0x01
0:
dir ((this is to confirm you are in the ESP))
md /efi/ubuntu
copy /efi/ubuntu.001/* /efi/ubuntu -s
close fs 0:
exit
close the tbosdt window
Open the IFL app and choose Copy. Copy the Linux partition to Free Space on any of your drives. Make a note of the target drive, eg sdb
Use these Options (in addition to the defaults)...
Change GUID, Change Volume SN, Assume Original HD
Give the target partition a New Name
Start the Copy
When finished, Exit IFL. Don't reboot.
Open a Terminal...
blkid, find the copied partition, eg sdb3. mouse copy (sweep, right click, copy) the uuid of the copied Linux partition (not the original partition). (DON'T USE PARTUUID). Leave the Terminal open
Open Partition work and select the ESP
Edit File, double click EFI, double click the ubuntu folder, double click grub.cfg, mouse sweep the uuid numbers, use ctrl-v to over-write the uuid numbers. (don't overwrite "root") Save,
OK, Close all Windows
Restart into BIU. You will see a new Boot Item called ubuntu. In Boot Edit give this a better name. In the ESP you will have a new folder, \efi\ubuntu.002 (for example here)
Go ahead and boot the copied Linux.
Boot into IFL. Copy the Linux booting files to a new folder. Use tbosdt (list hd) to find the drive containing the ESP. Mine was HD 0. 0 0x01 was the ESP.
tbosdt
list hd 0
open fs 0: 0 0x01
0:
dir ((this is to confirm you are in the ESP))
md /efi/ubuntu
copy /efi/ubuntu.001/* /efi/ubuntu -s
close fs 0:
exit
close the tbosdt window
Open the IFL app and choose Copy. Copy the Linux partition to Free Space on any of your drives. Make a note of the target drive, eg sdb
Use these Options (in addition to the defaults)...
Change GUID, Change Volume SN, Assume Original HD
Give the target partition a New Name
Start the Copy
When finished, Exit IFL. Don't reboot.
Open a Terminal...
blkid, find the copied partition, eg sdb3. mouse copy (sweep, right click, copy) the uuid of the copied Linux partition (not the original partition). (DON'T USE PARTUUID). Leave the Terminal open
Open Partition work and select the ESP
Edit File, double click EFI, double click the ubuntu folder, double click grub.cfg, mouse sweep the uuid numbers, use ctrl-v to over-write the uuid numbers. (don't overwrite "root") Save,
OK, Close all Windows
Restart into BIU. You will see a new Boot Item called ubuntu. In Boot Edit give this a better name. In the ESP you will have a new folder, \efi\ubuntu.002 (for example here)
Go ahead and boot the copied Linux.
Re: Cloning a system to the same GPT drive
Thanks for the info. I will try one method, not sure which, but at present I am having trouble finding and installing a network card driver so it might be a while.
Re: Cloning a system to the same GPT drive
Apologies for the length of this post but I want to give a complete explanation of what happened when I unsuccessfully tried the method I outlined in my first post above. I took an image of the tweaked Linux Mint system partition then did a basic install of Linux Mint on a second partition of identical size. I ran this basic install and mounted the tweaked partition. I used tune2fs to change its UUID and modified fstab to suit. I exited back to BIU. I then copied the modified tweaked partition over the newly installed partition.
At this point I made a mistake. I had first intended to use the image backup to reinstate the original partition. Instead went ahead to boot the second partition at which point it wouldn't boot. Now I realised there were 2 partitions with identical UUIDs. I managed to reboot and do the image reinstatement. I then booted each one but I found that both boot items pointed to the same partition i.e. the original one.
In this Linux I looked at /boot/EFI/efi which contained various subdirectories of ubuntu.xxx as detailed in BIU boot edit. But the boot files in BIU's boot edit were sometimes shimx64 and sometimes grubx64 (or similar). It appears there are alternative possibilities which I don't understand. The grub.cfg in each ubuntu subdirectory is fairly simple and it clearly shows the UUID. I tried various things in the boot edit boot file to get the second partition to boot but without success.
For some reason the original Linux Mint's boot file specifies a directory ubuntu.005 which I can't find anywhere in /boot/EFI/efi. I think this arose because I had scrapped and reinstalled the original Linux Mint as the one I was customising became cluttered with failed attempts at trying to get my network card working with secure boot. I presume this is because Rename Directory is ticked?
At this point I gave up as it seems I am fiddling with the operation of BIU without really knowing how it operates and so it is doing things I don't expect. I decided it is wiser just to install the second Linux Mint from scratch and repeat my tweaks.
The upshot of all this is that I am questioning if BIU is safe for me to use. I would like to know whether it is possible to create from scratch a boot item with a valid boot file given a Linux partition which contains a previously working OS. If I can't do that I might decide to abandon BIU due to the risk of having an unresponsive system if something ever goes wrong with the contents of the EFI system partition. At least I should back it up with a system image but would it be easy to get it back in position and working?
At this point I made a mistake. I had first intended to use the image backup to reinstate the original partition. Instead went ahead to boot the second partition at which point it wouldn't boot. Now I realised there were 2 partitions with identical UUIDs. I managed to reboot and do the image reinstatement. I then booted each one but I found that both boot items pointed to the same partition i.e. the original one.
In this Linux I looked at /boot/EFI/efi which contained various subdirectories of ubuntu.xxx as detailed in BIU boot edit. But the boot files in BIU's boot edit were sometimes shimx64 and sometimes grubx64 (or similar). It appears there are alternative possibilities which I don't understand. The grub.cfg in each ubuntu subdirectory is fairly simple and it clearly shows the UUID. I tried various things in the boot edit boot file to get the second partition to boot but without success.
For some reason the original Linux Mint's boot file specifies a directory ubuntu.005 which I can't find anywhere in /boot/EFI/efi. I think this arose because I had scrapped and reinstalled the original Linux Mint as the one I was customising became cluttered with failed attempts at trying to get my network card working with secure boot. I presume this is because Rename Directory is ticked?
At this point I gave up as it seems I am fiddling with the operation of BIU without really knowing how it operates and so it is doing things I don't expect. I decided it is wiser just to install the second Linux Mint from scratch and repeat my tweaks.
The upshot of all this is that I am questioning if BIU is safe for me to use. I would like to know whether it is possible to create from scratch a boot item with a valid boot file given a Linux partition which contains a previously working OS. If I can't do that I might decide to abandon BIU due to the risk of having an unresponsive system if something ever goes wrong with the contents of the EFI system partition. At least I should back it up with a system image but would it be easy to get it back in position and working?
Re: Cloning a system to the same GPT drive
rustleg,
I can perform the procedure I described in a few minutes. It's been performed over ten times without a failure.
I can perform the procedure I described in a few minutes. It's been performed over ten times without a failure.
Re: Cloning a system to the same GPT drive
Ok, nothing ventured nothing gained! I am reading the manual to understand about your tbosdt commands.
You say when finished the copy Exit IFL. Don't reboot. It seems you have access to IFL as an app within Linux or maybe in Windows? I have IFL in a separate partition which I boot via BIU.
As I haven't got IFL as an app I expect I could stay in IFL and use IFL's terminal to do the blkid and edit the grub.cfg ?
I had a look at tbosdt in IFL. I found the drive and opened 0. This has a directory EFI but uppercase, which is the same in BIU boot edit. Shouldn't I use uppercase in this ? :
copy /efi/ubuntu.001/* /efi/ubuntu -s
You say when finished the copy Exit IFL. Don't reboot. It seems you have access to IFL as an app within Linux or maybe in Windows? I have IFL in a separate partition which I boot via BIU.
As I haven't got IFL as an app I expect I could stay in IFL and use IFL's terminal to do the blkid and edit the grub.cfg ?
I had a look at tbosdt in IFL. I found the drive and opened 0. This has a directory EFI but uppercase, which is the same in BIU boot edit. Shouldn't I use uppercase in this ? :
copy /efi/ubuntu.001/* /efi/ubuntu -s
Re: Cloning a system to the same GPT drive
I did everything from my IFL partition installed on the SSD. But a UFD could be used.
Exit IFL is ambiguous. I just meant close the imaging app and get back to the IFL desktop.
It doesn't matter if you use upper or lowercase in TBOSDT. Or both.
Exit IFL is ambiguous. I just meant close the imaging app and get back to the IFL desktop.
It doesn't matter if you use upper or lowercase in TBOSDT. Or both.
Re: Cloning a system to the same GPT drive
Your first post started with "rustleg, amazing". I have to say - Brian K amazing. I followed all these instructions and now I have a clone system on a different partition. THANK YOU.
I will use this system for banking so that it never surfs the internet as I have done for many years on my old PC's MBR system. I'm not saying that someone who manages to hack into my PC can't get to it if they are very clever, but it's far safer than using my general Linux Mint system.
I will use this system for banking so that it never surfs the internet as I have done for many years on my old PC's MBR system. I'm not saying that someone who manages to hack into my PC can't get to it if they are very clever, but it's far safer than using my general Linux Mint system.
-
- Posts: 836
- Joined: Fri Aug 12, 2011 5:58 pm
Re: Cloning a system to the same GPT drive
This is similar to your question in your other post, isn't it? Seems like the answer would be yes.rustleg wrote: Sat May 10, 2025 8:19 am If I can't do that I might decide to abandon BIU due to the risk of having an unresponsive system if something ever goes wrong with the contents of the EFI system partition. At least I should back it up with a system image but would it be easy to get it back in position and working?
I don't know anything about Linux, but the easiest way to get a second working copy of a Windows partition seems to be to use BIU Partition Work to Copy/Paste the working partition to free space and check Create Boot Item or something similar to that. May not be relevant to Linuxx
Re: Cloning a system to the same GPT drive
rustleg,
Great. I'm glad it worked for you.
Boot from linux boot media...
sudo mount /dev/sdXY /mnt
sudo mount /dev/sdXX /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
grub-install /dev/sdXX
update-grub
... Note : sdXX = efi partition | sdXY = Linux system partition
This will create ubuntu.xxx and then you can create a Boot Item in BIU.
Great. I'm glad it worked for you.
Yes. If your ubuntu.xxx gets deleted or if you restore a linux image and you don't have an ubuntu.xxx, you can create one.I would like to know whether it is possible to create from scratch a boot item with a valid boot file given a Linux partition which contains a previously working OS.
Boot from linux boot media...
sudo mount /dev/sdXY /mnt
sudo mount /dev/sdXX /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
grub-install /dev/sdXX
update-grub
... Note : sdXX = efi partition | sdXY = Linux system partition
This will create ubuntu.xxx and then you can create a Boot Item in BIU.