use dd and xxd to get disk identifier
This commit is contained in:
parent
fcb8cca6ce
commit
31380448fd
|
@ -2,7 +2,7 @@
|
|||
|
||||
IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.img"
|
||||
|
||||
IMGID="$(fdisk -l ${IMG_FILE} | sed -n 's/Disk identifier: 0x\([^ ]*\)/\1/p')"
|
||||
IMGID="$(dd if=${IMG_FILE} skip=440 bs=1 count=4 2>/dev/null | xxd -e | cut -f 2 -d' ')"
|
||||
|
||||
BOOT_PARTUUID="${IMGID}-01"
|
||||
ROOT_PARTUUID="${IMGID}-02"
|
||||
|
|
Loading…
Reference in New Issue
Block a user