LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-17-2007, 03:12 PM   #1
Umagarz
LQ Newbie
 
Registered: Dec 2006
Location: Annisse (Denmark)
Distribution: Ubuntu
Posts: 9

Rep: Reputation: 0
Boot with grub instead of Windows


Hi...

After installing windows on my laptop, my grub won't load.
Windows starts as it was the only OS on my HD.
I have tried to reinstall grub on the master boot record, but it didn't work.
So what can I do to reinstall grub so I can use my Ubuntu again (with windows as a second OS)?
 
Old 05-17-2007, 03:16 PM   #2
Vincent_Vega
Member
 
Registered: Nov 2003
Location: Jacksonville, FL
Distribution: Slackware & Arch
Posts: 825

Rep: Reputation: 31
You need to run grub-install /dev/hda to put grub back on the MBR, assuming hda is the correct drive designation for your laptop.
 
Old 05-17-2007, 03:23 PM   #3
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Pop the Ubuntu CD into the drive to boot it up.

Click terminal, then type
Code:
sudo grub
geometry (hd0)
take note of the first partition with Type 83, my guess is partition 1 if partition 0 has Windows inside. Assuming the "/" of your Ubuntu is in this partition known to Grub as (hd0,1) then Grub will be back if you type
Code:
root (hd0,1)
setup (hd0)
quit
reboot
The grub-install /dev/hda suggested by Vincent Vega also works but you need to mount the UBuntu partition first and "change root" into it. It is described as Task B4 in the last link of my signature. The retoration of Grub by a Grub shell above is labelled as Task B4 in the same link.

Last edited by saikee; 05-17-2007 at 03:27 PM.
 
Old 05-18-2007, 03:52 AM   #4
Umagarz
LQ Newbie
 
Registered: Dec 2006
Location: Annisse (Denmark)
Distribution: Ubuntu
Posts: 9

Original Poster
Rep: Reputation: 0
that was it !
thank you...
 
  


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
grub question changing boot order making windows boot first nfsutim Linux - Newbie 29 10-27-2012 12:53 PM
dual boot - Grub won't boot Windows on /windows/D partition biosol Suse/Novell 9 04-09-2006 08:14 PM
GRUB dual boot problem: Boot "other" (windows) just restarts GRUB! stevod333 Linux - Software 13 04-06-2006 05:26 AM
GRUB using /boot partition for multiple Linux/Windows boot? cpv204 Linux - Newbie 7 04-01-2003 03:54 PM
How to add a boot record which used to startup windows under my Grub boot loader? yunxiang Linux - Newbie 6 02-01-2003 02:22 AM


All times are GMT -5. The time now is 01:45 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration