Help ... GRUB put on the wrong drive!

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
FulciLives
Level 1
Level 1
Posts: 38
Joined: Fri Jun 22, 2007 2:34 am
Location: Pittsburgh, PA USA

Help ... GRUB put on the wrong drive!

Post by FulciLives »

Hello.

I recently installed Linux Mint 12 LXDE and the installer behaved in a very odd fashion.

I have 3 interal hard drives:

1.) 1TB boot drive with a Windows 7 Home Premium 64-Bit install
2.) 320GB (empty)
3.) 3TB drive for personal files.

Normally the BIOS is set to boot to the 1TB drive with the Win7 install but I like to install various versions of Linux from time to time. When I do this I go into the BIOS and change the boot order of my hard drives so the 320GB drive is the boot drive. I install Linux there and all other distros also put GRUB there as well (thus I don't "touch" my main drive with the Win7 install). Usually this GRUB has an option to boot my Win7 (so I don't have to change the BIOS again although when I'm done playing with Linux I usually end up changing the boot order back and then it is like nothing ever happened).

Well I did the above procedure while installing Linux Mint 12 LXDE but somehow it managed to install itself on the 320GB HDD yet put GRUB on my 1TB HDD with the Win7 install. This is NOT what I wanted!

What can I do to get rid of GRUB from the 1TB HDD so that drive just boots straight to Windows 7 ???
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
seppalta

Re: Help ... GRUB put on the wrong drive!

Post by seppalta »

My guess is you chose the "other", or whatever it is called, category when the installer asked you where you want to put the Linux system. In the next prompt you choose the partition for / and swap, and at the bottom of that screen is a special box with sda always designated for the boot loader. It is easy to overlook this. It needs to be changed to the 320GB partition, which is unlikely to get the sda designation since the windows partition (drive) probably already claimed it, being first installed. That is why Grub ended up with Windows. The easiest solution is to reinstall Linux. Also, choose "install beside Windows" and then pick the 320GB drive for the installation and everything is automatic. Finally, grub is very smart. When Linux is installed after Windows, do an "update" and Grub automatically finds all the other operating systems and will present them at boot to choose from. No need to change anything in bios. Finally, download and install "Startupmanager" from Synaptic. Use it to pick the default system to boot and time the choice screen gives you to choose.
User avatar
FulciLives
Level 1
Level 1
Posts: 38
Joined: Fri Jun 22, 2007 2:34 am
Location: Pittsburgh, PA USA

Re: Help ... GRUB put on the wrong drive!

Post by FulciLives »

seppalta wrote:My guess is you chose the "other", or whatever it is called, category when the installer asked you where you want to put the Linux system. In the next prompt you choose the partition for / and swap, and at the bottom of that screen is a special box with sda always designated for the boot loader. It is easy to overlook this. It needs to be changed to the 320GB partition, which is unlikely to get the sda designation since the windows partition (drive) probably already claimed it, being first installed. That is why Grub ended up with Windows. The easiest solution is to reinstall Linux. Also, choose "install beside Windows" and then pick the 320GB drive for the installation and everything is automatic. Finally, grub is very smart. When Linux is installed after Windows, do an "update" and Grub automatically finds all the other operating systems and will present them at boot to choose from. No need to change anything in bios. Finally, download and install "Startupmanager" from Synaptic. Use it to pick the default system to boot and time the choice screen gives you to choose.
Actually I picked the first option in the install, which as I recall, said something like, "Install along Win7"

Other distros I've installed recently seem to have the same option BUT they put GRUB on the 320GB drive (along with my Linux install) and leave my 1TB drive alone (remember I change the BIOS before installing any Linux so that my 320GB drive is the boot drive instead of my 1TB Win7 drive). However by choosing that option the GRUB on the 320GB HDD does have the option to boot Win7 on the other HDD.

Anyway ...

In the case of Linux Mint 12 LXDE ... when I picked that first option ... it just started installing. There were no options at all. I was like "NO NO NO !!!"
Again to be clear: There was no "Are you sure you want to install" let alone any options as to where to install anything. It just started up right away. Very scary LOL

I've been playing with a lot of distros lately (including Ubuntu 12.04 Beta 1) and none of them acted like this during the install process.

To be clear GRUB works now (once switching the BIOS back to boot from the 1TB HDD) but ... sigh ... I didn't want it there and want it gone gone gone.
Kevin108

Re: Help ... GRUB put on the wrong drive!

Post by Kevin108 »

You need to figure out which drive is which. You can use Disk Utility to do so. Once you know the name of the drive you want grub on, open the terminal and run (for example) :

sudo grub-install /dev/sdb
HughT

Re: Help ... GRUB put on the wrong drive!

Post by HughT »

Hi FulciLives, I agree with Kevin108. You can install grub on the 320 GB drive using a live CD.

Code: Select all

sudo mount /dev/sdXY /mnt
replace X and Y with the appropriate drive and partition for Mint

Code: Select all

sudo grub-install --root-directory=/mnt /dev/sdX
note - there's a gap between =/mnt and /dev, and no partition number after sdX
re-boot into Mint then

Code: Select all

sudo update-grub
I believe that you'll still have to remove grub from the Windows drive using a Windows disk.
hope this helps, regards
oldfart

Re: Help ... GRUB put on the wrong drive!

Post by oldfart »

I don't think any of the answers you got are the correct one so I am throwing this out.

Hopefully you still have a computer that has internet access. Do a search for the "ultimate boot disk". This disk should allow you to boot into windows. Then from the command line input fdisk /mbr. That should allow you to boot into windows again.

But my advice is don't do that. Stop using training wheels and use linux all the time. In other words stop playing with linux and use linux. If you had been doing that you wouldn't have needed to ask this question in the first place.
Kevin108

Re: Help ... GRUB put on the wrong drive!

Post by Kevin108 »

Why do you disagree with my post? I have an IDE drive I keep my ol' reliable Mint 11 install on (/dev/sda) then I have a dying 500 GB SATA drive (/dev/sdb) I use to test other versions and distros. When I install something new, I let it install GRUB to sdb. I boot into Mint 11 and use GRUB Customizer to clean up the menu so it doesn't confuse my fiance, then I run sudo grub-install /dev/sbd to copy my optimized GRUB menu (complete with one of our engagement photos) to the SATA drive, which is what I have BIOS set to boot from.
boosted

Re: Help ... GRUB put on the wrong drive!

Post by boosted »

If you have the Windows7 disk, boot from it and go into recovery area - dos prompt.
The command you want is 'bootsect /nt60 SYS /mbr'
http://www.sevenforums.com/tutorials/20 ... ecord.html

I would recommend using the manual option to setup your drive. As your've seen not all distributions give you the option
to select the drive for the boot loader.
Zion

Re: Help ... GRUB put on the wrong drive!

Post by Zion »

FulciLives wrote:Hello.

I recently installed Linux Mint 12 LXDE and the installer behaved in a very odd fashion.

I have 3 interal hard drives:

1.) 1TB boot drive with a Windows 7 Home Premium 64-Bit install
2.) 320GB (empty)
3.) 3TB drive for personal files.
Well I did the above procedure while installing Linux Mint 12 LXDE but somehow it managed to install itself on the 320GB HDD yet put GRUB on my 1TB HDD with the Win7 install. This is NOT what I wanted!
What can I do to get rid of GRUB from the 1TB HDD so that drive just boots straight to Windows 7 ???
Same thing happened to me yesterday I was installing Linux Mint 12 LXDE on my second HDD ,but it seems installer put GRUB on my first HDD (where is my Windows 7 all my data) .I´ll try to use windows 7 DVD tommorow and repair boot.

EDIT:

I used this two commands

Code: Select all

sudo grub-install /dev/sdb

Code: Select all

sudo update-grub
and got access to my Windows 7 HDD,even though its thru GRUB I´m happy my data is here.
Huge thanks goes to all users (and to users above me for those commands) who helped me yesterday on IRC.
User avatar
FulciLives
Level 1
Level 1
Posts: 38
Joined: Fri Jun 22, 2007 2:34 am
Location: Pittsburgh, PA USA

Re: Help ... GRUB put on the wrong drive!

Post by FulciLives »

Thanks I got it to work ... at least in so far as getting it onto the right HDD.

Now I guess I need to use my Windows install disc to get rid of it on the other HDD.

Thanks for the help!
User avatar
FulciLives
Level 1
Level 1
Posts: 38
Joined: Fri Jun 22, 2007 2:34 am
Location: Pittsburgh, PA USA

Re: Help ... GRUB put on the wrong drive!

Post by FulciLives »

Actually is there a way to edit GRUB so it only points to my Windows install ?
Kevin108

Re: Help ... GRUB put on the wrong drive!

Post by Kevin108 »

Are you trying to make Windows boot by default?
User avatar
FulciLives
Level 1
Level 1
Posts: 38
Joined: Fri Jun 22, 2007 2:34 am
Location: Pittsburgh, PA USA

Re: Help ... GRUB put on the wrong drive!

Post by FulciLives »

Kevin108 wrote:Are you trying to make Windows boot by default?
Is it possible to edit GRUB so it only looks for and shows my Windows install (and of course boots to it by default)?
wayne128

Re: Help ... GRUB put on the wrong drive!

Post by wayne128 »

What can I do to get rid of GRUB from the 1TB HDD so that drive just boots straight to Windows 7 ???


To be clear GRUB works now (once switching the BIOS back to boot from the 1TB HDD) but ... sigh ... I didn't want it there and want it gone gone gone.

Is it possible to edit GRUB so it only looks for and shows my Windows install (and of course boots to it by default)?
From reading your posts, I think all you want is no other boot loader else except Win7 on your 1TB drive.

You do not have any problem to boot into Win7 drive, I think you did it by setting bios to boot from 1TB drive. but then you get grub menu :evil:

Well , nevermind, this kind of things happen when you are constantly 'playing' with new Linux OS...

Of course they are ways to get around.
Here is what I would suggest.. do at your own risk :lol: :lol:
1. boot comp, go to bios, select win7 1TB drive
2. it should boot and run win7
3. goto http://neosmart.net/EasyBCD/
download EasyBCD, install it, run it in win7, add entry , select grub2, put in your whatever name for you to boot other drive that has lots of linux.
4. inside the EasyBCD, there is a way to install boot loader to MBR, I cannot remember how it look like, anyway, you choose that, let win7 take over MBR.

EDIT, watch this video, MBR is somewhere after 8minutes
http://www.youtube.com/watch?v=ntTRdkkG ... re=related

5. reboot computer, see what happen... do at your own risk :lol: :lol:
Kevin108

Re: Help ... GRUB put on the wrong drive!

Post by Kevin108 »

Not sure on Windows 7 but in XP you would boot from the CD, load the recovery console and run FIXMBR at the command line. That would overwrite Grub with Windows standard stuff.
Locked

Return to “Software & Applications”