Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 29

Thread: Raing install has corrupted Vista MBR

  1. #11
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Raing install has corrupted Vista MBR

    No as 512 includes the partition table. Your issue is not the MBR but the PBR. Linux can install a Windows type boot loader to the MBR.

    http://www.cgsecurity.org/wiki/Advan...and_MFT_Repair


    Can you take a screenshot of testdisk. It should look like the link I posted above. I posted mine also.
    You need to get something that is NTFS related not grub into the sda2 PBR. Rebuild BS should work if backup is not valid. It may say the grub version is valid but from testdisk view it may be, but only the backup was.

    There are some other Windows repair tools not sure how much they do.
    Also has chkdsk and some other Windows repairs in free version:
    http://www.partitionwizard.com/features.html
    http://www.partitionwizard.com/parti...ition-fix.html

    EasyBCD also does some repairs.
    https://neosmart.net/

    You really should have a repairCD for the same version of every operating system you have installed. And when making major changes have good backups.

    The vendor recovery DVDs are just an image of your drive as purchased. If you have housecleaned a lot of cruft normally included, run many updates with many reboots, and added software you may want a full back up.
    Backup windows before install - post by Mark Phelps
    http://ubuntuforums.org/showthread.p...0#post12611710
    http://www.macrium.com/reflectfree.asp
    Another suggestion by srs5694
    http://www.runtime.org/driveimage-xml.htm

    My attachment is XP but one Bootsector is Windows 7 and the other is XP, so that is why they are different.
    Attached Images Attached Images
    Last edited by oldfred; June 26th, 2013 at 12:31 AM.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  2. #12
    Join Date
    Jun 2013
    Beans
    16

    Re: Raing install has corrupted Vista MBR

    Screenshot as requested, I will look at the links you've provided as well.
    PS. Browsing through the Vista partition (using testdisk), there is a file in the root of the drive named BOOTSECT.BAK with a size of 8192. Could I dd this into MBR? (I know you mentioned PBR, just wondering)

    Screenshot from 2013-06-26 00:37:51.png
    Last edited by pekatete; June 26th, 2013 at 12:46 AM.

  3. #13
    Join Date
    Jun 2013
    Beans
    16

    Re: Raing install has corrupted Vista MBR

    I think I may be making some progress.
    1. I went ahead and re-populated /dev/sda2 mbr with using
    Code:
    sudo dd if=vistambr.mbr of=/dev/sda2 bs=446 count=1
    and this is the link to the latest BootInfo http://paste.ubuntu.com/5800192/ (no reports of errors). I have backed up the old (corrupted) MBR just in case.
    2. The worry I still have is that
    Code:
    sudo update-grub
    still does not pick up the partition.
    I am going to re-boot to see if re-running this after a reboot will make a difference.

    PS. the vistambr.mbr is basically the BOOTSECT.BAK file that I found in the root of the partition.

  4. #14
    Join Date
    Jun 2013
    Beans
    16

    Re: Raing install has corrupted Vista MBR

    Just to reiterate I must have stumbled upon something here.
    Having rebooted, I still can not get sudo update-grub to add the Vista partition, however, having copied part of the file BOOTSECT.BAK to the MBR, I can now even mount the partition inside ubuntu (which was not possible before)!
    My next step will be to completely purge grub and then re-install it (rather than a plain update) and hopefully it will recognise the Vista partition and add it to the boot options. (At this point, I am pretty confident if I removed grub and rebooted, I'd boot into Vista straight .....! but a step at a time for now)

  5. #15
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Raing install has corrupted Vista MBR

    Grub still will not find it until you have all 3 Windows boot files needed to boot Windows. I think grub just looks for the two you are missing, the one's in RED.

    Vista/7 (with 7 the first two files are usually in a separate 100MB boot partition)
    /bootmgr /Boot/BCD /Windows/System32/winload.exe

    The boot flag also has to be on sda2 for any Windows repairs or direct Windows booting. Grub does not use boot flag to boot anything and actually just jumps to the Windows PBR in the partition with the boot files (the one's in red).

    To better understand how Windows boots and actually all BIOS/MBR systems. It is just that grub does not use PBR like Windows. Other older Linux boot loaders like Lilo do use PBR.

    Multibooters, Pictures here worth 1000+ words
    http://www.multibooters.co.uk/multiboot.html
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  6. #16
    Join Date
    Jun 2013
    Beans
    16

    Re: Raing install has corrupted Vista MBR

    Thanks for clarifying that oldfred. I was missing the fact that they were two files.
    1. Now where do I get those two files? I can not seem to see these anywhere on neither the Vista nor Ubuntu partitions.
    2. If like you mentioned they are on the recovery CD, can these not be rebuilt from the Vista partition?

    edit: I have now got hold of the winload.exe.file which resides on the Vista partion, now how do I recrete the first file aka /bootmgr /Boot/BCD
    Last edited by pekatete; June 26th, 2013 at 09:07 AM.

  7. #17
    Join Date
    Jun 2013
    Beans
    16

    Re: Raing install has corrupted Vista MBR

    OK I found both files on the Vista partion
    1. I copied bootmgr to the root of my Linux partition, i.e /bootmgr
    2. I created a directory Boot in the root of the Linux partition and copied the file BCD to that directory.
    3. i re-run sudo update-grub and also sudo boot-repair but grub did not pick up the Vista partition.
    Here is my latest Bootinfo: http://paste.ubuntu.com/5800896/

    PS. I noticed that boot-repair works on the boot rather than Boot directory (caps on). Do I need to copy the BCD file into the boot directory?
    I also have the other matter of un-installing grub from the boot sector of sda6. I managed to remove grub from sda2 by over-writing the mbr, would this be same with sda6? Should I simply zero it out?
    Last edited by pekatete; June 26th, 2013 at 10:00 AM.

  8. #18
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Raing install has corrupted Vista MBR

    Windows is not case sensitive so it can be any /boot. In fact some have installed grub to Windows and created /Boot and /boot which are different in Linux but then Windows sees duplicates & quits working.

    BootInfo report still is not showing the bootmgr & BCD? Uusally it finds them but occassionly it does not. But then grub2's os-prober will not find them either. Is bootmgr at the root or top level of Windows? and /boot off that top level with the BCD? Not sure if Windows has other files? BootInfo only shows the files required for booting.

    Do not worry about sda6's PBR. You would not normally use it and unless running the BootInfo report would not know if it was zeros or had some random data. In fact when users move partitions, the PBR often ends up with random data and BootINfo report shows it as unknown boot loader. There are ways with dd to zero it out, but than can be dangerous as any typo causes even more issues.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  9. #19
    Join Date
    Jun 2013
    Beans
    16

    Re: Raing install has corrupted Vista MBR

    oldfred, you have been such a godsend!
    i am not over the hill yet, but here is where I stand as of now.
    The two files you were reffering to I actually copied to the root folder of the linux partition! having copied them back to the windows folder, grub now recognises the windows partition and adds it to its menu. One small problem for now, grub thinks its a recovery and NOT an ntfs. i suppose that is because I got the BCD file from the Windows/Boot/DVD/PCAT folder. There is a Windows/Boot/PCAT folder, but it only contains the bootmgr and memtest.exe files plus locale folders (which only contain MUI files).

    I am going to reboot to see whether booting into Vista will force some kind of sanity check (hopefully it does).

    PS. And here is the latest BootInfo (with the two files showing!): http://paste.ubuntu.com/5801964/
    Last edited by pekatete; June 26th, 2013 at 05:28 PM.

  10. #20
    Join Date
    Jun 2013
    Beans
    16

    Re: Raing install has corrupted Vista MBR

    Just to update, the reboot failed to get me into Vista.
    1. Are there any issues being caused by the error: Warning: extended partition does not start at a cylinder boundary. I believe this is caused by the linux partition /dev/sda6 starting at 278005760 whereas its parent extended partition /dev/sda3 starts at 278005758. Oddly though, the preceeding Vista partition /dev/sda2 ends at 278003764
    2. Do we know where Vista stores its runtime bootmgr and BCD files?
    3. I still can not get the recovery partition to show in grub, from the bootinfo, any ideas what i need to do. (For the record, I ran gparted and it never recognised the partition, not sure whether it is because it does not support vfat out of the box, or as it claims, the partition has errors!)

    PS. the last bootinfo is as per my last post
    Last edited by pekatete; June 26th, 2013 at 06:10 PM.

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •