Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Bug#455914: Debian Install CD, process needs to support i386 EFI version

From: Charles Abdouch <Charles.Abdouch(at)CiscSystems.net>
Date: Wed Dec 12 2007 - 10:31:16 EST


Package: debian-cd

Version: 3.0.2  

Debian CD Team,    

Problem:

I am trying to produce a proper Debian Install CD (NETINST) to work with an i386 EFI Based system.

The NETINST CD should contain both the Legacy boot image and the EFI files needed to install Linux.

Also the install process should determine it is on an EFI Based system and install the appropriate packages as well as using the proper 'parted' and 'elilo' methods of partitioning the hard drive and installing the boot system.    

Background:

Do you need help?X

I am part of a team making an i386 EFI BIOS for an Intel Core 2 Duo platform.

Today our BIOS meets the EFI Spec and includes the optional ACPI, SMBIOS, and MPS tables pointed to by the EFI System Table. We are having a minor bug with efivars when we attempt to call set_variable which is a separate issue.

Although this is not an Apple MiniMAC type platform, it is similar in the major chipset components.

CPU: Intel Mobile L7400 Core 2 Duo with 64-bit extensions (our BIOS is currently only i386)

NorthBridge: Intel Mobile 945GM (PCIe port is used as a DVI-I port to run dual monitor)

SouthBridge: Intel Mobile ICH7M

SIO: None (no serial, parallel, floppy, keyboard, etc)

Keyboard: None (USB Ports only)

Do you need more help?X

NIC: Intel Mobile 82573L

  1. TI PCIe XIO2200AZHH

TPM: Atmel AT97SC3203

Sound: IDT STAC9200 (HD Audio)

Bluetooth: TI LMX5452  

ICH7 I/O: 2 Sata (one eSATA, one internal SATA), SPI (BIOS), LPC (TPM), PCIe
(ePCIe), 6 USB
     

Workaround:

  1. Take the i386 Debian NETINST install CD and extract the initrd and vmlinuz files from the install.386 directory on the CD to a USB Key.
  2. Copy elilo.efi (i386 version) which I previous downloaded from the Internet to the USB Key.
  3. Boot to EFI Shell. EFI Shell sees the USB Key as a file system and assigns a FS# to it.

            Note: Though EFI sees the CD, it doesn't assign a File System to either the El Torito image or ISO-9660 areas.

4. Change to the USB Key's file system using fs0:

Can we help you?X

5. Execute this command to start the install:

elilo -i initrd vmlinux ro root=/dev/ram0

Note: The install will proceed as normal up to the Partition point.

6. Use the manual method to create an EFI, Swap, and Linux partitions.

Note: Continue the install as normal to the "Install GRUB" step.

7. Switch to a tty session and manually mount the EFI Partition

mount /dev/sda1 /mnt

8. Copy the /target/initrd.img and /target/vmlinuz files to the EFI Partition (/mnt)

Can't find what you're looking for?X

            cp /target/initrd.img /mnt

            cp /target/vmlinuz /mnt

9. Do not allow GRUB or LILO to write to the disk.

  1. Finish the install and reboot to EFI Shell
  2. Copy elilo.efi from the USB Key to the EFI Partition on the hard drive.
  3. Remove the USB Key and remap the file systems

map -r

  1. Create an EFI Boot Manager entry or a startup.nsh script to boot Linux.

You can manually boot Linux with:

elilo -i initrd.img vmlinuz ro root=/dev/sda3    

Suggested Fix:

Instead of an El Torito boot image on the CD in no emulation mode, there could be a hard drive emulation with the original boot image as a file in the FAT File System and the EFI install files startup.nsh, elilo.efi, elilo.conf, initrd, and vmlinuz in the same directory. The "MBR" of the hard drive emulation of the El Torito CD section would indicate a single bootable partition and the Boot Sector in that partition would load the original boot image file.

Don't know where to look next?X

So when a legacy system boots the CD, it still boots the same file as it would have before but now when the CD is booted on an EFI system, a File System number is assigned to the directory which contain the files listed above.

The StartUp.nsh file would contain the following lines:

fs0:

elilo -i initrd vmlinux ro root=/dev/ram0

(or simply elilo if the elilo.conf file contains the command line
parameters)  

The parted should determine it is an EFI based system and create the GPT and the EFI Partition.

The Installer also needs to determine it is running on an EFI Based system
(efivars.ko will be loaded) and install the packages elilo and efibootmgr.

The efibootmgr program produces elilo.conf file and the elilo package contains the elilo.efi program. These files along with the compiled initrd.img and vmlinuz files should be copied to the EFI partition by the install process.

Confused? Frustrated?X

Finally the efibootmgr program should create an EFI Boot Manager boot entry for Linux. (this is currently broken on our system probably due to a BIOS bug)    

Summary:

Almost all these pieces exist in the i386 Linux build process today but there are some small changes needed to the build and install processes and the Install CD needs to have the El Torito section setup differently to work with both Legacy and EFI systems.    

I am trying to create a NETINST CD which meets the suggestion above to verify it would work with both and I would be happy to work with the individuals working on this to help refine the process and test it out.  

Thank you,

Charles Abdouch

-- 
To UNSUBSCRIBE, email to debian-cd-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Received on Wed Dec 12 10:34:27 2007

This archive was generated by hypermail 2.1.8 : Wed Mar 19 2008 - 06:56:32 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library