0

I have an Intel NUC (NUC7i5BNB) that I originally imaged with Ubuntu. I then added Windows and so the grub boot manager added Windows to the boot options.

I haven't used the Ubuntu option in years, and even when I did, I rarely used it. So, I was wanting to reorder by boot options so that Windows is first. I did accomplish this...

However, I want to get rid of Ubuntu completely (for a variety of reasons). My machine has two disks, Disk 0 and Disk 1. Here is a picture:

Picture of disks and partitions.

Disk 0 is where I store all my personal files. Disk 1, along with the system stuff, is where the Ubuntu and Windows 10 OSs currently reside.

My question is: is there a way to reimage Disk 1 (with the operating systems) to Windows without touching Disk 0 at all (which has my personal data) and once Disk 1 is reimaged I can "reconnect" to Disk 0?

1
  • Note that any change to the file system has risks, so first make full drive images of all drives. If something goes wrong, you have a fallback, and the images may also help in moving the Recovery partition, if you wish to keep it. You'll also want to eliminate booting through grub, which would still point to a non-existent Ubuntu. Commented Jul 23, 2023 at 18:59

1 Answer 1

0

Removing the Linux boot entry from the EFI partition will let you boot directly to Windows and then remove the Linux partition.

This procedure is taken from the post Uninstall GRUB and use Windows bootloader and I quote from the answer by armadadrive:

  1. Run a cmd.exe process with administrator privileges
  2. Run diskpart
  3. Type: list disk then sel disk X where X is the drive your boot files reside on
  4. Type list vol to see all partitions (volumes) on the disk (the EFI volume will be formatted in FAT, others will be NTFS)
  5. Select the EFI volume by typing: sel vol Y where Y is the SYSTEM volume (this is almost always the EFI partition)
  6. For convenience, assign a drive letter by typing: assign letter=Z: where Z is a free (unused) drive letter
  7. Type exit to leave disk part
  8. While still in the cmd prompt, type: Z: and hit enter, where Z was the drive letter you just created.
  9. Type dir to list directories on this mounted EFI partition
  10. If you are in the right place, you should see a directory called EFI
  11. Type cd EFI and then dir to list the child directories inside EFI
  12. Type rmdir /S ubuntu to delete the ubuntu boot directory

Assuming you only ever had two operating systems (Win 10 & Ubuntu) you should now be able to boot directly to Windows without hitting the black grub screen.

You may now delete the Linux partition, which I assume is the 77.46 GB partition that has no drive-letter.

Before doing all this, I suggest creating a good backup of your data, and perhaps also a disk image backup of the whole disk, in case of a serious problem.

6
  • Thanks, @harrymc. Do you reckon this will still work even if I do not currently see Windows Boot Manager in the UEFI settings? I initially tried this: itsfoss.com/uninstall-ubuntu-linux-windows-dual-boot but did not see Windows Boot Manager. Currently, I am backing up all the files on D:, but not a disk image of Disk 1 (or Disk 0, just the files themselves) as I do not really care about the data on Disk 1 (the operating systems).
    – JD136
    Commented Jul 23, 2023 at 20:51
  • Regarding whether it will work, I am thinking about doing what you suggested in conjunction with the recommendations here: helpdeskgeek.com/linux-tips/…. Specifically the command: bcdedit /set “{bootmgr}” path \efi\microsoft\boot\bootmgfw.efi
    – JD136
    Commented Jul 23, 2023 at 20:56
  • I'm a bit confused : How can you boot to Windows if you don't see in the EFI partition the folder ` \microsoft` (or similar)? If you don't care about the installed operating systems and have technical problems with my answer or these articles that you found, a strong-arm method would be to install Windows from USB while formatting the disk.
    – harrymc
    Commented Jul 24, 2023 at 8:44
  • I followed the instructions here, unfortunately I could not get it to boot into Windows thereafter (I probably lack the technical expertise). I attempted a variety of actions to access the existing windows installation, including bcdboot, etc. (a variety of errors appeared, I think the underlying problem was that my windows disk did not have "write" permissions...?). Anyways, I ended up reimaging the machine with Windows. Several resources were helpful (see next comment).
    – JD136
    Commented Aug 6, 2023 at 4:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .