summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorCalifornia Sullivan <california.l.sullivan@intel.com>2017-11-21 15:02:09 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-02 11:25:33 +0000
commit9cc3d74af851e3cda3064f89e5b15efeb1a4f89d (patch)
tree380f80eb1380ac7f4c645a9173cea049d632ca07 /meta
parent0b8460e2ce9f9a4ea8de8497fbb65b91cb69b8e0 (diff)
downloadpoky-9cc3d74af851e3cda3064f89e5b15efeb1a4f89d.tar.gz
install*.sh: add short sleep after parted commands
I wasn't able to install to my Optane SSD due to the following error: Formatting /dev/nvme0n1p1 to vfat... mkfs.fat 4.1 (2017-01-24) mkfs.vfat: unable to open /dev/nvme0n1p1: No such file or directory Target install-efi failed A couple lines later I see: [ 10.265401] nvme0n1: p1 p2 p3 Then looking at the device itself after booting from a USB stick: root@intel-corei7-64: ~# ls /dev/nvme0n1* /dev/nvme0n1 /dev/nvme0n1p1 /dev/nvme0n1p2 /dev/nvme0n1p3 So it looks like the parted commands return before the device node is actually created. Work around this issue by waiting for device nodes for a short duration. (From OE-Core rev: 9daafd49b448122e35d67a1637ce2212793a4dc5) Signed-off-by: California Sullivan <california.l.sullivan@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-efi.sh7
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install.sh7
2 files changed, 14 insertions, 0 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 5ad3a60c05..706418fa9c 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -186,6 +186,13 @@ parted ${device} mkpart swap linux-swap $swap_start 100%
186 186
187parted ${device} print 187parted ${device} print
188 188
189echo "Waiting for device nodes..."
190C=0
191while [ $C -ne 3 ] && [ ! -e $bootfs -o ! -e $rootfs -o ! -e $swap ]; do
192 C=$(( C + 1 ))
193 sleep 1
194done
195
189echo "Formatting $bootfs to vfat..." 196echo "Formatting $bootfs to vfat..."
190mkfs.vfat $bootfs 197mkfs.vfat $bootfs
191 198
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
index 1cac8064a2..dade059c8f 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -211,6 +211,13 @@ parted ${device} mkpart $pname linux-swap $swap_start 100%
211 211
212parted ${device} print 212parted ${device} print
213 213
214echo "Waiting for device nodes..."
215C=0
216while [ $C -ne 3 ] && [ ! -e $bootfs -o ! -e $rootfs -o ! -e $swap ]; do
217 C=$(( C + 1 ))
218 sleep 1
219done
220
214echo "Formatting $bootfs to ext3..." 221echo "Formatting $bootfs to ext3..."
215mkfs.ext3 $bootfs 222mkfs.ext3 $bootfs
216 223