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>
This commit is contained in:
parent
9da81df30e
commit
e1de8af487
|
@ -16,7 +16,8 @@ swap_ratio=5
|
|||
|
||||
# Get a list of hard drives
|
||||
hdnamelist=""
|
||||
live_dev_name=${1%%/*}
|
||||
live_dev_name=`cat /proc/mounts | grep ${1%/} | awk '{print $1}'`
|
||||
live_dev_name=${live_dev_name#\/dev/}
|
||||
live_dev_name=${live_dev_name%%[0-9]*}
|
||||
|
||||
echo "Searching for hard drives ..."
|
||||
|
|
|
@ -15,7 +15,8 @@ swap_ratio=5
|
|||
|
||||
# Get a list of hard drives
|
||||
hdnamelist=""
|
||||
live_dev_name=${1%%/*}
|
||||
live_dev_name=`cat /proc/mounts | grep ${1%/} | awk '{print $1}'`
|
||||
live_dev_name=${live_dev_name#\/dev/}
|
||||
live_dev_name=${live_dev_name%%[0-9]*}
|
||||
|
||||
echo "Searching for hard drives ..."
|
||||
|
|
Loading…
Reference in New Issue