diff options
author | Awais Belal <awais_belal@mentor.com> | 2015-05-21 19:28:34 +0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-24 07:19:18 +0100 |
commit | e1de8af4877d0dce6d4f1ca3a6204d8fc45a8612 (patch) | |
tree | b6281480d2e0999653db66ca6ef5dbff4f5f0e57 /meta/recipes-core | |
parent | 9da81df30e78005a076f6644dbe3fd6ab7dbc1ca (diff) | |
download | poky-e1de8af4877d0dce6d4f1ca3a6204d8fc45a8612.tar.gz |
initrdscripts: make boot drive detection more generic
The init script that invokes install and install-efi scripts
passes the first parameter that identifies the boot drive but
in cases when this disk is labeled and kernel configurations
allow disk labeling under /run/media/ this would pass the disk
label.
The earlier implementation considered that the drive name will
be passed and in case the label is passed it fails and provides
the boot drive as an option for installation driver.
We now use a more generic approach to identify the boot drive
which can handle both drive name as well as label if passed.
(From OE-Core rev: 1964b697ddadc59e27087f9f1f6b24236f4addcc)
Signed-off-by: Awais Belal <awais_belal@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/initrdscripts/files/init-install-efi.sh | 3 | ||||
-rw-r--r-- | meta/recipes-core/initrdscripts/files/init-install.sh | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh index 329586d74d..8dd2749b5e 100644 --- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh +++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh | |||
@@ -16,7 +16,8 @@ swap_ratio=5 | |||
16 | 16 | ||
17 | # Get a list of hard drives | 17 | # Get a list of hard drives |
18 | hdnamelist="" | 18 | hdnamelist="" |
19 | live_dev_name=${1%%/*} | 19 | live_dev_name=`cat /proc/mounts | grep ${1%/} | awk '{print $1}'` |
20 | live_dev_name=${live_dev_name#\/dev/} | ||
20 | live_dev_name=${live_dev_name%%[0-9]*} | 21 | live_dev_name=${live_dev_name%%[0-9]*} |
21 | 22 | ||
22 | echo "Searching for hard drives ..." | 23 | echo "Searching for hard drives ..." |
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh index fb537ee310..cb261630d0 100644 --- a/meta/recipes-core/initrdscripts/files/init-install.sh +++ b/meta/recipes-core/initrdscripts/files/init-install.sh | |||
@@ -15,7 +15,8 @@ swap_ratio=5 | |||
15 | 15 | ||
16 | # Get a list of hard drives | 16 | # Get a list of hard drives |
17 | hdnamelist="" | 17 | hdnamelist="" |
18 | live_dev_name=${1%%/*} | 18 | live_dev_name=`cat /proc/mounts | grep ${1%/} | awk '{print $1}'` |
19 | live_dev_name=${live_dev_name#\/dev/} | ||
19 | live_dev_name=${live_dev_name%%[0-9]*} | 20 | live_dev_name=${live_dev_name%%[0-9]*} |
20 | 21 | ||
21 | echo "Searching for hard drives ..." | 22 | echo "Searching for hard drives ..." |