-
Notifications
You must be signed in to change notification settings - Fork 311
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
Support direct kernel booting a disk image #1877
Conversation
2c8b787
to
c0ef822
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.
Looks reasonable. The moving of the code doesn't make it easy to review…
mkosi/qemu.py
Outdated
# kernel argument instead. | ||
root = finalize_root(find_partitions(fname)) | ||
if not root: | ||
die("Cannot direct boot image without root or usr partition") |
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.
directly
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.
I think direct is more useful here, since we're using the direct kernel boot feature, but I'll change it to "Cannot direct kernel boot image ..."
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.
That grammatical error is grating. "Cannot perform a direct kernel boot", or "Direct kernel boot is not possible", etc.
This requires two things: 1. We need to generate a split initrd again to pass to -initrd 2. We need to synthesize a root= argument as we can't rely on gpt-auto-generator since we're not using EFI. We move the partition and root= specific stuff to a new file partition.py so we can access it from qemu.py as well. We also introduce extract_pe_section() since we now use the logic twice.
c0ef822
to
8f26a6d
Compare
This requires two things:
gpt-auto-generator since we're not using EFI.
We move the partition and root= specific stuff to a new file
partition.py so we can access it from qemu.py as well.
We also introduce extract_pe_section() since we now use the logic
twice.