Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for SDX 8900 platform #181

Open
wants to merge 6 commits into
base: release/xs8
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions disktools.py
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,7 @@ class GPTPartitionTool(PartitionToolBase):
# These are partition type GUIDs
ID_LINUX_SWAP = "0657FD6D-A4AB-43C4-84E5-0933C84B4F4F"
ID_LINUX = "EBD0A0A2-B9E5-4433-87C0-68B6B72699C7"
ID_LINUX2 = "0FC63DAF-8483-4772-8E79-3D69D8477DE4"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In what cases would the host-installer need to handle a partition of this type?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you load the MBR using GPT tool for doing the conversion, it's the type gdisk will use.

ID_LINUX_LVM = "E6D6D379-F507-44C2-A23C-238F2A3DF928"
ID_EFI_BOOT = "C12A7328-F81F-11D2-BA4B-00A0C93EC93B"
ID_BIOS_BOOT = "21686148-6449-6E6F-744E-656564454649"
Expand All @@ -948,6 +949,7 @@ class GPTPartitionTool(PartitionToolBase):
GUID_to_type_code = {
ID_LINUX_SWAP: '8200',
ID_LINUX: '0700',
ID_LINUX2: '0700',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0FC63DAF-8483-4772-8E79-3D69D8477DE4 has a type code of 0x8300 according to gptfdisk, not 0x700.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but we want to end up with EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 for compatibility reasons.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than calling this ID_LINUX2, I think it would be better to rename ID_LINUX to reflect what gptfdisk calls it (at least since 0.7.2 from 2011).

0x700 == EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 == "Microsoft basic data"
0x8300 == 0FC63DAF-8483-4772-8E79-3D69D8477DE4 == "Linux filesystem"

(Although it is still not clear to me why this new constant is needed.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are using Microsoft basic type type for Linux partitions. So, we want to tell sgdisk 0700 for both. Maybe use ID_LINUX for 0FC63DAF-8483-4772-8E79-3D69D8477DE4 and ID_MS_BASIC for EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 but maps both to 0700 ?

ID_LINUX_LVM: '8e00',
ID_EFI_BOOT: 'ef00',
ID_BIOS_BOOT: 'ef02',
Expand Down