diff options
author | Ross Burton <ross.burton@intel.com> | 2013-07-18 14:59:42 +0100 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2013-07-22 09:44:10 -0700 |
commit | 1ace2bdd8d6d950038fb6d9b83f6eceba276f588 (patch) | |
tree | 10ef7122604575f3064ca40a1deaed2bd00d5bad /meta | |
parent | b5187fa61b34ff94513fcf8f64ff5c588c211d06 (diff) | |
download | openembedded-core-1ace2bdd8d6d950038fb6d9b83f6eceba276f588.tar.gz openembedded-core-1ace2bdd8d6d950038fb6d9b83f6eceba276f588.tar.bz2 openembedded-core-1ace2bdd8d6d950038fb6d9b83f6eceba276f588.zip |
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.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/initrdscripts/files/init-live.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh index 890c56280a..c56c79abc2 100644 --- a/meta/recipes-core/initrdscripts/files/init-live.sh +++ b/meta/recipes-core/initrdscripts/files/init-live.sh @@ -157,7 +157,7 @@ mount_and_boot() { case $union_fs_type in "overlayfs") 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 fatal "Could not mount rootfs image" else @@ -170,7 +170,7 @@ mount_and_boot() { ;; "aufs") 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 fatal "Could not mount rootfs image" else @@ -182,7 +182,7 @@ mount_and_boot() { 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" fi ;; |