Project

General

Profile

Bug #7841

loader: wrong device name is set for GPT partition

Added by Toomas Soome almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
bootloader
Start date:
2017-02-05
Due date:
% Done:

100%

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

Description

When booting from GPT partition and the file system is not ufs, the loader does set diskXsY: as currdev, but GPT partitions should be diskXpY:

The problem is that loader main does set partition type as -1, but disk_fmtdev() is expecting 255 (0xff) there.

#1

Updated by Toomas Soome almost 4 years ago

Toomas Soome wrote:

When booting from GPT partition and the file system is not ufs, the loader does set diskXsY: as currdev, but GPT partitions should be diskXpY:

The problem is that loader main does set partition type as -1, but disk_fmtdev() is expecting 255 (0xff) there.

oh, there is typo, the above should be read: .. and the file system is not zfs...

Still the root of the problem is that the improper partition type value is used in loader code, causing the currdev variable to have incorrect (but still functional) device name. The issue is not visible with zfs boot, as in case of zfs boot, the currdev value is using form "zfs:pool/dataset/dataset1:

#2

Updated by Electric Monk almost 4 years ago

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

git commit c21f2c4349fbfe190f08e04d2cb639d24b4e4f60

commit  c21f2c4349fbfe190f08e04d2cb639d24b4e4f60
Author: Toomas Soome <tsoome@me.com>
Date:   2017-02-07T19:34:15.000Z

    7841 loader: wrong device name is set for GPT partition
    Reviewed by: Yuri Pankov <yuri.pankov@gmail.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Also available in: Atom PDF