[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Debian install issues with i386 EFI based system



Linux Install 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:

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.

 

 

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.

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

5. Execute this command to start the install:

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

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

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

7. Continue the install as normal to the “Install GRUB” step.

8. Switch to a tty session and manually mount the EFI Partition (mount /dev/sda1 /mnt)

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

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

11. Finish the install and reboot to EFI Shell

12. Copy elilo.efi from the USB Key to the EFI Partition on the hard drive.

13. Create a 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 a El Torito boot image on the CD in no emulation mode, there could be a hard drive emulation with the Legacy boot image as a hidden file in the files list 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 Legacy boot image file.

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 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 parted should determine it is an EFI based system and create the GPT and the EFI Partition.

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.

Finally the efibootmgr program should create a EFI Boot Manager boot entry for Linux.

 

 

Summary:

Almost all these pieces exist in the i386 Linux build process today but there are some small changes needed to the build process 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


Reply to: