Installed Windows 7, now Ubuntu won’t start
Ubuntu was working absolutely fine, but you thought of trying Windows 7. Earlier you were doing a dual boot with Windows Vista or XP and Ubuntu.
After Microsoft launched Windows 7 on October 22nd, you got inspired to use Windows 7 as well because you were frustrated with Vista. You got the Windows 7 installation CD and installed it on your computer.
Surprisingly, now your computer always boots in Windows 7 and you don’t even get an option to select Ubuntu. What the heck??? Where is my Ubuntu? How do I boot in Ubuntu now? Did Windows 7 overwrite it?
Well nothing like that happened except the fact that Windows 7 recreated the MBR (Master Boot Record), a record that tells the operating system from where to boot from. That’s why you don’t see the old GRUB you were used to. Don’t worry, I can help you fix it.
You will need:
- Ubuntu Alternate installation CD. (Not the Live CD) If you don’t have it, just download the latest file and burn it on a CD/DVD.
- Patience and concentration; because you are going to modify GRUB in a command line interface.
- Probably a cup of coffee.
Steps to follow:
- After you have Ubuntu Alternate installation CD in hand, REBOOT the computer with CD in the CD/DVD-ROM.
- As soon as manufacturer splash screen comes up, press a hot key (F3, F8 or F12 depending on OEM). On my Dell it is F12.
- That will boot you computer through CD and not from the hard-drive. You will see Ubuntu screen which you saw when you installed it earlier.
- Select “Rescue a Broken System” and hit Enter.
- Let it detect your hardware, keyboard and network etc.
- After that it will give you an option to select disk.
- You need to select the disk where you installed Ubuntu earlier, something like /dev/sda1, /dev/sda2 or /dev/hda1 etc etc.
- If you don’t remember it, don’t worry. You can use trial and error method because it won’t do anything unless you select the one which has the original GRUB. That will be mounted as ‘/’. In my case it was /dev/sda8.
(I selected wrong many times, but it didn’t do anything until I selected /dev/sda8) - Select ‘Execute a shell in…”. Some line of code will run on the screen and you will be presented with the command prompt.
- Enter “# mount -a”.
- Enter “# df” to get the list of partitions.
- Search for the partition with ‘/’ as the mount. Note down the partition name, similar to previous step. Something like ‘/dev/sda8′ etc.
- Enter “#grub-install <partition without the number>”. For example, if you noted /dev/sda8′ then enter /dev/sda only.
- That’s it. If everything goes well, you will see “No error found. Installation finished properly.”
- Enter “#exit”
- Reboot your computer. You will see the same old GRUB again where you can select the operating system you want to boot in.
Enjoy the best of both worlds – Ubuntu 9.10 (Karmic Koala) and Windows 7. The steps remain same for any version of Windows and Ubuntu and any other Linux distro.
Hope you find it easy to follow. If you have any question/suggestion, drop in the comments and let us know what do you think. Probably you use some other method to regain access to your MBR file and to modify GRUB. Let us hear it in comments.




Posted under:
This may be a silly question (but I am a silly person, so I am ok with that). I was curious when you said “Ubuntu Alternate installation CD. (Not the Live CD)” does that simply mean that I should have an install disc as opposed to the ISO image (like the one I used to install Ubuntu)? Or is there a file I need to download to make this disc?
That’s a nice question. Actually most of the newbies in Linux world don’t know that Live CD and alternate CD are two different things because of the way the install the operating system.
Live CD is generally provides graphical user interface (GUI) and hence you don’t have to enter any UNIX command to run the applications.
Alternate CD files are different and while installation you don’t generally get the graphical interface. While installation you will see Blue and gray screens which receives only keyboard inputs. Your mouse won’t work. (At least I have seen that way).
So in short, you need to download a separate Ubuntu file. Search for “alternate” in the file name and then burn it on a CD/DVD and follow the instructions above.
Hope this information helps you understand the difference between Live and Alternate CD.
Thanks
Thank-you, that helps tremendously!
The alternate file I downloaded and burned to a CD was “karmic-alternate-i386.iso”. This is probably the one most users will need.
Yea that’s the one you need if you have an Intel PC. You will need
“karmic-alternate-AMD.iso” for AMD processor.
Thanks
Anurag Bansal
Thank-you for the suggestion, I found “ubuntu-9.10-alternate-amd64.iso” and am working on getting it downloaded, hopefully by tomorrow I will be able to get Ubuntu back up and running
Yes, That’s the one you need.
Make sure you have an AMD processor, else you will need the ubuntu-9.10-alternate-i386.iso.
Welcome to Ubuntu world.
Have a wonderful day!
Thank you very much for this advice on how to restore the Grub menu after the Windows 7 installation messed it up. Your steps worked perfectly for me!
You are very welcome my friend.
[...] Installed Windows 7, now Ubuntu won’t start [...]
Anurag: My TomTom works on Linux, Blackberry on it own OS and Palm has its own. I don’t bother on having a MS OS on it.
What is the benefit of having two operating system on PC ? I am just curious …
The gadgets you have mentioned are all Mobile devices. There are some Windows based mobiles too.
But in this article I was talking about PC and laptop having a Windows OS.
To your question: There are tremendous benefits of having two OS on a PC.
1. You can experience the best of both worlds.
2. If one becomes unresponsive then also you can finish your work.
3. You can try different applications and learn about them. (Good for techie people who want to play with different things.)
4. Ubuntu has some inherent benefits that can’t be replaced by Windows and vice versa.
5. Ubuntu is blazingly fast, though Windows is sometimes…you know
etc. etc…
Hope I answered your question.
RT @technomania Installed Windows 7, now Ubuntu won’t start http://bit.ly/1i8VBK
9.10 is Karmic Koala. 9.04 is Jaunty Jackalope.
Also, can’t you go to your advanced system settings and change your boot setup to be able to select your operating system and the amount of time for selection? Then you wouldn’t necessarily NEED grub.
Thanks Andy for correcting me. Didn’t notice that while writing.
I am not sure about the Advanced system settings. I will have to check about it.
Can you point us to any article or tutorial about it? How does the option looks like?
I’m not currently at home. I’ll try to check it out tonight and let you know. Maybe I’ll even write a post about it.
Thanks Andy, I appreciate your help. In fact, I will appreciate if you can write a guest post for Knowliz, if you don’t mind. That can go well with this article and hence improve its relevance.
Let me know if you have any question or suggestion.
Cheers…
New Post: Installed Windows 7, now Ubuntu won’t start #knowliz Plz RT http://bit.ly/4vcect
New Post: Installed Windows 7, now Ubuntu won't start. A complete how-to. http://bit.ly/1MMSPH Plz RT.
RT @technomania Installed Windows 7, now Ubuntu won’t start http://bit.ly/1i8VBK
[...] This post was mentioned on Twitter by Anurag Bansal, Anurag Bansal. Anurag Bansal said: New Post: Installed Windows 7, now Ubuntu won't start. A complete how-to. http://bit.ly/1MMSPH Plz RT. [...]