Hidden/Utillity partition support

steje

New Member
#1
Unless I've missed something - the app needs some enhancement to properly deal with such partitions... For instance, Microsoft describes the use of utility partitions, which I'm sure many of the ppl here are familiar with due to the common use of the by OEM's.

At any rate, I also rather like the idea of a hidden partition to store my recovery tools. What I would like to see in EasyBCD around this are the following:

Select BCD Store: allow user to browse based on partition - not just like logical drives. This is in the case the store is on the System partition and not accessible via a drive letter.

In addition to allowing to browse partitions, it would be good to allow browsing of hidden and system folders as well. For instance, on a newly formatted USB drive - made bootable by EasyBCD using the BCD Deployment->Create Bootable External Media feature (which incidentally, lets you browse by partitions :smile:, so the code to do so is already in the app), if you want to edit the boot menu later - when you go back to select it - you can't get to it unless you know to type the "boot" directory into the Open dialog manually from the root of the drive.

Add New Entry: in each of the Operating Systems and the Portable/External Media features, we're missing the ability to browse and select our OS's or disk images (PE WIM's, VHD's, etc) from hidden / recovery / utility partitions where some of these things are meant to reside.

Create Bootable External Media: allow for creation of a UEFI bootable USB drive. The USB's created by the app so far ONLY ever boot from a BIOS/MBR config or one that allows both UEFI and 'Legacy' with CSM support.

PORTABLE: if you'd support it - I'd gladly help debug and test for dependencies that need satisfying to run under WinPE. This tool seems able to fix non-bootable computers if able to be run in a pre-boot environment of some kind.
 

mqudsi

Mostly Harmless
Staff member
#2
Hi steje,

Thanks for your suggestions. I've considered adding support for partitions and not drives in EasyBCD, wherein it would automatically mount and access the partition in question via low-level API calls. However, at the moment our official recommendation is to use compmgmt.msc to mount the drive, perform any operations you would like to do, and then hide the partition once more. EasyBCD will continue to work fine with the drive hidden and the entries created will work once the drive/partition is hidden/unmounted once more, but this saves us the hassle of having to code EasyBCD to directly access the partitions in question.

EasyBCD 2.3 should have full support for creating bootable UEFI USB sticks, though the limitations of UEFI BCD still apply - you can't use it to boot non-Windows entries in UEFI mode, and in general, most PCs and motherboards have full CSM support and even give CSM mode priority when booting from removable media.

There has been much discussion about making EasyBCD portable in the past, but for reasons pertaining to WinPE licensing we've decided we cannot officially sponsor this project in a form that we would like and recommend EasyRE for use in these circumstances, as it is not encumbered by any MSFT licensing restrictions.
 

steje

New Member
#3
Thanks for the reply, I appreciate it and understand.

Re: support for hidden/utility partitions... I had tried the workaround you suggest before posting. Unfortunately, on my Win7 Home installs - compmgmt/diskmgmt do not allow me to manage such partitions. I assume this is intentional, and part of the protective treatment modern Windows uses with MBR partitions that have ID 27 set, and probably the same with GPT equivalent partition types. Maybe I can remove that OEM Recovery partition ID with diskpart to make it mountable...

Re: UEFI bootable USB drives... I had read that page on UEFI before posting as well and all I can say is that every bootable USB key I've created with the tool does NOT boot up on a computer set for UEFI only mode. Does it matter that I'm creating them from a BIOS/MBR based instance of Windows to start with? Otherwise there aren't any real options to change in creating the bootable media, so I don't see what else I could be doing 'wrong'.

Re: portable app support... I've been checking in to EasyRE and it seems an awesome and capable tool. Also very much geared for ppl who don't feel a need to control or know too closely what is actually being done. Among other reasons to want to run the app portably is in fact to get around the inability to manage standard hidden/utility/recovery partition references I described above, where WinPE doesn't follow the same rules as full blown Windows does and automounts such partitions to make them accessible to standard tools. There are MANY ways of creating WinPE utility disks ourselves using other tools which don't seem to run afoul of MS licensing issues. And I don't think you have to be concerned with those issues simply by clarifying whatever dependencies would need to be satisifed for the app to run under PE (and preferably avoid relying on system libraries that couldn't be satisfied under PE). But... I "get" that you'd rather drive ppl toward EasyRE. It'll be the right thing for most people who just want you to fix stuff for them. Bummer for the rest of us :frowning:.
 

steje

New Member
#4
For the curious:

For BIOS/MBR partitioned drives, the "OEM" utility partition type (ID 27), causes Windows to disallow managing the partition. I.E. in DISKMGMT, all you get is a HELP action from right clicking on the partition. The only way I found to access the partition for use by EasyBCD is to use diskpart to remove the partition ID to allow Windows to mount it.

* Caution: as with almost anything related to the use of EasyBCD, take these steps with some healthy caution, and make sure your situation matches mine before blindly repeating my steps below. For instance, there are other partition type values that could be used (17 for a 'regular' hidden partition, as opposed to my 27 for the official OEM/Utility partition ID). And these steps don't apply for UEFI/GPT partitioned drives at all. I don't have a great way to suggest making sure what the current partitiion flags are. I've long been frustrated that most partition tools try too hard to make things easy for users... I'm not aware of any that show you the RAW partition attributes and values. They all use 'friendly names' for things, rather than - for example - explicitly show you the partition has a 0x27 partition ID as opposed to a 0x07 ID. If someone can suggest a way other than using a disk editor to examine the raw MBR and partition table data - by all means, speak up.

The procedure goes basically like:

- run diskpart
- list the disks ('list disk')
- select the appropriate disk (in my case 'select disk 0')
- list the partitiions ('list partition')
- select the OEM/Utility partition (in my case 'select partition 3')
- replace the OEM/Utility partition ID with standard NTFS partition ID ('set id=07 override')

Once this has been done, Windows will let you (or do it itself) assign a drive letter to the partition as normal. You can then modify the boot entries using EasyBCD to reference your boot images stored on the utility partition.

Once you're done in Easy BCD, manually REMOVE the drive letter assignment using DISKMGMT... otherwise Windows will 'remember' it even after re-hiding the partitiion and multiple reboots:

- run diskpart
- repeat steps above to identify and select the correct disk and partition
- reset the appropriate partition type (in my case 'set id=27 override')

Once you've finished... you should be good to go.