diff options
| author | Serge Schneider <serge@raspberrypi.org> | 2017-03-07 15:13:22 +0000 |
|---|---|---|
| committer | Serge Schneider <serge@raspberrypi.org> | 2017-03-07 15:14:03 +0000 |
| commit | 718a4e8c21289f99ad542faf11bc2e4d769291cc (patch) | |
| tree | 420384482de75ae14d186c592a4feac324898325 /export-image | |
| parent | 8e74b4f15cee8e4b794d0c916cd34f22d5ccfcd9 (diff) | |
Switch to PARTUUID
Diffstat (limited to 'export-image')
| -rwxr-xr-x | export-image/03-set-partuuid/00-run.sh | 12 | ||||
| -rwxr-xr-x | export-image/04-finalise/01-run.sh (renamed from export-image/03-finalise/01-run.sh) | 0 | ||||
| -rw-r--r-- | export-image/04-finalise/files/LICENSE.oracle (renamed from export-image/03-finalise/files/LICENSE.oracle) | 0 |
3 files changed, 12 insertions, 0 deletions
diff --git a/export-image/03-set-partuuid/00-run.sh b/export-image/03-set-partuuid/00-run.sh new file mode 100755 index 0000000..f19884e --- /dev/null +++ b/export-image/03-set-partuuid/00-run.sh @@ -0,0 +1,12 @@ +#!/bin/bash -e +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')" + +BOOT_PARTUUID="${IMGID}-01" +ROOT_PARTUUID="${IMGID}-02" + +sed -i "s/BOOTDEV/PARTUUID=${BOOT_PARTUUID}/" ${ROOTFS_DIR}/etc/fstab +sed -i "s/ROOTDEV/PARTUUID=${ROOT_PARTUUID}/" ${ROOTFS_DIR}/etc/fstab + +sed -i "s/ROOTDEV/PARTUUID=${ROOT_PARTUUID}/" ${ROOTFS_DIR}/boot/cmdline.txt diff --git a/export-image/03-finalise/01-run.sh b/export-image/04-finalise/01-run.sh index c64c92b..c64c92b 100755 --- a/export-image/03-finalise/01-run.sh +++ b/export-image/04-finalise/01-run.sh diff --git a/export-image/03-finalise/files/LICENSE.oracle b/export-image/04-finalise/files/LICENSE.oracle index 00898ca..00898ca 100644 --- a/export-image/03-finalise/files/LICENSE.oracle +++ b/export-image/04-finalise/files/LICENSE.oracle |
