0

On my laptop, I had Windows 7 Home Premium preinstalled. A year or so ago, I dual-booted it with Ubuntu 14.04 LTS.

I now want to upgrade Windows 7 to Windows 10 (it's free, so why not?) when it's released.

However, I'm unsure whether this will affect GRUB and stop me from accessing my Ubuntu partition. I need both operating systems and can't afford to lose either.

If this will affect GRUB, how can I restore GRUB so I can access both operating systems?

Thanks in advance.

EDIT: Just to be clear, I already have a dual-boot set up, where Ubuntu was installed alongside a pre-existing Windows installation. I now want to upgrade Windows (from 7 to 10) but am worried it will affect GRUB and my ability to boot into Ubuntu.

UPDATE: I installed Windows 10 and it ended up leaving GRUB alone. Selecting the Windows 7 option booted me into Windows 10.

thesdog
  • 181
  • 2
  • 17
  • @Whaaaaaat In that question, Ubuntu was installed after Windows and that's when the problem arose. I want to know how to fix any problems that may arise after upgrading Windows. – thesdog Jul 18 '15 at 10:27

1 Answers1

-1

Short answer: Yes.

Short solution: After you upgrade, boot into Ubuntu (this will still work) and run this in Terminal:

sudo grub-mkconfig -o /boot/grub/grub.cfg

That's assuming your GRUB installation is on you Ubuntu drive. If that doesn't work, then it's on your Windows drive, and you'll instead need to run this:

sudo grub-install /dev/sda

(replace '/dev/sda' with whatever drive Windows is on; you can see this in the output of the first command)

Daniel
  • 3,446
  • Two questions:
    1. How do I boot into Ubuntu if GRUB gets messed up?
    2. How do I know if GRUB is on my Ubuntu or Windows partition?
    – thesdog Jul 17 '15 at 17:19
  • You can boot into Ubuntu using your BIOS's 'Boot Menu'. On my computer I hit F8 during the BIOS boot cycle. It's probably something else on yours. It may say something like 'Press ESC for boot options', then you hit escape and it tells you what to press to do what
  • – Daniel Jul 17 '15 at 17:22
  • So, if you installed Ubuntu after Win7, then GRUB's probably on the Ubuntu partition, but it's possibly on the Windows partition. It doesn't really matter, since as long as you run both of the above commands, it should work. That will put GRUB on both drives so that no matter what your laptop decides to boot from first, it will bring up GRUB.
  • – Daniel Jul 17 '15 at 17:23
  • Just run both commands in Ubuntu – Daniel Jul 17 '15 at 17:23
  • Okay, great. I won't mark this as an accepted answer until I've tested it and it works, but thanks for your quick reply :) – thesdog Jul 17 '15 at 17:33
  • If BIOS there is only one MBR, so whichever system installs last controls MBR. So you need Ubuntu live installer to restore grub. https://help.ubuntu.com/community/RestoreUbuntu/XP/Vista/7Bootloader OR: https://help.ubuntu.com/community/Grub2/Installing#Fixing_a_Broken_System Do not install grub2's boot loader to a partition, just to sda, or sdb if you have a second drive (not partition). – oldfred Jul 17 '15 at 18:09
  • I didn't call for him to install to a partition. – Daniel Jul 19 '15 at 02:06