mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-29 06:21:46 +01:00
fix(image_to_vm): Mount source rootfs as ro when creating cpio.
When building with a write-protected root mounting as rw, the default, fails.
This commit is contained in:
parent
c8d986d408
commit
bbacf2f0bd
@ -372,7 +372,7 @@ _write_base_cpio_disk() {
|
|||||||
mkdir -p "${root_mnt}"
|
mkdir -p "${root_mnt}"
|
||||||
|
|
||||||
# Roll the rootfs into the CPIO
|
# Roll the rootfs into the CPIO
|
||||||
sudo mount -o loop "${TEMP_ROOTFS}" "${root_mnt}"
|
sudo mount -o loop,ro "${TEMP_ROOTFS}" "${root_mnt}"
|
||||||
_write_dir_to_cpio "${root_mnt}" "$2"
|
_write_dir_to_cpio "${root_mnt}" "$2"
|
||||||
cp "${root_mnt}"/boot/vmlinuz "${dst_dir}/${vmlinuz_name}"
|
cp "${root_mnt}"/boot/vmlinuz "${dst_dir}/${vmlinuz_name}"
|
||||||
sudo umount "${root_mnt}"
|
sudo umount "${root_mnt}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user