Get rid of ROOTFSCFG hack on ISO platform#90
Get rid of ROOTFSCFG hack on ISO platform#90luzbel wants to merge 1 commit intorumpkernel:masterfrom
Conversation
Modify grub.cfg: Pass json.cfg to kernel using a multiboot module instead of reading json.cfg from rootfs This allow simple diskless unikernels to boot on baremetal or on hypervisors without virtio support (like Hyper V or VirtualBox ) while PCI IDE drivers aren't built by default.
|
Can you expand on the usage after your change? Also, I'm not sure if your assertion is correct. You should be able to use cookfs to create an image which you can bake and access at runtime without any I/O drivers. (at least I think that works) |
Usage before:
I want to remark, rumprun iso autogenerated grub.cfg and json.cfg, so developer not need to know about those files, and this is what i expect for one tool designed to help developers not to deal with some internals. If you want to run on Hyper-V, theory said you can bake a rootfs, but Usage after:
Just the standard(?) way described in this tutorial: compile, bake and run. (Ok, we can said that cookfs generate an object which is part of the compilation and baking process) I hope this is not going to be another long boring thread like so many in the rumpkernel-user email list. This is your repo, accept or reject the PR, but I can't say much more for only two lines of code. |
|
Where is the config file accessible from at runtime? |
|
rumprun/platform/hw/multiboot.c Line 94 in 39a97f3 |
|
I don't understand this comment on code
multiboot module is preferred source for configuration but grub.cfg is not using it? |
|
@luzbel To explain what this does, since I wrote that code: A multiboot module is just a file on the bootloader's filesystem which gets loaded into memory as a blob alongside the kernel, so it can contain anything. In this case if a module is present we inspect it to see if it looks like a JSON configuration and if so use it instead of looking for the configuration on the "kernel command line". So, in the GRUB example you would load the module with something like @anttikantee The config is not accessible as a file at runtime, only as |
This is what PR does. |
Modify grub.cfg: Pass json.cfg to kernel using a multiboot module instead of reading json.cfg from rootfs
This allow simple diskless unikernels to boot on baremetal or on hypervisors without virtio support (like Hyper V or VirtualBox ) while PCI IDE drivers aren't built by default.
Current grub.cfg generated by "rumprun iso"
New grub.cfg generated by "rumprun iso"