Comment 81 for bug 1065281

Revision history for this message
Kent Baxley (kentb) wrote :

@James, Thanks. I'll be ready to look at your changes at any time.

An additional note:

I was also able to repeat Stuart's work in a pure Ubuntu environment...there is one trick, though, and we might want to consider using it in the installer. Here's what I did:

1) Installed Ubuntu 13.10 and verified that it wouldn't boot.

2) Booted into a live desktop session for 13.10

3) Deleted my swap partition on /dev/sda3 and re-created a 1GB partition on /dev/sda3 via parted. I also toggled /dev/sda3 as bootable.

4) Ran mkfs.vfat -s1 /dev/sda3. We had to tell mkfs.vfat to use one sector per cluster or the format wouldn't work. Apparently it isn't smart enough to do that on its own, or the tool is still using 512 hard-coded for sector size where it determines how many sectors to use per cluster (which probably isn't surprising).

5) Once the fat filesystem was laid down, I mounted up /dev/sda1 and /dev/sda3 and copied the EFI directory and its contents from /dev/sda1 to /dev/sda3.

6) I rebooted into the EFI menu and the EFI firmware was finally able to see grubx64.efi by drilling down into the 'boot from file' option in the EFI menu. We've never been able to do this before.

I'm wondering if in partman-efi, where we had to start using mkdosfs to work around some limitations of libparted, we can add the "-s 1" flag to this code, along with making a bigger partition to make all of this work:

from commit.d/format_efi in parman-efi:

 59 log_sector_size="$(blockdev --getss "$(cat device)")"
 60 if log-output -t partman --pass-stdout \
 61 mkdosfs -F "${new_efi_fs#fat}" \
 62 -S "$log_sector_size" \
 63 "$device" >/dev/null; then
 64 sync
 65 status=OK