Jump to content

Patch bootloader to boot from Mac volumes ONLY


  • Please log in to reply
10 replies to this topic

#1
solu

solu

    InsanelyMac Protégé

  • Members
  • PipPip
  • 61 posts
Is there a way to patch the Darwin bootloader so that it only "sees" hfs volumes, and ignores Windows partitions entirely?

The Darwin bootloader is published under the APSL, and the sources are available on http://www.opensourc...8.x86/boot-132/

#2
fireshark

fireshark

    Your Mom

  • Members
  • PipPipPipPipPipPip
  • 489 posts
AFAIK, Windows does *NOT* set itself active each boot. Check your settings.

And about the code -- I thought NTFS was type 7, and HFS+ was AF.

#3
asap18

asap18

    O RLY?

  • Donators
  • 1,423 posts
It wouldn't have 0xaf as a boot parirition, since real intel macs use efi to boot.

#4
ppan76

ppan76

    InsanelyMac Protégé

  • Members
  • Pip
  • 47 posts
I think what you mean is that the Darwin loader picks the Active Partition as the default. Therefore, if you have X partition as the default (boot partition). Darwin by default will boot to that partition. So to clarify.

1.-Any OS (Active Partition)
2.-Mac OSX

If you select #2 The Mac OSX, then Darwain loader will default itself to boot to 1.-Any OS. Unless you tell it to boot. (By pressing F8 or change the time out value). If you dont touch the computer it will create a loop and eventually boot to Number 1.

This has been an annoyance. But nothing to go crazy about. When I select MacOsx I then scroll down the list in Darwin to select the OSX partition. But it would be cool to be able to pick the default boot partition in Darwin.

Edited by ppan76, 14 February 2007 - 11:06 AM.


#5
StuMan1337

StuMan1337

    InsanelyMac Protégé

  • Members
  • Pip
  • 7 posts

ppan76, that's precisely what I mean :-)

For example, I have a GRUB menu with:
(hd0,0) Windows
(hd0,1) XNU
(hd0,3) Linux

I have set up GRUB so that it loads whatever system was booted last time.
But if XNU was booted last time, GRUB does load the Darwin bootloader, which in turn loads Windows anyway, unless I press F8 fast enough and actively select my XNU partition. I find this annoying, since I can't find a setup that loads XNU automatically by default.

Hence I think we should modify the Darwin bootloader so that it simply ignores non-HFS partitions. (We can choose them from GRUB if we want to boot from them.)


Well, if you're using grub, isn't there a makeactive that can set the partition to be active so that OSX selects it first?

#6
cyclonefr

cyclonefr

    InsanelyMacaholic

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,751 posts
  • Gender:Male
  • Location:Paris, France

This has been an annoyance. But nothing to go crazy about. When I select MacOsx I then scroll down the list in Darwin to select the OSX partition. But it would be cool to be able to pick the default boot partition in Darwin.

im doing the exact same thing :hysterical:

#7
cbmkgd

cbmkgd

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,243 posts
As stu said, there's the makeactive command.
Also, there's the hide/unhide and makeactive commands to hide/unhide partitions in grub configuration.
Since you're using grub, when choosing osx in grub's menu, you could beforehand hide unwanted partitions and make your osx partition active.

An example (for inspiration) for using the hide/unhide command.

#8
cbmkgd

cbmkgd

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,243 posts

I have the OS on an extended partition, and those cannot be made active it appears.

... indeed.

It's possible to install osx in a logical partition and make it work, but under certain conditions, and it can't be booted directly, it needs a third party bootloader (not all might work though), or another darwin loader in a primary.

So a much better/preferred way is to install OSX in a primary, and also a primary before the extended partition (if there is one) (also, the osx primary partition number has to be before the extended partition number in the partition table... this little detail is usually taken care of with partition tools, but not all; that's why it's not usually mentioned).

Edited by cbmkgd, 17 February 2007 - 10:37 PM.


#9
cbmkgd

cbmkgd

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,243 posts
Just a little curious: is your OSX logical partition placed in the front of the extended partition?

Anyway, have you tried to hide the Windows partition in grub in the osx section, so that it doesn't show in the darwin loader? (Don't forget to unhide it in the windows section of the grub menu)

#10
redcell

redcell

    InsanelyMac Protégé

  • Members
  • PipPip
  • 58 posts
how can you compile the file chain0.s?

#11
Siegfried

Siegfried

    InsanelyMac Protégé

  • Members
  • Pip
  • 44 posts

how can you compile the file chain0.s?

It's in the comments of the file.

; This code is written for the NASM assembler.
;   nasm chain0.s -o chain0






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy