How to Edit boot.ini After a Restore

Discussion in 'Acronis True Image Product Line' started by The4Bs, Apr 11, 2009.

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

    The4Bs Registered Member

    Joined:
    Apr 29, 2007
    Posts:
    37
    I have a Dell Dimension 8400 desktop with Windows XP MCE 2005 SP3. I upgraded to a larger hard drive and used True Image 10 to capture a full disc image of the old drive to an external hdd and then used the boot CD to restore that image to the new drive. I restored the MBR and the three partitions with resizing to fit the new hard drive. It worked beautifully and the computer is working just great.

    The old hard drive was original from Dell and was laid out in 3 partitions. The first contains diagnostic tools, the second contains Windows and is the largest partition, and third contains a recovery partition. I tried to restore only the C: partition without the MBR and let True Image place its own MBR on the drive (because I didn't want all the other stuff in the other partitions). I have successfully done this in the past but only where the hard drive had one partition. This particular restore was unsuccessful I believe because the boot.ini file was expecting the operating system to be in partition 2, but it was now in partition 1. I got an error message saying something to the effect that Windows couldn't load due to a hardware problem. So I abandoned this approach and did a full restore of all partitions.

    So, my question is. After restoring only the windows C: partition partition to the new hard drive how could I edit the boot.ini file to tell windows to look in partition 1 rather than partition 2. What tool or software program could I boot from to edit this file on the new hard drive? Can I edit the boot.ini file inside the image before it is restored? Alternately, how could I delete the boot.ini file. My understanding is that if Windows can't find boot.ini it will simply create a new one. I do have the Windows XP install CD in case that is helpful.

    I have a couple of other computers I would like to do this same upgrade and would like to only restore the Windows partition and leave the other partitions behind.

    Thanks for any insights you can offer.
     
  2. DwnNdrty

    DwnNdrty Registered Member

    Joined:
    Mar 28, 2007
    Posts:
    3,335
    Location:
    Florida - USA
    I'm not sure that editing the boot.ini file will solve your problem, but to delete it, an easy way would be to boot with a BartPE cd and use it's A43File Management utility.

    I think you could also delete it via dos commands if you boot with a dos boot disc. There are some attributes that you have to know to change to do it this way. I don't know them, but maybe someone else will.
     
  3. K0LO

    K0LO Registered Member

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

    There are several ways to do this. Here is one of the easiest:

    1. Create an image of the Windows partition. You can do this from the Windows version of the program if TI is installed.
    2. After creating the image, mount it in read/write mode.
    3. Navigate to C:\boot.ini inside the image file
    4. Open boot.ini in Notepad
    5. Edit the file to replace Partition(2) with Partition(1). You will want the file to end up looking like this if the image is to be restored to the first partition on a disk:
    Code:
    [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(0)[COLOR="Red"]partition(1)[/COLOR]\WINDOWS
    [operating systems]
    multi(0)disk(0)rdisk(0)[COLOR="red"]partition(1)[/COLOR]\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
    6. Save the file and un-mount the image, saving changes. TI creates an incremental image that contains your edits.
    7. Restore the incremental image to a new disk as an "Active" primary partition.
    8. It doesn't matter if you restore the MBR or not; there is nothing in the MBR that specifically identifies the Windows partition. That information is in the partition table, which is not affected by restoring the MBR. The partition table is built up as you restore partitions to the disk.

    Hope this helps...
     
  4. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,483
    Location:
    California
    Just remember that TI 10 will "scramble" the partition table when you restore. TI 10 will restore the partition back into slot 2. I don't know if TI will adjust the restored boot.ini file or not since it expects the file to remain correct. It will adjust any other boot.ini files it finds.

    If TI changes the boot.ini file after the restore, the edit will need to be performed after the restore.

    XP will probably want partition(1) in the boot.ini file.
     
  5. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    :oops: I missed that the OP was using TI10 :oops:

    Thanks, Paul.
     
  6. The4Bs

    The4Bs Registered Member

    Joined:
    Apr 29, 2007
    Posts:
    37
    I don't understand what you mean by "scramble the partition table". I thought that TI 10 didn't restore the partition table but made its own based on how the restore was done. No?

    How will it put the one partition into slot 2 if only one partition is being restored to a new hard drive with no partitions on it? Doesn't it just make the one partition?

    Thanks for all the speedy responses.
     
  7. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,483
    Location:
    California
    This thread details the problem.

    TI 10 doesn't restore the partition table as such when restoring a partition, but it does make the required changes for the restored partition.

    There are four slots and any one or ones of them can be used or left empty. Just because you only have one partition doesn't automatically mean that its information is saved in slot 1 (though that is normally how it is).

    The earlier builds of TI 9 and TI 11 and later just modify the restored partition's booting info to be correct and leave the partition table order as it is.
     
  8. The4Bs

    The4Bs Registered Member

    Joined:
    Apr 29, 2007
    Posts:
    37
    Well, my simple little world just got rather complicated.

    Basically what I take away from this is when I upgrade my other systems (they are all Dells with the same basic layout) I will save a complete system image and then restore that image partition by partition with resizing as I did here. It just seems to me that there are too many moving parts for me to sort out and trying to save just one partition may or may not work even if I can edit the boot.ini file. I'll just take the extra stuff along on the restore and call it good.

    It appears I over simplified the problem.

    Now, one of my systems is a notebook with the MediaDirect in an HPA area. I thought that I could just restore one partition there and it would be good. Obviously not. I'll have to read the other guides that explain how to get around that problem.

    Thanks for your help. Much appreciated.
     
  9. jonyjoe81

    jonyjoe81 Registered Member

    Joined:
    May 1, 2007
    Posts:
    829
    use this free bootcd, it'll bootup your computer and will let you edit your boot.ini file on the "clone" drive that won't boot with the 'boot corrector" . It can even reslot your partitions. The boot corrector does all the repairs on the clone drive, no need to make changes to the source drive.

    Rescue Kit 9.0 Express


    http://www.cnet.de/downloads/windows/236584/rescue kit express.htm
     
    Last edited: Apr 12, 2009
  10. jmk94903

    jmk94903 Registered Member

    Joined:
    Jul 10, 2004
    Posts:
    3,329
    Location:
    San Rafael, CA
    How's this for simplification.

    1. Make an image of the entire hard drive (all partitions). Now, you could restore that if things go wrong.

    2. In Windows, confirm that Windows Explorer is set to show hidden files (Tools, Folder Options, View tab). Look in the root of C:, and you should see the boot.ini file.

    3. Right click on the boot.ini file and select Properties. Uncheck the Read only box and the Hidden box.

    4. Now Shift Right-click on boot.ini and select Open with. Choose Notepad.

    5. Edit boot.ini as shown by k0lo to make partition 1 the boot partition. When done, right click, select Properties and restore the Read only and Hidden check boxes.

    6. In Drive Management (Control panel / Administrative Tools / Computer Mangement and click on Drive Management on the left side) delete the first (diagnostic partition) and the last (OEM recovery) partition leaving only the C: partition.

    7. Reboot and the system should come up normally. If it doesn't, you can restore the image to get the system back running.

    There is a possiblility that Dell has altered the MBR to allow Shift-F11 to start the OEM restore process. If so the system may not boot.

    If you have an old Windows 98 boot floppy or CD, you can run FDISK C: /MBR to create a standard MBR now that the recovery partition is gone.

    If you have an XP installation CD, you can boot from it and run the XP Recovery console:
    http://pcsupport.about.com/od/termsr/p/recoveryconsole.htm

    And use the FIXMBR command in the console:
    http://pcsupport.about.com/od/fixtheproblem/ht/repairmbr.htm

    Assuming the system boots normally immediately or after fixing the MBR, you now have the partition setup that you want. Make a new full image backup and restore that to the new hard drive. When you restore the C: partition, adjust the size to fill the new hard drive or leave unallocated space if you want to create a second (data) partition.

    Since you have several machines to do, this will get very easy after the first one.
     
  11. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    John and The4bs:

    I think that you would need to add an additional step between steps 6 and 7 of the method described in your last post. After changing boot.ini to point to partition(1), the system will not boot since the Windows partition is still in slot 2 of the partition table at this point. So before rebooting, add this step:

    6a) Download Symantec Partition Table Editor, ptedit32.exe, from here. Unzip the file and place it on the desktop.
    6b) Double-click to run ptedit32 and view your main hard disk's partition table. Be sure that you are looking at the correct disk if you have more than one disk in the PC! An example of what you might see is shown below, although this is from a disk with all four slots in the partition table full:

    ptedit.PNG

    6c) Confirm that you only have one entry in the second slot of the partition table and that the other slots are empty.
    6d) Copy/paste the entries from slot 2 into slot 1. Then put zeros in all of the slot 2 boxes.
    6e) Save changes.

    Now you can reboot and continue with John's procedure.

    All things considered, however, it is probably easier to do this:

    A) Using Disk Management console, delete the diagnostic and recovery partitions
    B) Reboot
    C) Make an image file of the remaining Windows partition
    D) Shut down and boot from the Acronis recovery CD
    E) Restore the Windows partition to the disk, resizing to fill the entire disk
    F) Ignore the fact that the partition will end up in slot 2. It should boot and run correctly in any event.
     
  12. The4Bs

    The4Bs Registered Member

    Joined:
    Apr 29, 2007
    Posts:
    37
    Let me see if I understand what's going on from the different posts. When Windows deletes the partitions it keeps the MBR and partition table in a happy state. Even though the partitions are deleted the slots still exist and Windows will still be in slot 2. The other slots will be empty. Correct?

    These are Dell computers and they do all have the Ctrl-F11 function to reload to "out of the box" state. jmk94903 suggested in his post that removing these extra partitions may make the system unbootable because the MBR may be expecting them. Is this going to be an issue, do you think? Or is it only going to be an issue if one was to actually press Ctrl-F11 while booting? I think I'll head over to the Dell forums and see if I can find any information there from others who may have removed these partitions. I'll post back if I find something helpful.

    This does sound easier. A couple of points of clarification if you don't mind. I interpret that your points A->F are a stand alone procedure and that they don't need to be combined with any other suggestions in this thread. Correct?

    In point C are you saying to make an entire disc image of the new system or just the partition containing the C: drive. And then is it a restore with the MBR and that one partition with resizing or just the C: partition with resizing, letting TI create it's own MBR? If I do a restore without the MBR, will TI 10 create an MBR that reflects that Windows is in partition 2?

    Thanks again to all for your help. I'm learning lots of from this and feeling like I'm starting to "get it".
     
  13. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    That's what should happen, yes.

    I would suspect that it will only be an issue if you press Ctrl+F11 while booting. But you can resolve this issue later by doing a fixmbr operation from a Windows XP CD to replace the Dell MBR with a generic Windows MBR.

    I left out the part about having a full-disk image before doing anything; that would be step 1 in John's post #10. This is your "insurance policy" so that you can restore to the original state if something goes wrong. If you already have a full-disk image then yes, the rest of the procedure is stand alone.

    In step C you only have one partition so that's all that you need to make an image of. When you restore it in step E, restore with resize and make the C partition fill the entire disk. You don't need to restore the MBR since it's already on the disk, but it won't hurt to do so either.

    Maybe this explanation will make things a little clearer. When people talk about the disk's Master Boot Record (MBR) they are usually referring to the first sector on the disk. This 512-byte sector contains several things; among them the Master Boot Loader, the Disk ID, and the Partition Table. The Master Boot Loader is responsible for getting things started when you boot the PC -- it is a simple piece of code that searches the partition table looking for the Active partition. When it finds the active partition, it loads the first sector of the active partition and starts running the code located there. For your Windows XP system it loads a program that finds the file ntldr and executes it. And off you go...

    In Acronis terms, when you restore the MBR you are not restoring the entire first sector. In particular you are definitely not restoring the partition table. The only function performed by restoring the MBR with Acronis True Image is to re-load the Master Boot Loader code (300 or so bytes of code).

    All of the information about the partition location and whether it is active or not, and what type of file system (FAT32, NTFS, etc) is contained in the 64-byte partition table (16 bytes per slot). So the fact that your Windows partition is in slot 2 of the partition table has nothing to do with restoring the MBR using True Image. You can restore the MBR or not restore the MBR and that fact will not change.

    Hope this helps a little. If you are curious and want some additional information, here is a good description of the MBR contents, fully illustrated and in color.
     
  14. The4Bs

    The4Bs Registered Member

    Joined:
    Apr 29, 2007
    Posts:
    37
    But what about placing this image on a new hard drive, which is what I'm shooting for?

    Thanks again for the great descriptions and help!!!
     
  15. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    If the disk is completely blank then you can restore both the Windows partition and the MBR, which is automatically saved in the image file whenever you create a partition image with TI. Remember that to get to the resize screen in the restore wizard you will need to start out by first selecting only the Windows partition from the image file (don't check off the entire disk). After resizing, the wizard will then ask if you want to restore any other partitions. Then you can select the MBR.

    Since you are using TI 10, the first and only partition on the restored disk will end up in the second slot of the partition table, and boot.ini will thus be correctly referencing partition(2).
     
  16. The4Bs

    The4Bs Registered Member

    Joined:
    Apr 29, 2007
    Posts:
    37
    Cool. That's what I thought. Thanks again.
     
  17. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,483
    Location:
    California
    In additional testing I've done on this, I've found that XP doesn't always go by the partition table slot number for its partition(#) value. I suspect that, in this case, it will still want partition(1) because it's the first partition found.
     
  18. The4Bs

    The4Bs Registered Member

    Joined:
    Apr 29, 2007
    Posts:
    37
    Dang. Just when you thought it was safe to go back into the water.

    OK. Back to basics for me. My objective here is to upgrade a few computers to larger hard drives using their current settings, etc. without having to reload Windows, etc. Basically I need more space. I find all the input here very interesting but I think I'm making things too complicated now.

    So, here's my plan. Capture a system image of the existing small hard drive on each computer to an external hdd. Remove old small hdd and install new larger hdd. Restore the image from the external drive, including the MBR, partition by partition resizing as necessary. Boot to new system. This is essentially what I did with system number 1 and it worked. Since I'm not educated enough (yet) with the whole MBR, partition table, disc layout, Windows vs TI rules, etc. I need to stick with tried and true until I get there.

    I wanted to eliminate the bit of wasted space with the extra partitions but in the end I don't really care if I've got 498 GB available on my new drive or 500 GB. I just need more than the 20 GB I've got available at present.

    It just seems like there are too many variables at play and TI may do this or that and then Windows may do this or that and me the poor operator can't keep up at this point.

    Thanks to all of you for input. I've learned a lot and now have a plan that I think will work. It may not be perfect but it's awful close.

    I do have one final question. This may be more appropriate for a new topic but I'll ask it anyway. One of the computers in question is a notebook with Media Direct and the HPA. Page 9 of this instruction set says to not restore the MBR. If I restore my three partitions in the correct order, will TI come up with a MBR that will keep all this straight?

    Thanks.
     
  19. The4Bs

    The4Bs Registered Member

    Joined:
    Apr 29, 2007
    Posts:
    37
    I'm looking at purchasing TI 2009 for a Vista laptop and it appears that Vista restores work well now with TI 2009.

    As I read through the user guide I read on page 58: "Acronis True Image Home automatically corrects boot information during restore of the system partition to make it bootable even if it was not restored to the original partition (or disk)."

    This sounds like it would do exactly what I was trying to do with TI 10 which prompted this thread - restoring only the Windows partition (partition 2 on old drive) to a single partition on a new drive. Can one of the experts confirm that this would have worked for me for my XP system.

    Thank you, again.
     
  20. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,483
    Location:
    California
    TI 11 and TI 2009 both handle Vista restores much better than TI 10. TI 10 did not fix Vista to boot. This caused all sorts of problems, though most of them could be avoided if your prepared your Vista installation (see this thread).

    TI 11 and TI 2009 don't change the partition table order. I would assume that they make the necessary adjustments to the boot.ini file when it's restored to a different partition. The problems caused by TI 10 changing the partition table order can be avoided by using either TI 11 or TI 2009 (or TI 9 build 3,677 or earlier).

    Doing a test restore with the TI 2009 trial version would be an easy way to find out if it would work on your computer. It's hard to say for sure that it would have worked, but it should have and it would have had a much better chance of success.
     
  21. The4Bs

    The4Bs Registered Member

    Joined:
    Apr 29, 2007
    Posts:
    37
    Good idea. Thank you MudCrab. You're experience and willingness to share are invaluable.

    Cheers.
     
  22. Xpilot

    Xpilot Registered Member

    Joined:
    May 14, 2005
    Posts:
    2,318
    You may find this article of some use.
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;q289022

    When I once wanted to place an Xp system on a single hard drive instead of having the system and boot partitions on different physical drives I edited the boot INI before I made the transfer image.
    The system booted with no problem on the new drive.

    Xpilot
     
  23. The4Bs

    The4Bs Registered Member

    Joined:
    Apr 29, 2007
    Posts:
    37
    I tried it but it didn't work. Dang. I downloaded and installed the trial version of TI 2009 Home. I made the boot CD and captured a complete disc image of my XP Home SP3 Dell laptop from within Windows. Again, this laptop has 3 partitions visible to Windows with C: being the second partition. There is also the HPA area from MediaDirect invisible to Windows. I booted to the rescue CD and did a restore of only the C: partition. I didn't restore the other partitions or the MBR. I marked it as active and resized it to fill all of the new 250 GB hdd (the old one is 100 GB). The restore went quickly but when I rebooted the computer hung just after the BIOS screen. No errors, just a blinking cursor in the top left corner. Obviously TI 2009 didn't make an MBR that worked.

    Then I tried to restore a second time from the boot CD, restoring all three partitions, with resizing. But for the life of me I couldn't figure out how to get the partitions in the right order or get the properties selected for each. Everytime I went through and set the size and type of each partition it would only remember one and went it came time to "proceed" there was only one partition listed ready to be restored. So I abandoned TI 2009 at that point.

    I tried a restore of an image created with TI 10. Again, I set up to restore three partitions with resizing without the MBR. It did the restore fine but again the computer wouldn't boot afterward, with the same blinking cursor at boot up. It appears that TI 10 didn't create a useful MBR either. I was hoping that by keeping all three partitions in the correct order that TI 10 would keep it straight. But it didn't.

    So I'm back to square one with developoing my restore to a larger hdd. At this point I'm pretty sure I could restore to a new hdd if I choose to restore the Dell MBR. But then I've got HPA issues and truncating the new larger hdd. At least in the event of complete hdd failure I could restore to a like-sized hdd and be working. It's this resizing that really messes things up.

    So I guess I'm off to learn about editing the MBR to take care of the HPA trouble as I've read in other posts.

    So a note to others that may be interested. Page 9 of this instruction set says to not restore the MBR to avoid the HPA issue. I'm not sure that will work.

    Anyone care to throw out any words of advice of where I may have gone wrong or how to proceed from here.
     
  24. The4Bs

    The4Bs Registered Member

    Joined:
    Apr 29, 2007
    Posts:
    37
    A little follow up for those interested.

    I was able to get the new hdd going after booting to the Windows XP CD, starting recovery console, and running FIXMBR. The system booted after that. I see the full 250 GB in 3 partitions of my new hdd. The old drive was 100 GB. For clarity this was all done with ATI 10.

    The only odd thing was on boot up an error message popped up saying a particular file for Creative sound blaster was missing. The file was not in the .tib file either. Odd. But I've noticed Creative runs things from temp folders so who knows what happened. A few others at the Dell forum report this exact problem after moving up to a larger hdd through cloning or imaging processes, regardless of the imaging software used. I simply uninstalled Soundblaster and the problem is gone. It was one of those factory loaded programs we never use so no big deal. Apparently reinstalling it works just fine if people are so inclined.

    So for those with Dell notebooks with HPA this is one method to restore to a larger hdd. Save a disc image, restore all partitions without the MBR but then boot from Win XP CD and run fixmbr from the recovery console. Then all is good. From now on I can restore all partitions and the new Microsoft MBR with resizing and I'll be golden. No more odd Dell MBR or HPA to deal with.

    Interestingly when I push the MediaDirect button to see what happens, now that MediaDirect in the HPA is gone, the computer starts, there is a little Media Direct splash screen and then the computer boots into Windows and then loads MediaDirect from within Windows.

    Anyway, everything is good now and maybe this post will help other Dell notebook owners that have the HPA.

    Cheers and thanks again to all for their help.
     
  25. K0LO

    K0LO Registered Member

    Joined:
    Mar 9, 2006
    Posts:
    2,591
    Location:
    State College, Pennsylvania
    I'm glad that you got this figured out. I saw your post earlier today at work but was unable to answer, but I had it in the back of my mind to suggest using a Windows CD to write the MBR.

    Even though ATI is supposed to create a generic MBR when you restore to a blank hard disk, I recently had it fail to do that on a brand new and completely blank Hitachi notebook hard disk. After restoring the Windows partition the drive was unbootable. I used DD 10 to examine the first sector on the disk and found that it only contained a partition table. All of the other bytes were zero and there was no boot code at all! I think this is what happened to you. It would explain the blinking cursor when attempting to boot from the disk, and using FIXMBR would have added the missing boot loader code to the first sector.

    I have also restored only a partition to a blank disk in the past and had the procedure work as advertised, so I don't know how to explain this result, but it's easy to fix if you can recognize what happened.
     
Thread Status:
Not open for further replies.