Mercurial > illumos > illumos-gate
changeset 11019:133bd84ab259
6882425 delta for 6819150 breaks boot from DVD on a number of systems
author | Jan Setje-Eilers <Jan.Setje-Eilers@Sun.COM> |
---|---|
date | Mon, 09 Nov 2009 19:46:46 -0800 |
parents | 98dcc2fc68b6 |
children | e0feef27b61a |
files | usr/src/grub/grub-0.97/stage2/bios.c usr/src/grub/grub-0.97/stage2/fsys_zfs.c |
diffstat | 2 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/grub/grub-0.97/stage2/bios.c Tue Nov 10 11:28:35 2009 +0800 +++ b/usr/src/grub/grub-0.97/stage2/bios.c Mon Nov 09 19:46:46 2009 -0800 @@ -162,7 +162,7 @@ geometry->heads = 1; geometry->sectors = 15; geometry->sector_size = 2048; - geometry->total_sectors = MAXINT; + geometry->total_sectors = MAXUINT; return 1; } else @@ -196,7 +196,7 @@ geometry->heads = 1; geometry->sectors = 15; geometry->sector_size = 2048; - geometry->total_sectors = MAXINT; + geometry->total_sectors = MAXUINT; return 1; } return 0;
--- a/usr/src/grub/grub-0.97/stage2/fsys_zfs.c Tue Nov 10 11:28:35 2009 +0800 +++ b/usr/src/grub/grub-0.97/stage2/fsys_zfs.c Mon Nov 09 19:46:46 2009 -0800 @@ -1302,6 +1302,19 @@ adjpl = P2ALIGN(adjpl, (uint64_t)sizeof (vdev_label_t)); for (label = 0; label < VDEV_LABELS; label++) { + + /* + * some eltorito stacks don't give us a size and + * we end up setting the size to MAXUINT, further + * some of these devices stop working once a single + * read past the end has been issued. Checking + * for a maximum part_length and skipping the backup + * labels at the end of the slice/partition/device + * avoids breaking down on such devices. + */ + if (part_length == MAXUINT && label == 2) + break; + uint64_t sector = vdev_label_start(adjpl, label) >> SPA_MINBLOCKSHIFT;