mirror of
https://git.yoctoproject.org/poky
synced 2026-02-26 19:39:40 +01:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
0b8460e2ce
commit
9cc3d74af8
@@ -186,6 +186,13 @@ parted ${device} mkpart swap linux-swap $swap_start 100%
|
||||
|
||||
parted ${device} print
|
||||
|
||||
echo "Waiting for device nodes..."
|
||||
C=0
|
||||
while [ $C -ne 3 ] && [ ! -e $bootfs -o ! -e $rootfs -o ! -e $swap ]; do
|
||||
C=$(( C + 1 ))
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "Formatting $bootfs to vfat..."
|
||||
mkfs.vfat $bootfs
|
||||
|
||||
|
||||
@@ -211,6 +211,13 @@ parted ${device} mkpart $pname linux-swap $swap_start 100%
|
||||
|
||||
parted ${device} print
|
||||
|
||||
echo "Waiting for device nodes..."
|
||||
C=0
|
||||
while [ $C -ne 3 ] && [ ! -e $bootfs -o ! -e $rootfs -o ! -e $swap ]; do
|
||||
C=$(( C + 1 ))
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "Formatting $bootfs to ext3..."
|
||||
mkfs.ext3 $bootfs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user