Jump to content











Photo
- - - - -

Boot windows from extended partition


  • Please log in to reply
66 replies to this topic

#51 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 21 June 2010 - 04:08 PM

Imagine this: You're Windows. You have kept a note in the Registry for what volume is associated with C:. Suppose your note includes the following volume information:
  • Disk signature
  • Offset to partition
  • Length of partition
Now suppose any of these details change. Now try booting Windows. Windows says, "Hey, my C: volume is missing. Which volume is C:, in that case?" Now suppose Windows looks at the MBR and enumerates the volumes it finds there. Now suppose it picks one to be C:. Suppose it picks the wrong one. Suppose that you log in and userinit.exe is executed, but it's trying to access OS files for the wrong OS installation. Due to the severity of the error, it logs you out and returns you to the logon screen. This is easily reproducible when fiddling with partition shuffling.

#52 xpt

xpt

    Frequent Member

  • Advanced user
  • 138 posts
  •  
    Canada

Posted 21 June 2010 - 04:54 PM

Now suppose any of these details change.


Just FTR, further explanation (taken from http://www.pcreview....2237038-2.php):

Yes. Particularly (in Windows NT) a pointer in the registry (HKLM\System,
\DISK or \MountedDevices) which contains the mapping of the "letters"; this
mapping is done by the signature of the physical disk (bytes 1B8 to 1BB in
the MBR) along with the starting offset for the mounted file system
(starting at byte 0 in LBA 0).

So every different clone will assign C: to the same physical file system on
disk,
_unless_ the said file system has been made invisible to Windows before
booting (which is the case if you disconnect the original disk and install
the newly cloned one in place),
_or_ either if the cloning utility has slightly edited the registry (the
same way it already changes the HiddenSectors count in the boot record.)


The funny part is that Windows does not seem to check whether the indication
in BOOT.INI of the kernel to boot (the ARCpath, multi() etc.) actually
matches its view of the kernel once booted (i.e.
%SystemRoot%\system32\ntoskrnl.exe): it only complains (loudly, STOP 0x7B,
BSoD) if it is not able to _find_ the latter while booted.

Behaviours might evolve between versions at this level, my tests were with
W2K, YMMV with XP.



#53 xpt

xpt

    Frequent Member

  • Advanced user
  • 138 posts
  •  
    Canada

Posted 21 June 2010 - 04:58 PM

. . . You have kept a note in the Registry for what volume is associated with C:. Suppose your note includes the following volume information:

[*]Disk signature


What's this Disk signature (bytes 1B8 to 1BB in
the MBR)?

I notice mine just get changed, by ghost restore?

#54 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 21 June 2010 - 05:07 PM

Suppose that you log in and userinit.exe is executed, but it's trying to access OS files for the wrong OS installation. Due to the severity of the error, it logs you out and returns you to the logon screen. This is easily reproducible when fiddling with partition shuffling.

Right idea ;) , maybe wrong example. ;)
http://support.micro...kb/249321/en-us

:unsure:

What's this Disk signature (bytes 1B8 to 1BB in
the MBR)?

I notice mine just get changed, by ghost restore?

http://thestarman.pc...br/Win2kmbr.htm
http://www.911cd.net...showtopic=19663

Drive lettering (if not assigned/fixed) is a quite complex topic, take your time here (AND links within):
http://www.msfn.org/...howtopic=142620

:unsure:
Wonko

#55 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 21 June 2010 - 05:51 PM

Right idea :unsure: , maybe wrong example. :unsure:
http://support.micro...kb/249321/en-us

;)

Exactly what do you mean by using the word "wrong"? Is this not exactly the scenario detailed by the article you've referenced?

#56 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 21 June 2010 - 06:29 PM

Exactly what do you mean by using the word "wrong"? Is this not exactly the scenario detailed by the article you've referenced?

Almost but not quite.

It is a quirk in the standard Registry entry for userinit.exe with the hardcoded full path, which can normally be solved by replacing it with just the userinit.exe filename, that will then be supposedly looked for and found on the "right" drive.

I.e. you are right about the possible problem, but an easy solution exists. :unsure:

:unsure:
Wonko

#57 xpt

xpt

    Frequent Member

  • Advanced user
  • 138 posts
  •  
    Canada

Posted 22 June 2010 - 10:33 PM

. . . Drive lettering (if not assigned/fixed) is a quite complex topic, take your time here (AND links within):. . .


Oh well, I bet that will not be the last surprise that I will see.

a short Each Step-Detail will be very much appreciated , i mean your travel to your destiny in short steps :unsure:

otherwise i'd have to open each post to view whole thread..


Just looking at my conclusion posts would be enough. If you don't even care to look for them, then the safest conclusion that you can take home is here and here, depending on which side you want to take.

#58 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 14 July 2013 - 08:30 PM

bumping an old post..

I plan to try this method for booting XP from logical partition without the need for a primary partition containing system files soon.


it is a shame the forum screws up all these grub4dos entries! its complicated enough without having to adjust the examples given but I think I can manage it.


I was wondering if the same can be done with W7 and if not is there a way to accomplish the same objective?

#59 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 15 July 2013 - 03:19 AM

SUCCESS! YAY! XP booting from (hd5) instructions seemed more complicated than it was but I started simple so now I try to set up a USB HDD with many different Windows versions.

I dont see any reason why W7 wont work this same way either, no?

is there any limits with this method? I can see having 20 different partitions with 20 different OS available from the same drive, am I missing something, is there a hitch?

#60 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 15 July 2013 - 10:05 AM

I dont see any reason why W7 wont work this same way either, no?

 
As a matter of fact the BOOTMGR has seemingly "better" code and it seems like it needs not the correction of the "sectors before".
See:
http://reboot.pro/to...s-also-logical/
http://reboot.pro/to...gical/?p=167962
(and following few posts)
BUT - no matter if it works or not - DO anyway correct them hidden sectors, the number of tools/commands/utilities that may be "fooled" is big, and their nature tend to be that of "lowish level" hard disk related tools, i.e. VERY dangerous potentially for the integrity of partitions/filesystems.
There is also the possibility that (if the sectors before are not corrected) that you get some form of "hybrid boot", making use of some files on another volume. :ph34r:
 

is there any limits with this method? I can see having 20 different partitions with 20 different OS available from the same drive, am I missing something, is there a hitch?

The limit is the number of drive letters available (26-2=24), but you'll probably want to leave a couple letters free for when you connect / boot from a USB device and/or CD/DVD.

:cheers:
Wonko



#61 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 15 July 2013 - 01:47 PM

hi Wonko, good advice and info as usual! Im happy to start to understand the partition sectors (finally!) next will be more study of grub4dos because I have only scratched the surface of its abilities.

on the drive letters.. what happens if you have 30 partitions and boot one of them with windows? it just dont see beyond 24 or crash or worse?

edit: one other question, is there a way to make a logical volume in extended partition appear to non-M$ bootloader as "active"?

thanks

#62 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 15 July 2013 - 04:14 PM

No, the issue is only with drive letters as mountpoints.

Linux (as an example) that does not use drive letters as mount points will have no issues anyway.

But also on *any* Windows NT starting from Win 2000 you can use mountpoints (for the non-boot volumes), so the limit is only "virtual", if you prefer a DOS/Windows 9x/Me will never be able to have access to more than 24 hard disk volumes.

Same goes for NT up to NT 4.00.

Starting with 2000 and provided that at least one of the volumes is NTFS, you can mount the volumes exceeeding the first 24 to mountpoints.

A few tools/utilities/whatever (as an example something that only works with a path like C:\myhardcodedfolder\ ) may have issues with volumes mounted to a directory mountpoint, though most wil have no issues whatsoever.

 

A logical volume inside Extended CANNOT be made "active".

The "active" ONLY makes sense in the MBR and in the MBR there can be ONLY Primary Partitions (volumes) or the Extended Partition.

This is "OS" and "Bootloader" agnostic.

A bootloader installed to the MBR (ike grub4dos) may provide means to boot from a logical volume, but this will happen because of settings "outside" the "active status".

 

A "normal" MBR will be read by BIOS and will use the "active" flag to identify the partition which PBR will be chainloaded, and since the MBR does NOT contain data about logical volumes there is no way to set a non-existing entry to "active".

 

:cheers:

Wonko



#63 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 30 July 2013 - 07:14 PM

why is it that when I use the same OS that is in the primary partition where grub4dos gets called from and place it on another partition to be booted by grub4dos, it gets cross-linked (shows the primary as C: even though with the /sos switch it shows the other partition I am booting is loading?

this only seems to happen when I use the same OS (exact copy placed on another partition) but not when they are different version of the same OS or different OS it does not cross-link?

how to prevent this cross-linking (I think that is the correct term for this, not certain though)?

#64 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 30 July 2013 - 07:22 PM

why is it that when I use the same OS that is in the primary partition where grub4dos gets called from and place it on another partition to be booted by grub4dos, it gets cross-linked (shows the primary as C: even though with the /sos switch it shows the other partition I am booting is loading?

this only seems to happen when I use the same OS (exact copy placed on another partition) but not when they are different version of the same OS or different OS it does not cross-link?

how to prevent this cross-linking (I think that is the correct term for this, not certain though)?

What do you think that the (HKLM\SYSTEM\MountedDevices\) DosDevices Keys in the Registry are for? :dubbio:

 

Or - more loosely - WHY exactly you cannot normally change the drive letter of the Windows System volume? :unsure:

 

See if the info here (ONLY seemingly OT)  helps (it does) ;):

http://www.911cd.net...showtopic=19663

 

BTW, this SAME thread, only a few posts earlier, does mention something very related :whistling::

http://reboot.pro/to...ition/?p=103051

you may want to re-read a few posts starting from the above....

 

:cheers:

Wonko



#65 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 30 July 2013 - 08:13 PM

I always clear the mnt dev key though.

I have an idea that may work to eliminate the other hassles.. Im going to encrypt the primary system and boot from there to grub4dos then point to the copy in logical partition that is not encrypted so Im thinking that it cant crosslink what it cant see.

but what about grub4dos, can I use it to hide the primary after it has been called form there? like adding something to the menu item that I use to boot the OS that is in the extended partition?

edit: I tried the encrypted primary idea with no success, once you have booted into the primary to access grub4dos from the boot.ini it is unencrypted so when you point to the logical partition and boot it up, the primary is still unencrypted (not sure why?)

diskcryptor's feature for booting a specific partition with unique password is really good but it only works for partitions marked active so it is not of much use here.

now I am testing the hide function in grub4dos and the first thing I noticed is that it is not temporary.. after my first test with it, I shut down and unplugged the USB HDD and plugged it into another running system only to find I could not access that partition.

Im reading the guide (again) but I dont see a way to temporary hide when booting so that when you shut down you can access all partitions again on another system.

I guess I could add a menu list to unhide all but that would require a reboot. is there any way to unhide once booted from within windows before shutdown?

#66 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 31 July 2013 - 08:41 AM

Look, the general idea is that you need to assign drive letters manually.

 

If you just delete the dosdevices drive letter key and drive letters were assigned automatically, strangely enough :whistling:, the SAME drive letters will be assigned. (repeatability of drive lettering).

 

Of course you can hide and unhide partitions (both from windows before shutdown and from grub4dos BEFORE booting windows), but that won't normally "solve" by itself drive lettering issues (that need to be solved "internally" with manual assigning the "right" drive letters to the "right" volumes).

 

About partition hiding, there is no problem, imagine you have a hard disk that (for simplicity) has only two primary partitions.

title Part1
hide (0,1)
unhide (0,0)
root (hd0,0)
chainloader +1

title Part2
hide (0,0)
unhide (0,1)
root (hd0,1)
chainloader +1

in practice each menu entry has a "complete set" of hiding/unhiding commands, so that all the partitions/volumes are set to the way you want them when you initiate the (Windows) booting. ;)

 

:cheers:

Wonko



#67 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 31 July 2013 - 04:19 PM

I want to have each windows boot and think it is C: drive.

I think the problem Im having is that according to the goodells info: "do not let new-XP see the old-XP partition the first time it boots."

but since Im using grub4dos called from the primary partition with that XPs boot.ini, I dont know how to boot the XP in logical partition so it wont see the "old-XP"

maybe I need to assign the drive letters in the new-XP before booting but Im not sure how to do that from outside (offline) reading again this thread and goodells since I must have missed it.

edit: after you use the hide command does that change the partition order?

in other words, if I hide hd0,1 does that then make hd0,2 now into hd0,1?




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users