diff options
author | Jan Setje-Eilers <Jan.Setje-Eilers@Sun.COM> | 2009-11-09 19:46:46 -0800 |
---|---|---|
committer | Jan Setje-Eilers <Jan.Setje-Eilers@Sun.COM> | 2009-11-09 19:46:46 -0800 |
commit | 98c507c4288789fc67365c4cb51f80eb641e7182 (patch) | |
tree | dabd2c09277a7c860d8357e5de68b784c1d84b65 /usr/src/grub | |
parent | 005009242f70614f19a539bcf15cefce12b14958 (diff) | |
download | illumos-joyent-98c507c4288789fc67365c4cb51f80eb641e7182.tar.gz |
6882425 delta for 6819150 breaks boot from DVD on a number of systems
Diffstat (limited to 'usr/src/grub')
-rw-r--r-- | usr/src/grub/grub-0.97/stage2/bios.c | 4 | ||||
-rw-r--r-- | usr/src/grub/grub-0.97/stage2/fsys_zfs.c | 13 |
2 files changed, 15 insertions, 2 deletions
diff --git a/usr/src/grub/grub-0.97/stage2/bios.c b/usr/src/grub/grub-0.97/stage2/bios.c index ae70c306f9..c8365177eb 100644 --- a/usr/src/grub/grub-0.97/stage2/bios.c +++ b/usr/src/grub/grub-0.97/stage2/bios.c @@ -162,7 +162,7 @@ get_cdinfo (int drive, struct geometry *geometry) 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 @@ get_cdinfo (int drive, struct geometry *geometry) geometry->heads = 1; geometry->sectors = 15; geometry->sector_size = 2048; - geometry->total_sectors = MAXINT; + geometry->total_sectors = MAXUINT; return 1; } return 0; diff --git a/usr/src/grub/grub-0.97/stage2/fsys_zfs.c b/usr/src/grub/grub-0.97/stage2/fsys_zfs.c index 73e50b4273..a3f3888662 100644 --- a/usr/src/grub/grub-0.97/stage2/fsys_zfs.c +++ b/usr/src/grub/grub-0.97/stage2/fsys_zfs.c @@ -1302,6 +1302,19 @@ zfs_mount(void) 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; |