Page 1 of 5 123 ... LastLast
Results 1 to 10 of 45

Thread: instructing Ubuntu not to overwrite the Windows MBR

  1. #1
    Join Date
    Oct 2009
    Beans
    170

    instructing Ubuntu not to overwrite the Windows MBR

    I have been the past few days recovering my multiboot Windows bootloader with the help of the EasyBCD support forum. I was concerned about my former Grub (I have Mint and Ubuntu installed but presently inaccessible) overwriting the Windows MBR if I restore it with Supergrub. The problems with the mutlboot menu began with Windows 8.1 apparently corrupting the multiboot menu. I ending up choosing to reformat Windows XP knowing what the result would be but not being able to successfully recover the XP by any of the other options that I was familiar with. One of the moderators on Neosmart Forum (EasyBCD) said this to me: "You can instruct the Linux install not to overwrite the MBR but to place grub in the Linux partition. That will protect the existing MS multiboot. You can then add a Linux entry to the BCD and EasyBCD will automatically locate it and set up everything necessary." I assume Neosmart (EasyBCD) are not expert in the Linux side of things. Can you point me to a step by step guide for doing this from the Linux Ubuntu viewpoint. I don't know if this can be done with a SuperGrub recovery disk or if I will need to reinstall Ubuntu. Thanks in advance for any assistance.

  2. #2
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: instructing Ubuntu not to overwrite the Windows MBR

    Grub does not recommend that it be installed to a partition's PBR or partition boot sector. It does not really fit. So it converts to blocklists or hard coded addresses which may change on grub update or even a fsck or anything that may move a file.

    You get messages like this:
    grub-setup -v /dev/sda6
    Attempting to install GRUB to a partition instead of the MBR. This is a BAD idea.
    Embedding is not possible, GRUB can only be installed in this setup by using blocklists. However blocklists are UNRELIABLE and its use is discouraged.
    error: If you really want blocklists, use --force

    Windows is not designed as a multiple boot system. It will boot multiple installs of Windows but most recent install takes over an moves all its boot files into the one primary NTFS partition with the boot flag. Then BCD or boot.ini is updated with additional Windows.
    EasyBCD tries to modify BCD to chain boot to grub. It actually adds grub4dos and an entry in BCD or boot.ini to grub4dos to chain to the grub in the PBR. That actually was not so bad with grub legacy but not so good with grub2. Some in forum have post it does work. But be prepared to reinstall grub after major grub updates.


    http://neosmart.net/wiki/display/EBCD/Linux
    http://neosmart.net/wiki/display/EBCD/Ubuntu

    Grub is designed a a multiple boot manager as well as a Linux system boot loader. So it just adds Windows to its menu and chain loads to the Window PBR, just like a Windows boot loader in the drive's MBR chain loads to the PBR.

    Pictures here worth 1000+ words
    http://www.multibooters.co.uk/multiboot.html

    Do not install grub2 to any NTFS partition's PBR. That damages Windows.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  3. #3
    Join Date
    Oct 2009
    Beans
    170

    Re: instructing Ubuntu not to overwrite the Windows MBR

    Thanks for the prompt reply and the great links. You didn't comment about using Supergrub. Is there any hope of recovering my old Grub bootloader with Supergrub after reformatting my drive c? One thing I did notice was that the drive letters Windows has assigned to my drives now is different than it was originally. This is one good thing (I suppose it's good) that came out of the recovery process. Windows XP is now C which is the way I expected it to be originally, but somehow during the process of installing the OS's the first time, XP ended up being K instead of C. I don't know if that contributed to the loader getting corrupted and I don't know if the fact that XP is C now but was K before is going to matter to Grub. The OS's are actually installed to the same partitions as before. Would it be safer reinstalling Ubuntu than trying to use Supergrub?

  4. #4
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: instructing Ubuntu not to overwrite the Windows MBR

    Supergrub is a useful tool to have. It is for booting when grub is corrupted or you have other issues. But you should correctly install a boot loader once you boot with Supergrub.

    Windows normally sees the c: drive as the version of Windows you boot into. If you have more than one Windows then that is d: or some other letter.

    You should not need to reinstall Ubuntu, just repair grub. But I always suggest using grub2 in drive's MBR, not other boot loaders. But part of that is I know grub2, and do not know the others.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  5. #5
    Join Date
    Oct 2009
    Beans
    170

    Re: instructing Ubuntu not to overwrite the Windows MBR

    Gparted Live Disk showed XP as /sda1 so I presume that's where the MBR is. I installed Mint before Ubuntu so it would appear that sdc1 (13gb) is the Mint Partition sdc5 (4.8gb) is a swap partition, sdc6 ext3 (5.59gb) and sd8 ext4 (7.47gb) and sd9 ext4 (7.26gb) must be all Ubuntu partitions (I don't remember why I partitioned it that way and/or which is home/root/etc.) When I ran supergrub 2 and chose "locate grub even if mbr is overwritten" it gave me two options hd1 msdos8 or hd1 msdos1 for two grub config files. Would I be correct in choosing the hd1 msdos1 file. I have no idea what msdos1 means. I understand that after I choose one of these two grubs it will ask me for the location of the Linux OS. Do I choose /sdc1 (mint) or the first of the 3 ubuntu partitions sdc6? I had my grub customized using grub customizer with a splash image. I don't know how that will complicate the chances of recovery. One of the problems I had with Grub2 in installing first Mint and then Ubunut is that it did not detect all the Windows OS's. One of the options linked to the multiboot windows loader, so what I had going was a two menu system - one to choose between mint, ubuntu or windows, and if I chose windows I would get to choose one of the Windows OS's. That worked and i got used to it, but I would have preferred having all OS's on the one menu. I don't know how hard that will be to do manually with Grub2.
    Last edited by archp2009; April 14th, 2014 at 11:51 PM.

  6. #6
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: instructing Ubuntu not to overwrite the Windows MBR

    Best to see all the details.

    Post the link to the Create BootInfo report. Is part of Boot-Repair:
    https://help.ubuntu.com/community/Boot-Info


    MBR is the first sector of a hard drive and before any partitions. Windows also uses the PBR or the first sector of the NTFS partition for more boot code.

    hd0 is first drive, hd1 second etc
    msdos1 is first partition, msdos2 is second partition etc and that is with MBR or msdos partitioning not the new gpt partitioning.
    It used to just be in grub as (hd0,1) but they added msdos or gpt to tell which partitioning the drive is.

    If you have mulitple drives you can have different installs in each drive and different boot loaders in the MBR of each drive. Then in BIOS choose to boot another drive.

    You can have each Windows in grub if you have installed both Windows in primary partitions. Windows only boots from the drive in BIOS set as boot and on that drive the NTFS partition with the boot flag. All other installs put there boot files in that one partition, so grub can only find one install. But if you move boot flag or change to other drive and do Windows repairs, The repair can add boot files to the second install. Then grub can find the second install.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  7. #7
    Join Date
    Oct 2009
    Beans
    170

    Re: instructing Ubuntu not to overwrite the Windows MBR

    Thanks for your continued guidance. I burned a boot repair disk. This is the url of the boot info: http://paste.ubuntu.com/7252717/ The recommendation to set the bios to boot the 320gb disk is contradictory to the present location of the mbr. Drive c is the first 137gb partition of the 1tb disk which has the XP on it. The 320gb disk is the one with the Mint and Ubuntu and a partition of data (movies) but no Windows OS at the present time. BTW, the drive management in XP gives false information about allocated and unallocated space and drive capacity for the 640gb drive. Using third party utitlities such as Easeus Disk Manager gives the correct information for that drive. One of my drives, the 1tb drive, has shown evidence in the past of failing using WD diagnostic software (lots of bad sectors) but no issues since I updated the mobo drivers, so I'm keeping my fingers crossed. I went back and used the WD diagnostics again since and it showed passed and no errors at least in short test.
    Last edited by archp2009; April 15th, 2014 at 02:02 AM.

  8. #8
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: instructing Ubuntu not to overwrite the Windows MBR

    Do not run Boot-Repairs auto fix. It is fine for those with one drive or only one system, but you want to keep the Windows boot loaders on both sda & sdb.

    But you do want to install grub to sdc's MBR and change BIOS to boot sdc. Not sure which system you want in control. sdc1 Mint or sdc8 Ubuntu. With Boot-Repairs advanced choice you can choose system and choose drive to install to or sdc.

    You also have mixed Windows boot files in sda1, sda2 & and no boot files for Windows 7 in sdb1. I might copy bootmgr & BCD from working system into sdb1. You may need to change BIOS to boot sdb temporarily and run Windows repairs to make it directly bootable.

    Windows BIOS Boot files:
    WinXP
    /boot.ini /ntldr /NTDETECT.COM
    Vista/7/8 (with 7or 8 the first two files are usually in a separate 100MB boot partition)
    /bootmgr /Boot/BCD /Windows/System32/winload.exe

    You also have grub4dos's /grldr folders or files. That is for grub4dos to chainload to another boot loader and is usually installed by EasyBCD. With multiple hard drives and multiple MBRs you do not need EasyBCD.


    Windows 7 repair USB, Also Vista if service pack installed
    http://www.intowindows.com/how-to-re...tion-dvd-disc/
    http://www.webupd8.org/2010/10/creat...usb-drive.html
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  9. #9
    Join Date
    Oct 2009
    Beans
    170

    Re: instructing Ubuntu not to overwrite the Windows MBR

    Thanks again, All this is a bit overwhelming to me at this moment. I will need some time to inwardly digest your comments. Re-installing Ubuntu feels at least 10x easier to me. I guess I'm thinking only of the negative aspects and magnifying them in my mind. All the Windows systems are working fine at this moment. I may give it some time to consider.

  10. #10
    Join Date
    Oct 2009
    Beans
    170

    Re: instructing Ubuntu not to overwrite the Windows MBR

    Quote Originally Posted by oldfred View Post
    You also have mixed Windows boot files in sda1, sda2 & and no boot files for Windows 7 in sdb1. I might copy bootmgr & BCD from working system into sdb1.
    I have been hesitating this past few days for your comments to settle in my mind before deciding what I should try next. I'm surprised that if there are no boot files in the Win 7 partition that I can still successfully boot into Windows 7 from my present windows boot menu. Does that not surprise you? Will you provide guidance on a reinstall of the Ubuntu 13.10 if I prefer that option?

Page 1 of 5 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
  •