LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-14-2014, 04:29 AM   #1
SteveH_66
LQ Newbie
 
Registered: Feb 2012
Posts: 16

Rep: Reputation: Disabled
Win 7 messed up grub, had to reinstall, want to do dual boot right


Hi all, I was dual booting before, Windows 7 and Linux Mint 12, checking out Linux to see if I like it which I did. Well, I am wanting to install Linux Mint 17, but I want to do it right and not run into the same problem I just went through.

Here's what happened: Somehow Win 7 corrupted my grub boot loader, I know it was Win 7 because I haven't used Mint in a couple of weeks. I am having to reinstall both of them, and it was a fight to get them off of there. Mint put grub somewhere it was impossible to track down, and I had to wipe all the partitions to get rid of it.

In doing my research to try to find out the problem, I read in a couple of places that this was a real problem with Mint, and known, especially with Win 7 thrown into the mix - something about where Mint puts the grub boot loader. I can attest to the fact that it was a tough job getting rid of grub cause I basically could not find it and had to reinstall windows 7 with a disk format.

So here's what I want to do. I want to install a distro that is easy to install and user friendly to new users, I liked the looks of Mint but I'm not stuck on it - if there is another distro that will help me avoid this problem in the future, I would be willing to take a look at it. Would prefer one with different desktops available that I can check out. And as I said earlier, fairly user friendly to new users, as I am still not too experienced with Linux. Also, something that is good on a laptop that is 2 or 3 years old.

And are there any suggestions how to do this in a way so that Win 7 can not mess up everything and I have to go through days of reinstalling? I have to keep dual boot, but I don't want this happening again. I thought different partitions, but I don't know enough about Linux to know if this alone would solve the problem. In the Mint forums they stated that Win 7 had to be installed first to avoid this problem, but obviously Windows found a way to mess it up anyway. If the best way is to uninstall Win 7, install Linux first, and then reinstall Windows then I would be willing to do so - I want to avoid this problem again. I want dual boot and a way to make Windows mind it's manners, if this is possible - somehow I have doubts on that score.

Suggestions needed and most wanted. Thank you
 
Old 07-14-2014, 05:09 AM   #2
NGIB
Member
 
Registered: Sep 2013
Location: Sumter SC, USA
Distribution: Manjaro, Sparky, Others...
Posts: 448

Rep: Reputation: Disabled
If you are installing Windows and Linux in a dual boot, always install Windows first. Windows does not respect any other OS and always assumes it is "king". Once Windows is installed and running, install the Linux distro of choice. When you get to the installation of the bootloader, usually GRUB, tell it you want to install on the MBR of your Windows drive. It will install GRUB to the MBR, detect all available OSs, and all should go well. I've done this 100s of times and it always works as long as Windows is installed and setup first.
 
2 members found this post helpful.
Old 07-14-2014, 06:57 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,724

Rep: Reputation: 2121Reputation: 2121Reputation: 2121Reputation: 2121Reputation: 2121Reputation: 2121Reputation: 2121Reputation: 2121Reputation: 2121Reputation: 2121Reputation: 2121
All superstition and folklore.

There is *no* requirement to install Win7 before (any) Linux. Sure Win7 will overlay the MBR and (apparently) delete access to Linux, but this is easily fixed from a liveCD and/or chroot. No need to re-install either system.
Deal with the real issue, not with symptoms.

To the OP, go with Mint17 and be happy - and if Win7 screws up the dual-boot, just ask. If I can find a decent how-to online, I'll post here.
 
1 members found this post helpful.
Old 07-14-2014, 06:59 AM   #4
NGIB
Member
 
Registered: Sep 2013
Location: Sumter SC, USA
Distribution: Manjaro, Sparky, Others...
Posts: 448

Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
All superstition and folklore.

There is *no* requirement to install Win7 before (any) Linux. Sure Win7 will overlay the MBR and (apparently) delete access to Linux, but this is easily fixed from a liveCD and/or chroot. No need to re-install either system.
Deal with the real issue, not with symptoms.

To the OP, go with Mint17 and be happy - and if Win7 screws up the dual-boot, just ask. If I can find a decent how-to online, I'll post here.
Not superstition at all. Windows WILL break Grub which then requires repair. Installing Windows first prevents this from happening. What misinformation did I provide?

Experts would not be asking for simple solutions so the simplest solution is to install Windows first.

Last edited by NGIB; 07-14-2014 at 07:01 AM.
 
1 members found this post helpful.
Old 07-14-2014, 08:40 AM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,281

Rep: Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381
syg00 said there is no "requirement" windows be installed first. You didn't say it was "required" but easier and I think his point was that it is a simple matter to reinstall Grub after a windows install. In this particular case, the OP hasn't told us what happened to corrupt the bootloader. Also his comment about where "mint puts the bootloader" means he is not familiar with Grub2 as it is the same as used on Ubuntu and numerous other distributions. A simple command: sudo grub-install /dev/sda might have resovled the issue but not enough information was posted to know.
 
1 members found this post helpful.
Old 07-14-2014, 11:55 AM   #6
SteveH_66
LQ Newbie
 
Registered: Feb 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
Additional Information

OK, I saw the comment about not posting enough information about how Win7 got messed up and took grub down with it. The truth is, after almost 30 years of using computers I still can't tell you all the ways Windows or the program developers for it can do that - I wish I knew them all, I believe I could make a substantial income in the computer field if I could. My first (that I seriously used) computer was a Commodore Colt with dual 5 1/4 floppies, you ran the programs from one and stored the data on the other. Back then I was even a fair hand at bat file scripting.

Anyway, here is what started happening. In Win7, my most noticeable problem was a loss of my wireless capability. Numerous unistall/reintstalls of the proper wireless driver, latest version from the Acer site for my exact model didn't fix it. It was gone, never to be heard from again. So, I was tied to a network cable, something I don't like on a laptop - I actually use them that way, on my lap, and the fewer cables in the way the better.

So, I decided to take a look at Linux again, being frustrated with Win7. Booted up to Linux, but there was a problem, Linux Mint 12 refused my password. Without full drive encryption for serious security, I just use the same password for Linux and Win7 - since everyone knows if you can get your hands on the computer physically then a live disk gives you everything on the hard disk, as far as I know anyway. I run zone alarm firewall & antivirus plus 4 malware programs so I figure I'm about as safe as you can get from the Internet with Win7. So, when Mint refused my password, I started getting a bad feeling about things.

Now at this time, being able to boot Win7 still and Mint 12 coming up but saying incorrect password, and with Win7 suddenly not wanting to run my wireless, I was getting a bad feeling. But still not too worried yet. Downloaded a live disc of Mint 17 KDE, wanted to test some things out. The live disc booted up fine, and under it my wireless worked fine. A couple weeks before this, I got system crashes under Win7 three nights in a row, and the people at sevenforums were trying to help me diagnose that, but they suddenly stopped happening before I could get log captures to post to that forum.

Then, a couple of days ago I got an error message.
error: that partition does not exist.
grub rescue: _
(the error message to the best of my recollection.)

So now, I couldn't boot into either system. The message indicated to me a corrupted GRUB. So, I started researching that message. I did a google search, tried all the suggested methods for restoring the grub with a live CD. None of them worked, and I was sitting there with a system that would only boot to the Mint Live CD. Checked forums and posts and blogs about restoring the GRUB, tried them all, many were repeats of the processes I had already tried from previous posts. Got tired of that, wiped the system and reinstalled Win7 from the disk.

So, now here I am. I have a fresh install of Windows 7, did that first because I plan to dual boot and I had read in numerous posts if you don't put Windows 7 on first, it will hose the GRUB. I am going to put on the bare minimum of what I consider essential programs in Win7 for me, then I am going to get an Image of Win7 so I can restore it more easily in the future. Then, I am going to set up Linux on the system with dual boot. I am actually thinking about installing a couple of distros so I can look at more than one and see if I like one better than the other.

So basically what I am wanting to do now is install a couple of different Linux distros to take a look at, or possibly 2 versions of the same distro with different desktops and try them a while, then switch out to a different one and see if I can find a distro & desktop version that I like. Keep that, and have the other partition for trying other distros I read about and decide to take a look at.

So basically I am wanting to know how to protect the GRUB from Windows 7 in case of a future reinstall of Windows 7. Once I have an image that shouldn't be too hard to do, and I have a feeling I WILL be having to reinstall Win7 again, or move the image over. It was actually overdue for it, I have had problems with Windows 7 for a while now, for example it was taking 5 minutes to boot up from powered down under Windows 7 - booted in about 30-45 seconds under Mint 12. Defragging the disk and the registry under Windows 7 didn't help, still slow boot and a lot of memory tied up under Windows 7.

So as I said, I am basically wanting to find out how to protect the GRUB from Windows 7 reinstall, and if that isn't possible how to easily reinstall it from a backup or something if it does get messed up again. Because I had a couple of fun days trying to FIND the GRUB (never did) or fix it - never could. Thanks
 
Old 07-14-2014, 12:10 PM   #7
SteveH_66
LQ Newbie
 
Registered: Feb 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
P.S. Thanks for the posts you folks have already made, I did try the methods outlined in the posts I found from a google search. sudo grub-install /dev/sda2 (which showed as the boot sda in a run of fdsk -l I did) didn't work. As I said, none of the fixes I could find worked. If this happens again in the future, I will come here and see if you good folks can help me through a GRUB2 restore. Hopefully I won't face one that hard again lol.
 
Old 07-14-2014, 12:20 PM   #8
NGIB
Member
 
Registered: Sep 2013
Location: Sumter SC, USA
Distribution: Manjaro, Sparky, Others...
Posts: 448

Rep: Reputation: Disabled
If you install/reinstall Windows it will overwrite the MBR every time. If you plan on doing lots of installs, I highly suggest making yourself a bootable USB drive containing "rescue" software. I use Parted Magic as it has all the tools I need to fix most problems. The Grub Doctor in Parted Magic would have fixed your issues with just a few clicks...
 
1 members found this post helpful.
Old 07-14-2014, 12:48 PM   #9
SteveH_66
LQ Newbie
 
Registered: Feb 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
Thanks NGIB, I was looking around at some other posts and I think on the 'trying different distros' thing I am going to go with a suggestion in another post to install VM and test the different flavors that way, less install uninstall. As for Parted Magic, I used Hiren's boot disk and under the Linux option it brought up a version of linux that had Parted Magic if I remember correctly. I couldn't fix it with that, maybe it was an older version of it, or maybe I just wasn't looking in the right spot. Not very familiar with Hiren's either. I will do a search and read up more on Parted Magic, if there is a rescue disk with Parted Magic on it maybe I can figure out how to use it to restore the GRUB. If not I'll be back! With questions Thanks
 
Old 07-14-2014, 12:52 PM   #10
NGIB
Member
 
Registered: Sep 2013
Location: Sumter SC, USA
Distribution: Manjaro, Sparky, Others...
Posts: 448

Rep: Reputation: Disabled
The last free version of Parted Magic was from August 2013 and it included Grub Doctor - it's still available for download on the web - just Google it.

Grub Doctor is very simple - you choose the partition that contains your linux install and it will reinstall Grub to the MBR and your linux /boot directory...
 
1 members found this post helpful.
Old 07-14-2014, 01:03 PM   #11
wizard10000
LQ Newbie
 
Registered: Jun 2014
Location: midwestern us
Distribution: debian unstable
Posts: 17

Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
All superstition and folklore.

There is *no* requirement to install Win7 before (any) Linux. Sure Win7 will overlay the MBR and (apparently) delete access to Linux, but this is easily fixed from a liveCD and/or chroot. No need to re-install either system.
Deal with the real issue, not with symptoms.

To the OP, go with Mint17 and be happy - and if Win7 screws up the dual-boot, just ask. If I can find a decent how-to online, I'll post here.
I don't do dual-boot machines any more but it's always been my preference to let the Windows bootloader chainload grub rather than the other way around; that way you can reinstall either OS without trashing the other one. Here's how I do it -
  • Install Linux. Make sure grub installs on the first Linux partition **instead of the MBR**
  • Install Windows.
  • Start Windows and download and run bootpart (XP) or EasyBCD (Vista and later). It will find your Linux installation, copy the Linux boot sector to the root of the Windows drive and create a boot menu entry to call grub.

It's a little bit more work but it pays off if you ever have to reinstall Windows.

edit: You can also create the Linux boot sector image with dd; but bootpart or EasyBCD is considerably easier.
 
1 members found this post helpful.
Old 07-14-2014, 01:16 PM   #12
SteveH_66
LQ Newbie
 
Registered: Feb 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
Thanks Wizard10000. I downloaded EasyBCD and another program called Rescatux, going to try to burn both of those and check them out. That operation doesn't sound too complicated, so I might try that. Can I use EasyBCD to uninstall Windows? I've done a lot of re-installs of Windows when it got corrupted, but I can't ever remember uninstalling it. And if something happens and I have to copy the Win7 image back to the system, EasyBCD will allow me to fix the GRUB again? Thanks

Last edited by SteveH_66; 07-14-2014 at 01:19 PM. Reason: additional question
 
Old 07-14-2014, 01:20 PM   #13
wizard10000
LQ Newbie
 
Registered: Jun 2014
Location: midwestern us
Distribution: debian unstable
Posts: 17

Rep: Reputation: Disabled
Quote:
Originally Posted by SteveH_66 View Post
Thanks Wizard10000. I downloaded EasyBCD and another program called Rescatux, going to try to burn both of those and check them out. That operation doesn't sound too complicated, so I might try that. Can I use EasyBCD to uninstall Windows? I've done a lot of re-installs of Windows when it got corrupted, but I can't ever remember uninstalling it. Thanks
If grub was installed on the MBR your Windows reinstall trashed it and you'll need to reinstall grub at least; my suggestion is to install grub on the first Linux partition then boot into Windows and run EasyBCD. It'll find grub, make the proper changes to your Windows partition and you'll be able to select Linux from a Windows boot menu.

edit: To answer the question about Windows breaking grub; if grub is not installed on the MBR Windows can't break it; so yes - once you get things running if you need to reinstall Windows you just run EasyBCD afterward. It finds grub, adds it to the Windows boot menu and away you go

Good luck!

Last edited by wizard10000; 07-14-2014 at 01:22 PM.
 
1 members found this post helpful.
Old 07-14-2014, 02:10 PM   #14
jross
Member
 
Registered: Apr 2014
Distribution: Xubuntu 14.04
Posts: 164

Rep: Reputation: Disabled
This is not something I know anything about, but I think this video is similar to Wizard10000's method??:

http://youtu.be/xlTgaWs9BD0
 
1 members found this post helpful.
Old 07-14-2014, 03:52 PM   #15
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,281

Rep: Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381
Quote:
Then, a couple of days ago I got an error message.
error: that partition does not exist.
grub rescue: _
That error occurs when a partition has been deleted or there have been changes make to partitions or to uuids. If you had a Mint partition and your deleted it or a Mint boot partition and deleted it or formatted it, that would certainly be expected. Don't know what actually happened.

Quote:
I did try the methods outlined in the posts I found from a google search. sudo grub-install /dev/sda2
That won't help. You installed Grub to the partition not the mbr, it might have worked if you changed sda2 to sda but if you did not have the boot files on the Mint partition, that would not work either.

Quote:
Can I use EasyBCD to uninstall Windows?
No. EasyBCD is software used to boot different systems. You don't uninstall operating systems like windows or Linux, you uninstall applications. If you want to get rid of a system, you select its partition and format it and install something else to the same partition. I'm not sure EasyBCD can boot multiple Linux systems but you can chainload other Linux systems from the Linux bootloader. My understanding of EasyBCD is that is a modified version of Grub built to run on windows (Grub4Dos).

If you have to reinstall windows 7, you will probably have to reinstall EasyBCD as it is generally just downloaded and run from within windows. I seem to recall the possibility of putting it on a CD and making it bootable but it has been years since I used it.

I you are going to be trying multiple systems, something like VirtualBox would probably be the easiest and you should not have to worry about corrupting the bootloader.

Last edited by yancek; 07-14-2014 at 03:54 PM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Having to reinstall my Ubuntu on my Win 7 dual boot :( cavibird Linux - Laptop and Netbook 4 12-27-2009 02:12 AM
how to reinstall grub (only) again to have dual boot avd122 Linux - Laptop and Netbook 1 01-09-2009 10:21 PM
How to reinstall Win XP on dual boot systemand leave SUSE 10.0 intact riba43 SUSE / openSUSE 11 02-15-2006 08:04 AM
Dual Boot messed up my Win-partiton josgas Linux - Newbie 2 12-27-2004 09:04 AM
Messed up when installing linux, erased win Me...Need to reinstall is it possible?re wolfyheart Linux - Newbie 6 10-23-2001 11:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration