part with role='mbr' should be stricter about its parameters
Bug #1630769 reported by
Barry Warsaw
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Image |
Fix Released
|
High
|
Barry Warsaw |
Bug Description
During test writing I discovered that a partition with the special type 'mbr' and an offset of 6MiB causes the root partition to be written at an unexpected location. If this partition is the last of three f.e., then the root should be written at least 1MiB past that. Instead, the root partition is written 1MiB past the last non-mbr type partition.
In a way this makes sense since mbr is by definition the 446 bytes at the front of the disk before the partition table, so the disk image builder (make_disk() in builder.py) is not expecting these bogus parameters.
However, we do need to tighten up the documentation around type='mbr' and reject invalid parameters.
tags: | added: tech-debt |
tags: | removed: tech-debt |
Changed in ubuntu-image: | |
milestone: | none → 0.11 |
assignee: | nobody → Barry Warsaw (barry) |
importance: | Undecided → High |
Changed in ubuntu-image: | |
milestone: | 0.11 → 0.12 |
summary: |
- part with type='mbr' should be stricter about its parameters + part with role='mbr' should be stricter about its parameters |
Changed in ubuntu-image: | |
status: | In Progress → Fix Committed |
Changed in ubuntu-image: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Okay, we'll make this easy. After discussion with slangasek, we agree that a role:mbr at anything other than offset 0 doesn't make sense, so we'll just disallow that at the parsing/sanity checking phase.
If a user needs it to be different, they can pad the image written to the mbr structure. If someone else has a use case for an mbr structure at any other weird offset, file a future bug!