summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-framework/overlayroot9
1 files changed, 7 insertions, 2 deletions
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/overlayroot b/meta/recipes-core/initrdscripts/initramfs-framework/overlayroot
index 0d41432878..db164d9846 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/overlayroot
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/overlayroot
@@ -38,10 +38,10 @@
38PATH=/sbin:/bin:/usr/sbin:/usr/bin 38PATH=/sbin:/bin:/usr/sbin:/usr/bin
39 39
40# We get OLDROOT from the rootfs module 40# We get OLDROOT from the rootfs module
41OLDROOT="/rootfs" 41OLDROOT="${ROOTFS_DIR}"
42 42
43NEWROOT="${RWMOUNT}/root"
44RWMOUNT="/overlay" 43RWMOUNT="/overlay"
44NEWROOT="${RWMOUNT}/root"
45ROMOUNT="${RWMOUNT}/rofs" 45ROMOUNT="${RWMOUNT}/rofs"
46UPPER_DIR="${RWMOUNT}/upper" 46UPPER_DIR="${RWMOUNT}/upper"
47WORK_DIR="${RWMOUNT}/work" 47WORK_DIR="${RWMOUNT}/work"
@@ -115,4 +115,9 @@ mount -n --move /proc ${NEWROOT}/proc
115mount -n --move /sys ${NEWROOT}/sys 115mount -n --move /sys ${NEWROOT}/sys
116mount -n --move /dev ${NEWROOT}/dev 116mount -n --move /dev ${NEWROOT}/dev
117 117
118# Mount/move boot if is already mounted
119if mountpoint -q ${OLDROOT}/boot; then
120 mount -n --move ${OLDROOT}/boot ${NEWROOT}/boot
121fi
122
118exec chroot ${NEWROOT}/ ${bootparam_init:-/sbin/init} || exit_gracefully "Couldn't chroot into overlay" 123exec chroot ${NEWROOT}/ ${bootparam_init:-/sbin/init} || exit_gracefully "Couldn't chroot into overlay"