Where would the trace for logical partitions be in mbr?
The method is absolutely the same, but whilst by slightly modifying the principle of your tool you can easily "select" just one partition entry, corresponding (if the partition is Primary) to just one partition, the Extended partition entry is nothing but a redirector to the EPBR (or EMBR), which in itself is contains the first logical volume data AND a Redirector to next EPBR, and so on, thus if you zero out the entry in MBR, you effectively put off-line ALL logical Volumes inside Extended.
In itself, the approach of completely zeroing out a partition entry (or worse, all of them together) seems to me a bit risky, I have no idea how "strong" is the lock (if any) that Vista/2008/Windows7 puts on \\PhysicalDrives, but for this specific task, if I were you I would try simply changing the single byte which represent Partition ID, trying setting it to 00 or "unused" like 21, as steve6375
does for his second "fake partition": http://www.boot-land...?...ic=7739&hl=
For this approach, instead of dsfo/dsfi, it would be IMHO more advised a "specific tool" like MBRFIX:http://www.sysint.no...ting/mbrfix.htm
A sequence of:
MbrFix /drive <num> /partition <part> getpartitiontype
Get partition type
MbrFix /drive <num> /partition <part> setpartitiontype <typenum>
Set partition type
would do the trick nicely.
To make sure of having access to the "old" partitiontype, you could use the features of:
MbrFix /drive <num> readstate Read state from byte 0x1b2 in MBR
MbrFix /drive <num> writestate <state> Write state to byte 0x1b2 in MBR
to store temporarily the partition type in the MBR itself, so that it can be recovered even if anything goes wrong on the file/filesystem where you would otherwise store it. (this is probably a bit of paranoia
, but better be safe then sorry, as I see it
Same, or even more features are contained in MBRWIZ:http://mbrwizard.com/http://mbrwizard.com...erence.php#copy
that also has a "Hide" partition command, that could be the solution.
Still, nothing of the above represents a solution for selectively use/zero out single logical volumes inside Extended, just as above I have no idea which kind of limits there are on a Vista/2008/Windows7 about accessing the EPBR's.
, notr I know a "specific command line app to do so.