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
    On advice from kOlo I have reorganised my boot setup so that XP and Vista each occupy a primary partition on the same SATA disk. (Formerly XP was on primary and Vista on an extended logical partition, and ATI 11 has not been able to successfully image and restore the Vista partition).

    I have tested each OS using DD to hide the OS partition not in use, and everything is working correctly. I now want to install Grub4DOS as a boot manager but have run into a problem.

    Trying to install Grub4DOS from Vista the install complains that the partition table is bad and will not offer the option to install to Whole Disk MBR. It is offering Whole Disk Other.

    I have killed it and need some guidance as to the next step please.
     
  2. K0LO

    K0LO Registered Member

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

    Could you post a screen shot of sector 0 of the disk using DD10 with the view "as partition table" and another with the view "as hex"? I suspect that Grub4DOS may be looking for something specific that is present in an XP MBR. The Vista MBR is slightly different, and perhaps Grub4DOS just doesn't recognize it as valid.

    Not to worry - Vista will boot fine from an XP MBR and vice-versa. But I wonder why it complains about the partition table?

    For reference, here (post #7) is a comparison of the Vista and XP MBRs. Note that the partition tables are identical.
     
  3. Earthling

    Earthling Registered Member

    Joined:
    Nov 5, 2007
    Posts:
    604
    Location:
    UK
    Here we go -
     

    Attached Files:

  4. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    Hmm... That's not what I had expected to see. You've got me scratching my head here:

    1. Is this the same disk as previously shown here?
    2. The disk ID is different and the BIOS geometry is different (you currently show a 240 head geometry while the older figure shows 255 heads). Normally this is determined by the BIOS, so is this the same computer?
    3. I had expected to see two primary partitions from your description of what you did. Instead, the first partition is logical and the second is primary.
    4. The MBR is not from XP or Vista, but rather from Grub4DOS.

    I'm really confused.... is that really the right picture?
    **Edit - Just noticed the title bar in the graphic. This is your Disk 2. Could you substitute the pictures from Disk 1? It would help on the hex view to resize horizontally so that each line showed 16 bytes (0000 - 000F, etc). Thanks.
     
  5. Earthling

    Earthling Registered Member

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

    Really sorry about that. These pics are after retrying the procedure in XP, but the result was the same - Bad Partition Table - and I could not install Grub4DOS
     

    Attached Files:

  6. K0LO

    K0LO Registered Member

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

    OK; that looks better. It's a Vista MBR and the partition table looks OK to me. However, I'm not sure which consistency checks Grub4DOS is using to determine that there is a problem with the partition table.

    For example, you have your partitions in this order [Primary 1] [Extended] [Primary 2], which I assume are [XP][logical drives][Vista]. The older partitioning rules used by Windows will not let you create a layout like this. After you have created your first logical partition you can then no longer create any primary partitions that follow the extended partition container. Ironically, Windows will run just fine this way, as you know because your system is working. Perhaps Grub4DOS is checking for this and sees that you do not have [Primary 1][Primary 2][Extended], which would conform to the DOS standards, and throws up its hands and says "something is fishy".

    There is nothing wrong with your layout. Disk Director, Linux, and a lot of other partitioning tools can create layouts with mixed primary/logical partitions.

    I can think of only two reasons for the Grub4DOS error. One, maybe it does not understand the rest of the Vista MBR. Or two, it's the order of primary/extended partitions.

    What to do? Since we are unsure of the reason for Grub4DOS not wanting to install correctly we will have to guess. You can either:

    1. Replace the Vista MBR with an XP MBR using fixmbr from a Windows XP disk, or
    2. Re-order your partitions so that you have [XP] [Vista] [Logical drives]

    Your choice. #2 is a little bit of work, but I think it's the most likely cause of the problem. Here is how I would do it. I am assuming that you successfully moved all of the Vista boot files into the Vista partition and have got the BCD working correctly so that Vista boots when its partition is active. If so, TI should now do fine for partition restorations.

    A) Before backing up, generalize your Vista BCD to make Vista independent of location on the disk. This is done by changing the references in the BCD from "Partition = C:" to "Boot". The term "boot" refers to the partition that Vista just booted from, and thus is position independent. To do this, follow the steps in post #1 of this thread. Do this from Vista while it is working and before backing up. This step will make moving the Vista partition around almost hassle-free because you will no longer need to do a BCD repair when moving the partition.
    B) Back up all of your partitions
    C) Using DD, delete all of the partitions except for the XP partition
    D) Create a new primary partition of the correct size for Vista, immediately to the right of the XP partition
    E) Next create your logical partitions immediately following the Vista partition
    F) Restore the Vista partition from your TI backup
    G) Reboot and test Vista, making sure it is assigned the C drive letter.
    G) Restore each logical partition from your backup
    H) Reboot and check that drive letters are as-preferred in both operating systems.

    Once you have this setup working, then try installing Grub4DOS again.
     
  7. Earthling

    Earthling Registered Member

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

    The arrangement is a consequence of converting my Vista partition from logical to primary.

    I understand what you are saying and will see it through, though it may be a day or two before I can.

    Is there a reason not to install OSS in this situation rather than Grub4DOS? Not that I know anything about OSS, but it came free with DD of course.
     
  8. K0LO

    K0LO Registered Member

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

    No, you can use OSS, or BootItNG, GRUB, or any boot manager of your choosing. But before installing a boot manager, let's think this over and determine the optimum course of action so that you don't have to move things around again.

    My favorite arrangement is to have a combination of the standard, generic Microsoft boot mechanism that is backed up by a boot manager. This type of arrangement is fail-safe. If the boot manager gets mangled then you can drop back to the old way of booting. Let me give an example from the arrangement on my laptop.

    On the laptop I have Windows XP and Kubuntu plus an Acronis repair partition containing the bootable full and safe mode versions of DD and TI. I use GRUB as the boot manager.

    Instead of installing GRUB to the MBR and letting it control everything, I kept the plain-vanilla Microsoft MBR; the one that simply searches the partition table for the Active partition and then boots it. So the disk is arranged like this: [Boot partition] [Windows] [Extended partition]. The first two partitions are primaries and the rest are logicals and contain Linux, NTFS data, and Acronis.

    The boot manager GRUB is installed to the partition boot record of the Boot partition, a small (100 MB) partition holding the boot manager and the Linux kernels. The partition table in the MBR has this partition set as active, so that when I boot the laptop, GRUB starts and its menu appears. Then I can choose which OS to start (Windows, Linux, Acronis).

    If something were to go wrong with the boot manager or its files, I could boot from a recovery CD and simply set partition #2 as active. Then Windows would boot directly. I prefer this because there are multiple ways to recover in case something goes wrong.

    I was thinking that a similar idea may work to your benefit. You could keep the Vista MBR that you currently have working and consider creating a small boot partition. You could put VistaPE in this partition, as well as whatever boot manager you decide to use. By making this the active partition, the boot manager would start when you boot the PC. From the boot manager menu you could choose XP, Vista, or VistaPE.

    If you ever had a failure you could use DD to change the active partition to XP or Vista to boot them (and hide/unhide appropriately).

    So before you rearrange your disk, think about whether this is something you might consider. If so let's plan it out first, then do the work.

    I'm still trying to understand what Grub4DOS was objecting to, and if we can then it may not be necessary to shuffle partitions around. Just to prove that it is possible to boot with your disk as-is, here is an experiment that you can try. Let's use Grub4DOS on your Disk2 to boot XP as a test. On Disk 1, hide the Vista partition, unhide XP, and make the XP partition active. Then boot VistaPE from Disk 2. When the Grub4DOS menu appears, type a "c" to bring up a GRUB command prompt.

    Since you booted from Disk 2, it will be (hd0) and your Disk 1 will be (hd1), so we will direct Grub4DOS to boot Windows XP on partition 1, so it will be (hd1,0). {Remember, GRUB numbers disks and partitions starting with 0}. Also, Windows must boot from Disk 1 so we will use the "map" command to fool it into thinking its running from disk 1.Type the following commands:
    Code:
    [B]root (hd1,0)[/B]       #Grub should say "Filesystem type is NTFS, partition type 0x7"
    [B]find /ntldr[/B]        #Grub should return the location as (hd1,0)
    [B]map (hd0) (hd1)[/B]
    [B]map (hd1) (hd0)[/B]    #Fool Windows into thinking it's running from disk 1
    [B]chainloader /ntldr[/B] #Grub should say "Will boot NTLDR from drive=0x81, partition=0x0(hidden sectors=xxxxxxx)
    [B]boot[/B]               #XP should boot
    This will demonstrate that it is possible to control the boot process from Grub4DOS. If we were doing this on your primary disk then the map statements would not be needed and we would add commands to hide the Vista partition and unhide the XP partition, so everything would be automatic. All you would need to do is to choose the OS from the menu.

    Let me know if this works, and think about how you would like to control your system before ripping into it and rearranging all of the partitions. It would be nice to avoid this, or at the least, to plan it so it only has to be done once. In the mean time, I'll do some more research on Grub4DOS to see what it is complaining about.
     
  9. Earthling

    Earthling Registered Member

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

    I like the setup you are recommending and can see how it would work, though in some ways it's like asking for directions and being advised it's best not to start from here ;)

    I do need to keep in mind why I have set off down this road, which is to be able to use ATI 'with confidence' as the authors say. Well, after the changes made so far it does look as if I may be able to do just that, as I can still boot to either OS, but both now image and restore with ATI without any of the problems I had previously.

    OK, it's a bit of a palaver switching OS, but it's only about once month I need XP and even then it's usually only to Ghost my system partitions because ATI couldn't hack it, or to use one of the older bits of software I haven't yet got on Vista. Maybe I won't even bother with Ghost for much longer either.

    I'm filing all this stuff away because one day, maybe with my next system, that's how I'll probably set it up.

    BTW, I did try out what you suggested but was baulked by the partition table problem. Each command comes back with "Unrecognized partition table for drive 81. Please rebuild it using a Microsoft compatible FDISK tool (err=8 ) Current C/H/S=16383/255/63 Filesystem type is ntfs, partition type 0x7"

    Once again I want to thank you for your infinite patience and willingness to help ppl like myself up the learner curve. If the IT community ever brings in canonization I'm gonna put your name forward :D
     
  10. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    I finally found out what this error means.

    So Grub4DOS is complaining that one or more partitions are not aligned on cylinder boundaries. I must have been tired when I looked at your partition table before and said that I couldn't see anything wrong. Looking here, the Vista partition does not start on a cylinder boundary. The value of "beginning sector" should be 1, and the "Relative Sectors" and "Number of Sectors" should be divisible by 63, so this partition is misaligned.

    P Table.jpg

    How does your disk layout appear when viewed by DD?

    DD View.jpg

    After you converted the Vista partition from logical to primary, does the Vista partition now follow the logical partitions in the graphic; in other words is it the last partition on the right or is it next to the XP partition?
     
  11. Earthling

    Earthling Registered Member

    Joined:
    Nov 5, 2007
    Posts:
    604
    Location:
    UK
    The view from XP -
     

    Attached Files:

  12. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    OK - it all makes sense. Since all of your other partitions are properly aligned you only need to delete and restore the Vista partition to fix the partition table problem. The following should work:

    1. Generalize your Vista BCD first so that you don't have to deal with repairing it when it gets moved. Step A in post #6.
    2. Create an image of the Vista partition after doing step 1.
    3. Boot to DD and delete the Vista partition, leaving uncommitted free space.
    4. Create a new, primary NTFS partition that completely fills the free space
    5. After committing the changes in DD, check the partition table view of the disk and confirm that the newly-created Vista partition is aligned properly. You should see "Begin Sector" = 1, "Relative Sectors" = 61432560, and "Number of Sectors" = 61432560 in the partition table view if my math is correct.
    6. In anticipation of a test boot into Vista, hide the XP partition, unhide the Vista partition and set the Vista partition active.
    7. Boot to TI and restore the Vista image to the newly-created partition, choosing primary active state while restoring.
    8. Boot to Vista to check.

    Assuming that works, check whether Grub4DOS is happy by booting to VistaPE and testing some manual GRUB commands per post #8.

    Is Grub4DOS happy now? If so, before making it your bootloader, check back. There are a couple of things I still need to figure out, like how it reacts to having its loader file and menu file in a hidden partition, before proceeding. I can do some of those tests here on my machine.
     
  13. Earthling

    Earthling Registered Member

    Joined:
    Nov 5, 2007
    Posts:
    604
    Location:
    UK
    OK, I'll check back once that's all sorted.
     
  14. Earthling

    Earthling Registered Member

    Joined:
    Nov 5, 2007
    Posts:
    604
    Location:
    UK
    All tickety-boo. What next?
     
  15. K0LO

    K0LO Registered Member

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

    I've been experimenting with grub4DOS and have found that it can indeed find its loader file and menu file in a hidden partition, so that's one less worry. I tried sticking these files in random places all over my disk in FAT32, Linux ext2, and NTFS partitions and it always found them. Pretty slick.

    Here are the remaining steps. Let's install Grub4DOS to the MBR and put its files in the first primary partition, since that's where it begins searching from.

    1. Make sure that you have a recent TI backup that contains the MBR and Track 0. If things go wonky with Grub4DOS then you can just restore the MBR to get back to the current state.

    2. From XP, copy the following files from your VistaPE partition (J:?) to the root of the XP partition:
    Code:
    Source                   Destination
    J:\grldr                 C:\grldr
    J:\Boot\gentleblue.gz    C:\gentleblue.gz
    J:\Boot\memtest.bin      C:\memtest.bin
    3. Copy the following text into a file and name it menu.lst, and put the file in the root of C:\ like the others:
    Code:
    # Custom grub4DOS menu for Earthling
    # 4.26.2008 K0LO
    
    # Other splash image files are available in VistaPE \Boot folder. Rename this to suit
    splashimage /gentleblue.gz
    
    # Timeout in seconds before default operating system boots
    timeout 10
    
    # Default OS from choices below. Numbered starting with 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.
    
    # Hide XP, unhide Vista
    title Windows Vista
    root (hd0,1)
    hide (hd0,0)
    unhide (hd0,1)
    chainloader /bootmgr
    
    # Hide Vista, unhide XP
    title Windows XP
    root (hd0,0)
    hide (hd0,1)
    unhide (hd0,0)
    chainloader /ntldr
    
    # Unhide both XP and Vista. Since VistaPE is on second hard disk,
    # use the map commands to fool it into thinking it is running from the first disk.
    title VistaPE
    root (hd1,0)
    unhide (hd0,0)
    unhide (hd0,1)
    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 Halt
    halt
    I've included menu entries in this file for booting Vista, XP, VistaPE, and memtest86+, and you can add more. Change the default, the timeout interval, and the splash image to suit your tastes.

    4. Install grub4DOS to the MBR of your disk 1.

    5. Try it out. I hope I got all of the commands correct; if not let me know.
     
    Last edited: Apr 26, 2008
  16. Earthling

    Earthling Registered Member

    Joined:
    Nov 5, 2007
    Posts:
    604
    Location:
    UK
    Don't they all, by default?
     
  17. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,483
    Location:
    California
    Yes, they do.
     
  18. Earthling

    Earthling Registered Member

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

    atm it won't boot either Vista or VistaPE from the menu. Also, it has destroyed the three data partitions on Disk 1 which are showing as a single primary partition of 239.5GB 0x15 (Unknown). I should be able to restore those partitions from the backup, but won't just yet until the problem is identified.

    This was a bit unexpected.
     
  19. K0LO

    K0LO Registered Member

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

    You bet that's unexpected. I can't imagine what would cause that. It sounds like something made changes to the partition table that affected the extended partition container, which would probably result in the loss of references to some or all of the logical partitions.

    To troubleshoot, a couple of questions:

    1. Did the correct GRUB menu show up when booting?
    2. Did XP boot correctly?
    3. Can you post a screen shot of the partition table for Disk 1?
    4. While running DD, can you try the "Recover Partitions" wizard to see if it can find the logical partitions? (after doing step 3).
     
  20. Earthling

    Earthling Registered Member

    Joined:
    Nov 5, 2007
    Posts:
    604
    Location:
    UK
    Got a few functionality problems atm, like Favs have disappeared along with everything else.

    1. Yes, menu was OK
    2. Yes, XP boots
    3. Below
    4. Will revert
     

    Attached Files:

  21. K0LO

    K0LO Registered Member

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

    Hang on a second before reverting. I have an idea.
     
  22. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    On the above picture of the partition table, all looks fine except for the "Partition Type" listed for the Extended partition. It is listed as "Unknown". Could you click on the drop-down box and change it to "Extended", save the sector, then see if everything looks normal again? If you reboot, only boot into XP. I think I know what happened.
     
  23. Earthling

    Earthling Registered Member

    Joined:
    Nov 5, 2007
    Posts:
    604
    Location:
    UK
    4. The wizard can't find any unallocated spaces. I'm now going to restore the missing partitions - I need 'em.
     
  24. Earthling

    Earthling Registered Member

    Joined:
    Nov 5, 2007
    Posts:
    604
    Location:
    UK
    OK, changing it to Extended has restored the missing partitions. I'm still in VistaPE/DD (booted from CD) and will await your advice.
     
  25. K0LO

    K0LO Registered Member

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

    This is what I think is going on. Your partition table is not in disk order. If you look at your disk in the graphic view of DD, the XP partition is first followed by the Vista partition and then by the logical partitions.

    Looking at the partition table, the order is XP, the logical partitions then Vista.

    Apparently grub4DOS is going by partition table order when referring to partitions and not by disk order. The following illustration shows what I think is happening:

    P Table 2.jpg

    Let's confirm this by doing a quick test. If you could reboot the machine, then choose "Command Line" from the grub menu. Try this:
    Code:
    root (hd0,2)
    find /bootmgr
    What partitions are returned as containing this file? Are they (hd0,2) and (hd1,1)?

    Don't let the PC boot into XP or Vista yet.
     
    Last edited: Apr 26, 2008
Thread Status:
Not open for further replies.