I would assume the process is similar for a regular disk; Just creating the partitions on the new disk, then copying from the old disk to the new disk, then setting up fstab. Unless im perhaps mistaken?
If the new drive is the same size or bigger, you could also use `dd` to clone the entire disk, then use `efibootmgr` to setup the bootloader either from a recovery image or after booting using UEFI Shell. Then just expand the partition/filesystem.
I've been meaning to post an update to that guide for ZFS, which I've been using on my systems recently. With ZFS I can take a snapshot and send it to a new drive.
@djsumdog oh cool, didnt know I could use diskdestroyer to do that
i assume that setting up the bootloader happens from the usb live environment? Ive only ever done clean installs so im not super knowledgeable in ways of cloning systems
Back in the Master Boot Record (MBR) days, the boot loader was just in the boot sector of a partition and you could mark it as active with fdisk. So you could move a disk and it would "just work." But now with UEFI and GUID Partition Tables (GPT), the BIOS has to be told: add a boot entry labeled Linux that points to (hdx,x)/EFI/Grub.uefi or whatever. You'll see that at the bottom of my guide.
If your motherboard supports UEFI shell (there's usually a "Start UEFI shell" option. Sometimes its built in to the BIOS, sometimes you have to put the shell on a USB stick), you can use that to navigate to the UEFI executable. The command syntax is similar to MSDOS. You type fd0: <enter> dir / cd.... You can find your bootloader and start it, then use efibootmgr after you're booted to add the entry permanently.
Some BIOS setup screens let you configure the UEFI menu (Dell, Framework, etc.) It's a nice feature but not very common.
@theorytoe@djsumdog >I remember you writing about how you do system clones on most of your machines here If you aren't aware a dedicated bootable distro exist for that clonezilla.org
Yes. \efi\BOOT\BOOTX64 will boot without needing to be set in the BIOS. (x64 can be replaced for different architecture) That's how bootable USB sticks work.
good stuff to know. I miss the days when a disk partition could simply be marked bootable. And I don't think UEFI has made the process any more secure. If anything, it has enlarged the attack surface.
Infuriatingly, on my Acer notebook I must hit F12 right after powering on, and select the GRUB entry, otherwise it just boots Win10. I admit that I have not done much research on it, but have failed to find a way to edit the UEFI boot order.