mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-05 05:04:44 +02:00
recipes-core: initrdscripts overlayroot allow boot partition
Test if /boot is previously mounted on the OLDROOT and move it into NEWROOT (ro). (From OE-Core rev: 4c930500814dbec735e7958aaaf0593ae0119622) Signed-off-by: Anibal Limon <anibal@limonsoftware.com> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
a494efab53
commit
89e72a4fcc
|
@ -38,10 +38,10 @@
|
|||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
|
||||
# We get OLDROOT from the rootfs module
|
||||
OLDROOT="/rootfs"
|
||||
OLDROOT="${ROOTFS_DIR}"
|
||||
|
||||
NEWROOT="${RWMOUNT}/root"
|
||||
RWMOUNT="/overlay"
|
||||
NEWROOT="${RWMOUNT}/root"
|
||||
ROMOUNT="${RWMOUNT}/rofs"
|
||||
UPPER_DIR="${RWMOUNT}/upper"
|
||||
WORK_DIR="${RWMOUNT}/work"
|
||||
|
@ -115,4 +115,9 @@ mount -n --move /proc ${NEWROOT}/proc
|
|||
mount -n --move /sys ${NEWROOT}/sys
|
||||
mount -n --move /dev ${NEWROOT}/dev
|
||||
|
||||
# Mount/move boot if is already mounted
|
||||
if mountpoint -q ${OLDROOT}/boot; then
|
||||
mount -n --move ${OLDROOT}/boot ${NEWROOT}/boot
|
||||
fi
|
||||
|
||||
exec chroot ${NEWROOT}/ ${bootparam_init:-/sbin/init} || exit_gracefully "Couldn't chroot into overlay"
|
||||
|
|
Loading…
Reference in New Issue
Block a user