0

I have Ubuntu on M.2 disk y Windows 10 on un SSD

I had install windows with ubuntu already installed, Windows has put its bootloader in the EFI partition of Ubuntu, since the M.2 disk is the first disk, my current situation is as follows

I have Ubuntu on M.2 disk with the following partitions

/dev/nvme0n1p1 2048 1050623 1048576 512M System EFI
/dev/nvme0n1p2 1050624 976771071 975720448 465,3G File system Linux

As a second drive SSD I have Windows 10 with the following partitions

/dev/sda1 2048 34815 32768 16M Reserved Microsoft
/dev/sda2 34816 468860927 468826112 223,6G Data Microsoft

The EFI partition is the first partition of the Ubuntu disk and its content is as follows:

enter image description here

In the event that the M.2 drive is damaged, my intention is to create a backup of the partition on a USB EFI partition

I have tried the following: I have created a FAT32 partition on the USB, I have created the partition as EFI type and I have marked it as bootable, I have copied the three directories that are seen in the image on the USB into a directory named EFI

My BIOS is configured as EFI and when I boot with the USB it can boot ubuntu without problems but Windows doesn't boot, my question is..., what should I put or modify on the USB to be able to boot Windows 10 with it? Thank you

UPDATE

Following user1686 instructions, I tried the following..., booting from Windows 10 (being the usb the volume a: and windows volume c:) and from the directory /boot/microsoft/boot the usb I have executed:

bcdboot c:\windows /s a: /f UEFI /v

Everything runs correctly and I can still boot ubuntu with the usb stick but I still can't boot windows 10, I can't figure out what I'm missing...

4
  • 1
    You could even have a backup EFI partition on your second SSD with the exact contents of the first EFI partition. Nov 20, 2022 at 19:32
  • Would I have to make space, create a partition and copy the contents of the EFI partition from the M.2?
    – Mario
    Nov 20, 2022 at 21:35
  • 1
    Yes, that is exactly what you would need to do. Nov 22, 2022 at 1:51
  • Thanks..., adding an EFI partition to the SSD I keep it as the last option..., for now I'm still trying it with my USB, I've updated the question with new experiments :-)
    – Mario
    Nov 22, 2022 at 14:53

1 Answer 1

0

what should I put or modify on the USB to be able to boot Windows 10 with it?

The Windows 10 installer. You can use its bcdboot command to reinstall the Windows Boot Manager into a new EFI partition (or a BIOS "MS system partition") whenever needed.

bcdboot.exe is approximately the Windows equivalent of grub-install, which is what you'd use to install Ubuntu's GRUB boot manager into the EFI partition.

(In fact, you can also use bcdboot from Windows itself if you want to move the existing Windows Boot Manager into the SSD's EFI partition, making it no longer dependent on the M.2 disk.)

3
  • Buff! I don't know if I understand it correctly..., that is..., do I have to run bcdboot.exe from windows, so that the Windows boot loader is installed on the USB stick?..., in that case, what would be the parameters with which to call bcdboot? Thanks
    – Mario
    Nov 20, 2022 at 18:53
  • 1
    This wouldn't help if @Mario would need to access his ubuntu installation in case of a corrupted EFI partition. But a second USB with ubuntu live could also fix that. Note: Ventoy is able to serve multiple ISOs off a single USB which could be helpful in such a case. Nov 22, 2022 at 1:51
  • Following user1686 instructions, I tried the following..., everything runs correctly and I can still boot ubuntu with the usb stick but I still can't boot windows 10, I can't figure out what I'm missing..., Booting from Windows 10 and from the usb located in the directory /boot/microsoft/boot I have executed, being the usb the volume a ----> bcdboot c:\windows /s a: /f UEFI /v
    – Mario
    Nov 22, 2022 at 12:03

You must log in to answer this question.

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