-
Notifications
You must be signed in to change notification settings - Fork 305
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 for booting without initramfs (rebased) #1401
Closed
wmanley
wants to merge
5
commits into
ostreedev:master
from
stb-tester:no-initramfs-bootloader-support
Closed
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
aa7cbb5
ostree-prepare-root: enabler for simpler kernel arg
gatispaeglis ef51271
deploy: add --karg-none argument
gatispaeglis cd0f55f
Support for booting without initramfs
gatispaeglis ddb2242
ostree-grub-generator: update outdated comment
gatispaeglis a97c054
Tests: test-no-initramfs: Test both legacy and new kernel locations
wmanley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash | ||
|
||
. $(dirname $0)/libtest.sh | ||
|
||
echo "1..3" | ||
|
||
setup_os_repository "archive-z2" "uboot" | ||
|
||
cd ${test_tmpdir} | ||
|
||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo remote add --set=gpg-verify=false testos $(cat httpd-address)/ostree/testos-repo | ||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo pull testos testos/buildmaster/x86_64-runtime | ||
${CMD_PREFIX} ostree admin deploy --karg=root=LABEL=rootfs --os=testos testos:testos/buildmaster/x86_64-runtime | ||
|
||
assert_file_has_content sysroot/boot/loader/entries/ostree-testos-0.conf 'root=LABEL=rootfs' | ||
assert_not_file_has_content sysroot/boot/loader/entries/ostree-testos-0.conf 'init=' | ||
|
||
echo "ok deployment with initramfs" | ||
|
||
cd ${test_tmpdir}/osdata/boot | ||
rm -f initramfs* vmlinuz* | ||
echo "the kernel only" > vmlinuz-3.6.0 | ||
bootcsum=$(cat vmlinuz-3.6.0 | sha256sum | cut -f 1 -d ' ') | ||
mv vmlinuz-3.6.0 vmlinuz-3.6.0-${bootcsum} | ||
cd - | ||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --tree=dir=osdata/ -b testos/buildmaster/x86_64-runtime | ||
${CMD_PREFIX} ostree pull testos:testos/buildmaster/x86_64-runtime | ||
${CMD_PREFIX} ostree admin deploy --os=testos --karg=root=/dev/sda2 --karg=rootwait testos:testos/buildmaster/x86_64-runtime | ||
assert_file_has_content sysroot/boot/loader/entries/ostree-testos-0.conf 'rootwait' | ||
assert_file_has_content sysroot/boot/loader/entries/ostree-testos-0.conf 'init=' | ||
assert_not_file_has_content sysroot/boot/loader/entries/ostree-testos-0.conf 'initrd' | ||
|
||
echo "ok switching to bootdir with no initramfs" | ||
|
||
cd ${test_tmpdir}/osdata/boot | ||
rm -f initramfs* vmlinuz* | ||
echo "the kernel" > vmlinuz-3.6.0 | ||
echo "initramfs to assist the kernel" > initramfs-3.6.0 | ||
bootcsum=$(cat vmlinuz-3.6.0 initramfs-3.6.0 | sha256sum | cut -f 1 -d ' ') | ||
mv vmlinuz-3.6.0 vmlinuz-3.6.0-${bootcsum} | ||
mv initramfs-3.6.0 initramfs-3.6.0-${bootcsum} | ||
cd - | ||
${CMD_PREFIX} ostree --repo=${test_tmpdir}/testos-repo commit --tree=dir=osdata/ -b testos/buildmaster/x86_64-runtime | ||
${CMD_PREFIX} ostree pull testos:testos/buildmaster/x86_64-runtime | ||
${CMD_PREFIX} ostree admin deploy --os=testos --karg-none --karg=root=LABEL=rootfs testos:testos/buildmaster/x86_64-runtime | ||
assert_file_has_content sysroot/boot/loader/entries/ostree-testos-0.conf 'initrd' | ||
assert_file_has_content sysroot/boot/loader/entries/ostree-testos-0.conf 'root=LABEL=rootfs' | ||
assert_not_file_has_content sysroot/boot/loader/entries/ostree-testos-0.conf 'rootwait' | ||
assert_not_file_has_content sysroot/boot/loader/entries/ostree-testos-0.conf 'init=' | ||
|
||
echo "ok switching from no initramfs to initramfs enabled sysroot" | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This path should use
LIBEXECDIR
I think.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 don't think so. See fd1a044. I think the idea is that
ostree-prepare-root
needs to be at a fixed location in the rootfs otherwise a different version of ostree with different configure flags couldn't successfully deploy a rootfs with standard configure flags.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.
Yep, I even agreed with this in #449 (comment) - though for a different reason; I'm not sure how realistic it is to worry about different configure flags.