LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   grub recovery after installing windows 7, debian squeeze in 2nd partition (https://www.linuxquestions.org/questions/linux-newbie-8/grub-recovery-after-installing-windows-7-debian-squeeze-in-2nd-partition-930581/)

Foxbat1155 02-21-2012 04:51 PM

grub recovery after installing windows 7, debian squeeze in 2nd partition
 
My laptop has debian squeeze and I installed windows 7 after it, on the remaining unused space (20g).

After windows install grub does not load.

I have tried several solutions using the ubuntu 10.10 livecd.

I have tried this one:

http://www.lancelhoff.com/restore-gr...lling-windows/

And this one:

http://kasunweranga.blogspot.com/201...nstalling.html


However I have had no success.

What should I do?

I have tried to mount all the sda's that seemed relevant, none worked.

Foxbat1155 02-21-2012 05:36 PM

I am trying this:

http://www.linuxquestions.org/questi...71#post4608671

Its not working.

Foxbat1155 02-21-2012 05:50 PM

progress so far
 
I have entered my Debian install through rescueccd and have reinstalled grub. However now I cannot boot windows, it does not show on grub..

Any help please?

syg00 02-21-2012 06:14 PM

Which grub (grub-install -v) ?.

Don't worry about that - we need more info. go here, do as it says and post the RESULTS.txt

Foxbat1155 02-21-2012 06:16 PM

Solved.
 
I managed to solve this on my own after reading some sites on grub2 and improvising on a crazy personal idea I did not expect to work:

My solution:

1 - use rescuecd 2.4.1 CD and boot it choosing it in BIOS startup

2 - boot your installed linux via rescuecd, it is one of the possible options in the first menu

3 - after entering your installed linux, use aptitude (for example) to purge grub, and then install it again

4 - mount your windows 7 (in my case it was in sda1)

5 - simply run update-grub (as root)

To my amazement, this worked, I initially thought this would be kind of crazy, too good to be true, but grub interpreted the windows boot correctly and loaded it as I expect it will load in your case.

So this is a confirmation it worked in my case, please tell me if it worked for you..

Thanks anyways everyone.

---------- Post added 02-22-12 at 00:17 ----------

Quote:

Originally Posted by syg00 (Post 4608692)
Which grub (grub-install -v) ?.

Don't worry about that - we need more info. go here, do as it says and post the RESULTS.txt

I was writing my improvised solution as you wrote this. Just to say thanks but it is fixed.

Foxbat1155 02-21-2012 06:19 PM

svg00 do you still want me to get that results.txt?

syg00 02-21-2012 06:31 PM

No, you fixed it already ;) - might be interesting for you to look at though.

Keep forgetting - with Debian, update-grub works regardless .... d'oh

Foxbat1155 02-21-2012 06:32 PM

You mean to say it does not work with other distributions?

EDDY1 02-21-2012 06:45 PM

So can you tell us which of the tutorials + your revision helped you, so that others including myself will know what to do in the future?
Quote:

You mean to say it does not work with other distributions?
It works with debian-based os'es,not sure of any others.

syg00 02-21-2012 07:15 PM

It isn't part of the original grub package. Grub2 shows its Debian heritage in lots of ways.

Foxbat1155 02-21-2012 09:17 PM

Quote:

Originally Posted by EDDY1 (Post 4608716)
So can you tell us which of the tutorials + your revision helped you, so that others including myself will know what to do in the future?
It works with debian-based os'es,not sure of any others.

Ok I suppose I can search my browser history:

I visited dozens of sites, these were the most useful:

https://help.ubuntu.com/community/Grub2

http://www.dedoimedo.com/computers/grub-2.html

http://linuxers.org/howto/how-config...ub2-ubuntu-910

----------------------------------------------------------------------------------------------

However I must say that what triggered my solution was seeing how grub could update its bootloader and thinking that perhaps he wasnt loading the Windows boot because the NTFS partition was not mounted and maybe if it was, perhaps grub could read the boot windows file and recognize it and load it.

I must emphasize none of this is implied in the sites I have mentioned, I did not read them, merely read them "diagonally", as it is usually said, fast searching for a reference to configuring the bootloader.

Kind of a crazy stroke of chance, as it just sounded too simple to me to actually be a solution to this problem.

Foxbat1155 02-21-2012 09:25 PM

I must say I was seconds away from re-installing debian squeeze avec fluxbox for it would have taken me less time and pain than the hours spent resetting the computer, trying the live cd's, etc..

It is just so easy to install debian and customizing it after you finish preparing your .emacs ; startup ; keys ; .bashrc ; Xdefaults ; sources.list files. Just cp them.

Everything the way you always wanted it.

sundialsvcs 02-21-2012 09:28 PM

Y'know, on the one hand, Grub is a fantastic boot-loader, seeing as how it's controlled by ordinary files and it knows how to read file-systems and all that ... but, on the other hand, it is "just a boot loader," and its ability to recover from, specifically, errors in the menu-file are really (and understandably) quite limited.

If there is one most-basic survival skill that you need to master in this business, and to master quickly, it is how to use a stand-alone so-called "live CD" to recover any sort of system. (Very useful for Windows troubleshooting too.)

Foxbat1155 02-21-2012 09:31 PM

Indeed. Arguably one of the strongest arguments for knowing your linux.


All times are GMT -5. The time now is 06:39 AM.