From: Raymond Tan Date: Tue, 17 May 2016 05:41:09 +0000 (+0800) Subject: mkefidisk.sh: mount images as read-only X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~25788 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1391c8a603f0ed972ee0bcc8c74999f5f43be43;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git mkefidisk.sh: mount images as read-only Mount the hddimg and rootfs.img as read-only when creating the bootable image on the medium. Otherwise, the md5 checksum values of the hddimg will be altered. As this changed checksum value might cause issue for users whom would reuse the hddimg. Signed-off-by: Raymond Tan Signed-off-by: Richard Purdie --- diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh index 333284ff504..d8db3c0165b 100755 --- a/scripts/contrib/mkefidisk.sh +++ b/scripts/contrib/mkefidisk.sh @@ -369,8 +369,8 @@ mkswap $SWAP >$OUT 2>&1 || die "Failed to prepare swap" # Installing to $DEVICE # debug "Mounting images and device in preparation for installation" -mount -o loop $HDDIMG $HDDIMG_MNT >$OUT 2>&1 || error "Failed to mount $HDDIMG" -mount -o loop $HDDIMG_MNT/rootfs.img $HDDIMG_ROOTFS_MNT >$OUT 2>&1 || error "Failed to mount rootfs.img" +mount -o ro,loop $HDDIMG $HDDIMG_MNT >$OUT 2>&1 || error "Failed to mount $HDDIMG" +mount -o ro,loop $HDDIMG_MNT/rootfs.img $HDDIMG_ROOTFS_MNT >$OUT 2>&1 || error "Failed to mount rootfs.img" mount $ROOTFS $ROOTFS_MNT >$OUT 2>&1 || error "Failed to mount $ROOTFS on $ROOTFS_MNT" mount $BOOTFS $BOOTFS_MNT >$OUT 2>&1 || error "Failed to mount $BOOTFS on $BOOTFS_MNT"