Jump to content











Photo
- - - - -

grub4dos and mbldr


  • Please log in to reply
5 replies to this topic

#1 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 12 April 2008 - 04:31 PM

Master bootloader http://sourceforge.net/projects/mbldr/
is a very nice boot manager, requiring only one sector (446-byte of code) in the MBR.

Be careful though when you use the grub4dos disk swap as:
map (hd1) (hd0)

map (hd0) (hd1)

rootnoverify (hd1)

chainloader +1

(this is to boot from external USB disk (hd1) instead of internal IDE disk (hd0) without changing the BIOS boot order.
So the PC boots (hd0) which has grub4dos then the mapping is done as above).

If the (hd1) uses mbldr, when you switch OS using it, the MBR of disk (hd0) will be written in fact
(while it should be written to (hd1)). mbldr writes to the MBR each time at selection to set the active partition, and hide
all other primary partitions.

Instead of disk swapping/mapping by grub4dos, if you use the BIOS to change the boot order, then there is no problem with mbldr,
it writes back the MBR correctly to the (hd0) (booted disk).

Does it means that grub4dos did not completely do the disk mapping ?

#2 was_jaclaz

was_jaclaz

    Finder

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

Posted 12 April 2008 - 04:40 PM

Does it means that grub4dos did not completely do the disk mapping ?


No, it means that you did not --hook the mapping:
map (hd1) (hd0)

map (hd0) (hd1)

rootnoverify (hd1)

chainloader +1

, thus it will be ineffective outside grub4dos :thumbsup:

Try this:
map (hd1) (hd0)

map (hd0) (hd1)

map --hook

rootnoverify (hd0)

chainloader +1

....then, it may still not work, cannot say.... :tabletalk:

jaclaz

#3 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 12 April 2008 - 05:34 PM

@jaclaz

....then, it may still not work, cannot say....


OK thank you. I will give it a try. Last time I have to restore the MBR :-(, but I know the risk of experimentations :-).

Question: after the disk mapping, I am lost. Which is the right syntax ?
rootnoverify (hd0)
or
rootnoverify (hd1)

(to be able to boot on the so called (hd1) external disk if no BIOS order change).

Edit:
By the way, happy birthday to you !

#4 was_jaclaz

was_jaclaz

    Finder

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

Posted 13 April 2008 - 04:12 PM

Basically it works similarly to a local (as opposed to global) variable, let's call the drives 1stDrive and 2ndDrive, respectively.

Normally BOTH the PC BIOS (and any OS relying on BIOS) and grub4dos will "see":
1stDrive as (hd0)
2ndDrive as (hd1)

After commands:
map (hd0) (hd1)
map (hd1) (hd0)
and until the mapping has been hooked, the PC BIOS will be seeing (temporarily) the drives "exchanged":
1stDrive as (hd1)
2ndDrive as (hd0)
WHILST grub4dos will see (as before):
1stDrive as (hd0)
2ndDrive as (hd1)
(so the "right" way to choose 2ndDrive from within grub4dos is (hd1))

After command:
map --hook

BOTH PC and grub4dos will see:
1stDrive as (hd1)
2ndDrive as (hd0)
(so the "right" way to choose 2ndDrive from within grub4dos becomes (hd0))

Check this:
http://www.boot-land...topic=2568&st=7

But cannot say how mbldr gets informations on drive order... :thumbsup:

jaclaz

#5 ktp

ktp

    Silver Member

  • Advanced user
  • 773 posts

Posted 13 April 2008 - 04:20 PM

Thank you for the explanations. Could you please comment for the following code I have,
with a little different (only one map command).
If I understand, both codes are OK ?

title Boot USB key (as 2nd hard disk)

map (hd1) (hd0)

root (hd1,0)

chainloader +1

or

title Boot USB key (as 2nd hard disk)

map (hd1) (hd0)

map --hook

root (hd0,0)

chainloader +1


#6 was_jaclaz

was_jaclaz

    Finder

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

Posted 13 April 2008 - 07:03 PM

If I understand, both codes are OK ?


Yep, both should work alike. :thumbsup:

jaclaz




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users