mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 09:13:08 +00:00
defect 4665: for ubuntu diskfull install, if the /dev/disk/by-path is not created, will use list-devices command to select the first available disk
This commit is contained in:
parent
cfd42a36a8
commit
328c04da81
@ -59,7 +59,14 @@ d-i partman/early_command string \
|
||||
rm /tmp/devs-with-boot 2>/dev/null || true; \
|
||||
else \
|
||||
DEV=`ls /dev/disk/by-path/* -l | egrep -o '/dev.*[s|h|v]d[^0-9]$' | sort -t : -k 1 -k 2 -k 3 -k 4 -k 5 -k 6 -k 7 -k 8 -g | head -n1 | egrep -o '[s|h|v]d.*$'`; \
|
||||
if [[ "$DEV" == "" ]]; then DEV="sda"; fi; \
|
||||
if [[ "$DEV" == "" ]]; then \
|
||||
for line in $(list-devices disk); do \
|
||||
DEV=$line; DEV=${DEV##/dev/}; break; \
|
||||
done; \
|
||||
if [[ "$DEV" == "" ]]; then \
|
||||
DEV="sda"; \
|
||||
fi \
|
||||
fi; \
|
||||
echo "/dev/$DEV" > /tmp/boot_disk; \
|
||||
fi; \
|
||||
debconf-set partman-auto/disk "$(cat /tmp/boot_disk)"
|
||||
|
Loading…
x
Reference in New Issue
Block a user