-
Notifications
You must be signed in to change notification settings - Fork 93
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
pack: Support --real-rootdev for RHCOS+LUKS #251
Conversation
Current status is that this crashes with a checksum mismatch. Debugging this is fun! (any tips appreciated) My notes:
|
Yes, this is correct. We need the data offset of the LUKS container ( |
ef23c0d
to
ae787b5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for tackling this! LGTM overall, just some minor comments.
src/osmet/mod.rs
Outdated
let ((start_offset, end_offset), offset) = if let Some(mapping) = mapping { | ||
let bdev = BlkDev { path: mapping.underlying_device.clone(), ..Default::default() }; | ||
let (start_offset, end_offset) = bdev.get_partition_offsets()?; | ||
let offset = mapping.offset_bytes.checked_mul(512) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, does this need to actually be * $sector_size
? Or (like partition offsets), is it always in 512 blocks? We can punt on investigating this until we actually plumb through osmet for metal4k images.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question; yeah, I think we should defer this until we've gone through the metal4k exercise.
I wouldn't be surprised if for 4k we also had to change the LUKS bits in RHCOS too.
Pairs with: coreos/coreos-assembler#1483 We want RHCOS to support offline installs too (it's key to the UX) but the LUKS container complicates things. We discussed changing the RHCOS LUKS bits to save the header in e.g. `/boot` but it's a big change to that code, and introduces yet another layout when we really want to switch to Ignition+LUKS.
One argument to have the "preparation" in the supermin code in coreos-assembler is that it's code that isn't shipped in the main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I think it's fine as is. We'll rip this out anyway once we drop the baked LUKS container. |
Pairs with: coreos/coreos-assembler#1483
We want RHCOS to support offline installs too (it's key to the UX)
but the LUKS container complicates things. We discussed changing
the RHCOS LUKS bits to save the header in e.g.
/boot
but it'sa big change to that code, and introduces yet another layout
when we really want to switch to Ignition+LUKS.