Ubuntu CD image build software

Comment 110 for bug 1040557

Val (vk1266) wrote :

I am a bit stuck... need some ideas. Steve?

Here is what I have done so far:
1. switched to the CMS mode, installed Ubuntu, rebooted
3. installed Colin King's patches, rebooted, removed all previous kernel images just in case, rebooted again and verified that indeed I have the correct patched kernel; added the EFI partition to /etc/fstab to mount at /boot/efi
4. rebooted, switched to the UEFI+CMS mode
5. now the machine boots Windows! Apparently, if there is working UEFI bootloader and a CMS bootloader, only the UEFI one gets picked up. Okay... the only way to boot Ubuntu at this time is to go back to the CMS mode
6. back in the CMS mode. Ubuntu loads fine. Now I attempt to install UEFI bootloader while in the CMS mode:
   sudo apt-get install grub-efi-amd64
This removes grub-pc and grub-gfxpayload-lists, but I guess that's okay for now... then
   sudo grub-install --efi-directory=/boot/efi --target=x86_64-efi --bootloader-id=Ubuntu

At this point, I get:
   Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables.
   Try 'modprobe efivars' as root.
   Installation finished. No error reported.

'modprobe efivars' has no effect. Some googling reveals that in order to get it to work, one needs to boot in the UEFI mode; this modprobe command will not work while in the BIOS/CMS mode. I am stuck... I can't load UEFI because it's not yet installed and I can't install UEFI from the CMS mode. Now what? Any ideas?