Project

General

Profile

Actions

Bug #9753

closed

installgrub: hard coded partition 0 with GPT

Added by Toomas Soome over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2018-08-17
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:

Description

I was quite surprised to find installgrub to report partition 0 when I did use c2t1d0s1 with it. Fortunately the fix is quite trivial:

--- a/usr/src/cmd/boot/installgrub/installgrub.c
+++ b/usr/src/cmd/boot/installgrub/installgrub.c
@@ -741,8 +741,8 @@ get_start_sector(ig_device_t *device)

                device->start_sector = vtoc->efi_parts[device->slice].p_start;
                /* GPT doesn't use traditional slice letters */
+               device->partition = device->slice;
                device->slice = 0xff;
-               device->partition = 0;

                efi_free(vtoc);
                goto found_part;

Actions #1

Updated by Electric Monk over 5 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit d23a2a081683858fbc9fafc163b60bbd8c9ede13

commit  d23a2a081683858fbc9fafc163b60bbd8c9ede13
Author: Toomas Soome <tsoome@me.com>
Date:   2018-08-20T17:35:40.000Z

    9753 installgrub: hard coded partition 0 with GPT
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Reviewed by: Yuri Pankov <yuripv@yuripv.net>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF