Double boot W7Starter, trying to hide XP on an extended/logical partition

berillio

Member
New thread, just to keep things as simple as possible (but it never is).
I have a Asus eeePC 1011px, which came with W7 Starter and the Android ExpressGate which we will ignore for the time being, as it is far less important; I repartitioned the HD and I have installed XP Pro as well.

I tried to read all the 38 pages of the "Vista Hide 'n Seek BETA" thread (but I am sure that I have missed few points), as well as few bits and pieces from other threads. I did read CG's post #543 on page 37 "I am sure you know that HnS isn't at all supported anymore..." .
So, at this moment in time (2012, not 2007/2008, when the thread was started) I do not really know the recommended way to implement a double boot with OS hide. I remember seeing a page which recommended the best solution as to use HnS, with NeoGrub the second option, but again that was an old page, and it referred (I may be wrong) to EBCD 1.721, not the current 2.xx (the version I have installed is 2.1.2.156), and since HnS is not supported since at least July 2010, HnS may not be considered the best solution anymore.

In my wish list I would have only OS visible at any time as C:. (I know that W7 does not mess up wit the XP recovery points, but I would prefer it that way, say for "tidyness" or "clarity"). If that wasn't possible, then I would have W7 visible, but I guess that isn' really the issue.

The netbook has one SATA HD, repartitioned as followed, with the entries ordered as their location on the disk:
Sequence
a) Win7StarterC: ( E: )Primary0NTFS50Gb
b) Android/RecoveryPrimary (hidden)1Fat3215Gb
c) Extended Partition2
d) XP ProE: ( C: )Logical/extended4NTFS50 Gb
e) DataD:Logical/extended5NTFS200 Gb
f) ESPPrimary3ESP16 Mb


I can boot either W7 or XP invoking the boot manager using F8 at boot time. The loaded OS will appear as C:, the other OS will appear as E:. Using this method, the W7 recovery points may be overwritten by XP. To avoid this, I have I have installed HnS (Build 61), but when I reboot and choose XP, I get
"Booting 'Windows XP [Boot2-logi4-XP] (E:\)]'
(hd0,0)
(hd0,0) Hidden
(hd0,4)
Mapped (hd0) (hd0) OK
Mapped (hd0) (hd0) OK
(hd0,4)
makeactive
Error 12, Invalid Device request".

Trawling through the thread, I found a number of key points; the most relevant probably is found in page 29, #421
"If your XP systems are on logical drives, then you won't be able to use HnS to boot them. HnS makes use of the makeactive command when booting OSs, and a logical drive can never be active."

I also found lot of discussions on manual editing menu.lst, in case it wasn't been created correctly.
Note that, if I run Drivegrabber I get the following:
\\.\PHYSICALDRIVE0
Disk #0, Partition #0, Type: Installable File System
C:
Disk #0, Partition #1, Type: Unknown
Disk #0, Partition #2, Type: Extended w/Extended Int 13
D: - GRUB partition #4
E: - GRUB partition #5
Disk #0, Partition #3, Type: Unknown

This is somewhat different than expected, as the XP partition E: should be partition #4 (first logical partition) while D: should be partition #5.

See a snapshot of the partition taken with DiskGenius:

DiskGenius.jpg
The Menu.lst listed below does not use the (hd0,0) notation but it use drive letters; therefore I do not know if there is an error because of this possible inconsistency shown by DriveGrabber:

# NeoSmart Technologies' Vista Hide 'n Seek Beta
# DO NOT MODIFY!!! YOU HAVE BEEN WARNED!

timeout 30
default 0
splashimage=/vhns.xpm.gz
foreground 000000
background ffffff

title Microsoft Windows Vista
find --unhide /Vista.C.HnS
find --set-root /BOOTMGR.HNS
makeactive
chainloader /BOOTMGR.HNS
boot

title Windows XP [Boot2-logi4-XP (E:\)]
find --hide /Vista.C.HnS
find --remap-root /XP.E.HnS
find --set-root /XP.E.HnS
makeactive
chainloader /ntldr
boot

# All your boot are belong to NeoSmart!

Furthermore, on the Goodells pages I found reference on the "Hidden Sectors" value, which should be responsible for the impossibility of making active a logical drive. I investigated this avenue and I used the procedure shown in:

Using Disk Director to Change the Hidden Sectors field of an NTFS Logical Partition

to assign to the hidden sectors the proper value; unfortunately it had no effect. I also tried the "start value -1", (just in case the hidden sector was suppose to be last sector before the start of the drive); again, no good. But I wonder if the inaccuracy highlighted by DriveGrabber (if it exist, that is), becomes relevant after removing the "Hidden Sectors" limitation.

Failing to hide the W7 partition, I am left with trying the "Registry hack", not my favourite option as I would prefer to hide the partitions (both of them in turns, as I already said).

Another point to raise. The ESP partition. I suppose that this partition could be removed, thus removing the need for extended/logical partitions, or maybe it could be made logical/extended itself, leaving a primary partition free for XP.
The point is that I do not know the function of the ESP partition, and why the ASUS technicians decided to have it, or have it there; nor if its purpose could be met if it was a logical/extended partition. For this reason I left it alone.

Thanks for reading, Berillio

Addendum

apologies - The table of partitions came out a mess. It seemed OK until I posted it. Me bad - Sorry
 
Partition numbers aren't necessarily the same as you would expect from the physical position on the HDD.
It's the position in the MBR partition table.
For a freshly formatted new HDD, the two will be the same, but the more you shrink/delete/extend or otherwise play around with the disposition or quantity of your partitions, the less chance that the slot in the MBR PT will mirror the position on the HDD.
HnS was designed to do one thing only, hide Vista from XP on those systems where the registry hack didn't work.
That's why it's not very sophisticated or flexible, and has a very small user base.
It's really just a GUI for creating a menu.lst for the Linux-virgin with no knowledge of legacy grub syntax, and having created that, it switches bootloaders between Vista's and grub4dos by mutual renaming (leaving the MBR untouched),so that the system is fooled into using grub whilst thinking it's using bootmgr.
Grub then chains the real (renamed) bootmgr or NTLDR as appropriate after doing the hiding/unhiding.
For what you want to do (mutual hiding), you can't use HnS, though you can use it as a way of creating the menu.lst which you can subsequently customize with your own commands.
There is one final twist to HnS which you must bear in mind. It takes precautions (multiple copies) to ensure that you don't end up hiding the boot manager from the MBR and paint yourself into a corner.
If you're going to hide each system from the other, you'll need to ensure that the boot files are somewhere other than either of the two (possibly hidden) OS partitions.
My own use of a customized HnS is described here
Quad boot Vista, XP, W7 and Ubuntu using HnS to protect system restore points from XP
where I use a small custom boot partition.
 
Hy Terry, thanks for replying and your thinking/advices.
I just reasoned that I do not have an issue with the partition number: I base myself on the DiskGenius reading of the partitions, and believe that the XP partition is the 4th one, and so does HnS too: althought menu.lst shows letters (and the correct one, for that matter) and not partition numbers, the correct partition number is shown in the error message which appears when I boot XP
"(hd0,4)
makeactive
Error 12, Invalid Device request".
DriveGrabber assigns the wrong letter to the partition, maybe because that partition letter was changed within Windows and not by some partitioning software (I say "some" because I have used both DiskGenius and Acronis for partition operations, as well as EaseUs and maybe Partition Wizard too).
I still wish to know if there is a solid base to the "hidden Sectors" method, and if so, why it did not work.
Regarding the use of a separate partition to keep the boot manager(s)/HnS, while I appreciate (and share) the thinking behind it, I have to many question marks on what is happening right now (namely ESP and its purpose) which need answering before tackling new avenues; I also still have the Android ExpressGate (which, for reason unknown to me, isn't working right now, but I wish to render operational at some stage) which could be muddling everything even more (as pointed out by Mak 2.0 on the Some trivial basics and a double boot issue thread).
 
Disk Letters don't really exist.
When your PC is switched off, none of the partitions have a letter. That's just a virtual label given to a partition or a drive by a running version of Windows. The letter may be assigned dynamically during PnP detection or (if you assigned it manually) be recorded in (and reused from) the registry of the OS.
Each OS has its own registry map of devices to letters and they won't necessarily be the same or even similar unless you manually synchronize them as I do across my four Windows systems.
HnS early builds used (hdx,y) syntax in the menu.lst it constructs, but it caused problems which broke the boot if the user changed the hardware configuration in any way.
Later builds created a null file on every partition, (e.g Vista.x.Hns) and used the find command to locate that partition during the boot, immunizing itself from any user configuration changes. The "x" just reflects what letter the version of Windows which ran HnS happened to be calling the partition by at the time HnS was running.
It's not necessarily the same as the partition letter currently in use (nor does it need to be). It's just a unique label which grub can use to find a unique location.
Your problem with XP being logical will need to be solved by chaining grub to the primary location where XP installed its boot files, not to the logical drive.
 
Hi Terry.
"Your problem with XP being logical will need to be solved by chaining grub to the primary location where XP installed its boot files, not to the logical drive."
I am not sure if a location other than on the logical drive exists.

For what is worth, this is what happened:
I had a number of partition with no OS (too long to explain Whys and Hows):
Part0 Primary, Active for Win7, first OS
Part1 Primary, Hidden (Android, Recovery)
Part2 Extended
...................Part4, Logical, other uses, become redundant and later deleted
...................Part5, Logical, for second OS, XP
...................Part6, Logical, for Data
Part3, Primary, ESP

a) I installed XP on C:\ ( Partition 0 )
b) I imaged this OS and copied to F:\ ( Part 5)
c) I removed one partition (now redundant, Partition 4), hence the XP partition became Part 4
d) I installed EBCD on XP Part 0, hoping to get control over the OS and boot either of them at will. Unfortunately something went wrong (maybe I configured the wrong "System Drive" in the Add New Entry window) and after that I could only access the 2nd XP (the imaged one) on Part 4. Installing EBCD on this partition did not help. Although the boot.ini had both partition 1 and partition 5 listed (on both drives), setting default to 1 only booted 5. F8 at boot time did not offer a choice, and the only partition listed was partition 5.
e) Using F9 and the recovery partition (Part 1, Primary, hidden), I reinstalled W7 starter on C: Partition 0
f) installed HnS, EBCD, but cannot hide XP, although I can boot either OS using the Windows partition manager which now opens after selecting Vista/W7
g) In W7, the last Logical partition (Data) appeared as E:, with XP second boot appeared as D:, so I renamed the drives swapping the letters, so to have C: System, D: Data, F: System (hidden, in theory).

On E:\, Part 4, at root level, I have three "boot" files:
Boot.bak 02/05/2012
Boot.ini 22/05/2012
Boot.ini.hns 14/05/2012

Boot.bak reads:
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(5)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(5)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect

Boot.ini reads
[boot loader]
timeout=0
default=multi(0)disk(0)rdisk(0)partition(6)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(6)\WINDOWS="Vista Hide 'n Seek: Windows XP" /noexecute=optin /fastdetect

Boot.ini.hns is not readable because in use. Rebooting with Hiren Mini Window XP I get access and it reads:
[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 XP Professional Boot0" /noexecute=optin /fastdetect
multi(0)disk(0)rdisk(0)partition(5)\WINDOWS="Microsoft Windows XP Professional Boot4" /noexecute=optin /fastdetect

I am not sure if all this is of any use. Any other information I can provide?
Any keys in the registry which I can read after I boot in XP which could be of any use? (I have seen on the Godells pages that 2K and XP write down drives informations at installation time but I did not have the time to read too much on this, although I have an interest because I have another PC which is probably suffering from this).
Many Thanks for your help (and to anybody else who may chip in)
 
Re: f) As we've already discussed, HnS won't hide XP (even on a primary partition). It's only designed to do the opposite.
I think your best bet, if you're not happy to custom build your own grub4dos boot, is to use EasyBCD on W7 to boot both Windows as you are presently doing.
No point in using HnS as it won't boot a logical XP, and it won't hide XP.
In XP apply the registry hack to protect W7, and if you really want W7 not to see XP, remove the XP partition letter in Disk Management after the dual boot is all set up. Explorer ignores all unlettered drives.
 
Hi Terry,
Now I am really confused.
"and if you really want W7 not to see XP, remove the XP partition letter in Disk Management after the dual boot is all set up. Explorer ignores all unlettered drives".
Somewhat, it seems too easy. The letter is removed, and Windows 7 cannot access the drive. When I boot XP, the registry hack protects the restore points: after rebooting into XP, E: appears as "Local disk E:", with no content.
OK, this way of doing things may not be as neat as "hiding" a drive, but it achieves the same results, exactly as I wanted: XP cannot see/access W7, W7 cannot see XP.
Too easy - I must have misunderstood something.
Thank you nevertheless - mostly for your patience in putting up with me.
 
Not only is it easier, but it's a thousandfold safer and more robust, too.

You don't have to worry about this solution breaking when you install a service pack or a Windows Update contains some surprise changes.

While Vista HnS was an (if I do say so myself) amazing bit of software, there's a reason it was discontinued: way too complex of a solution except in the most extreme fringe cases.
 
Hello CG!
All of a sudden, your avatar gets a new meaning !
You may recall me saying that I trawled thru' the 38 pages of the "Hide 'n Seek Beta" looking for some reasons why support for HnS had been discontinued, without finding any. I assumed that you guys got too busy to spend time on something which would become les and less useful, as XP was being dropped (one could still find netbook sold with XP on board, when I bought mine, last Xmas, but the hardware specs weren't really interesting).
Just a question: does the W7 registry folllows the same rules as the XP's, meaning that one could unmount the file system in the same way? I suppose that there is no need to edit the registry if something to the same effect could be done using the "normal" Computer Management. On the other hand, maybe XP would see the Vista/W7 recovery points even though no letter is assigned...
Also, why is it called "the hack"? sound like some trickery !, in fact, it is simple and elegant, just one registry key. I thought that i would have been something obscure, like a triple somersault followed by two double twists with inverse rotations :wink: ).
Thanks for spending time developing software, even tho' some of it may end up becoming a "fringe" product.
Cheers, Willy (aka berillio)
 
Hack is just a generic term for "get inside and fiddle with the internals", not used in the "chop it into pieces" sense here.
You can also use the registry to "offline" drives in Vista/7, not just XP.
The reason to use one method in XP in the other in W7 is mainly persistence. The registry hack can't be accidentally undone, but a disk letter could easily be reassigned in a moment of carelessness and bang go all your restore points and backups.
It's so long ago now (the reason I came here in the first place nearly 5 years ago) when I was first trying to solve the restore point problem, that I can't remember all the details, but I have a suspicion that just removing the letter from XP was yet another thing tried that just didn't work.
The hack didn't work on my setup either which is why I ended up here and found the Neogrub solution which was superseded by HnS, and how I became the de-facto HnS expert after debugging virtually every build CG came up with to overcome the stress testing my system placed on his initial code.
 
Yeah, Terry was our star tester back then. He had an almost-magical ability to instantly run into issues with HnS on his machine :tongueout:
With that in mind, no surprise the registry fix didn't work for him, either :smile:
 
Terry, CG
"The hack didn't work on my setup"...... Misteries of computers.... Well, I tried the "Hidden Sectors" trick, that should have made my logical partition responsive to the makeactive command..... and it didn't..... Too bad.
But it doesn't matter, you got me a solution, it works brilliantly, I am happy.
Next: getting the ExpressGate Android to work. But that is next week job.....
Cheers
 
now the "Android" bit...

Offline for two days - maybe an extension problem, maybe some line issues.
Tuesday 29/5
OOOps.
Brilliant. Now I get a blinking cursor... and precious nothing else. All self inflicted, I suppose
Background info.
With ExpressGate working (as I had on the netbook as new, before I had any problems), the user would set (in Windows 7) the Express gate switch to default to one or the other OS, or a choice menu, with a default windows after a configurable delay, normally set to 15 seconds.
At that time, when I installed EBCD and the BCD, as found, was as follows:

Default : Windows 7
Timeout : 30 seconds
Easy BCD Boot Device: C:\

Entry #1
Name: Windows 7
BCD ID [current] (sorry, cannot find curly brackets on the italian kb)
Drive: C:\
Bootloader Path: \windows\system32\winload.exe

(I have the detailed debug if it is of interest).

Then HDD failure, and all the saga about HnS etc earlier, so, as on saturday 26/5, I had W7 and XP working; the choice was made by the Windows bootloader. Maybe wrongly, I assumed that this was (by chance) the best suited solution: I could have the Android menu come up, and if selecting windows, I would have the Windows Boot manager and all the choices.

Last time I booted into W7, which was the default OS, the Android switch was set to come up with the Choice menu, and then default to W7.

On the ASUS site there are two ExpressGate files to download: one ~600Mb exe, and one 1.8Gb zipped Image. The exe seemed to update the ExpressGateCloud, but nothing else.
This morning I went to the shop wher I bought the netbook, the idea was to "ghost" the android partition off an identical netbook which was on display. Unfortunately, that (last) netbook had been sold during the weekend.
So I went back home; later on I used DiskGenius to "clone partition to image file" of the three important partitions: W7, XP, and the Android/Recovery partition, then I used ghost32 to expand the downloaded unzipped ASUS image to the Android partition (no recovery files, as the ASUS image partition has only the ExpressGate files). The un-ghostinging worked fine... but... Bummer, after reboot I get a blinking cursor.
OK, no problem. Before doing anything, I cloned the partitions. So I wilI copy back the old Android one, to have my double boot back... nope, did not work. So I copied back W7 (the partition clone made with DiskGenius). Nope. So I use another W7 image, made with Ghost32 2 days ago. Nope. I even try to reinstate the image (also made with Ghost 32) of the ESP partition, made two months ago. Nothing. Seriously stuck now (and never mind the fact that I am offline).

This may be of little use, I report it for completeness. Within the various utilities on the Hiren Disk, I have "Bellavista BCD editor", which I tried to use in the past with no success (could not work out WHAT to loadand edit). This time it comes up with two configuration named "MS Windows XP Professional Boot0" and "MS..........Boot4".
I am not sure what it reads: I definitely did NOT have two XP, but a W7 / XP choice, also the Timeout is set to 30 seconds, while I had it on 5 seconds. So I do not really know what this is, but, just in case, I try to change the default one (which was 7) to XP, but it does not work. So I set it back to as I found it, default on Boot0. (note that I had two XPs at some stage, before I managed to get F9 working and reinstall W7. The timeout was 30 seconds, but strangely enough, the default was Boot4. What is more strange is the fact that I did not think that XP was loaded by the Boot manager, but NTLDR (which could be evoked by the boot manager). So this is the EBCD which I botched when I had the two XPs.... but it would have been immaterial, bcd is not used by XP..... ?????

So, as on now thursday 31/5 (with a "temperamental" ADSL), I have a netbook which boots into a blinking cursor. I "ghosted" back the ghosted images and/or partition clones for W7, the Android partition and the ESP partition (which accorting to some pages found on the italian speaking Eee PC - Netbook News Forum (I am italian and I can read the posts), is needed for the Android OS to work. I have not touched the XP partition (but I have a ghost image made at the same time as the W7, with the double boot working). I have not ghosted it back because I have not seen a boot manager redirecting me to XP, I think that the issue is before that.
I can think that Android is still "broken", so it gets activated but does not execute and does not continue back to W7, which would give me the boot options. But I don't understand why I cannot go back to what I had before, even using the images/clones made just before I broke it all.

Any thoughts?
Thanks for reading this - sorry for being a pest :frowning:
 
Seven days and "not a whisper" after some excellent support.... :x
Then I suspect that Android issues are beyond the scope of this forum (they are not related to EBCD, after all)......
Well.. thank you for you support until then: You got me a solution to my original problem. Cheers!

Addendum

Problem solved: Pfeeww.
Managed to go back to the "PreAndroidRestoration" situation, i.e the double boot W7 + XP.
I found in DiskGenius a "rebuild MBR" command. Easy as pie.
Still wish to have android working, though: I will try different avenue (I have some Android backup files within my original android partition, but I have the feeling that the problem lies elsewhere), wish me luck!
Incidentally, if you can think of a more appropriate place where I could discuss boot issues with android, I am all ears: I only found a couple of italian forums, but no english based ones
 
Nope. I was wrong. I do NOT need to fix the Android boot. It is already fixed.
When I got all the problems, one of the things I did was to copy over an old backup (individual files, not a ghost image or a DiskGenius clone) of the old Android partition. I then "unzipped and copied over" some Android back up files which were in that partition; they seemed to be older files than the one which they were replacing, but I was trying to solve a problem.
Once I re-enabled Android in the BIOS and select the OS switch to the OS menu (I need to do this in W7), next reboot gave me Android, in a "first open state" (configure language and keyboard, accept EULA). Google Chrome was working (need that for quick browsing and mail). But after using for few minutes, I thought that it was a little slow; I tried to run the updater (within Android) but somewhat, it got stuck and did not work (I tried twice, with a reboot in between). So I created another ghost image (and a DiskGenius clone, to be on the safe side), then I copied again the same "old" files I had done in the past, but without unzipping the built in back-up. I ended up with the same Android as I had before I had the Hard Disk failure, including Chrome bookmarks :wink: I run the updater again, which whizzed for few seconds to say that it was all up-to-date. So, probably my problem was only a corrupted MBR, which (my guess), partition software like Acronis, DiskGenius and few others were able to understand and present to me, but would misfire at boot time.

What is interesting (to me) is the "order" of events at boot.
I imagine that the Android OS switch in W7 (or in XP : I simply copied the ExpressGateUtil folder to XP and it works - shear luck) set a flag high for the next reboot (where is this flag kept? in the ESP partition? Is this the reason why the guys at eeforum.it are convinced that Android needs the ESP partition?).
After reboot I am presented with a menu: if I choose Android, then the Android partition (which was hidden) becomes visible and active and boots up.
Once I finished using Android, I can switch off, or switch OS. Either case, the netbook reboots (I can see the AMI BIOS screen, which is NOT shown or accessible if the Android menu is activated) directly to the Windows boot manager. The next reboot, though, I will get the Android menu again (so the flag is set high again).
The people on this forum can probably understand what's going on, and some of them may object to this less-than-perfect "two stages" set of boot choices. While I totally agree that it is a little cumbersome and not at all elegant, it seems to work. And thanks to all the people on this forum, I have a workable machine. Maybe now I can concentrate on installing software and use it as I had in mind when I bought it. Hurray !!

and let's hope that I stop experimenting and I can keep it working :wink:
Cheers!
 
Back
Top