Support for booting without initramfs
Previously when initramfs-* was not found in a deployment's boot directory, it was assumed that rootfs is prepared for ostree booting by a kernel patch. With this patch, the behaviour changes to be - if initramfs-* is not found, assume that system is using a static ostree-prepare-root as init process. Booting without initramfs is a common use case on embedded systems. This approach is also more convenient, than having to patch the kernel. Closes: #1401 Approved by: cgwalters
This commit is contained in:
1 parent
652d9dd98a
commit
4233b1db19
4 files changed
+71
-8
No files matched your search
@@ -28,7 +28,7 @@ entries_path=$(dirname $new_grub2_cfg)/entries
|
||||
|
||||
read_config()
|
||||
{
|
||||
config_file=${entries_path}/${1}
|
||||
config_file=${1}
|
||||
title=""
|
||||
initrd=""
|
||||
options=""
|
||||
@@ -67,11 +67,13 @@ populate_menu()
|
||||
else
|
||||
boot_prefix="${OSTREE_BOOT_PARTITION}"
|
||||
fi
|
||||
for config in $(ls ${entries_path}); do
|
||||
for config in $(ls $entries_path/*.conf); do
|
||||
read_config ${config}
|
||||
menu="${menu}menuentry '${title}' {\n"
|
||||
menu="${menu}\t linux ${boot_prefix}${linux} ${options}\n"
|
||||
menu="${menu}\t initrd ${boot_prefix}${initrd}\n"
|
||||
if [ -n "${initrd}" ] ; then
|
||||
menu="${menu}\t initrd ${boot_prefix}${initrd}\n"
|
||||
fi
|
||||
menu="${menu}}\n\n"
|
||||
done
|
||||
# The printf command seems to be more reliable across shells for special character (\n, \t) evaluation
|
||||
|
||||
Reference in new issue
Block a user