mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 11:51:14 +02:00
Merge pull request #137 from kinvolk/kai/remove-kernel-from-usr
build_image_util.sh: delete vmlinuz file from /usr partition
This commit is contained in:
commit
6c13e2c3a7
@ -597,10 +597,13 @@ finish_image() {
|
||||
*) disable_read_write=${FLAGS_FALSE} ;;
|
||||
esac
|
||||
|
||||
# Copy kernel to support dm-verity boots
|
||||
# Copy kernel to the /boot partition to support dm-verity boots by embedding
|
||||
# the hash of the /usr partition into the kernel.
|
||||
# Remove the kernel from the /usr partition to save space.
|
||||
sudo mkdir -p "${root_fs_dir}/boot/flatcar"
|
||||
sudo cp "${root_fs_dir}/usr/boot/vmlinuz" \
|
||||
"${root_fs_dir}/boot/flatcar/vmlinuz-a"
|
||||
sudo rm "${root_fs_dir}/usr/boot/vmlinuz"*
|
||||
|
||||
# Record directories installed to the state partition.
|
||||
# Explicitly ignore entries covered by existing configs.
|
||||
|
||||
@ -661,7 +661,7 @@ _write_iso_disk() {
|
||||
pushd "${iso_target}" >/dev/null
|
||||
mkdir isolinux syslinux flatcar
|
||||
_write_cpio_common "$1" "${iso_target}/flatcar/cpio.gz"
|
||||
cp "${base_dir}"/boot/vmlinuz "${iso_target}/flatcar/vmlinuz"
|
||||
cp "${VM_TMP_ROOT}"/boot/flatcar/vmlinuz-a "${iso_target}/flatcar/vmlinuz"
|
||||
cp -R /usr/share/syslinux/* isolinux/
|
||||
cat<<EOF > isolinux/isolinux.cfg
|
||||
INCLUDE /syslinux/syslinux.cfg
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user