Skip to content

Commit

Permalink
Add a magic string for the ISO kernel cmdline: (#244)
Browse files Browse the repository at this point in the history
## Description

<!--- Please describe what this PR is going to change -->
This adds a 1024 character string that is used as a known string to
match on when binary patching the Hook ISO. This means that a service
needs to binary patch the Hook ISO that is built with the cmdline. In
the Tinkerbell stack this is functionality that is being built into
Smee. 1024 characters were chosen to allow for patching all the things
that the `auto.ipxe` in Smee allows for currently. This include many
things like, tink worker image, container registry info, proxies, and
more.

## Why is this needed

<!--- Link to issue you have raised -->

Fixes: #

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->


## How are existing users impacted? What migration steps/scripts do we
need?

<!--- Fixes a bug, unblocks installation, removes a component of the
stack etc -->
<!--- Requires a DB migration script, etc. -->


## Checklist:

I have:

- [ ] updated the documentation and/or roadmap (if required)
- [ ] added unit or e2e tests
- [ ] provided instructions on how to upgrade
  • Loading branch information
jacobweinstock authored Nov 8, 2024
2 parents 0bfb51e + 7ed0cf5 commit fbb29ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion linuxkit-templates/hook.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

kernel:
image: "${HOOK_KERNEL_IMAGE}"
cmdline: "this_is_not_used=at_all_in_hook command_line_is_determined_by=ipxe"
# The cmdline is a random string with 1024 characters. It is used for binary patching in the ISO image.
# The kernel and initrd don't use this cmdline. The bootloader that loads the kernel determines the cmdline that will be used.
cmdline: "464vn90e7rbj08xbwdjejmdf4it17c5zfzjyfhthbh19eij201hjgit021bmpdb9ctrc87x2ymc8e7icu4ffi15x1hah9iyaiz38ckyap8hwx2vt5rm44ixv4hau8iw718q5yd019um5dt2xpqqa2rjtdypzr5v1gun8un110hhwp8cex7pqrh2ivh0ynpm4zkkwc8wcn367zyethzy7q8hzudyeyzx3cgmxqbkh825gcak7kxzjbgjajwizryv7ec1xm2h0hh7pz29qmvtgfjj1vphpgq1zcbiiehv52wrjy9yq473d9t1rvryy6929nk435hfx55du3ih05kn5tju3vijreru1p6knc988d4gfdz28eragvryq5x8aibe5trxd0t6t7jwxkde34v6pj1khmp50k6qqj3nzgcfzabtgqkmeqhdedbvwf3byfdma4nkv3rcxugaj2d0ru30pa2fqadjqrtjnv8bu52xzxv7irbhyvygygxu1nt5z4fh9w1vwbdcmagep26d298zknykf2e88kumt59ab7nq79d8amnhhvbexgh48e8qc61vq2e9qkihzt1twk1ijfgw70nwizai15iqyted2dt9gfmf2gg7amzufre79hwqkddc1cd935ywacnkrnak6r7xzcz7zbmq3kt04u2hg1iuupid8rt4nyrju51e6uejb2ruu36g9aibmz3hnmvazptu8x5tyxk820g2cdpxjdij766bt2n3djur7v623a2v44juyfgz80ekgfb9hkibpxh3zgknw8a34t4jifhf116x15cei9hwch0fye3xyq0acuym8uhitu5evc4rag3ui0fny3qg4kju7zkfyy8hwh537urd5uixkzwu5bdvafz4jmv7imypj543xg5em8jk8cgk7c4504xdd5e4e71ihaumt6u5u2t1w7um92fepzae8p0vq93wdrd1756npu1pziiur1payc7kmdwyxg3hj5n4phxbc29x0tcddamjrwt260b0w"

init:
# this init container sha has support for volumes
Expand Down

0 comments on commit fbb29ea

Please sign in to comment.