Linux - original and clone partition setup

Creating and Booting from a Cloned Linux Mint partition



1. Clone 


option 1

use Terabyte Unlimited's BIBM, BIU, IFD, IFL to copy.
Later editions include the following flags to make most file changes:
- change GUID
- change volume SN
- assume original hdd.


option 2

- from an external Linux boot, use Gparted or dd to clone.

    dd if=/dev/sdb1 of=/dev/sdb2
(sdb2 does not have to exist, however I don't understand how dd would know where on free space to place the clone otherwise)

- manually change UUID in Gparted, or gdisk

- edit fstab using new uuid for root /

- edit /boot/grub.cfg
(the file that begins "do not edit this file"), replace old uuid with new.

-  grub.cfg may also need secondary boot items changed (uuid and /dev/nvme0n1px )



2. Make boot menu item


- For BIU or BIBM boot manager, an /EFI/ubuntu.00x  entry is not required.

-------------------------------------------------------------------------------------

(i)
It is more trouble free to use
 
    /boot/grub/x86_64-efi/grub.efi

as a boot loader.

--------------------------------------------------------------------------------------

(ii)
If you want to use
    /boot/grub/x86_64-efi/core.efi

it more than likely will pass you to a grub_rescue screen.

How to resolve this:

at the screen enter

   set

output will be like
 
  cmdpath=(hd0,gpt8)/boot/grub/x86_64-efi
  prefix=(hd0,gpt5)/boot/grub
  root=hd0,gpt5

Now, enter

   set prefix=(hd0,gpt8)/boot/grub
   set root=(hd0,gpt8)
   insmod normal
   normal

This will get  you back to a normal grub screen, or boot the right partition.

Once booted, open a terminal and enter
   sudo update-grub
   sudo grub-install /dev/nvme0n1

The last line will reinstall /boot/grub files, removing any concealed reference to the original partition.


-------------------------------------------------------------------





- For rEFInd, edit   /boot/refind_linux.conf
update uuid and /dev/xxxx

rEFIind will boot using kernel file, with its integrated boot stub.

Comments