1

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.

user302106
  • 23
  • 2
  • 5

3 Answers3

1

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.

Ashu
  • 3,966
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.

mchid
  • 43,546
  • 8
  • 97
  • 150
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.

DaneM
  • 376