At this point it's probably better to rebase and resend?

Alex

On Fri, 11 Jun 2021 at 09:30, Yu, Mingli <mingli.yu@windriver.com> wrote:
Ping.

Thanks,

On 9/25/20 3:05 PM, hongxu wrote:
> In initramfs-framework, udev (initramfs-module-udev) calls hook mount.sh to
> mount /run/media/XXX which is used by setup-live (initramfs-module-setup-live).
> The setup-live calls install-XXX.sh and use /run/media/XXX to do installation
>
> The side effect is while setup-live is not used, after it switches to rootfs,
> and the mounted disk could not be released
>
> Release the mounted disk before switch root and after kill udev
>
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ---
>   meta/recipes-core/initrdscripts/initramfs-framework/udev | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/udev b/meta/recipes-core/initrdscripts/initramfs-framework/udev
> index 4898b89246..8b62080c68 100644
> --- a/meta/recipes-core/initrdscripts/initramfs-framework/udev
> +++ b/meta/recipes-core/initrdscripts/initramfs-framework/udev
> @@ -8,6 +8,11 @@ udev_shutdown_hook_handler() {
>       if [ "$status" = "pre" ] && [ "$module" = "finish" ]; then
>               udevadm settle
>               killall `basename $_UDEV_DAEMON` 2>/dev/null
> +
> +             # Umount other media which is mounted by udev
> +             for dir in `awk '/\/dev.* \/run\/media/{print $2}' /proc/mounts`; do
> +                     umount $dir
> +             done
>       fi
>   }
>   
>
>
>
>
>