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, 21 December 2014

    UEFI Debian installer work for Jessie, part 2

    A month ago , I wrote about my plans for improved (U)EFI support in Jessie. It's about time I gave an update on progress!

    I spoke about adding support for installing grub-efi into the removable media path (#746662). That went into Debian's grub packages already, but there were a couple of bugs. First of all, the code could end up prompting people about EFI questions even when they didn't have any grub-efi packages installed. Doh! (#773004). Then there was an unexpected bug with case-insensitive file name handling on FAT/VFAT filesystems (#773092). I've posted (and tested!) patches to fix both, hopefully in an upload any day now.

    Next, I mentioned getting i386 UEFI support going again. This is a major feature that a lot of people have been asking for. It's also going to involve quite a bit of effort...

    Our existing (amd64) UEFI-capable images in Debian use the standard x86 El Torito CD boot method, with two boot images provided. One of these images gives us the traditional isolinux BIOS-boot support. The second option is an alternate El Torito image, including at a 64-bit version of grub-efi. For most machines, this works just fine - the BIOS or UEFI firmware will automatically pick the correct image and everybody's happy. This even works on our multi-arch i386/amd64 CDs and DVDs - isolinux will boot either kernel from the first El Torito image, or the alternate UEFI image is amd64 only.

    However, I can now see that there's been a long-standing issue with those multi-arch images, and it's to do with Macs. On the advice of Matthew Garrett, I've borrowed an old 32-bit Intel Mac to help testing, and it's quite instructive in terms of buggy firmware! The firmware on older 32-bit Intel Macs crashes hard when it detects more than one El Torito boot image, and I've now seen this happen myself. I've not had any bug reports about this, so I can only assume that we haven't had many users try that image. As far as I can tell, they've been using the normal i386 images in BIOS boot mode, and then struggling to get bootloaders working afterwards. There are a number of different posts on the net explaining how to do that. That's OK, but...

    If I now start adding 32-bit UEFI support to our standard set of i386 images, this will prevent users of old Macs from installing Debian. I could just say "screw it" and decide to not support those users at all, but that's not a very nice thing to do. If we want to continue to support them and add 32-bit UEFI support, I'll have to add another flavour of i386 image, either a "Mac special" or a "32-bit UEFI special". I'm not keen on doing that if I could avoid it, but the two options are mutually exclusive. Given the Mac problem is only on older hardware which (hopefully!) will be dying out, I'll probably pick that one as the special-case CD, and I'll make an extra netinst flavour only for those users to boot off.

    So, I've started playing with i386 UEFI stuff in the last couple of weeks too. I almost immediately found some showstopper behaviour bugs in the i386 versions of efivar and efibootmgr (#773412 and #773007), but I've debugged these with our Debian maintainer (Jared Dominguez) and the upstream developer (Peter Jones) and fixes should be in Jessie very soon.

    As I mentioned last month, the machines that most people have been requesting support for are the latest Bay Trail-based laptops and tablets. There are using 64-bit Intel Atom CPUs, but crippled with 32-bit UEFI firmware with no BIOS compatibility mode. This makes for some interesting issues. It's probably impossible to get a true answer why these machines are so broken by design, but there are several rumours. As far as I can see, most of these machines seem to ship with a limited version of 32-bit Windows 8.1. 32-bit Windows is smaller than 64-bit Windows, so fits much better in limited on-board storage space. But 32-bit Windows won't boot from 64-bit UEFI, so the firmware needed buggering to match. Ugh!

    To support these Bay Trail machines properly, we'll want to add a 32-bit UEFI installation option to our 64-bit images. I can tweak our CDs so that both 32-bit and 64-bit versions of grub-efi are included, and the on-board UEFI will load the right one needed. Then I'll need to make sure that all the 64-bit images also include grub-efi-ia32-bin from now on. With some extra logic, we'll need to remember that these new machines need that package installing instead of grub-efi-amd64-bin. It shouldn't be too hard, but let's see! :-)

    So, I've been out and bought one of these machines, an Asus X205TA. Lucas agreed that Debian will reimburse me (thanks!), so I'm not stuck with spending my own money on an otherwise unwanted machine! I can see via Google that none of the mainstream Linux distros support the Bay Trail machines fully yet, so there's not a lot of documentation yet. Initial boot on the new machine was easy using a quick-hack i386 UEFI image on USB, but from there everything went downhill quickly. I'll need to investigate some more, but the laptop's own keyboard and trackpad are not detected by the installer system. Neither is its built-in WiFi. Yay! I had to go and dig out a USB hub to connect the installer image USB key, a keyboard, mouse and a USB hard drive to the machine, as it only has 2 USB ports. I've taken a complete backup of the on-board 32GB flash before I start experimenting, so I can restore the machine back to its virgin state for future testing.

    I guess I now have a project to keep me busy over Christmas...!

    In other news, we've been continuing work on UEFI support for and within the new arm64 port. My ARM/Linaro colleague Leif Lindholm has been back-porting upstream kernel features and bug fixes to make d-i work, and filing Debian bugs when silly things break on arm64 because people don't think about other architectures (e.g #773311, doh!). As there are more and more people interested in (U)EFI support these days, I've also proposed that we create a new debian-efi mailing list to help focus discussion. See #773327 and follow up there if you think you'd use the list too!

    You can help! Same as 2 years ago, I'll need help testing some of these images. For the 32-bit UEFI support, I now have some relevant hardware myself, but testing on other machines too will be very important! I'll start pushing unofficial Jessie EFI test images shortly - watch this space.

    02:51 :: # :: /debian/CDs :: 9 comments

    Comments

    Re: UEFI Debian installer work for Jessie, part 2
    jba wrote on Sun, 21 Dec 2014 20:48

    Hi Steve, glad to here that you are continuing the work on the 32Bit UEFI boot problem! And you are testing with the Asus X205! I think this is a machine, many people want to run Linux on (including myself)! So I am am looking forward to your next post. Thanks a lot for your efforts.

    jba


    Reply
    Re: UEFI Debian installer work for Jessie, part 2
    Andrea Bolognani wrote on Sun, 21 Dec 2014 23:29

    I installed Debian, using the Jessie beta 2 installer, on a UEFI system (Lenovo Yoga 2 Pro) during the weekend. Being my first UEFI-powered machine, I was afraid just getting the installer to start would require arcane incantations, but as it turns out everything worked out of the box! I hope your work will make installation just as easy for as many people as possible. Cheers!


    Reply
    Re: UEFI Debian installer work for Jessie, part 2
    Hendrik Weimer wrote on Fri, 26 Dec 2014 19:13

    FYI: I've managed to install Debian on the X205TA. I've written down my experience in the Wiki (https://wiki.debian.org/InstallingDebianOn/Asus/X205TA).


    Reply
    Re: UEFI Debian installer work for Jessie, part 2
    lachlan wrote on Thu, 01 Jan 2015 05:56

    being able to set 32 bit grub in an amd64 install would be i really welcome update! i've found a lot of HP machines with this type of efi and it has caught me out a few times now.


    Reply
    Re: UEFI Debian installer work for Jessie, part 2
    Edgar wrote on Thu, 22 Jan 2015 04:03

    Someone help me. i install this and now the bios is locked and i cant restored my Asus X205TA. to access my debian i need a localhost login: i have no idea. please someone help me.


    Reply
    Re: UEFI Debian installer work for Jessie, part 2
    Brian wrote on Wed, 28 Jan 2015 00:45

    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744959 is probably relevant to the 32-bit-Mac-EFI issue.


    Reply
    Re: UEFI Debian installer work for Jessie, part 2
    tilt wrote on Fri, 30 Jan 2015 05:38

    Successfully booted into the Acer Aspire Switch 10 (Intel Atom Z3745D) with build #3.

    Dmesg: http://tk-sls.de/test/acer-aspire-switch10.linux_3.16.0-4.dmesg.txt


    Reply
    Re: UEFI Debian installer work for Jessie, part 2
    RK wrote on Tue, 24 Feb 2015 16:51

    I've tested the 64 bit install to work on the Meegopad T01 nearly flawlessly. Booted to Windows and shrunk the Windows partition and then proceeded to install Debian in the resulting empty space. There was a warning about not finding the EFI partition (the "nearly flawless" part mentioned earlier) I ignored but as soon as the system rebooted I found myself in Grub and Debian was booting fine.

    For any other Meegopad owners that might be reading this: You'd need a usb-to-ethernet adapter since the install needs a working internet connection but the WiFi driver isn't in the Debian repositories. Also, there's a known bug with the Meegopad regarding backspace being sent to Grub on boot but it's unrelated to the distribution. If booting without a keyboard on human input on reboot is necessary - seeing as those ghost backspaces break the 5 secs time-out to the default OS - you could change /etc/default/grub "GRUB_TIMEOUT=5" to "GRUB_TIMEOUT=0" and execute "update-grub" in root (su...). On power outs there's a separate bios configuration that might also be necessary but I've heard it bricked someone's device so I didn't bother testing it out.

    Also unrelated to the distribution but is related to the kernel version Jessie comes with (3.16): Audio, the built-in micro-sd card-reader and the WiFi drivers are missing. Though the latter can be found in https://github.com/hadess and compile with build-essential and the normal 64bit stock 3.16 headers aptitude installs*. For audio I bought a USB sound card for 1$ on ebay that works fine out of the box.

    * (adopted from Ubuntu instructions found at https://github.com/hadess/rtl8723bs/issues/10 for this jessie install cd): su aptitude install build-essential linux-headers-amd64 git exit git clone https://github.com/hadess/rtl8723as.git cd rtl8723as make su make install depmod -a modprobe r8723bs exit


    Reply
      Re: Re: UEFI Debian installer work for Jessie, part 2
      wrote on Tue, 24 Feb 2015 16:56

      Last comment had EOL formatting issues so restarting from the asterisk:

      * (adopted from Ubuntu instructions found at https://github.com/hadess/rtl8723bs/issues/10 for this jessie install cd):

      "

      su

      aptitude install build-essential linux-headers-amd64 git

      exit

      git clone https://github.com/hadess/rtl8723as.git

      cd rtl8723as

      make

      su

      make install

      depmod -a

      modprobe r8723bs

      exit

      "


      Reply

    Your Comment

     
    Name:
    URL/Email: [http://... or mailto:you@wherever] (optional)
    Title: (optional)
    Comment:
    Anti-spam:Select the seventh of the following words and enter it in the "Human" box
    jackets jollying joyously jiffy jolted junketed jettison jets joggles jigsaws
    Human:
    Save my Name and URL/Email for next time