mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
fix: Build faster
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
! test -f /etc/docker/daemon.json || rm /etc/docker/daemon.json
|
! test -f /etc/docker/daemon.json || rm /etc/docker/daemon.json
|
||||||
|
mount -o remount,rw /boot/firmware
|
||||||
|
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get purge -y \
|
apt-get purge -y \
|
||||||
|
|||||||
@@ -96,13 +96,13 @@ if [[ "$(uname)" == "Darwin" ]]; then
|
|||||||
if which pv > /dev/null; then
|
if which pv > /dev/null; then
|
||||||
sudo cat ${SOURCE_PARTITION} | head -c $FS_SIZE | pv -s $FS_SIZE | sudo dd of=${TARGET_PARTITION} bs=1m 2>/dev/null
|
sudo cat ${SOURCE_PARTITION} | head -c $FS_SIZE | pv -s $FS_SIZE | sudo dd of=${TARGET_PARTITION} bs=1m 2>/dev/null
|
||||||
else
|
else
|
||||||
sudo cat ${SOURCE_PARTITION} | head -c $FS_SIZE | sudo dd of=${TARGET_PARTITION} bs=1M iflag=fullblock oflag=direct
|
sudo cat ${SOURCE_PARTITION} | head -c $FS_SIZE | sudo dd of=${TARGET_PARTITION} bs=1m
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if which pv > /dev/null; then
|
if which pv > /dev/null; then
|
||||||
sudo cat ${SOURCE_PARTITION} | head -c $FS_SIZE | pv -s $FS_SIZE | sudo dd of=${TARGET_PARTITION} bs=1M iflag=fullblock oflag=direct 2>/dev/null
|
sudo cat ${SOURCE_PARTITION} | head -c $FS_SIZE | pv -s $FS_SIZE | sudo dd of=${TARGET_PARTITION} bs=1M iflag=fullblock oflag=direct conv=fsync 2>/dev/null
|
||||||
else
|
else
|
||||||
sudo cat ${SOURCE_PARTITION} | head -c $FS_SIZE | sudo dd of=${TARGET_PARTITION} bs=1M iflag=fullblock oflag=direct
|
sudo cat ${SOURCE_PARTITION} | head -c $FS_SIZE | sudo dd of=${TARGET_PARTITION} bs=1M iflag=fullblock oflag=direct conv=fsync
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo Verifying...
|
echo Verifying...
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ set -e
|
|||||||
|
|
||||||
# Write contents of LOOPDEV (Ubuntu image) to sd card and make filesystems, then detach the loop device
|
# Write contents of LOOPDEV (Ubuntu image) to sd card and make filesystems, then detach the loop device
|
||||||
echo USING $LOOPDEV TO IMAGE $OUTPUT_DEVICE
|
echo USING $LOOPDEV TO IMAGE $OUTPUT_DEVICE
|
||||||
sudo dd if=${LOOPDEV}p1 of=${OUTPUT_DEVICE}p1 bs=4096 conv=fsync status=progress
|
sudo dd if=${LOOPDEV}p1 of=${OUTPUT_DEVICE}p1 bs=1M iflag=fullblock oflag=direct conv=fsync status=progress
|
||||||
sudo mkfs.vfat -F 32 ${OUTPUT_DEVICE}p2
|
sudo mkfs.vfat -F 32 ${OUTPUT_DEVICE}p2
|
||||||
sudo dd if=${LOOPDEV}p2 of=${OUTPUT_DEVICE}p3 bs=4096 conv=fsync status=progress
|
sudo dd if=${LOOPDEV}p2 of=${OUTPUT_DEVICE}p3 bs=1M iflag=fullblock oflag=direct conv=fsync status=progress
|
||||||
sudo mkfs.ext4 ${OUTPUT_DEVICE}p4
|
sudo mkfs.ext4 ${OUTPUT_DEVICE}p4
|
||||||
|
|
||||||
sudo losetup -d $LOOPDEV
|
sudo losetup -d $LOOPDEV
|
||||||
|
|||||||
Reference in New Issue
Block a user