Hi Niall.
The fix looks fine. (I checked the fdisk manpage.)
Thanks,
Jack
On 04/16/12 01:33 AM, Niall Power wrote:
Good morning!
Could I ask for a very short code review for the following bug:
7161544 Workaround for brain dead BIOSes that refuse to boot off USB
media that have no active DOS partition
http://monaco.us.oracle.com/detail.jsf?cr=7161544
The fix is to mark the EFI system partition on the boot media as
active when the MBR image is being assembled
during distro constructor's boot checkpoint execution. This satisfies
the BIOS enough to execute the boot
sector of the MBR on the affected system.
I've tested and confirmed this on the system that this was reported
against plus on a couple BIOS and UEFI systems
that were doing the correct thing already.
Wevrev:
http://jurassic.us.oracle.com/~npower/webrevs/webrev-active-esp/
Diff:
--- old/usr/src/lib/install_boot/boot.py Sun Apr 15 14:37:38 2012
+++ new/usr/src/lib/install_boot/boot.py Sun Apr 15 14:37:38 2012
@@ -1023,11 +1023,15 @@
# target modules because we want precise control over
the
# geometry, plus it's not well suited to lofi devices.
# Layout:
- # type ESP, at 1M offset, partition size = uefi_image
size
+ # - type ESP, active, at 1M offset,
+ # - partition size = uefi_image size
+ # The ESP is marked active, because despite the fact
that we
+ # write GRUB to the MBR, some BIOSes are brain dead
and won't
+ # boot USB media without an active DOS partition.
esptype = Partition.name_to_num("EFI System")
startblock = MB / BLOCKSIZE
uefi_image_nblocks = uefi_image_size / BLOCKSIZE
- fdiskentry = "%d:0:0:0:0:0:0:0:%d:%d" \
+ fdiskentry = "%d:128:0:0:0:0:0:0:%d:%d" \
% (esptype, startblock, uefi_image_nblocks)
self.logger.debug("Creating fdisk table on %s:\n\t%s",
lofi_rdev, fdiskentry)
Thanks!
Niall
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss