New dual boot setup

Discussion in 'Acronis Disk Director Suite' started by Earthling, Apr 25, 2008.

Thread Status:
Not open for further replies.
  1. Earthling

    Earthling Registered Member

    Joined:
    Nov 5, 2007
    Posts:
    604
    Location:
    UK
    Sorry for delay - interruptions! The partition table looks ok, but root (hd,0,2) returns no partition; root (hd0,1) returns the filesystem and partition type, and find /bootmgr returns (hd0,1) and (hd1,2), which looks OK to me.
     
  2. Earthling

    Earthling Registered Member

    Joined:
    Nov 5, 2007
    Posts:
    604
    Location:
    UK
    I'm tempted to try the 'wrong' partition table data per #10, but It's just a half educated guess really. btw, XP can't see the data partitions even though they are showing in DD
     
  3. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    Then I really am baffled. My interpretation in post #25 must be completely wrong. It would appear that (hd0,1) does indeed point to the second primary partition on Disk 1, which is your Vista partition. The output of the find /bootmgr command confirms that Vista is in this partition. But why did the "hide" command end up hiding the wrong partition?

    Yet the other response for (hd1,2) is unexpected; that's saying VistaPE is on Disk #2 (correct) in primary partition #3 (what??). Looking at the illustration of your Disk 2 in post #3 shows only two partition table entries, an extended partition followed by a primary partition. However, from your other thread, the DD view of Disk 2 is shown below:

    Disk 2.JPG

    So perhaps the unallocated space is being counted as unformatted primary partitions. Confusing. But try this sequence by booting the PC and choosing a Command Line in grub:
    Code:
    root (hd1,2)
    map (hd0) (hd1)
    map (hd1) (hd0)
    chainloader /bootmgr
    If VistaPE starts correctly then that will confirm that the partition designator is correct.

    I'll have to think about this some more. Sorry to get your disk so messed up. If you want to return to normalcy then use TI to restore the MBR and Track 0, manually hide/unhide and manually select the correct partition to be active.

    Gotta shut down here - big thunderstorm and may lose power at any moment.
     
  4. Earthling

    Earthling Registered Member

    Joined:
    Nov 5, 2007
    Posts:
    604
    Location:
    UK
    Mark:

    I'm shutting down here too, I'm a bit tired. No apologies please - I've made sure I know how to get back to where I was, and I'll be doing that first thing in the morning. We will crack it.
     
  5. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    You may only need to go to XP Disk Management and reassign the drive letters.
     
  6. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    Bernard:

    While you're sleeping I was doing some tests on my laptop. I had a spare slot in the partition table so I created a new primary partition. The partition showed up as (hd0,3) in GRUB as expected, as (hd1,3) in grub4DOS (when booted to a VistaPE flash drive, the hard disk is (hd1) and the flash drive is (hd0), so that's as expected), as /dev/sda4 in Linux (primary partition #4), so that's as expected, and as primary partition #4 in Windows as viewed by Disk Management and by DD. So nothing unexpected or out of the ordinary here.

    I then tried hiding and unhiding various partitions with both GRUB and with grub4DOS, and in all cases the outcome was as expected. However, I do not have the same disk layout as you do with the order of the partitions on the disk differing from the order in the partition table. I suspect that this is the root cause of the problem. If you are positive that your menu.lst file had the correct hide/unhide statements (hiding (hd0,0) and (hd0,1) only) and yet you somehow ended up with the extended partition (hd0,2) hidden, then I'm highly suspicious that this is the issue.

    So, I would recommend biting the bullet and getting the partition table order straightened out. Most tools are supposed to be able to deal with this situation, but it is nonstandard and you never know when you might run into some program that doesn't deal properly with an out-of-order partition table. Maybe you just did with grub4DOS!

    Since TI restores are working for you it really is not difficult to straighten this out. I'm game to help if you're game for doing it. This is a rough outline, but I can provide further details if needed:

    1. Using DD, delete the logical partitions and the Vista partition
    2. Re-create the partition structure in the correct order and sizes (Vista first as primary, then logicals)
    3. Restore the Vista partition using TI
    4. Restore the logical partitions

    With the partition table ordered correctly then the menu.lst file should work correctly, except for booting VistaPE. That's another issue that we can fix later...
     
  7. Earthling

    Earthling Registered Member

    Joined:
    Nov 5, 2007
    Posts:
    604
    Location:
    UK
    Mark:

    Just to confirm that it's back to the position we were in at #14, everything functioning normally.

    I'm quite confident I can recreate the partition structure if that's what's needed, but I have been looking at your suggested menu.lst to see if I can understand how it replicates the steps I have to take in DD to switch OS -

    1. Hide last OS
    2. Unhide next OS
    3. Set new partition active

    1 and 2 are obviously there but how is 3 catered for? Presumably it's either the root or chainloader command?
     
  8. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    Bernard:

    You've got it; those are the steps. But when using a boot manager there is no need for setting the "Active" flag. The active flag is only used by the simple generic Microsoft MBR code. This code searches the partition table to find the one and only partition with the active flag set, then it jumps to this partition and executes the boot code in the partition boot record. So it "chainloads" so to speak.

    With other boot managers you point them to the partition that you want to boot from and then tell them "go", so the active flag isn't used.

    With GRUB and grub4DOS, the "root" command is used to point to the partition of interest and the "chainloader" command is used to jump to either the start of a partition (chainloader +1) or to a specific file (chainloader /ntldr).
     
  9. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    Here is a revised menu.lst file with a few comments rearranged, a couple of typos corrected, and the partition reference for VistaPE changed to correspond with your findings.
    Code:
    # Custom grub4DOS menu for Earthling
    # Rev. B with corrected partition references and makeactive statements
    # 4.27.2008 K0LO
    
    # Other splash image files are available in VistaPE \Boot folder; rename to suit
    splashimage /gentleblue.gz
    
    # Timeout in seconds before default operating system boots
    timeout 10
    
    # Default OS from choices below. Numbered starting at zero
    default 0
    
    # GRUB numbers disks starting with 0, partitions starting with 0
    # (hd0,0)=first primary partition on disk 1
    # For partitions, 0=primary 1, 1=primary 2, 2=primary 3, 3=primary 4
    # 4=logical 1, 5=logical 2, 6=logical 3, 7=logical 4, etc.
    
    # For reference, these are the partition designators for your disk
    # (hd0,0) Windows XP
    # (hd0,1) Windows Vista
    # (hd1,2) VistaPE on Disk #2
    
    title Windows Vista
    root (hd0,1)
    makeactive
    # Hide XP, unhide Vista
    hide (hd0,0)
    unhide (hd0,1)
    chainloader /bootmgr
    
    title Windows XP
    root (hd0,0)
    makeactive
    # Hide Vista, unhide XP
    hide (hd0,1)
    unhide (hd0,0)
    chainloader /ntldr
    
    title VistaPE
    root (hd1,2)
    # Unhide both XP and Vista
    unhide (hd0,0)
    unhide (hd0,1)
    # Since VistaPE is on second hard disk, use map commands
    # to fool it into thinking it is running from the first disk.
    map (hd0) (hd1)
    map (hd1) (hd0)
    chainloader /bootmgr
    
    # Memtest86+ memory test program
    title Memory Test
    kernel /memtest.bin
    
    # Get a grub4DOS command prompt
    title CommandLine
    commandline
    
    title Reboot
    reboot
    
    title Shut Down
    halt
     
    Last edited: Apr 27, 2008
  10. Earthling

    Earthling Registered Member

    Joined:
    Nov 5, 2007
    Posts:
    604
    Location:
    UK
    Mark:

    I'd rather avoid getting my disk in a state again if poss. I see the menu is the same as the previous one as far as XP and Vista are concerned, and different for VistaPE. This seems to imply you are very confident that it was my partition order that caused the havoc, and that if I sort that and then install Grub4DOS in the MBR it will be fine.

    How confident?
     
  11. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    Bernard:

    I'd say very confident. Of course it's your choice.
     
  12. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,483
    Location:
    California
    I would just add that if you don't set the Active flag and you boot into a Windows partition that requires Windows to reassign drive letters, you may end up with a problem. In those cases, it's best to have the Windows partition set Active prior to booting it.
     
  13. Earthling

    Earthling Registered Member

    Joined:
    Nov 5, 2007
    Posts:
    604
    Location:
    UK
    Mark (and MudCrab):

    I'd like this thread to end with an all round success. We've achieved a great deal already, and I'm confident of finishing the job in the next day or two. It's just the time factor.

    We haven't had any comments from other Windows dual booters who use ATI, but I do hope some are watching and thinking of giving it a whirl.

    I'll come back and confirm when it's done.
     
  14. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,483
    Location:
    California
    Mark,

    From Post #26:
    The partition table looks ok, but root (hd,0,2) returns no partition; root (hd0,1) returns the filesystem and partition type, and find /bootmgr returns (hd0,1) and (hd1,2)

    I'm having a hard time figuring this out. Your tests didn't have the partitions out of order in the partition table. I may make a scrambled version and do a test, but I wonder if something else is going on.

    From Post #6:
    4. Install grub4DOS to the MBR of your disk 1.

    When you refer to disk 1 you mean the XP/Vista disk, right? When installing Grub4DOS this would show up as Disk 0 (hd0) in the list. However, this could also be different. I have an IDE drive in my computer and even though the boot drive is my RAID, the IDE gets the (hd0) positition by Grub4DOS.

    I'm just trying to verify that Grub4DOS did get installed to the XP/Vista drive. Also that the current BIOS booting drive is the XP/Vista drive and not the VistaPE drive. As you know, Grub4DOS will search for the /grubldr file and use the first one it finds. There are two on this system.

    The reason is the following:
    If you assume that the booting drive was not the XP/Vista drive, but was instead the VistaPE drive and you assume that Grub4DOS is keeping the (hd#,#) values according to their slot positions, then the values returned by Post #26 make sense.

    (hd0,1) = VistaPE disk, first drive, second Primary partition (second slot) = VistaPE partition
    (hd1,2) = XP/Vista disk, second drive, third Primary partition (third slot) = Vista partition

    Another case may be that Grub4DOS is detecting the VistaPE drive as (hd0) even though the XP/Vista drive is the BIOS boot drive.

    A different find test that looks for a unique file would show which is really which: find /ntldr

    When I setup different partitions with GRUB, I like to put "tag" files on them. XPtag, Vistatag, etc. This lets me run the find command and verify exactly which drive/partition is which as GRUB sees it.

    I may just be confusing the matter more, but I'm trying to understand what happened.
     
  15. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    What is confusing when you try to interpret how Windows assigns drive letters is that the MS documentation is fairly old; this reference is for DOS/Windows and this one is for Windows 2000.

    For example, from the DOS/Windows article, after scanning floppies:
    And from the Windows 2000 article:
    So does the scan "see" hidden partitions? With Windows, probably not. Going by Earthling's dual-boot setup, which is pretty commonplace for isolated dual-boots of Windows, shouldn't the following happen? If booting to XP and the Vista partition is active but hidden, won't XP then choose the first visible primary partition (its own) to assign to C:? And when booting to Vista if the XP partition is active but hidden, won't Vista choose the first visible primary partition (again, its own) as C:?

    I believe this will happen but like you say there may be some circumstance when there is another active partition visible to the OS at boot time, so in this case the drive letter assignments may not come out as intended. Perhaps it would be safer to also change the active flag when switching operating systems, at any event it wouldn't hurt.

    It is easy enough to do this with GRUB by adding the makeactive statement. An example of an XP boot stanza is:
    Code:
    title Windows XP
    root (hd0,0)
    [B][COLOR="Red"]makeactive[/COLOR][/B]
    # Hide Vista, unhide XP
    hide (hd0,1)
    unhide (hd0,0)
    chainloader /ntldr
    I'll incorporate this change into the menu.lst file in post #34 just so it is more robust.
     
  16. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    Hi, Paul. I'm glad you are having a look at this.

    Yes, I did intend for grub4DOS to be installed to the first IDE hard disk; the one containing XP and Vista. Good point about the destination of the install. One way to be certain would be to disconnect the disk with VistaPE. If the grub menu appears with only the XP/Vista disk connected then the install went to the correct disk.

    I think at the moment, Bernard has removed grub4DOS from his primary hard disk so perhaps there is an alternate way to confirm this. He could boot from the second hard disk, which has grub4DOS now, and go to a command prompt. How about the inverse test:
    Code:
    find /ntldr
    # should return (hd1,0) if the VistaPE drive is detected as (hd0)
    # but will return (hd0,0) if the VistaPE drive is detected as (hd1)
    
    # Another unique file:
    find /gentleblue.gz
    # should return (hd1,0) since this file was copied to the XP root
    # and the one in the VistaPE partition is inside a folder and won't be found
    Good suggestions; keep them coming.
     
  17. Earthling

    Earthling Registered Member

    Joined:
    Nov 5, 2007
    Posts:
    604
    Location:
    UK
    Sorry guys, other duties today.

    I can remove any doubt on this. ATM there are no hidden partitions, Grub4DOS has been removed from the first hard disk, and I've booted to VistaPE. I've also put a tag file on each of the three bootable partitions -

    find / XPTag.txt returns (hd1,0) - correct, 1st partition on XP/Vista disk
    find /VistaTag.txt returns (hd1,2) - surprise, and probably supports Mark's theory about my partitions. I expected (hd1,1)
    find /VistaPETag.txt returns (hd0,1) - I think that's correct but need to check it. It's in the last of three partitions on the eSATA but the second may be a logical.

    EDIT - the last is correct. There's an extended partition containing two logical partitions, then the VistaPE primary, and that's how it shows in the partition table.
     
    Last edited: Apr 27, 2008
  18. Earthling

    Earthling Registered Member

    Joined:
    Nov 5, 2007
    Posts:
    604
    Location:
    UK
    It would help with all this if there was a way to switch from Command line in VistaPE to LiteStep, and vice versa, rather than having to continually reboot.

    Is this possible?
     
  19. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,483
    Location:
    California
    This is good.

    The next test (when you have time, of course), would be to reinstall Grub4DOS to the XP/Vista drive and then boot it and run the same find commands. Those results would verify exactly what Grub4DOS sees when doing a normal boot.
     
  20. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,483
    Location:
    California
    Are you referring to switching between the Grub4DOS command line and VistaPE?

    Even if you could, the results might not be the same as when booted directly to Grub4DOS.
     
  21. Earthling

    Earthling Registered Member

    Joined:
    Nov 5, 2007
    Posts:
    604
    Location:
    UK
    Yes, sorry, that is what I meant, and I was pretty sure it wasn't doable. Thanks.
     
  22. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    This finding is consistent with everything except post #26.

    For Disk 1 from post #25:
    P Table1.jpg
    Apparently the partition numbers returned by grub4DOS of (hd1,0) for XP and (hd1,2) for Vista are referring to the location or "slot" in the partition table.

    For Disk 2 from post #3:
    P Table 2.jpg
    Again, the returned value of (hd0,1) is consistent with the location in the partition table.

    What doesn't make sense are the values found in post #26:
    Here Vista was identified as (hd0,1) instead of (hd0,2) and VistaPE was identified as (hd1,2) instead of (hd1,1). Like Paul says, the best way to decipher this is to search for your tag files when booting grub4DOS from Disk 1.

    You will have to reinstall grub4DOS to the MBR of Disk 1 to do this, then to undo the install use TI to restore the MBR of Disk 1. If you don't try booting to anything then this should not result in any changes to your disk except for the MBR.
     
  23. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    And going back to Paul's post #39, this will all make sense if the test done in post #26 was accidentally done while booted from the VistaPE disk or from a VistaPE CD instead of from the primary (XP/Vista) hard disk. Post #26 is the only inconsistency in all of the tests done so far.

    Post #24 says
    Bernard, is there any chance that this might have happened? If so, mystery solved.
     
  24. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,483
    Location:
    California
    Mark,

    The other possibility is that because Grub4DOS was installed on both drives, even if it booted from Disk 1 (hd0), it may have detected the VistaPE drive as (hd0) when it scanned them and then booted it instead because it searched it first and found /grubldr on it.

    However, you would think the menu.lst file would be different on each partition. The VistaPE partition's menu.lst shouldn't include the XP and Vista entries and the other changes in your file.

    Are both the drives in the computer using the same interface? Both SATA or IDE? This problem seems to happen mostly when mixing SATA and IDE drives.
     
  25. Earthling

    Earthling Registered Member

    Joined:
    Nov 5, 2007
    Posts:
    604
    Location:
    UK
    Hard to be absolutely sure about that, but I think it was done from VistaPE.

    I was about to ask how to avoid upsetting Windows if I did what Paul has suggested, so thanks for the tip.
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.