From 71810ceae94ff9ff966f31fa89208322bc64e0bb Mon Sep 17 00:00:00 2001 From: Chih-Wei Huang Date: Thu, 25 Jan 2018 10:53:25 +0800 Subject: [PATCH] 1-install: create device node if not exists After re-partition, sometimes the device node is not re-created automatically. I'm not sure why. Regenerate the uevent to force creating it. --- install/scripts/1-install | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install/scripts/1-install b/install/scripts/1-install index d83f056..398cf8f 100644 --- a/install/scripts/1-install +++ b/install/scripts/1-install @@ -292,7 +292,12 @@ get_part_info() install_to() { - [ -b /dev/$1 ] || return 1 + local t=`echo /sys/block/*/$1/partition` + [ -f "$t" ] || return 1 + until [ -b /dev/$1 ]; do + echo add > `dirname $t`/uevent + sleep 1 + done cd / mountpoint -q /hd && umount /hd while [ 1 ]; do -- 2.11.0