I am trying to understand how booting works with a Recovery partition. In the past when I have restored a Windows partition using GParted with a copy that I made earlier, I needed to use a Windows recovery disc to repair the partition because it would not boot.
Now I have done the same process again, except this time Windows boots immediately after with need to do a repair with a Windows disc. The difference that I notice is that with this laptop, the boot flag is on an ntfs partition called Recovery. I assume that this must be the reason why it is able to boot without a repair.
Can anyone explain to me what is happening here?
Boot is used by some commercial operating system boot loaders. The boot flag indicates the partition is active or bootable. Only one partition on a disk device can be active.
Source: GParted manual
Boot is just a… flag.
I needed to use a Windows recovery disc to repair the partition
Yes, because restoring the partition probably didn’t restore a working bootloader.
Now I have done the same process again, except this time Windows boots immediately
Newer Windows versions (I guess 7 and 8, 8.1) install the bootloader on a separate partition, which is automatically created when you make the first partition on an unformatted HDD. Because the bootloader was intact, it looked for a partition with the
boot flag and started the boot process from it.
Most likely it’s a question of precise partition placement. On a BIOS-based computer, Windows is very finicky about where its boot partition begins; if it’s moved by as much as a single sector, the boot process wanders off and gets lost. Thus, if you back up a partition that began on, say, sector 63, and restore it to a partition that begins elsewhere, say on sector 2048, the computer will no longer boot. Furthermore, if you restore the partitions to the disk but fail to restore the boot loader, the computer won’t boot.
Thus, chances are one of two things happened in your recent experience:
- You happened to restore to a partition with the same starting sector number as the original, and either you restored the MBR or the target disk had a compatible MBR in place already.
- Your computer uses EFI, which isn’t reliant on the MBR and isn’t as finicky about partition start points.
The former seems more likely than the latter, because on an EFI-based computer, what GParted reports as the “boot flag” should be assigned to a smallish (typically 100-600MiB) FAT partition, not to an NTFS partition. If you also have a FAT partition with a “boot flag” set, though, it could be that the NTFS partition you mention is mis-labelled or that the computer’s manufacturer has set it up strangely.