mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-27 05:29:32 +00:00
image_builder: change PARTUUID to /dev/mmcblk0p2
This commit is contained in:
@@ -81,9 +81,13 @@ pipeline {
|
||||
}
|
||||
// TODO: Add finalising step, transfer mirror removal from ros.sh
|
||||
stage('Shrink image') {
|
||||
environment {
|
||||
EXECUTE_FILE = 'image_builder/scripts/change_boot_part.sh'
|
||||
}
|
||||
when { expression { return params.SHRINK } }
|
||||
steps {
|
||||
sh "$WORKSPACE/image_builder/autosizer.sh ${params.BUILD_DIR}/${params.IMAGE_NAME}"
|
||||
sh "$WORKSPACE/image_builder/image_config.sh execute ${params.BUILD_DIR}/${params.IMAGE_NAME} ${params.MOUNT_POINT} $WORKSPACE/$EXECUTE_FILE"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
11
image_builder/scripts/change_boot_part.sh
Executable file
11
image_builder/scripts/change_boot_part.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
echo -e "\033[0;31m\033[1m$(date) | #1 Change boot partition\033[0m\033[0m"
|
||||
|
||||
sed -i 's/root=[^ ]*/root=\/dev\/mmcblk0p2/' /boot/cmdline.txt
|
||||
sed -i 's/.* \/boot vfat defaults 0 2$/\/dev\/mmcblk0p1 \/boot vfat defaults 0 2/' /etc/fstab
|
||||
sed -i 's/.* \/ ext4 defaults,noatime 0 1$/\/dev\/mmcblk0p2 \/ ext4 defaults,noatime 0 1/' /etc/fstab
|
||||
|
||||
echo -e "\033[0;31m\033[1m$(date) | End of change boot partition\033[0m\033[0m"
|
||||
Reference in New Issue
Block a user