Skip to content

Commit

Permalink
Adjust the UUID value
Browse files Browse the repository at this point in the history
  • Loading branch information
ophub committed Jan 22, 2022
1 parent c08dbd4 commit bbcc637
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rebuild
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ make_image() {
dd if=/dev/zero of=${build_image_file} bs=1M count=${IMG_SIZE} conv=fsync >/dev/null 2>&1
sync

ROOTFS_UUID=$(uuidgen)
ROOTFS_UUID="$(cat /proc/sys/kernel/random/uuid)"
[ -z "${ROOTFS_UUID}" ] && ROOTFS_UUID="$(uuidgen)"
[ -z "${ROOTFS_UUID}" ] && error_msg "The uuidgen is invalid, cannot continue."

parted -s ${build_image_file} mklabel msdos 2>/dev/null
parted -s ${build_image_file} mkpart primary fat32 $((SKIP_MB))M $((SKIP_MB + BOOT_MB - 1))M 2>/dev/null
parted -s ${build_image_file} mkpart primary ext4 $((SKIP_MB + BOOT_MB))M 100% 2>/dev/null
Expand Down

0 comments on commit bbcc637

Please sign in to comment.