0

I just installed Ubuntu onto a second hard drive of mine. I also chose it as the location for the bootloader. Now when I turn on the computer, it goes straight to Ubuntu, no GRUB no nothing, and I had expected to see GRUB. I have windows installed on a separate drive. I think choosing the second hard drive as the bootloader location is what caused my problem, but it is too late to fix that I believe.

I'm thinking the easiest way to get windows to boot back up is to just reformat the hard drive with Ubuntu on it, but this is just a guess. My logic is that all the things I added were put onto that hard drive, so if I get rid of all the things again, I'm alright. However, I have my doubts as well so any advice is welcome. I have no qualms of wiping the drive in terms of losing data, nothing is on it.

  • most BIOS have some boot-menu nowadays - indeed if you are careful (and it seems you've been) and install the OS on different HDD/SSDs then it's probably easier than using Grub - btw: you can use your windows install/recovery dvd to repair your boot-loader - just make sure to disconnect your linux-drive first as it will mess up everything – Carsten Mar 30 '16 at 5:07
  • 1
0

You should use boot-repair

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

Please make sure that your BIOS points to the disk(second drive) where grub is being installed. This way grub gets control from BIOS to load the O/S and works accordingly.

grub2 is by default installed in recent Ubuntu Linux versions.

  • I'll give this a go when I'm home from work. Looks like the "simplest" solution, hopefully it works – user302106 Mar 30 '16 at 12:01
  • Worked like a charm! – user302106 Mar 30 '16 at 22:41
  • Glad that it worked – Ashu Mar 30 '16 at 22:42
0

Run the following command to update grub:

sudo update-grub

If that doesn't work, change the boot order in your bios and set the windows disk as the first to boot when you want to boot windows. Change the boot order to boot ubuntu in bios when you want to boot ubuntu.

0

I struggled with this for a long time, and tried the other methods that were suggested. I would somehow get Windows to boot, but then Ubuntu Linux wouldn't boot. Then I would get Ubuntu to boot, and Windows wouldn't boot. The solution I found is as follows. I don't have it in front of me, right now, so this is entirely from memory; YMMV. Note that my setup uses EFI.

  1. Reboot into a live USB or DVD.
  2. Open a command prompt.
  3. Type the following:

    sudo blkid

    (Note the device nodes of your Linux boot and system partitions. It will be something like "/dev/sdXY", where "X" is a letter, and "Y" is a number.)

    sudo mount [Linux system partition] /mnt

    sudo mount [Linux boot partition] /mnt/boot/efi

    sudo mount --bind /dev /mnt/dev

    sudo mount --bind /sys /mnt/sys

    sudo mount --bind /proc /mnt/proc

    sudo mount --bind /var /mnt/var

    sudo mount --bind /tmp/mnt/tmp

    sudo chroot /mnt

    sudo grub-install [Linux boot partition]

    sudo update-grub

    exit

  4. Reboot.

  5. Go into EFI BIOS and ensure that it's booting from your Linux hard drive.

Please note that GRUB must be installed into the Ubuntu Linux boot partition, when using EFI. If you install to the drive root (/dev/sdX rather than /dev/sdXY), you'll have problems.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.