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:
Michael Marineau 2013-09-05 16:24:45 -04:00
parent c8d986d408
commit bbacf2f0bd

View File

@ -372,7 +372,7 @@ _write_base_cpio_disk() {
mkdir -p "${root_mnt}"
# 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"
cp "${root_mnt}"/boot/vmlinuz "${dst_dir}/${vmlinuz_name}"
sudo umount "${root_mnt}"