Author Topic: [Solved] Dual-boot and grub  (Read 1723 times)

0 Members and 1 Guest are viewing this topic.

Offline mikep

  • Sr. Member
  • ****
  • Posts: 255
  • Karma: 1
  • Gender: Male
  • Me again!
    • View Profile
    • Awards
[Solved] Dual-boot and grub
« on: February 07, 2017, 01:20:36 am »
Hello Folks,

One of our boxes is a dual-boot with Windows and Ubuntu. Windows needs reinstalling and the question is, will this confuse Grub and break the dual-boot?

Thanks for any feedback..
« Last Edit: February 13, 2017, 12:16:11 am by mikep »

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 17264
  • Karma: 436
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Dual-boot and grub
« Reply #1 on: February 07, 2017, 12:32:19 pm »
If the PC is non-UEFI then YES reinstalling Windows WILL break GRUB (as Windows will overwrite GRUB stage one on the master boot record) .. But as long as you have a LiveCD/LiveUSB of your distro, we can always reinstall GRUB afterwards.

The other option would be to stick with the Windows bootloader and use something like EasyBCD to boot Linux.
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline mikep

  • Sr. Member
  • ****
  • Posts: 255
  • Karma: 1
  • Gender: Male
  • Me again!
    • View Profile
    • Awards
Re: Dual-boot and grub
« Reply #2 on: February 07, 2017, 10:17:56 pm »
Thanks Mark,

Not UEFI, needless to say..

I've got the live cd though. Would it be possible for you to tell me in advance what I'll need to do to reinstate GRUB, so that I can do it as soon as Windows is reinstalled? Could I just copy some file(s) before I start the reinstall, then copy them back afterwards? Obviously I'd have to do that in Windows, as Ubuntu won't be bootable afterwards. Or could I do it in Ubuntu, then use the live cd to copy back?

M

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 17264
  • Karma: 436
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Dual-boot and grub
« Reply #3 on: February 07, 2017, 10:30:16 pm »
Not really because we'll have to look at the partition setup to get the command syntax right.

This is the method I always use:
https://help.ubuntu.com/community/Grub2/Installing#via_ChRoot

But you could try the "BootRepair" method if you like:
https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows#The_graphical_way
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline mikep

  • Sr. Member
  • ****
  • Posts: 255
  • Karma: 1
  • Gender: Male
  • Me again!
    • View Profile
    • Awards
Re: Dual-boot and grub
« Reply #4 on: February 07, 2017, 10:57:29 pm »
OK. Am I right in thinking the part I will need is the link to the section "How to Repair, Restore, or Reinstall Grub 2 with a Ubuntu Live CD or USB"?

If so, I'm fairly confident I can work through it (famous last words - what could possibly go wrong!#?)...

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 17264
  • Karma: 436
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Dual-boot and grub
« Reply #5 on: February 07, 2017, 11:05:26 pm »
Boot to the LiveCD/LiveUSB

Make sure you have an active internet connection in the Live session

Open a terminal and run:
Code: [Select]
sudo add-apt-repository ppa:yannubuntu/boot-repair
then
Code: [Select]
sudo apt-get update
then
Code: [Select]
sudo apt-get install -y boot-repair && boot-repair
Click "Recommended Repair".

The REBOOT to the hard drive.
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline mikep

  • Sr. Member
  • ****
  • Posts: 255
  • Karma: 1
  • Gender: Male
  • Me again!
    • View Profile
    • Awards
Re: Dual-boot and grub
« Reply #6 on: February 07, 2017, 11:59:16 pm »
Ok. I presume I do all that AFTER I've broken GRUB by reinstalling Windows?

On reflection, I'm not quite so confident. If it's ok with you Mark, I'll spend a couple of days backing up data and thinking about this. Then I'll reinstall Windows and come back here via another machine to ask your advice in realtime.

Anyway, the worst case scenario would be to reinstall Ubuntu after reinstalling Windows, which I believe would reinstall GRUB as well. It's about time I upgraded Ubuntu, so a fresh install wouldn't be such a bad thing...

Your help is much appreciated, as always.

M

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 17264
  • Karma: 436
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Dual-boot and grub
« Reply #7 on: February 08, 2017, 12:11:24 am »
Yeah you do that AFTER reinstalling Windows, but I'm fine if you want to come back here when your ready :)
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline mikep

  • Sr. Member
  • ****
  • Posts: 255
  • Karma: 1
  • Gender: Male
  • Me again!
    • View Profile
    • Awards
Re: Dual-boot and grub
« Reply #8 on: February 08, 2017, 12:22:02 am »
Thanks. Will do.

Offline mikep

  • Sr. Member
  • ****
  • Posts: 255
  • Karma: 1
  • Gender: Male
  • Me again!
    • View Profile
    • Awards
Re: Dual-boot and grub
« Reply #9 on: February 13, 2017, 12:14:49 am »
Hello again Mark,

Now, this is weird. Welcome, but weird.

I've just reinstalled Windows, fully expecting to have to restore GRUB, and hoping it wouldn't bite me on the backside with some mysterious error that would take up time I can't really spare..

However, the dual-boot still works. GRUB gives me the usual options as though nothing happened.

Thanks for your help, as usual. Next step is to upgrade Ubuntu...

I'll mark this solved now.

M

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 17264
  • Karma: 436
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: [Solved] Dual-boot and grub
« Reply #10 on: February 14, 2017, 01:04:49 am »
Nice ..

I'm gonna guess this *IS* a UEFI system then.
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

Offline mikep

  • Sr. Member
  • ****
  • Posts: 255
  • Karma: 1
  • Gender: Male
  • Me again!
    • View Profile
    • Awards
Re: [Solved] Dual-boot and grub
« Reply #11 on: February 15, 2017, 12:15:38 am »
No. That's the odd part. It's an ageing Abit IP35 Pro motherboard...

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 17264
  • Karma: 436
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: [Solved] Dual-boot and grub
« Reply #12 on: February 15, 2017, 09:57:37 am »
Ok very odd, Windows must have forgotten to overwrite the master boot record .. who cares if it's working eh :)
WARNING: You are logged into reality as 'root'
logging in as 'insane' is the only safe option.
pcnetspec.co.uk

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal