mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
initrdscripts: mount / as read-only when live-booting
So that the root filesystem can be fsck'd properly, mount it read only. Either initscripts or systemd will re-mount as read-write in early boot. (From OE-Core rev: 1ace2bdd8d6d950038fb6d9b83f6eceba276f588) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
e6f96e2f5d
commit
7af92f8fa3
@@ -157,7 +157,7 @@ mount_and_boot() {
|
|||||||
case $union_fs_type in
|
case $union_fs_type in
|
||||||
"overlayfs")
|
"overlayfs")
|
||||||
mkdir -p /rootfs.ro /rootfs.rw
|
mkdir -p /rootfs.ro /rootfs.rw
|
||||||
if ! mount -o rw,loop,noatime,nodiratime /media/$i/$ISOLINUX/$ROOT_IMAGE /rootfs.ro; then
|
if ! mount -o ro,loop,noatime,nodiratime /media/$i/$ISOLINUX/$ROOT_IMAGE /rootfs.ro; then
|
||||||
rm -rf /rootfs.ro /rootfs.rw
|
rm -rf /rootfs.ro /rootfs.rw
|
||||||
fatal "Could not mount rootfs image"
|
fatal "Could not mount rootfs image"
|
||||||
else
|
else
|
||||||
@@ -170,7 +170,7 @@ mount_and_boot() {
|
|||||||
;;
|
;;
|
||||||
"aufs")
|
"aufs")
|
||||||
mkdir -p /rootfs.ro /rootfs.rw
|
mkdir -p /rootfs.ro /rootfs.rw
|
||||||
if ! mount -o rw,loop,noatime,nodiratime /media/$i/$ISOLINUX/$ROOT_IMAGE /rootfs.ro; then
|
if ! mount -o ro,loop,noatime,nodiratime /media/$i/$ISOLINUX/$ROOT_IMAGE /rootfs.ro; then
|
||||||
rm -rf /rootfs.ro /rootfs.rw
|
rm -rf /rootfs.ro /rootfs.rw
|
||||||
fatal "Could not mount rootfs image"
|
fatal "Could not mount rootfs image"
|
||||||
else
|
else
|
||||||
@@ -182,7 +182,7 @@ mount_and_boot() {
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
"")
|
"")
|
||||||
if ! mount -o rw,loop,noatime,nodiratime /media/$i/$ISOLINUX/$ROOT_IMAGE $ROOT_MOUNT ; then
|
if ! mount -o ro,loop,noatime,nodiratime /media/$i/$ISOLINUX/$ROOT_IMAGE $ROOT_MOUNT ; then
|
||||||
fatal "Could not mount rootfs image"
|
fatal "Could not mount rootfs image"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user