Jump to content











Photo
- - - - -

Dual boot guide with Fedora and XP


  • Please log in to reply
8 replies to this topic

#1 rasker

rasker

    Newbie

  • Members
  • 23 posts
  • Location:London, UK
  •  
    United Kingdom

Posted 15 January 2009 - 02:48 PM

EDIT by jaclaz:
Following posts were splitted from the grub4dos guide sticky:
http://www.boot-land...?showtopic=5187

rasker published a nice guide for double booting XP and Fedora with grub4dos:
http://fedorasolved....p-vista-already

:)

One thing to add is that windows can boot linux by default by changing the default= line in boot.ini to default=c:\grldr.

Cheers
R

#2 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 15 January 2009 - 03:17 PM

One thing to add is that windows can boot linux by default by changing the default= line in boot.ini to default=c:\grldr.

Well, no. :)

Making default=c:\grldr wil simply load grub4dos. (if in menu.lst there is also a default entry chainloading a Linux kernel, THEN linux will be booted)

In other words this would apply to a BOOT.INI/NTLDR guide:
http://www.tburke.ne...cking_guide.htm
not to grub4dos one. :)

jaclaz

#3 rasker

rasker

    Newbie

  • Members
  • 23 posts
  • Location:London, UK
  •  
    United Kingdom

Posted 15 January 2009 - 04:45 PM

OK, you are right.

However I have just installed a recent Grub4dos 0.4.4 on a windows machine which also has Fedora 10. I just extracted the archive to c:\Grub4dos and copied grldr to c:\ made the changes to boot.ini and tested that Grub4dos worked when selecting grldr. Then I added default=c:\grldr and it boots straight into fedora. I guess the Grub4dos menu.lst has been cleaned up some since 0.4.3 which I used some months ago and it looks for the Fedora menu.lst by default (it has a number of find sections one of which finds the Fedora menu.lst.

I did this while finishing off this document

http://fedorasolved....p-vista-already

#4 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 15 January 2009 - 05:04 PM

I guess the Grub4dos menu.lst has been cleaned up some since 0.4.3 which I used some months ago and it looks for the Fedora menu.lst by default (it has a number of find sections one of which finds the Fedora menu.lst.


Yes, a "normal" Legacy GRUB (such as a Fedora one) can usually been read and executed correctly by grub4dos.

Unless I am mistaken, late newish grub4dos searches for menu.lst in:
/menu.lst

/boot/grub/menu.lst

/grub/menu.lst
in this exact order, so, probably when you had a /menu.lst, the original Fedora one was ignored, and once you used grldr without one in ROOT, the Fedora was "suddenly" found...:), if you re-add a /menu.lst in ROOT, the Fedora one will again be ignored, this should not be related to 0.4.3 ->0.4.4 changes...:)


jaclaz

P.S.: The link you posted requires logging in....:)

#5 rasker

rasker

    Newbie

  • Members
  • 23 posts
  • Location:London, UK
  •  
    United Kingdom

Posted 15 January 2009 - 05:44 PM

Yeah thats right. AFAICS grldr is first picking up the menu.lst in c:\Grub4dos and then using this it does the searches you described. The Fedora menu.lst is picked up on the second search (/boot/grub/menu.lst) and it uses that to boot Fedora. All in all very nice.

When you say ROOT do you mean c:\ or / in the fedora boot partition? I guess / in the fedora boot partition.

BTW Fedora *might* start using ext4 for it's boot partition in the future (maybe F11 but F12 probably). Do you think grub4dos will support this?

Sorry about the link, I guess it is only visible when it has been published by the site owners.

Actually I chose Grub4dos because it is the least 'invasive' method that I could find for dual boot, meaning that it doesn't interfere with either operating system so for example kernel upgrades in Fedora just work without the user having to edit files each time and Windows is virtually untouched so servicepacks and other upgrades wouldn't break boot. It does work very well.

Cheers
R

#6 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 15 January 2009 - 06:32 PM

When you say ROOT do you mean c:\ or / in the fedora boot partition? I guess / in the fedora boot partition.

Unless a root command has been given to grub4dos, ROOT is whatever device/partition the boot took place, in this case, since you boot to C:\NTLDR->C:\BOOT.INI->C.\grldr, it means C:, UNTIL a
C:\menu.lst = ROOT/menu.lst
is NOT found.

If you boot from floppy or CD, ROOT will be Floppy or CD, but then - and somewhere there is some doc about the order in which it is done, hd0, hd1, and partitions in them, etc. - grub4dos will search on HD's too.

The "embedded" menu.lst in grub4dos is the following:

default 0
timeout 1
fallback 1

title find /menu.lst
find --set-root --ignore-floppies --ignore-cd /menu.lst
configfile /menu.lst

title find /boot/grub/menu.lst
fallback 2
find --set-root --ignore-floppies --ignore-cd /boot/grub/menu.lst
configfile /boot/grub/menu.lst

title find /grub/menu.lst
fallback 3
find --set-root --ignore-floppies --ignore-cd /grub/menu.lst
configfile /grub/menu.lst

title commandline
commandline

title reboot
reboot

title halt
halt


Since it uses find -set-root ROOT is changed by the execution of the above, it is possible to edit (it's in the last few bytes of grldr) the above menu.lst to let it search on floppy and/or cd first....:)), so, after a menu.lst is found, ROOT will become the partition where it is found.

Link is working now :)

jaclaz

P.S.:
About "Appendix B", the given example is EXACTLY what is NOT recommended (at least by me) i.e. "hardcoding" a hd/partition and using it's bootsector:
title Fedora (grub boot)



chainloader (hd0,1)+1



rootnoverify (hd0,1)
And a root command would be more appropriate that a rootnoverify one.

A better example is this (assuming that a file named fedora.tag is in ROOT of the Fedora partition, you can use any file in it):
title Fedora (grub boot)

find --set-root /fedora.tag

chainloader +1

But it still uses the bootsector. :)

The problem you had might be due to the presence of the gfx-menu entry in Fedora's menu.lst, it should be simply skipped in not-gfx-versions of grub4dos, but it did gave problems in the past.
http://www.boot-land...?showtopic=6180

Which exact grub4dos version did you try?

Latest should work. :)

#7 rasker

rasker

    Newbie

  • Members
  • 23 posts
  • Location:London, UK
  •  
    United Kingdom

Posted 15 January 2009 - 10:41 PM

Ok that makes sense. I am seeing the result of three find --set-root's when it is booting so I guess it's using the embedded menu.lst (as Fedora's menu.lst is in /grub/.

Yeah appendix b was a left over from a few months ago (using the latest 0.4.3 at the time) when I first had a go at the how-to and I needed to use that to boot my machine (I think I found that information in the forum somewhere. I haven't tried 0.4.4 on the same hardware but I am sure it will work. I'll post back if I get the chance to try it. At the time I thought it might have been because I put the Fedora boot sector on the Fedora /boot partition or something (i forget exactly).

Still I actually realise now that I don't really need to have the Fedora boot sector at all as Grub4linux is doing it for me. I'll leave adding the boot sector in the how-to document for now as it might be useful if things go belly up. The user can just change the active partition and sidestep the Windows part. Right? Should I remove appendix B?

Cheers
R

#8 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 16 January 2009 - 08:01 AM

Should I remove appendix B?


Not really, that "method" is "failsafe" (given that the user changes appropriately the (hd0,1) to whatever he is using), the one posted by me is even "more failsafe", in this version:
title Fedora (grub boot)

find --set-root /grub/menu.lst

chainloader +1
(as long as just one partition, the Fedora one, has a /grub/menu.lst)
and this one is the "proper" way (supposing that the gfx entry is not anymore a problem):
title Fedora (grub boot)

find --set-root /grub/menu.lst

configfile /grub/menu.lst
so I would add them, together with the existing one.

No need to change the active partitions.

jaclaz

#9 rasker

rasker

    Newbie

  • Members
  • 23 posts
  • Location:London, UK
  •  
    United Kingdom

Posted 16 January 2009 - 11:58 AM

Ok, cool, thanks a lot for the assistance!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users