A 500 GB HDD that started giving signs of obsolescence had multiple partitions, including Linux Mint and Windows 10.
This is on a BIOS laptop (non-UEFI).
That HDD had MBR partition table. Because of that, I had to create an extended partition for Linux in order to fit a fifth partition for swap. The table looked something like this:
Using Disks (gnome-disk-utility), I have created two images of the Windows partitions that had been created during the initial Windows 10 installation. These images were saved on an external drive.
Note that the Windows system was not affected by the signs of HDD failure that I had noticed. Those were limited to error on copying files from the large NTFS partition. All operating systems were working fine after the images were created.
I have then replaced the old HDD with a 1TB SDD on which I have created a GPT partition table so that I can have more than four partitions. I have restored the two Windows 10 images with Disks in Linux.. As I have a lot of space, I have installed another two Linux operating systems along my old Linux Mint 19.2 Xfce (restored with Timeshift) and a swap partition. (I am testing the improvements involved by the new SDD, that's why I want to see how Windows behaves, as it was very slow on the HDD. In the end I will keep only one Linux I imagine.) Gparted shows this:
The installation of Linux Mint 20.1 Cinnamon asked me to create a small bio_grub partition too.
The Windows 10 appears in grub boot list, but would not boot, hanging with no message on a black screen with one underscore sign.
I have tried to fix it with boot-repair (automatic repair) but without success. I don't know if "restoring mbr" makes sense on a GPT table. I guess not, given MBR options are not available in Boot Repair from Linux.
Could the problem be that the Windows 10 has been initially installed on a MBR partition table, but their images have been restored on a GPT partition table?
I would like to fix this from Linux. Can it be done? Or is it a must to try a Windows tool? (Could I create a System Restore disk from the smaller image called SYSTEM_RESTORE_WIN10.img?)
UPDATE
Using a Windows USB to repair didn't work. Restoring mbr from Command prompt only destroyed the grub. Trying to install windows gave the message that Windows cannot be installed on a GPT partition style, which now I know it's normal for a non-UEFI computer.
As I don't want to change the GPT partition table, there seems to be no way to boot Windows from those restored images unless maybe by some of the solutions discussed here: Booting Windows 7 / 10 from GPT Disk on BIOS (non-UEFI) systems.
2 Answers 2
I suspect you are thinking along the right lines that the switch from MBR to GPT though it might be something simpler. There's a reference here to a boot.ini file. The example on that page shows something like this:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows .NET Standard Server" /fastdetect
Windows's own bootloader (invoked by grub) needs to know where Windows is installed. It looks like it does this by just numbering the partitions in order on the disk - something linux moved away from years ago.
So I think the first thing you should try is to find your boot.ini and make sure that it is still referencing the right partition after you rearranged into a GPT layout.
Beyond that, I think you will get more helpful answers from superuser.com
-
The idea being to modify that file within the Windows image, maybe by copying its files and re-creating a new image? Or the change can be made within the image itself?cipricus– cipricus2021年03月03日 11:13:53 +00:00Commented Mar 3, 2021 at 11:13
-
make sure that it is still referencing the right partition- The fact is that old HDD had a NTFS partition that is now absent (I have decided to use only ext4 outside Windows), which at the time was seen by Windows: three partitions were accessible from Windows then, now it should be only two.cipricus– cipricus2021年03月03日 11:21:01 +00:00Commented Mar 3, 2021 at 11:21 -
boot.ini only needs to reference the Windows OS not it's other partitions.Philip Couling– Philip Couling2021年03月03日 12:28:10 +00:00Commented Mar 3, 2021 at 12:28
-
I will update the question. This is a non uefi machine with gpt. Windows cannot be installed at all. Uefi or mbr is a must.cipricus– cipricus2021年03月03日 12:35:56 +00:00Commented Mar 3, 2021 at 12:35
I don't know what to do with this question, maybe I should close or delete it, as there isn't any possibility anymore to solve the initial problem.
But it might be worth explaining that the question involves two very separate aspects: (1) the impossibility of installing Windows 10 on an old BIOS machine with a GPT partition table and (2) the impossibility of restoring Windows 10 from partition images created with Disks in Linux.
A GPT partition table on a non-UEFI (old BIOS) machine makes no sense: it makes the installation of Windows 10 impossible. The creation of an extended partition on a MBR partition table solves the specific problem of the 4-partitions limit. Not being able to install Windows on that drive at all (now or in the future) and the fact that I had just formatted that drive and there was no much on it made me decide to reformat the whole SDD with a MBR partition table.
But even then I was not able to restore a working Windows 10 installation out of the two partition images of my previous Windows 10 installation: those images had been created with Disks in Linux and restored in the same way. No subsequent action with Boot Repair or Windows installation drive could make those restored partitions bootable.
On a Microsoft forum I have found some authoritative suggestion to re-install Windows rather than try to restore from such images that were not created under Windows. Therefore, I re-installed Windows, which took me much less time than the other efforts.
cp /path/to win10.iso /dev/sdX && syncwhere X is the letter matching the thumb drive (be careful to pick the right one, drive must be unmounted). The you have your Win10 installer drive and should be able to boot it and get a repair option.woeusb. I will report if successful, you could post an answer then.