0

This pc started as my first Ubuntu daily driver when I transitioned from Windows, it's a dual-boot UEFI 64-bit system with Windows 8 (original system) and Ubuntu 18.04.5. Secure Boot is disabled.

Here is the current partition setup for the 2 disks.

enter image description here

I haven't booted it into Windows for three or four years now, and sda is showing some issues on SMART, so it's time to replace it. I'd like to get rid of Windows in the same operation. Here's my proposed final config.

enter image description here

So, how to get from "current" to "final"? Here is my plan, asking if it won't work and how to fix the plan if it's wrong.

  1. Clonezilla the UEFI system partition and the data partition to our samba server.
  2. Use gparted to set the new hard-drive up as gpt and make the partitions.
  3. Clonezilla the partitions to the new drive.
  4. Swap out the drives in the pc.
  5. Boot the pc with a live USB.
  6. update-grub with bind mounts and chroot like in this answer
  7. Update the fstab to include the data partition's new UUID
  8. Profit?

One thing I'm not sure of, do I need to do a grub-install? I'm not sure what that does on UEFI systems. If it just fills in the UEFI system partition, seems like I wouldn't need to since I cloned it.

Organic Marble
  • 23,641
  • 15
  • 70
  • 122
  • A grub install also runs efibootmgr to add a new or replace an old UEFI boot entry. You may need to run efibootmgr to add correct entry or reinstall grub. UEFI boot entry uses GUID/partUUID to know where to find /EFI/Ubuntu folder & files. Be careful on cloning gpt partitions, generally not recommended. Do not know if now newer tools also then sync partUUID/GUIDs also? Do not use dd to copy partition with gpt due to unique guids & UUIDs post #12 http://ubuntuforums.org/showthread.php?t=1680929 – oldfred Aug 18 '20 at 18:24
  • Thanks @oldfred. If I don't clone the UEFI system partition, can I just make an empty vfat partition and run run-install instead? Sounds like that might be a better plan. – Organic Marble Aug 18 '20 at 18:50
  • 1
    If you do a full grub install, that will add the .efi boot files into the ESP and update UEFI with a new boot entry. – oldfred Aug 18 '20 at 19:48
  • Thanks again @oldfred. That's what I will do. – Organic Marble Aug 18 '20 at 19:58
  • Backup first. Ensure backup is complete and correct. – waltinator Aug 18 '20 at 20:51

1 Answers1

0

I executed the above procedure and it worked. There was still a Windows entry in grub, though. I had to go into /boot/efi/EFI/Microsoft/Boot and rename bootmgfw.efi to keep grub from finding a windows install. I also used efibootmgr to remove the Windows entry.

I believe windows is gone forever now from the pc.

Organic Marble
  • 23,641
  • 15
  • 70
  • 122