Steve's blog
   


Steve About
Steve's blog,
The Words of the Sledge
steve@einval.com

Subscribe
Subscribe to the RSS feed.

Links

  • Home
  • Debian
  • PlanetDebian
  • Search PlanetDebian
  • Friends

  • Matthew Garrett
  • Jonathan McDowell
  • Jo McIntyre
  • Martin Michlmayr
  • Andrew Mobbs
  • Mike Pitt
  • Daniel Silverstone
  • Andy Simpkins
  • Neil Williams

  •        

    Sunday, 12 August 2012

    EFI installation progress

    As promised last month at DebConf, I've been working on adding EFI support to debian-cd and debian-installer, hopefully to get it up and running. At the moment, this is basic support only for booting and setting up the installed system via UEFI. I'm not worrying about "Secure" (better named "Restricted"?) Boot yet - that comes later, and depends on the basic stuff working first.

    So, how is it going? Quite well, really. I've got a debian-cd branch that I'm working on locally, and with a relatively small amount of work there I've got a locally-built CD that boots in EFI mode, using grub-efi as a boot loader. I've borrowed a script called efi-image from Colin Watson which generates the necessary EFI boot image from bits out of the grub-efi-amd64-bin package. For some reason, this grub image isn't working with all the normal graphics code so I've not got a pretty branded startup screen yet. But, nonetheless, I do have a working EFI boot CD. Yay!

    Next step: the installer. At the moment, generic amd64 and i386 machines are assumed to use need dos-style partitioning, and then either lilo or grub as a bootloader. I've patched and rebuilt some of the d-i packages locally to add a new sub-architecture of "efi" for both amd64 and i386, alongside the existing "generic" and "mac" variants. Using that new sub-architecture, it's possible to add checks for amd/efi and i386/efi in various places to make the necessary changes:

    • choose the GPT partition type for blank disks
    • tweak the auto-partitioner to add an EFI (fat32) boot partition on the front of the first hard disk
    • install the elilo bootloader

    Why elilo? It's the default for current ia64 systems, and for EFI Macs. I tried to get grub-efi working with the grub-installer package, but with little success so far. I'll try again with grub-efi, but for now elilo is much simpler and (importantly!) it works for me.

    So, I have a netinst CD built that works for me in local testing in a qemu VM using James Bottomley's OVMF build of Tianocore. It's not pretty, but it works fine, covering all the normal Debian installation steps and giving me a UEFI system at the end of the process. I'm about to start testing on real hardware now, so I think it's worth sharing this netinst image with others too. Grab it from http://cdimage.debian.org/cdimage/unofficial/efi-development/upload1/ . The "bits" subdirectory contains all the tweaked d-i packages I've played with, in both source and binary form. If you have an EFI system and would like to help us get it supported well in Debian, please download this image and play with it! Feedback to the debian-cd and/or debian-boot lists, please!

    16:22 :: # :: /debian/CDs :: 10 comments

    Comments

    Re: EFI installation progress
    Andy Cater wrote on Sun, 12 Aug 2012 21:01

    Meh - loadlin.bin not found - this from dd'ing it direct to USB stick :(

    Rotten nuisance - I want to dual-boot this Thinkpad


    Reply
      Re: Re: EFI installation progress
      Steve wrote on Sun, 12 Aug 2012 23:02

      Yeah, it's not working on USB yet. I think I know why - the existing isohybrid stuff is designed for a BIOS to use, so we'll need to do the equivalent in a UEFI-compatible manner so it looks like a hard disk should.

      I burned the image to a CD for testing on real hardware.


      Reply
    Re: EFI installation progress
    Elessar wrote on Sun, 12 Aug 2012 21:05

    Excellent! Just do not forget that some people install Debian on computers where there is already another operating system, in which case the existing EFI partition must be used without formating it.

    Also, it would be nice to have the choice between elilo and grub-efi, just like there is a choice between lilo and grub for BIOS-based systems. Defaulting to elilo is fine, but dropping GRUB completely…


    Reply
      Re: Re: EFI installation progress
      Steve wrote on Sun, 12 Aug 2012 23:05

      Yeah, we need to work on fitting in with existing installations.

      And yes, I'm just doing elilo *for now* as already stated. I'm going to look at grub-efi again shortly (as already stated above!)


      Reply
        Re: Re: Re: EFI installation progress
        greg wrote on Mon, 03 Sep 2012 19:42

        Does this mean the CD does not work for dual booting at the moment? Or do I have just to take care of the formatting of the GPT parition manually?


        Reply
          Re: Re: Re: Re: EFI installation progress
          Steve wrote on Wed, 05 Sep 2012 16:49

          I'd expect the latest build to work for dual-boot using grub, but I can't guarantee it'll work out of the box. A report on the debian-cd list suggests that it *may* not find a Windows installation automatically. More tests in this area would be lovely...


          Reply
    Re: EFI installation progress
    Andrey wrote on Mon, 20 Aug 2012 14:54

    Thank you Steve very much for your work. I just tested your installation CD on ASUS UX32VD notebook. Installed on built-in SSD drive (/dev/sdb) in UEFI mode without any problems! Before installation I've partitioned the SSD with GPT (200Mb fat32 with boot flag and the rest is ext4 partition) using live gparted CD.


    Reply
    Re: EFI installation progress
    Jeremiah Foster wrote on Tue, 28 Aug 2012 12:08

    Going to test on a 15" MacBook Pro Mid-2012. I'll post more here later but I can say that using the regular Debian testing ISO is not working; refit doesn't see it, the machine won't boot from the CD (even when holding down the "c" key) and Apple's OS X won't allow one to specify Debian as a start-up disk.


    Reply
    Re: EFI installation progress
    Jeremiah Foster wrote on Sun, 02 Sep 2012 11:28

    It looks as if the move Apple made to "protected" GPT has rendered booting Linux, even the Debian EFI disks, quite difficult. One has to disable the protected part of the partition which one cannot do with Apple's own tools, so at the very least one needs to install a tool like gptfdisk along with refit to change the partition format so that EFI can see it. If you want an easy experience installing debian on an EFI enabled device, you may want to choose something other than Apple hardware.


    Reply
      Re: Re: EFI installation progress
      Steve wrote on Sun, 02 Sep 2012 18:40

      Yeah, Apple are really not the most helpful here. There are scary stories about bad interactions between Apple's firmware and efibootmgr too. :-(


      Reply

    Your Comment

     
    Name:
    URL/Email: [http://... or mailto:you@wherever] (optional)
    Title: (optional)
    Comment:
    Anti-spam:Select the ninth of the following words and enter it in the "Human" box
    renter robust responds ruffled roams relics ruffing rarities resorts recounts
    Human:
    Save my Name and URL/Email for next time