Author Topic: Will installing Windows overwrite Grub  (Read 2050 times)

0 Members and 1 Guest are viewing this topic.

Online Emegra

  • Hero Member
  • *****
  • Posts: 2586
  • Karma: 54
  • Gender: Male
  • Devilishly Handsome
    • View Profile
    • Awards
Will installing Windows overwrite Grub
« on: May 20, 2013, 10:15:20 pm »
Hi Guys

I have 2 hard drives installed on my PC sdb(360GB) has WinXP & Linux Mint 14 sda (40GB) has Peppermint 3

I've completely wiped sdb in preparation to Install Windows 7 alongside Mint 15 when it's released, so I'm now ready to install Windows 7 but my problems is I don't know what drive Grub is installed on and my fear is that if I go ahead and install Windows 7 on sdb will it overwrite Grub preventing me from booting into Peppermint on sda ?

Any help would be much appreciated


Many thanks


Graeme
If you can keep your head while all around are losing theirs, then you're not quite grasping the situation

Offline SeZo

  • Hero Member
  • *****
  • Posts: 1500
  • Karma: 119
  • Gender: Male
    • View Profile
    • Awards
Re: Will installing Windows overwrite Grub
« Reply #1 on: May 20, 2013, 11:03:17 pm »
If I am getting this right, then in your current arrangement Peppermint (on drive sda1) controls grub.
Installing Win7 on drive sdb1 will over write grub on sda1.
I would suggest to approach it like this:
1) Disconnect all drives, except sdb
2) Move sdb to be the first drive
3) Install Windows 7 to sdb (it will re-partition it)
4) Move sdb to be in the second position
5) Reconnect sda (to first position) and run update-grub in Peppermint to pick up Win7
4) Install Mint alongside Win 7 on sdb but skip install grub (or install to sdb if you have to)
5) Update grub in Peppermint to pick up Mint

Make sure that when connecting the drives they go to the correct position so they are detected in the correct order in the bios.

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13575
  • Karma: 338
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Will installing Windows overwrite Grub
« Reply #2 on: May 21, 2013, 12:19:51 am »
I can't add anything to that .. that's exactly how I'd do things :)
(ie. don't have the Linux drive attached during Windows installation .. then use GRUB to chainload Windows after adding the Linux drive back in and making sure it's the primary boot device)

But rest assured, GRUB is easy to reinstall even if you do manage to overwrite it .. or you could add Peppermint/Mint to the Win7 bootloader with EasyBCD.
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Online Emegra

  • Hero Member
  • *****
  • Posts: 2586
  • Karma: 54
  • Gender: Male
  • Devilishly Handsome
    • View Profile
    • Awards
Re: Will installing Windows overwrite Grub
« Reply #3 on: May 21, 2013, 06:58:45 am »
I'm sure this will come as no surprise to you (it certainly doesn't surprise me) but I've screwed it up

Before installing Win 7 I disconnected the Peppermint drive the installation went perfectly once installed I switched off the PC and reconnectd the Peppermint drive  but now I have no grub menu and it will only boot into Windown even if I hit escape to get me into the boot options menu and select the Peppermint drive it skips that drive and boots into Windows.

I ran a live session and all the Peppermint system files appear to be there so I don't think I've  wiped it

Any help would be much appreciated


Graeme
« Last Edit: May 21, 2013, 07:09:31 am by Emegra »
If you can keep your head while all around are losing theirs, then you're not quite grasping the situation

Offline goldtopia

  • Full Member
  • ***
  • Posts: 170
  • Karma: 0
  • Gender: Male
  • I've just joined!
    • View Profile
    • Motley Minstrels
    • Awards
Re: Will installing Windows overwrite Grub
« Reply #4 on: May 21, 2013, 08:19:26 am »
The easiest would be to have different OSs' on separate hard disc caddies which are interchangeable. But that just my opinion. It saves a lot of aggro. No emulators, no dual booting. Thats if you have a desk top computer.
« Last Edit: May 21, 2013, 08:24:07 am by goldtopia »
Bill.O

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13575
  • Karma: 338
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Will installing Windows overwrite Grub
« Reply #5 on: May 21, 2013, 10:21:14 am »
You've probably changed the boot order of the drives .. either:-

a) swap the data cables on the drives
or
b) go into your BIOS and make sure the Peppermint drive is set as the primary boot device.
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Online Emegra

  • Hero Member
  • *****
  • Posts: 2586
  • Karma: 54
  • Gender: Male
  • Devilishly Handsome
    • View Profile
    • Awards
Re: Will installing Windows overwrite Grub
« Reply #6 on: May 21, 2013, 01:47:17 pm »
Quote
swap the data cables on the drives

unfortunately that's not an option as one drive is SATA and the other IDE

Quote
go into your BIOS and make sure the Peppermint drive is set as the primary boot device.

I'm sure it already is set that way but I'll double check when I get home but i didn't think that would matter if I try directly booting the Peppermint drive via the bootloader



Graeme
If you can keep your head while all around are losing theirs, then you're not quite grasping the situation

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13575
  • Karma: 338
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Will installing Windows overwrite Grub
« Reply #7 on: May 21, 2013, 01:51:37 pm »
I thought you said you hadn't access to the GRUB bootloader ?

Or do you mean if you use the boot device selection screen to select the Linux drive it STILL doesn't display GRUB ?

[EDIT]

Can you boot to a LiveCD/LiveUSB and post the output from:
Code: [Select]
sudo fdisk -l
« Last Edit: May 21, 2013, 01:53:28 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Online Emegra

  • Hero Member
  • *****
  • Posts: 2586
  • Karma: 54
  • Gender: Male
  • Devilishly Handsome
    • View Profile
    • Awards
Re: Will installing Windows overwrite Grub
« Reply #8 on: May 21, 2013, 01:56:37 pm »
Quote
Or do you mean if you use the boot device selection screen to select the Linux drive it STILL doesn't display GRUB ?

Yes that's what I mean

Quote
Can you boot to a LiveCD/LiveUSB and post the output from:
Code: [Select]
sudo fdisk -l

I'm at work just now but I'll do that when I get home


Many thanks


Graeme
If you can keep your head while all around are losing theirs, then you're not quite grasping the situation

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13575
  • Karma: 338
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Will installing Windows overwrite Grub
« Reply #9 on: May 21, 2013, 01:59:32 pm »
Okey dokey.
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline SeZo

  • Hero Member
  • *****
  • Posts: 1500
  • Karma: 119
  • Gender: Male
    • View Profile
    • Awards
Re: Will installing Windows overwrite Grub
« Reply #10 on: May 21, 2013, 05:35:41 pm »
Is it possible that you might have had Peppermint's grub installed to sdb in your original setup?
If that is the case then you will have to reinstall grub (from a live cd) to sda.
Also which drive is on IDE and which is on SATA?

Online Emegra

  • Hero Member
  • *****
  • Posts: 2586
  • Karma: 54
  • Gender: Male
  • Devilishly Handsome
    • View Profile
    • Awards
Re: Will installing Windows overwrite Grub
« Reply #11 on: May 21, 2013, 06:01:24 pm »
Hi SeZo

You could be right but what I can't understand is that Peppermint booted ok after I had completely re-formatted the other drive (sdb) which I imagine would have wiped Grub if it was installed on that drive

The SATA Drive is sdb (360GB) which now has Windows 7 installed

The IDE Drive is sda (40GB) which has Peppermint installed which I can't now boot into since installing Windows 7 on sdb
If you can keep your head while all around are losing theirs, then you're not quite grasping the situation

Online Emegra

  • Hero Member
  • *****
  • Posts: 2586
  • Karma: 54
  • Gender: Male
  • Devilishly Handsome
    • View Profile
    • Awards
Re: Will installing Windows overwrite Grub
« Reply #12 on: May 21, 2013, 06:47:43 pm »
Code: [Select]
peppermint@peppermint ~ $ sudo fdisk -l

Disk /dev/sda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders, total 78165360 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000bd46b

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1        73990142    78163967     2086913    5  Extended
/dev/sda2            2048    73988095    36993024   83  Linux
/dev/sda5        73990144    78163967     2086912   82  Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/sdb: 360.1 GB, 360080695296 bytes
255 heads, 63 sectors/track, 43777 cylinders, total 703282608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000001

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048   703277504   351637728+   7  HPFS/NTFS/exFAT
peppermint@peppermint ~ $


If I'm understanding this right then SeZo was correct because it looks to me like grub is installed on sdb (Windows 7 partition), how can this be ?
« Last Edit: May 21, 2013, 07:00:43 pm by Emegra »
If you can keep your head while all around are losing theirs, then you're not quite grasping the situation

Online Emegra

  • Hero Member
  • *****
  • Posts: 2586
  • Karma: 54
  • Gender: Male
  • Devilishly Handsome
    • View Profile
    • Awards
Re: Will installing Windows overwrite Grub
« Reply #13 on: May 21, 2013, 06:57:16 pm »
Quote
The easiest would be to have different OSs' on separate hard disc caddies which are interchangeabl e. But that just my opinion. It saves a lot of aggro. No emulators, no dual booting. Thats if you have a desk top computer.

Sorry Bill I missed your post

I don't have caddies i could use but to be honest there's normally no hassle with dual booting unless you screw it up like I've managed to do but I am supremely  confident the supergurus on here will sort it out for me

Thanks for your input


Graeme
« Last Edit: May 21, 2013, 06:58:50 pm by Emegra »
If you can keep your head while all around are losing theirs, then you're not quite grasping the situation

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13575
  • Karma: 338
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Will installing Windows overwrite Grub
« Reply #14 on: May 21, 2013, 07:25:42 pm »
Boot to a LiveCD/LiveUSB of Peppermint 3

When at the desktop run these commands in sequence:
Code: [Select]
sudo mount /dev/sda2 /mnt
then
Code: [Select]
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
then
Code: [Select]
sudo chroot /mnt
then
Code: [Select]
grub-install --recheck /dev/sda
then
Code: [Select]
update-grub
now hit Ctrl+D to exit the chroot environment .. now REBOOT to the HDD (not the LiveCD/LiveUSB) to test.
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal