Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect Windows boot/recovery partition #195

Closed
Sebastian-Roth opened this issue Oct 18, 2017 · 4 comments

Comments

@Sebastian-Roth
Copy link
Member

commented Oct 18, 2017

So far we use the filesystem labels (remember to fix the wording in the script code) to find boot/recovery/reserved partitions on Windows systems. This fails on systems having a different label, namely foreign language installations. See here, here and here.

We need a different way of detecting those "special" partitions.

@mastacontrola

This comment has been minimized.

Copy link
Member

commented Oct 18, 2017

I've added a label for the French "Reserved" label, however I agree that a much better method of detecting reserved partitions should be created. There's too many different languages for us to just keep on "adding" new labels to search for. Also, labels can be set by the user, so it's kind of an unreliable mechanism in some situations.

@Sebastian-Roth

This comment has been minimized.

Copy link
Member Author

commented Nov 11, 2017

Trying to gather more information on this and discussing this with others we came up with four different types of partitions so far:

  1. Windows system partition* - This partition contains the files need to boot up Windows and should be fixed in size and start sector. Should be fairly easy to detect.
    1. Windows Vista/7/8/10/Server 2008: Boot\BCD (registry hive config file) and bootmgr (boot loader binary) (ref1)
    2. Windows XP: boot.ini (INI config file) and NTLDR (boot loader binary)
  2. Windows recovery, EFI and OEM partitions as well as Linux SWAP and /boot partitions - We want those to be fixed in size but have a movable start sector as those partitions are last on disk quite often. So we need to move those to be able to expand the Windows partition.
    1. Windows recovery - should be easy, find Recovery\WindowsRE\winre.wim file.
    2. EFI partition - easy, find EFI\Boot\BOOTX64.EFI bzw. EFI\Boot\BOOTX86.EFI
    3. OEM partition - Almost impossible to detect as every vendor does his own thing.
    4. SWAP is easy to detect using blkid
    5. Linux /boot shouldn't be to hard as almost all distros use GRUB these days.
  3. Windows boot partition* - On systems with only one single partition for boot and system we want this single partition to be fixed in start sector but not fixed in size.
    1. TBD
  4. Normal NTFS or EXTFS formated partition (neither system nor boot) - Those shouldn't be fixed at all, so movable and re-sizable!
    1. Nothing new here. Those partitions we will actually shrink and move around as we like.

* Quite often we see the naming of those partitions in reverse. Some people state that the system partition is the one containing the files to start windows, e.g. BCD and such. Thus the one named boot partition actually holds the Windows system files. Doesn't make sense to me but ... Wikipedia officially states that the reverse naming logic exists. Probably not something we need to care about but it's important to know when reading up on those things!

Will update this post as I find out new things.

@Sebastian-Roth

This comment has been minimized.

Copy link
Member Author

commented Nov 20, 2017

Closed #210 for now as we still haven't come to terms with this and other things are coming up. Need to pick that up again at some point.

@Sebastian-Roth

This comment has been minimized.

Copy link
Member Author

commented Oct 2, 2018

This issue was moved to FOGProject/fos#18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.