diff options
Diffstat (limited to 'yocto-poky/meta/recipes-core/initrdscripts/files/init-live.sh')
-rw-r--r-- | yocto-poky/meta/recipes-core/initrdscripts/files/init-live.sh | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/yocto-poky/meta/recipes-core/initrdscripts/files/init-live.sh b/yocto-poky/meta/recipes-core/initrdscripts/files/init-live.sh index d852c5737..09fb47991 100644 --- a/yocto-poky/meta/recipes-core/initrdscripts/files/init-live.sh +++ b/yocto-poky/meta/recipes-core/initrdscripts/files/init-live.sh @@ -2,7 +2,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin -ROOT_MOUNT="/rootfs/" +ROOT_MOUNT="/rootfs" ROOT_IMAGE="rootfs.img" MOUNT="/bin/mount" UMOUNT="/bin/umount" @@ -169,8 +169,8 @@ mount_and_boot() { # determine which unification filesystem to use union_fs_type="" - if grep -q -w "overlayfs" /proc/filesystems; then - union_fs_type="overlayfs" + if grep -q -w "overlay" /proc/filesystems; then + union_fs_type="overlay" elif grep -q -w "aufs" /proc/filesystems; then union_fs_type="aufs" else @@ -179,14 +179,15 @@ mount_and_boot() { # make a union mount if possible case $union_fs_type in - "overlayfs") + "overlay") mkdir -p /rootfs.ro /rootfs.rw if ! mount -n --move $ROOT_MOUNT /rootfs.ro; then rm -rf /rootfs.ro /rootfs.rw fatal "Could not move rootfs mount point" else mount -t tmpfs -o rw,noatime,mode=755 tmpfs /rootfs.rw - mount -t overlayfs -o "lowerdir=/rootfs.ro,upperdir=/rootfs.rw" overlayfs $ROOT_MOUNT + mkdir -p /rootfs.rw/upperdir /rootfs.rw/work + mount -t overlay overlay -o "lowerdir=/rootfs.ro,upperdir=/rootfs.rw/upperdir,workdir=/rootfs.rw/work" $ROOT_MOUNT mkdir -p $ROOT_MOUNT/rootfs.ro $ROOT_MOUNT/rootfs.rw mount --move /rootfs.ro $ROOT_MOUNT/rootfs.ro mount --move /rootfs.rw $ROOT_MOUNT/rootfs.rw @@ -214,11 +215,7 @@ mount_and_boot() { boot_live_root } -case $label in - boot) - mount_and_boot - ;; - install|install-efi) +if [ "$label" != "boot" -a -f $label.sh ] ; then if [ -f /run/media/$i/$ISOLINUX/$ROOT_IMAGE ] ; then ./$label.sh $i/$ISOLINUX $ROOT_IMAGE $video_mode $vga_mode $console_params else @@ -226,10 +223,8 @@ case $label in fi # If we're getting here, we failed... - fatal "Installation image failed" - ;; - *) - # Not sure what boot label is provided. Try to boot to avoid locking up. - mount_and_boot - ;; -esac + fatal "Target $label failed" +fi + +mount_and_boot + |