LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-11-2010, 09:11 AM   #1
littlebigman
Member
 
Registered: Aug 2008
Posts: 553

Rep: Reputation: 33
Question Installing Grub from scratch to boot Windows?


Hello

Since CloneZilla doesn't include the MBR when saving a partition into a file, I need to take care of this myself.

With a working XP in /sda1, I'd like to...
1. Boot with a Linux live CD
2. replace the Windows MBR with Grub, ie. without any Linux already installed
3. save Grub's configuration files into /sda2 (which is ext2fs-formatted)
4. add XP to Grub

Has someone done this and could explain what the steps are?

Thank you.
 
Old 01-11-2010, 09:21 AM   #2
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,596

Rep: Reputation: 80
1/ copy the grub files from the live CD (in /boot/grub) to (/dev/sda2)/boot/grub
2/ edit the (/dev/sda2)/boot/grub/menu.lst: suppress any entry and add the following one:
Code:
title Windows
rootnoverify (hd0,0)
makeactive
chainloader +1
3/ install grub on the mbr:
Code:
sudo grub
grub> root (hd0,1)
grub> setup (hd0)
 
Old 01-11-2010, 09:29 AM   #3
cola
Senior Member
 
Registered: Sep 2007
Location: Dhaka,Bangladesh
Distribution: Debian
Posts: 1,032

Rep: Reputation: 64
Quote:
Originally Posted by littlebigman View Post
Hello

Since CloneZilla doesn't include the MBR when saving a partition into a file, I need to take care of this myself.

With a working XP in /sda1, I'd like to...
1. Boot with a Linux live CD
2. replace the Windows MBR with Grub, ie. without any Linux already installed
3. save Grub's configuration files into /sda2 (which is ext2fs-formatted)
4. add XP to Grub

Has someone done this and could explain what the steps are?

Thank you.
Is it solved after following the instructions of Agrouf?
 
Old 01-11-2010, 12:26 PM   #4
littlebigman
Member
 
Registered: Aug 2008
Posts: 553

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by cola View Post
Is it solved after following the instructions of Agrouf?
Yes, it worked perfectly. Thanks Agrouf.

BTW, "makeactive" in the grub conf file is apparently now replaced by:

"parttool (hd0,6) boot+"

http://superuser.com/questions/93443/

... but "makeactive" worked OK.
 
Old 01-11-2010, 01:05 PM   #5
cola
Senior Member
 
Registered: Sep 2007
Location: Dhaka,Bangladesh
Distribution: Debian
Posts: 1,032

Rep: Reputation: 64
Quote:
Originally Posted by littlebigman View Post
Yes, it worked perfectly. Thanks Agrouf.

BTW, "makeactive" in the grub conf file is apparently now replaced by:

"parttool (hd0,6) boot+"

http://superuser.com/questions/93443/

... but "makeactive" worked OK.
Mark the thread as "[SOLVED]" .This option is under the "Thread Tools" above.
 
Old 01-11-2010, 02:57 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,481

Rep: Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097Reputation: 3097
Quote:
Originally Posted by littlebigman View Post
Yes, it worked perfectly. Thanks Agrouf.

BTW, "makeactive" in the grub conf file is apparently now replaced by:

"parttool (hd0,6) boot+"

http://superuser.com/questions/93443/

... but "makeactive" worked OK.
You are mixing advice for two different tools. grub (legacy) is not gub2.
The link you quoted is specifically referring to Ubuntu 9.10, which uses grub2.
This confusion is going to be rife for a while.
 
  


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
Windows XP won't boot with Grub after installing Ubuntu 8.04 ktscheschke Linux - Newbie 30 02-18-2010 09:36 AM
Installing GRUB or GRUB2 from scratch williamv2 Linux - Newbie 10 03-31-2009 10:31 PM
Fix grub boot loader after installing windows xp alaios Ubuntu 2 07-23-2008 10:58 AM
Grub 1.5 Error 21 when installing Debian/Windows dual-boot VinceIP Debian 15 01-30-2007 05:13 PM
Can i/ How can i use grub to boot Windows XP and Macosx x86 without installing hkl8324 Other *NIX 3 03-02-2006 03:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:38 AM.

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