How to boot from an EUFI original or clone Linux partition
Posted: Sun Feb 03, 2019 7:13 am
Goal :
To copy a Linux Mint OS partition to the same ssd, then boot from either the original or copied OS.
I've done this on a Dell Latitude 5289 with no apparent BIOS issues with Linux.
The steps:
1.
The copy operation of the Mint original partition to free space using BootIt EUFI began painfully slowly...and was unlikely to finish under 20 minutes.
I therefore made an image, then did a restore operation to free space (30 seconds to image, and 30secs to restore. I will have to investigate why the parition copy operation was so slow.)
2.
Before rebooting the computer into either Mint partition, it is necessary to change the UUID of the clone.
On one trial, I did boot before doing this, thinking I was booting into the Mint original....however it booted me into Mint clone. The interwebs say results are unpredictable when there's OS partitions with same UUIDs.
Procedure for changing UUID
- Boot using any bootable Linux USB.
- do not mount Mint clone.
- determine the /dev/ of Mint clone by running 'disks' software, or in terminal - blkid = /dev/nvme0n1p8
- run a file check on Mint clone from terminal using sudo e2fsck -f /dev/nvme0n1p8
- now the uuid of Mint clone can be changed with sudo tune2fs -U random /dev/nvme0n1p8
- confirm the uuid change has occurred by running 'disks' again ..... the change will not be picked up with blkid at this point.
3.
Before a Mint clone boot is possible, it is also necessary to change the UUID in /etc/fstab and /boot/grub/grub/cfg on the Mint clone file system.
Actually, it may not be necessary to change grub.cfg on Mint clone, at least on my system.
Why?
because the grub menu I am persistently presented with at boot is that of Mint original. This needs to be changed as well, so as to create an menu item for Mint clone (which I do later).
So, mount Mint clone
- open /etc/fstab, and replace the old uuid with new, and save.
- open /boot/grub/grub.cfg, and do a find and replace operation to replace all occurences of the old uuid with the new. (don't worry that this is overkill. This is just to help boot into Mint clone one time....Once Mint clone is booted, then you can run a sudo update-grub which will correct Mint clone grub.cfg.
- now I reboot the laptop, and am presented with grub menu installed by Mint original. but Mint clone still does not have a boot entry.....so I choose to boot into Mint original
- I then check in 'disks' which Mint partition is root, ensuring it is Mint original.
- then run sudo update-grub to get a grub menu entry for Mint clone.
- then reboot to test...and menu entry is there. select it. once in, check in 'disks' to ensure Mint clone is mounted and root....and mint original is not mounted.
- now run sudo update-grub in Mint clone.
- I also change the desktop wallpaper of Mint clone to help confirm which parition I am booting into.
That's the process.
--------------------------------
However, the only bug I have is on booting of Mint clone, I get a quick error message soon after choosing Mint clone from the grub menu.
"[ 1.2985921 Couldn't get size; 0x0000000000000000E"
I did fsck operations on this but nothing changed.
I presume it might be due to the image restore operation....maybe due to incongruence in the cloned partition parameters relative to the original's.
------------------------------
why bother doing this?
Over the years, I got into a habit of setting up systems with a bootable clone of the primary OS, usually Windows XP.
This way, if a client had OS issues, they could simply select from the boot menu to boot up the clone OS. If there was no issue, then they could stay productive until I arrived to investigate whether the issue was software or hardware.
In general, having a clone OS to boot from, is a quick way to help determine whether an OS issue is hardware or software.
To copy a Linux Mint OS partition to the same ssd, then boot from either the original or copied OS.
I've done this on a Dell Latitude 5289 with no apparent BIOS issues with Linux.
The steps:
1.
The copy operation of the Mint original partition to free space using BootIt EUFI began painfully slowly...and was unlikely to finish under 20 minutes.
I therefore made an image, then did a restore operation to free space (30 seconds to image, and 30secs to restore. I will have to investigate why the parition copy operation was so slow.)
2.
Before rebooting the computer into either Mint partition, it is necessary to change the UUID of the clone.
On one trial, I did boot before doing this, thinking I was booting into the Mint original....however it booted me into Mint clone. The interwebs say results are unpredictable when there's OS partitions with same UUIDs.
Procedure for changing UUID
- Boot using any bootable Linux USB.
- do not mount Mint clone.
- determine the /dev/ of Mint clone by running 'disks' software, or in terminal - blkid = /dev/nvme0n1p8
- run a file check on Mint clone from terminal using sudo e2fsck -f /dev/nvme0n1p8
- now the uuid of Mint clone can be changed with sudo tune2fs -U random /dev/nvme0n1p8
- confirm the uuid change has occurred by running 'disks' again ..... the change will not be picked up with blkid at this point.
3.
Before a Mint clone boot is possible, it is also necessary to change the UUID in /etc/fstab and /boot/grub/grub/cfg on the Mint clone file system.
Actually, it may not be necessary to change grub.cfg on Mint clone, at least on my system.
Why?
because the grub menu I am persistently presented with at boot is that of Mint original. This needs to be changed as well, so as to create an menu item for Mint clone (which I do later).
So, mount Mint clone
- open /etc/fstab, and replace the old uuid with new, and save.
- open /boot/grub/grub.cfg, and do a find and replace operation to replace all occurences of the old uuid with the new. (don't worry that this is overkill. This is just to help boot into Mint clone one time....Once Mint clone is booted, then you can run a sudo update-grub which will correct Mint clone grub.cfg.
- now I reboot the laptop, and am presented with grub menu installed by Mint original. but Mint clone still does not have a boot entry.....so I choose to boot into Mint original
- I then check in 'disks' which Mint partition is root, ensuring it is Mint original.
- then run sudo update-grub to get a grub menu entry for Mint clone.
- then reboot to test...and menu entry is there. select it. once in, check in 'disks' to ensure Mint clone is mounted and root....and mint original is not mounted.
- now run sudo update-grub in Mint clone.
- I also change the desktop wallpaper of Mint clone to help confirm which parition I am booting into.
That's the process.
--------------------------------
However, the only bug I have is on booting of Mint clone, I get a quick error message soon after choosing Mint clone from the grub menu.
"[ 1.2985921 Couldn't get size; 0x0000000000000000E"
I did fsck operations on this but nothing changed.
I presume it might be due to the image restore operation....maybe due to incongruence in the cloned partition parameters relative to the original's.
------------------------------
why bother doing this?
Over the years, I got into a habit of setting up systems with a bootable clone of the primary OS, usually Windows XP.
This way, if a client had OS issues, they could simply select from the boot menu to boot up the clone OS. If there was no issue, then they could stay productive until I arrived to investigate whether the issue was software or hardware.
In general, having a clone OS to boot from, is a quick way to help determine whether an OS issue is hardware or software.