Jump to content
Keshav Amburay

Linux and Windows UEFI boot using Tianocore DUET firmware

162 posts in this topic

Recommended Posts

EDIT: The page has been moved to gitorious wiki at https://gitorious.or...64_BIOS_to_UEFI

 

EDIT: DUET git repos won't be updated anymore. See http://www.insanelymac.com/forum/topic/186440-linux-and-windows-uefi-boot-using-tianocore-duet-firmware/page-8?do=findComment&comment=1934820 for more info.

Share this post


Link to post
Share on other sites
Advertisement

For Tianocore DUET installer download https://gitorious.org/tianocore_uefi_duet_builds/tianocore_uefi_duet_installer/archive-tarball/master .

 

For Tianocore DUET compiled floppy memdisk download https://gitorious.org/tianocore_uefi_duet_builds/tianocore_uefi_duet_memdisk_compiled/archive-tarball/master .

 

For the scripts to create the DUET floppy memdisk, download https://gitorious.org/tianocore_uefi_duet_builds/tianocore_uefi_duet_memdisk_tools/archive-tarball/master .

 

In Windows you may need http://7-zip.org/ to extract these tarballs. Only the gitorious repos will be used from now on and the github repos will no longer be updated.

 

EDIT: github to gitorious.

Edited by Keshav

Share this post


Link to post
Share on other sites

I just formatted a 128 MB USB Flash Drive with the UEFI DUET firmware and it boots perfectly, but it won't recognize my DVD drive or Hard Drive. I have a Dell Studio 1555 like you, with an Intel ICH9 chipset and the A06 version of the BIOS. My SATA mode in the BIOS is set to ACHI mode. I already have Ubuntu 9.10 x64 installed and I wanted to install Windows 7 on another partition.

Share this post


Link to post
Share on other sites

The reason I used GPT was because I wanted more than four partitions and also because it was easier to install Snow Leopard. Could you give the steps to making a hybrid GPT/MBR disk? Also, are you using EFI at all (including other firmware) and if I were to use an EFI firmware, where can I get drivers (especially for AHCI)?

 

Thanks for your help.

Share this post


Link to post
Share on other sites

That didn't work as I wanted. The installer gives an error about installing to a GPT disk on a BIOS computer. Is there a way to make the DUET firmware read the DVD? The original person said that it worked for his Dell Studio 1555 and I'm using his version of the firmware in his second post.

Share this post


Link to post
Share on other sites

If Windows complained about installing to GPT even with a hybrid MBR, then something weird is going on. In every test I've run, Windows sees a hybrid disk as an MBR disk, not a GPT disk. Are you 100% sure you actually created a hybrid configuration? Note that if you used my GPT fdisk program, you must write your changes to disk (via the "w" command); if you don't, the changes will be made in memory only, and if you exit (via the "q" command), they won't be written to disk.

Share this post


Link to post
Share on other sites

The DUET firmware does not support AHCI SATA mode. I already mentioned that in the readme file in EDK_DUET folder. Change the SATA mode to IDE in the BIOS to make DUET recognise the HDD and the DVD drive. I personally do not suggest using Hybrid MBR ( it defeats the very reason for using GPT - multiple primary partitions ). To install Windows in UEFI boot mode, change back to Protective MBR using gdisk, boot DUET, insert the Windows 7 x64 setup disk and then select EFI DVD/CD option in BOOT MANAGER in DUET. Also make sure the EFI SYSTEM PARTITION is formatted as FAT32 ( not NTFS and not HFS or HFS+ ).

Share this post


Link to post
Share on other sites

Thanks for the info, Keshav! I'll try using IDE mode today on my main computer (the Hybrid-GPT-MBR worked on my spare computer). Are there any slowdowns using IDE? I know switching from ACPI to IDE will cause Windows to stop booting. Is it the same for Linux, specifically Ubuntu?

Share this post


Link to post
Share on other sites
Thanks for the info, Keshav! I'll try using IDE mode today on my main computer (the Hybrid-GPT-MBR worked on my spare computer). Are there any slowdowns using IDE? I know switching from ACPI to IDE will cause Windows to stop booting. Is it the same for Linux, specifically Ubuntu?

I have experienced no slowdowns with IDE SATA mode. I did not experience any problem with Linux while switching SATA modes. I am using Fedora 11 x64, I do not know whether it is any different for Ubuntu. Tell me if ur UEFI Windows Install is successful.

 

Correction : It is AHCI, not ACPI.

Share this post


Link to post
Share on other sites

It worked perfectly. I'm actually typing this in Windows 7. Ubuntu boots fine in IDE mode, but it had to do a fsck file system check before it booted. Everything works fine now.

 

Thanks for all the help!

Share this post


Link to post
Share on other sites

Just some extra info:

 

EFI DUET can be installed to a FAT32 partition on the hard drive. I have it installed on a 512 MB partition and I have GRUB chainloading that partition. So no more sticking out of an ugly USB drive on my computer. :)

Share this post


Link to post
Share on other sites
Just some extra info:

 

EFI DUET can be installed to a FAT32 partition on the hard drive. I have it installed on a 512 MB partition and I have GRUB chainloading that partition. So no more sticking out of an ugly USB drive on my computer. :(

 

 

At last. Can you mention the procedure as to how to boot DUET from harddisk. Did you use the hd32 folder? I tried to do it but there seemed to be some problem either with gpt.com file or dumpbs.efi . If you compiled newer versions of these files please attach them here. Thank you.

Share this post


Link to post
Share on other sites

I have no idea what the hd32 folder is for. All I did was:

 

1) Make a DUET USB

 

2) Boot into Linux

 

3) Make a partition the same size as my USB flash drive with Gparted

 

4) Run "dd if=/dev/sdb1 of=/dev/sda7" (probably not sda7 for you)

 

5) Add the following to /etc/grub/11-efi-duet (remember to change (hd0,7) to your partition number)

 

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
echo "Adding EFI DUET menu entry" >&2
menuentry "EFI DUET" {
set root=(hd0,7)
chainloader +1
}

 

6) Run "sudo update-grub"

 

7) Rebooted

 

and everything works. :wacko:

Share this post


Link to post
Share on other sites
Also, the partition cannot be formatted with fat32. It doesn't work for some reason.

 

Wait a second...in post #13 you said: "Just some extra info: EFI DUET can be installed to a FAT32 partition on the hard drive. I have it installed on a 512 MB partition and I have GRUB chainloading that partition. So no more sticking out of an ugly USB drive on my computer."

 

Now you are saying FAT32 won't work. Did you format the partition with FAT16? I haven't gotten the hard drive boot to work myself although I only spent a very limited amount of time trying to do so. I keep getting "MBR FAIL! ERR 80" or something like that when I try imaging a work USB-DUET partition onto a hard drive. It's too bad the "genbootsector" utility (or was it "bootsectorimage"?) won't work with fixed drives although that limitation is easily overcome using "dd" or even "Winhex". I suppose somebody could hack up the source code to fix that but I am no coder so it won't be me.

 

In a related vein I was thinking it may be possible to create a UEFI payload that could be directly loaded by GRUB.

Share this post


Link to post
Share on other sites
In a related vein I was thinking it may be possible to create a UEFI payload that could be directly loaded by GRUB.

 

FWIW, GRUB2 has some limited EFI emulation already, similar to what OSx86 boot loaders provide. (See this thread for details of using this support to boot OSx86.) I haven't heard of anybody successfully using this support to boot Windows 7 from a GPT disk, but it's conceivable that this support could be built upon to accomplish that goal. The same could be said of other OSx86 boot loaders, for that matter. I fully expect something like that to materialize sooner or later; with 2TiB drives available now and drive sizes constantly going up, sooner or later the Windows GPT boot limitations are going to become enough of a problem for somebody with sufficient knowledge and programming skill to build an easy-to-install boot loader to get around the problem.

Share this post


Link to post
Share on other sites

Poophead (I don't mean to call you that :P ), in post 13, that was a typo on my part. I actually have it installed to an ext3 partition because Grub supports it natively. Fat32 doesn't work [i think] because fat32 partitions are marked with the MSFT Restricted label (in Gparted) unless it's the EFI boot partition, which makes it unable to boot.

Share this post


Link to post
Share on other sites
Fat32 doesn't work [i think] because fat32 partitions are marked with the MSFT Restricted label (in Gparted) unless it's the EFI boot partition, which makes it unable to boot.

 

That's a bug in GNU Parted and related tools, such as GParted. I hear it's been fixed in recent versions, but I don't recall the details. The improper partition type code is easily fixed with my GPT fdisk program; just use the 'p' command to view the current partitions, then use the 't' command to change the type code, enter the partition number and a code of 0700, and then use the 'w' command to write the changes to disk and exit.

Share this post


Link to post
Share on other sites

i can see the uefi menu (DUET: PRODUCT NAME HERE), however, looks like my usb keyboard and mouse arent working...

 

usb legacy support is enabled in bios

Share this post


Link to post
Share on other sites
i can see the uefi menu (DUET: PRODUCT NAME HERE), however, looks like my usb keyboard and mouse arent working...

 

usb legacy support is enabled in bios

 

It's possible that UEFI DUET has crashed. That's what it does for me, and I'm using PS/2 keyboards and mice.

Share this post


Link to post
Share on other sites
The DUET firmware does not support AHCI SATA mode. I already mentioned that in the readme file in EDK_DUET folder. Change the SATA mode to IDE in the BIOS to make DUET recognise the HDD and the DVD drive. I personally do not suggest using Hybrid MBR ( it defeats the very reason for using GPT - multiple primary partitions ). To install Windows in UEFI boot mode, change back to Protective MBR using gdisk, boot DUET, insert the Windows 7 x64 setup disk and then select EFI DVD/CD option in BOOT MANAGER in DUET. Also make sure the EFI SYSTEM PARTITION is formatted as FAT32 ( not NTFS and not HFS or HFS+ ).

Hi Keshav from Chennai, here's Christian from Pondy (in France now)!

Thanks a lot for your tutorial and the USB key trick for emulating UEFI on my BIOS only Asus P5Q3 Deluxe motherboard. I managed to install a dual boot UEFI-GPT system (Snow Leopard/Windows 7 Ultimate 64bit) on a brand new Sata SSD.

 

Pure UEFI-GPT scheme:

0: GUID_partition_scheme *64.0 GB disk0

1: EFI 209.7 MB disk0s1 (FAT32 - created automatically by Snow Leopard Installation, updated automatically by Win7 Installation)

2: Apple_HFS Snow 32.0 GB disk0s2 (HFS+ - for Snow Leopard)

3: Microsoft Reserved 134.2 MB disk0s3 (FAT32 - created automatically by Win7 Installation)

4: Microsoft Basic Data 31.7 GB disk0s4 (NTFS - for Windows 7 Ultimate 64 bit)

 

For the time being, for SL I have to boot in "AHCI" mode with a chameleon USB key, and for Win7 I have to switch to "Enhanced IDE" mode with your UEFI USB key.

Is there no way to compile an "AHCI" compatible EFI_DUET? If you can do that I'll be pleased not to switch between AHCI and IDE mode, then I'll try to have a single USB key with both Chameleon and UEFI in it (if that's possible at all).

Share this post


Link to post
Share on other sites

Hi heliox, I corrected the mistake you pointed out in http://www.insanelymac.com/forum/lofiversi...ndex.php/t43689 page. About AHCI, I do not know even a tiny bit of programming, to help you. I have been unable to boot DUET from HDD (by chainloading it from grub2). If you know programming you can talk to tianocore guys about AHCI support.

 

Chameleon, on the other hand, does not need a separate bootable USB like DUET. Just follow their instructions on installing Chameleon manually. It is safe to overwrite the first 440 bytes MBR boot code of your HDD. In UEFI-GPT mode Windows will not bother about any MBR or its boot code. So you can do away with atleast one pen-drive.

 

Even if you want to continue booting Chameleon from USB, I don't think its possible to have both DUET and Chameleon in the same pendrive. The booting of DUET depends heavily on its bootsectors which load it, unlike Chalemeon. The hindrance here is the DUET bootsectors, not Chameleon.

Share this post


Link to post
Share on other sites

Thanks for your fast reply

I didn't try to boot DUET from HDD either.

I know Chameleon or PCEFI 10.6 can be installed on HDD without hassle but for my experiment I'm using my pendive :).

No, sadly I'm not a programmer so I'm stuck with the DUET pendrive. Speaking of that, yesterday I made an acronis image backup of Win7 partition with it's "plus pack" for GPT HDDs. Perhaps just a coincidence, since then I can't boot into Win7 anymore ;).

In UEFI menu I can't find anymore my HDD's EFI in device list, just the EFI_DUET and EFI SECTOR of my DVD. So no way to "boot from file" -> bootmgfw.efi.

Any idea for solving this problem? Here's what I tried, to no avail:

- boot recovery from Win7 install DVD

- From Linux, deleted and recreated EFI partition with gdisk with the correct type : ef00 . then copied the necessary files in their original folders.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×