Results 1 to 3 of 3

Thread: GRUB2 and dualbooting with Windows 7

  1. #1
    Join Date
    Oct 2013
    Beans
    1

    GRUB2 and dualbooting with Windows 7

    Hello,
    today I set up a dual boot with Ubuntu 13 and Windows 7 on a Samsung laptop. I have 2 HDDs: sda (1TB) had already Windows 7 on it; sdb (500MB) was clean. I managed to install Ubuntu on sdb via live-USB. After gathering some information, I understood that the two partitions I had to manually create where a root partition (mine is approximately 496 GB) and a swap partition (4 GB in my case). I also installed GRUB2 on sdb. Basically the idea was to leave windows untouched, and use windows boot manager (WBM) to chose which OS to boot.
    Here came the first problem: I had succeeded in creating entries on WBM, but every time i chose Ubuntu I just went straight to the GRUB prompt. Being unfamiliar with Linux, I had no idea what to do from there. Eventually I managed to boot Ubuntu and I tried the boot repair to fix the GRUB prompt option.
    This lead to the present situation: I know have GRUB2 installed on BOTH sda and sdb, and it loads regardless of the HDD boot priority I set. From there, I can choose either Windows or Ubuntu, and both work just fine (especially after deleting Ubuntu entries from WBM).

    Now I have two questions:
    1. Is GRUB2 supposed to be installed on both device? Wouldn't it be cleaner if I had GRUB2 on sdb and WBM onsda?
    2. Is there any way to have GRUB2 loading ONLY if I choose to boot from sdb (by changing boot priorities in the BIOS), and having Windows loading directly (via WBM) if I give boot priority to sda?


    Thank you in advance for your help; I hope this was clear enough (unfortunately, I don't know much about linux and/or booting configuration)

    P.S. If you need further information just let me know (and please tell me where to find it!)

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

    Re: GRUB2 and dualbooting with Windows 7

    Boot-Repair likes to install grub2 to every drive, I prefer what you want or each drive has a separate install and its boot loader in the MBR of the same drive. Then if one drive fails you should still be able to boot from the other.

    Boot-Repair can install a Windows type boot loader to sda. Just uncheck auto repair, and in advanced options choose which operating sytem to install to which drive.
    Or you can use your Windows repairCD or flash drive (you do have one?) to restore the Windows boot loader to sda.
    Grub will let you dual boot easily so just set BIOS to default to sdb. Windows is not designed as a Boot Manager so it is a major work around to get it to boot Ubuntu.

    Boot Repair -Also handles LVM, GPT, separate /boot and UEFI dual boot.:
    https://help.ubuntu.com/community/Boot-Repair
    You can repair many boot issues with this or 'Create BootInfo' report (Other Options) & post the link it creates, so we can see your exact configuration and diagnose advanced problems.
    LighterWeight (Lubuntu based) Boot-RepairCD
    http://sourceforge.net/projects/boot-repair-cd/files/

    Or from Ubuntu, this will install grub to sdb.
    sudo grub-install /dev/sdb

    And this will install the lilo boot loader (boot loader only not all of lilo) to sda. Lilo works like Windows in booting from MBR.

    Restore basic windows boot loader - universe enabled if error on lilo not found
    Simply open Synaptic and Settings > Repositories and tick the box against the Universe repo in the Ubuntu Software tab. Close that window and click on reload before installing lilo with Synaptic or command line.
    sudo apt-get install lilo
    sudo lilo -M /dev/sda mbr
    May show error messages about the rest of lilo missing, ignore, we just want MBR with bootloader to boot partition with boot flag (Windows).
    Last edited by oldfred; October 3rd, 2013 at 11:35 PM.
    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.

  3. #3
    Join Date
    May 2006
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: GRUB2 and dualbooting with Windows 7

    A new install worked more quickly for me.

    Just make sure that you don't boot the installation CD with a UEFI boot sequence if your HD structures is MSDOS with MBR or vice versa.
    (See: this thread)

    What did your HD structure turn out to be?
    To fail to prepare is to prepare to fail.

Tags for this Thread

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
  •