-1

This question has already addresses but none of the solutions has worked. I replace my laptop from time to time. I even have a Clonezilla image that I restore to the new one. This approach had ran fine until now.

I got a refurbished Latitude 5480 at a very good price. It had a mechanical drive that I even didn´t use. I replaced it with a SSD drive that runs fine.

The image (hence the disk) has dual boot. Starts with Ubuntu configured with GRUB to boot either Ubuntu or Linux. The partition table is GPT.

The first partition has Ubuntu installed, following the Linux swap partition and then a bootable Windows partition. There is no "reserved microsoft partition" Many people asks why I installed it that way since the most common is Windows first. The answer is simple: Windows eats hard disk space while Ubuntu doesn´t. In fact I installed a new version of Delphi that required 20 GB. Were the partitions set backwards, Delphi would not had fit.

So, I got a new M.2 NVME disk and cloned the entire disk to it. Neither OS boots. GRUB menu appears. Ubuntu enters in "panic" mode after a while and Windows just hangs, sometimes complaining about inaccessible boot device. The laptop is configured as UEFI with Secure Boot turned off (As far as I know, secure boot implies UEFI, but UEFI doesn't necessarily implies Secure Boot)

My guess is since both OS were installed on preNVMe time neither has the drivers or configuration needed.

I don't want to install from scratch (specially Windows) but I'm stuck here. The UEFI requires some files created at OS install, again, as far as I know.

How can I migrate this nonUEFI disk to the new one?

I checked this answers but no one has worked
moving Windows 10 from SSD (UEFI/GPT) to m.2 NVMe PCH PCIE (or PCH SATA)
Moving windows from SATA SSD to NvMe SSD

5
  • 1
    So what exactly is your question? You cannot boot MBR on a device that requires GPT if your unable to enable Legacy mode.
    – Ramhound
    Sep 8, 2022 at 0:16
  • How can I migrate this nonUEFI disk to the new one? It is stated that the disk has GPT and that I enabled UEFI
    – alvaroc
    Sep 8, 2022 at 14:29
  • You would have to convert the nonUEFI disk, which does not exist so I suspect you actually mean MBR, to GPT. Your only other alternative is enable Legacy mode on the other system, and boot to the MBR image of your legacy disk, provided your system even supports that.
    – Ramhound
    Sep 8, 2022 at 14:52
  • No. I didn´t mean MBR. The disk has GPT and boots fine under Legacy
    – alvaroc
    Sep 8, 2022 at 15:07
  • The disk has GPT and boots fine under Legacy with Linux, not with Windows. Windows strictly requires GPT for UEFI mode and MBR for BIOS/Legacy. Sep 8, 2023 at 16:15

2 Answers 2

2

Because both operating systems were installed on a SATA disk, neither is configured to load an NVMe driver at the right time – the bootloader is able to load the OS kernel using BIOS capabilities, but the OS is unable to natively detect NVMe disks (and of course can't load drivers in the regular way yet because the root partition is inaccessible).

For Windows, the 'StorNvme' driver has to be marked as "boot start" – allegedly just booting Windows in Safe Mode should do this automatically, but I've had to manually do it with sc before cloning:

  1. Boot Windows from the SATA SSD,
  2. Run sc config stornvme start= boot,
  3. Shut down and clone the Windows partition of SATA SSD to NVMe.
  4. (Make sure the SATA SSD is disconnected at least during your first NVMe Windows boot.)

For Linux, the initramfs archive needs to be rebuilt to include the needed modules.

  1. Boot Ubuntu from the SATA SSD,
  2. Add nvme to /etc/initramfs-tools/modules,
  3. Run update-initramfs -u -k all,
  4. Shut down and clone all Linux partitions from SATA SSD to NVMe,
  5. The /etc/initramfs-tools entry should be no longer needed at this point (once you're booting from NVMe, update-initramfs will know that it needs to include the 'nvme' module).

The UEFI requires some files created at OS install, again, as far as I know.

They all can be created at a later point. Manually create an "EFI System Partition" (shared between both operating systems), clone the individual Windows and Linux partitions next to it, then use bcdboot for Windows and grub-install for Linux to rebuild the bootloaders.

1
  • Your solution ran fine for Ubuntu, but not for windows. I found an easier way but maybe not suitable for everybody
    – alvaroc
    May 3, 2023 at 18:43
-1

This may not work for everybody. It depends if you are able to plug both SSD and NVMe at the same time
1.- Plug BOTH the SSD and NVMe at the same time
2.- Boot from the SSD
3.- windows will recognize the NVMe disk and will add the required driver
4.- Just in case, try to format or access the NVMe disk
5.- Clone the windows partition to the NVMe and now it should boot

"The UEFI requires some files created at OS install, again, as far as I know" This is incorrect. Such files are required for Secure Boot (which requires UEFI but not viceversa)

Driver installed

1
  • This is very much incorrect. Clearly you don't know what a NVMe drive is (and how it must be used) and particularly you don't know what the UEFI mode requires. Please take the time to read the proper answer. Sep 8, 2023 at 16:12

You must log in to answer this question.

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