Jump to content

EFI booting thread


kinkadius
 Share

148 posts in this topic

Recommended Posts

I think my work with dual booting is done until further notice (Feb Vista CTP more than likely)... And I'll be keeping an ear to the ground in terms of Linux UGA support as well...

 

Anyhow, I finished typing this detailed report up at Nakfull Propoganda:

 

--

 

More progress tonight... Per Nak's request, we exchanged contact information and did some work in parallel tonight...

 

He was able to get bootmgfw.efi to render text by removing the ttf font folders. I reproduced this method to verify it and it did indeed work (since ive got a couple partitions with different test scenarios)...

 

Nak then got a step further: he hexedited the BCD catalog file to reference winload.efi instead of winload.exe. This resulted in a 'Windows is loading files...' display with a progress bar. Hitting F8 brought up the Advanced Boot Options menu. From there he selected Safe Boot and watched as all the driver files were loaded... And then it froze on crcdisk.sys...

 

I was able to reproduce the same scenario under slightly different circumstances. Nak used a full Vistal install on an external firewire hard drive. I decided to copy specific DVD installation files to a fat32 partition and attempt to load the installer.

 

My Safe Boot only got as far as disk.sys, because the installation disc doesn't load as many drivers as a full installation of Vista. I experienced the typical behavior of the USB HID shutting down from EFI and then reinitializing from a blank screen.

 

I was then able to 'Alt-F4' and 'Alt-Y' to the blank screen and shortly thereafter, the computer restarted - just as it would if you had cancelled the Vista installer main window...

 

So I think it is safe to say we can boot Vista on the iMac...

 

But unfortunately Vista is lacking video support, presumably because of the lack of UGA drivers. Again, I am under the assumption that the Radeo x1600 has a UGA BIOS ONLY. There is no evidence or reason to believe that there is a legacy PCI Option ROM that supports VGA for the Radeon x1600 in the iMac Core Duo.

 

That is not to say that a Windows-based card's PCI Option ROM couldn't be flashed and/or loaded in EFI, but this may depend on a functioning Compatability Support Module...

 

To wrap up, I've decided to document the various steps with photos for you to view.

 

One last note: One thing I've done is copied the GraphicsConsole.efi file to my 1st partition (small FAT) and placed it in /System/Library/CoreServices/boot.efi. I then copied made a copy of /Library/Preferences/SystemConfiguration/com.apple.Boot.plist and disabled boot graphics. After blessing, this allows me to Option-Boot right in to EFI... That is where the images start sequentially - with the selection of the 'unnamed' disk (FAT) which loads a copy of GraphicsConsole.efi:

 

http://img95.imageshack.us/img95/5756/011ze1.jpg

http://img95.imageshack.us/img95/4219/027is.jpg

http://img95.imageshack.us/img95/1328/033gt.jpg

http://img95.imageshack.us/img95/6895/041dm.jpg

http://img95.imageshack.us/img95/8241/058re.jpg

http://img510.imageshack.us/img510/5563/061nz.jpg

http://img510.imageshack.us/img510/4007/072os.jpg

http://img510.imageshack.us/img510/2585/084bf.jpg

http://img510.imageshack.us/img510/3461/096ju.jpg

 

Having said all that, I think the best thing we can do is wait for the next Vista CTP build which is expected to ship this month... I recall reading that a Microsoft developer mentioned having an internal build of Vista running on the iMac Core Duo. Lets hope that support is there for the next Vista CTP.

 

Of course, there's nothing stopping someone from hacking together their own EFI boot loader to boot Windows XP - but I envision it being a very difficult task considering that these iMacs have no evidence of supporting any legacy BIOS or VGA Option ROMs.

 

Special thanks again to Nak for sharing his processes and results with me...

 

through the device manager into EFI there is an option thet u choose which graphic device work first VGA or PCI like classic bios.If u choose VGA maybe u trick the loader.Or patch vista instalation with ATI drivers from different version of windows just generic ones.

 

UPDATE

There are drivers for vista 5270 from ATI...

https://support.ati.com/ics/support/default...dge&folderID=27

Link to comment
Share on other sites

Some things that I DO NOT KNOW yet for certain:

 

Read the EFI spec. At the very least, skim it. Ignore the promotional/marketing material, it will only confuse you.

 

- if EFI and VGA work together (without a UGA EFI Driver?)

 

From the strict specification standpoint, no. VGA is not called out in the EFI spec; EFI requires console support from a driver providing the SIMPLE_INPUT and SIMPLE_TEXT_OUTPUT protocols. You can read more about this in chapter 10 of the EFI specification (highly recommended).

 

- if EFI requires graphics adapter firmware

 

EFI does not require 'graphics adapter firmware'. As noted above, it requires that someone provide those two protocols (it does not have to be the same someone providing each) if the system is to have console input and output respectively.

 

- if EFI requires graphics adapter UGA EFI Drivers

 

Depending on what you mean by "require", the answer here can be "yes" or "no". EFI will operate without console input or output support, however other functionality (e.g. the EFI shell) may depend on it.

 

- if graphics firmware and UGA EFI drivers are the same thing

 

Firmware is a generic term for software directly associated with and typically stored on or downloaded to a device.

 

An EFI driver that provides the EFI_UGA_DRAW_PROTOCOL may be included in the firmware image for a graphics adapter. It can be argued that the initialisation of the card is part of the EFI driver's responsibility, which greys the answer to your question.

 

- if the Macintel platform can support a third party CSM

 

Firmware for Intel-processor Apple Macintosh systems is provided by Apple.

 

- if the CSM requires VGA firmware (ROM dump? Video BIOS?)

 

VGA/VESA BIOS functionality could be supplied by either a CSM of some sort, or by a regular VGA BIOS ROM on a video adapter.

Link to comment
Share on other sites

I've slightly skimmed the spec - albeit very very briefly. It appears aimed towards software developers. Flat-out, I am far from a programmer - just someone who's been in to computing for my whole life.

 

Sadly, since EFI is really only relevant to programmers, only the documentation written for that audience can really be trusted. Much of the introductory material in the standard is, however, more general in nature and if read with an open mind (speaking here more to others reading this thread) can clear up a lot of misconceptions.

 

I may have miscommunicated 'requirements' as pertaining to EFI. What I really meant is a given operating systems requirement for video functionality - depending on either a legacy OS/BIOS or EFI. At present, Vista and Linux sucessfully boot without video support. I am assuming that they only support a VGA/VESA BIOS initialization.

 

That seems like a reasonable conclusion to draw from the evidence.

 

This is one part of the spec - which I just opened again - that I mistakingly forgot. EFI's goal for device firmware is to use an EFI Byte Code Virtual Machine to gain hardware and operating system platform independence.

 

EBC looks unlikely to gain a lot of traction. It suffers from a number of competing drawbacks; the language is quite low-level (compare with e.g. OpenFirmware's Forth implementation), it performs poorly, and the development environment leaves much to be desired.

 

When combined with the lack of a compelling reason to use it (how may non-x86 EFI systems are there with any sort of major market penetration?), these factors leave EBC dead in the water.

 

I was speaking in regards to EFI's (optional) Compatability Support Module - which Apple does not provide for legacy operating systems. Again, my focus is on multi-booting - Windows XP and/or Vista, as well as Linux...

 

Yes; perhaps I was being a bit obtuse.

 

There are a number of ways that one might go about achieving those goals. For the open-source operating systems, clearly the path of least resistance will be to make the changes required to adapt to the new environment.

 

With regards to a closed system like Windows, and given Microsoft's attitude on the subject, other approaches need to be considered.

 

My point above was simply that attempting to replace, modify or even integrate with the Apple-supplied firmware is likely to be problematic. There are really two approaches that seem to make sense:

  1. Produce a CSM-like module which layers strictly on top of EFI using the standard EFI interfaces. This will be troublesome for a number of reasons.
    One is that (as previously noted) EFI runs and expects to be called in flat 32-bit mode, wheras legacy operating system bootloaders start in Real mode. Most of these loaders switch to 32-bit mode shortly before handing off to the OS; prior to this it is possible to thunk to 32 bit mode in the CSM to call EFI.
    Another is that the EFI Boot Services protocol is not meant to be left alive when the OS starts. An integrated CSM would call ExitBootServices() before launching the MBR off the selected boot device, leaving BIOS services enabled. A fully layered CSM would not be able to provide BIOS services once Boot Services was shut down, meaning that it would either have to guess when to shut Boot Services down, or leave it active while the OS was running. Note that shutting Boot Services down might well preclude the CSM-alike from providing ongoing BIOS services to the operating system.
  2. Replace the bootloader with one that is compatible with EFI. This is actually a more constrained and reasonable approach; the interface between the bootloader and the operating system tends to be stable and well-defined, and the bootloader has a good idea about when Boot Services can be shut down.
    Note that this approach does not resolve the issue of operating systems that make BIOS calls (the int15 memory map call is a good example here) once they themselves are up and running.

Going beyond the issue of getting the OS booted one has to consider the runtime environment. There are a number of issues here that I haven't yet seen publically considered, including:

  1. ACPI compatibility. There is no guarantee that Microsoft's (known quirky) AML interpreter will be happy with Apple's AML, which is after all geared towards supporting Mac OS X. The open-source operating systems will have an easier time of it, as they are already used to dealing with incompatible AML.
  2. Device driver support. Apple are well known for doing interesting and innovative things with otherwise conventional-seeming components. With the widely publicised move by Microsoft to mandate that all Vista drivers be signed, any additional support required to support Macintosh hardware may be difficult to integrate. The absence of public documentation will hinder efforts by all parties on this front.
  3. Power management. This is a major issue for portable systems, and ties into the first point above. There is no guarantee that Apple's power management scheme(s) are ACPI-centric. The ACPI power management strategy was devised as a compromise that allowed platform designers and OS developers to work in complete ignorance of one another. It gives up a lot of efficiency in return for this generality, but for non-Mac OS X systems it is the only game in town.

Link to comment
Share on other sites

I'm a programmer - recent CS graduate. I've done my share of C/C++ which appear to be relevant as the EFI is programmed in C. It seems that the EFI can recognize and work with Windows XP (and older), but it is basically that Windows XP 32-bit doesn't know how to boot when dealing with the EFI. I've emailed a few from Intel to get further info on the EFI, although maybe I'll have to trudge through the documentation they have provided.

 

There is one additional problem - I don't have a new Intel iMac and wouldn't really want to buy one just to try this out, since I'm really only interested in the MacBook Pro (esp. if it could dual-boot Windows XP). Anyone in the forums from near the NYC area (I live in NJ, work in NYC) willing to work with me on this?

 

Thx,

dantheman82

Link to comment
Share on other sites

i found this web site that has a massive list of what seams to be all the bios calls that Windows XP makes, i dont know if this will help anyone or if it has allready been posted but i thought it might help someone in some small way.

 

http://www.missl.cs.umd.edu/winint/index2.html

 

It has, but Thanks!

Link to comment
Share on other sites

Just a start. More will follow.

 

http://www.dark-green.com/img_0043.jpg

 

Intel iMac Linux seems to be recognizing a VGA-compatabile video card in the dmesg and lspci...

Does this mean VGA _is_ lurking in there after all?

 

 

dmesg: http://xbox-linux.org/mactel/index.php/Dmesg

 

Kernel command line: BOOT_IMAGE=dev000:/vmlinuz video=vesafb:1440x900-32@70 init=/linuxrc root=/dev/ram0 acpi=force pci=routeirq irqpoll

...

fb0: VESA VGA frame buffer device

 

lspci: http://xbox-linux.org/mactel/index.php/Lspci

 

01:00.0 VGA compatible controller: ATI Technologies Inc Unknown device 71c5

Link to comment
Share on other sites

  • 2 weeks later...

I am able to boot linux using efi and elilo.Now elilo sits on an EFI partition.I would like to boot linux on a diskless client using bootp and tfp and i would like to locate even elilo on the tftp server is it possible with EFI

these are the steps what i would like to do

 

a ) BOOT using EFI,EFI sends bootp requests bootp server responds with ip adress.

b ) Now from tftp server elilo image is loaded

c )using elilo and tftp protocoal linux image is brought to the client and booted(root files system is got through NFS)

 

I am trying to do this on a 32 bit machine

Link to comment
Share on other sites

I am able to boot linux using efi and elilo.Now elilo sits on an EFI partition.I would like to boot linux on a diskless client using bootp and tfp and i would like to locate even elilo on the tftp server is it possible with EFI

these are the steps what i would like to do

 

a ) BOOT using EFI,EFI sends bootp requests bootp server responds with ip adress.

b ) Now from tftp server elilo image is loaded

c )using elilo and tftp protocoal linux image is brought to the client and booted(root files system is got through NFS)

 

I am trying to do this on a 32 bit machine

 

I could do the step (a ) using the boot manger and load file but the EFI fails to receive the boop offer packets send from the bootp server.

i tried to boot the same machine, where i am trying efi floopy, using pxe without changing anything in the bootp/tftp server and network connections and i could boot linux

Could anyone please tell me what could be the reason for EFI not accepting the bootps from the bootp server

Link to comment
Share on other sites

One question. I was reading somewhere and someone mentioned the possibility of taking the NTDLR of Windows IA-64 (Windows for Itanium that only uses EFI to boot). By doing so, you'd should be able to but Windows IA-32 using the IA-64 EFI bootloaders and since they're bytecode and not machine specific code, should work? I guess the files that need replaced are HAL.SYS and NTLOADER.SYS? Though, would we still run into the issue of video?

 

Impossible? Stupid? Pointless? Comments wanted, since I have no idea! Thanks.

 

Nick

Link to comment
Share on other sites

One question. I was reading somewhere and someone mentioned the possibility of taking the NTDLR of Windows IA-64 (Windows for Itanium that only uses EFI to boot). By doing so, you'd should be able to but Windows IA-32 using the IA-64 EFI bootloaders and since they're bytecode and not machine specific code, should work? I guess the files that need replaced are HAL.SYS and NTLOADER.SYS? Though, would we still run into the issue of video?

 

Impossible? Stupid? Pointless? Comments wanted, since I have no idea! Thanks.

 

Nick

 

The IA64 platform is simply not compatible with x86 at all. To be honest that's why Intel's first 64 bit implementation failed while AMD's succeeded. AMD's version was built upon retaining 32 bit compatibility while Intel's wanted everything to be re-encoded.

IA64 is *very* different to x86

Link to comment
Share on other sites

The IA64 platform is simply not compatible with x86 at all. To be honest that's why Intel's first 64 bit implementation failed while AMD's succeeded. AMD's version was built upon retaining 32 bit compatibility while Intel's wanted everything to be re-encoded.

IA64 is *very* different to x86

 

Quite true. I was *ONLY* referring to using it's NTDLR files for use of its EFI bootloader capabilities, similiar to what people have tried with Vista. In no way was I implying to use the IA64 version of Windows, as that'd never work. Using the NTDLR might not work either, but I was curious as to people's thoughts on it, or if it's been tried.

Link to comment
Share on other sites

From there he selected Safe Boot and watched as all the driver files were loaded... And then it froze on crcdisk.sys...

 

............

 

My Safe Boot only got as far as disk.sys, because the installation disc doesn't load as many drivers as a full installation of Vista. I experienced the typical behavior of the USB HID shutting down from EFI and then reinitializing from a blank screen.

 

After reading this, i did some research. (Take this with a grain of salt, please, as I don't have an intel mac to play with and I'm researching this in my free time for the hell of it).

 

According to the Windows XP & GPT FAQ from:

 

http://www.microsoft.com/whdc/device/stora...PT_FAQ.mspx#E6F

 

There are a few "required" partitions. One of which is what they call the MSR (Microsoft Reserved Partition) that comes right after the ESP. On disks more than 16GB, it's a 128MB partition that MUST come before anything else except the ESP (and optional OEM) partitions (and the MSR is used for "subsequent use of operating system software.") My initial impression (since the files above that halt copying BOTH have to do with disk I/O) is that the testers have not placed this 128MB partition before the data partition on the drive when it was partitioned for this testing, and the Windows installer doesn't have anywhere to put this specific information.

 

Just a guess, but let me know what people think.

 

-----

 

Also - regarding UGA, there is a slide from Microsoft about Longhorn (which means the ppt is probably pretty old) but it talks all about EFI on Longhorn. Specifically, though, on page 33 of the ppt:

 

http://download.microsoft.com/download/9/8...17_WinHEC05.ppt

 

It states that Longhorn will not use UGA at runtime, but does not specify what happens during boot. These slides actually provide a high-level walkthrough of the Vista/Longhorn boot process and the means they might take to accomplish it with EFI and VGA registers.

 

 

-----

 

Has anyone tried doing a network boot (using PXE, TFTP) of either XP or Vista? (Or better yet, has anyone used WinPE? The Intel Platform Innovation Framework for EFI, page 5, specifically mentions it - I've seen sites that tell you how to build the 32-bit version from the 64-bit version and vice-versa).

 

Let me know if any of this information helps.

 

-Craig

Link to comment
Share on other sites

Hi all,

 

I have used the strings utility on bootmgr.efi and cdboot.efi if vista 32bits 5308 and i have found the following options / strings :

cdboot.efi :

WINDOWS

BTAPENT

MSWIM

NTFS

.rsrc

.EFI

Boot Environment Library

tsize

octet

blksize

TFTP Aborted

%spartition(%d)

net(0)

/BREAK

/REDIRECT

/RDEXPORTASCD

,NOUMEX

=NOUMEX

=DISABLE

=AUTOENABLE

/DEBUG

/MAXPROC

/PCILOCK

/BOOTLOG

/SOS

/ONECPU

/BASEVIDEO

/NOGUIBOOT

/NOVESA

/USEPHYSICALAPIC

/NOLOWMEM

/SAFEBOOT:

DSREPAIR

NETWORK

MINIMAL

MINIMAL(ALTERNATESHELL)

/DETECTHAL

/MININT

/DISABLE_INTEGRITY_CHECKS

/CONFIGFLAG=

/PERFMEM=

/MAXPROCSPERCLUSTER=

/MAXAPICCLUSTER=

/NUMPROC=

/3GB /USERVA=

/HAL=

/NOEXECUTE=ALWAYSON

/EXECUTE /NOEXECUTE=ALWAYSOFF

/NOEXECUTE=OPTOUT

/NOEXECUTE=OPTIN

/NOPAE

/PAE

/BURNMEMORY=

/KERNEL=

/BAUDRATE=

/CHANNEL=

/FVEBOOT=

/BOOTDEBUG

/DEBUGPORT=COM

/TARGETNAME=

/MAXMEM=

/DEBUGPORT=USB

/DEBUGPORT=1394

RDPATH=

RDIMAGELENGTH=

RDIMAGEOFFSET=

multi(0)disk(0)rdisk(%d)

multi(0)disk(0)fdisk(%d)

multi(0)disk(0)cdrom(%d)

ramdisk(%d)

 

bootmgr.efi:

bootsect.dat

[operating systems]

NOBCD

[boot loader]

DEFAULT=

BOOTMGRDEFAULT=

User requested boot debugger break!

BD: Boot Debugger Initialized

Boot Application

-FVE-FS-

EFI PART

$SDI0001

MSWIM

NTFS

BTAPENT

WINDOWS

.rsrc

%spartition(%d)

net(0)

/BREAK

/REDIRECT

/RDEXPORTASCD

,NOUMEX

=NOUMEX

=DISABLE

=AUTOENABLE

/DEBUG

/MAXPROC

/PCILOCK

/BOOTLOG

/SOS

/ONECPU

/BASEVIDEO

/NOGUIBOOT

/NOVESA

/USEPHYSICALAPIC

/NOLOWMEM

/SAFEBOOT:

DSREPAIR

NETWORK

MINIMAL

MINIMAL(ALTERNATESHELL)

/DETECTHAL

/MININT

/DISABLE_INTEGRITY_CHECKS

/CONFIGFLAG=

/PERFMEM=

/MAXPROCSPERCLUSTER=

/MAXAPICCLUSTER=

/NUMPROC=

/3GB /USERVA=

/HAL=

/NOEXECUTE=ALWAYSON

/EXECUTE /NOEXECUTE=ALWAYSOFF

/NOEXECUTE=OPTOUT

/NOEXECUTE=OPTIN

/NOPAE

/PAE

/BURNMEMORY=

/KERNEL=

/BAUDRATE=

/CHANNEL=

/FVEBOOT=

/BOOTDEBUG

/DEBUGPORT=COM

/TARGETNAME=

/MAXMEM=

/DEBUGPORT=USB

/DEBUGPORT=1394

ramdisk

cdrom

fdisk

rdisk

partition

signature

disk

RDPATH=

RDIMAGELENGTH=

RDIMAGEOFFSET=

multi(0)disk(0)rdisk(%d)

multi(0)disk(0)fdisk(%d)

multi(0)disk(0)cdrom(%d)

ramdisk(%d)

.EFI

Boot Environment Library

tsize

octet

blksize

TFTP Aborted

 

I have the message "Press any key to boot from the CD...." when i use :

fs0:

cd boot

cdboot.efi /DEBUG /DISABLE_INTEGRITY_CHECK /NOGUIBOOT /NOVESA /DETECTHAL

 

And this crash when i type a key.

 

I have done this by restoring the vista 32 bit iso on a partition of my ipod and booting to refit (located on a 128Mo USB key) if you want to try.

 

I would like to know if others have tried to play with this options and what have been the successes if any ?

Cheers,

Link to comment
Share on other sites

  • 2 weeks later...
 Share

×
×
  • Create New...