Actually remember to sudo the install stuff.
This commit is contained in:
@@ -126,7 +126,7 @@ fi
|
|||||||
|
|
||||||
# Unmount any mounted partitions on target disk
|
# Unmount any mounted partitions on target disk
|
||||||
echo "Unmounting target disk partitions..."
|
echo "Unmounting target disk partitions..."
|
||||||
umount "${TARGET_DEVICE}"* 2>/dev/null || true
|
sudo umount "${TARGET_DEVICE}"* 2>/dev/null || true
|
||||||
|
|
||||||
# Clone the USB to the target disk
|
# Clone the USB to the target disk
|
||||||
echo "Cloning USB system to target disk..."
|
echo "Cloning USB system to target disk..."
|
||||||
@@ -134,13 +134,13 @@ echo "This will take several minutes depending on USB size and disk speed."
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
# Use dd to clone the entire device
|
# Use dd to clone the entire device
|
||||||
if ! dd if="$SOURCE_DEVICE" of="$TARGET_DEVICE" bs=4M status=progress; then
|
if ! sudo dd if="$SOURCE_DEVICE" of="$TARGET_DEVICE" bs=4M status=progress; then
|
||||||
error_exit "Failed to clone USB to target disk"
|
error_exit "Failed to clone USB to target disk"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Sync to ensure all data is written
|
# Sync to ensure all data is written
|
||||||
echo "Syncing data to disk..."
|
echo "Syncing data to disk..."
|
||||||
sync
|
sudo sync
|
||||||
|
|
||||||
# Update the cloned system to remove USB-specific configurations
|
# Update the cloned system to remove USB-specific configurations
|
||||||
echo "Finalizing installation..."
|
echo "Finalizing installation..."
|
||||||
@@ -164,18 +164,18 @@ done
|
|||||||
|
|
||||||
# Mount and make final adjustments
|
# Mount and make final adjustments
|
||||||
TEMP_MOUNT="/mnt/stormux_target"
|
TEMP_MOUNT="/mnt/stormux_target"
|
||||||
mkdir -p "$TEMP_MOUNT"
|
sudo mkdir -p "$TEMP_MOUNT"
|
||||||
|
|
||||||
if mount "$TARGET_ROOT_PART" "$TEMP_MOUNT" 2>/dev/null; then
|
if sudo mount "$TARGET_ROOT_PART" "$TEMP_MOUNT" 2>/dev/null; then
|
||||||
# Remove any USB-specific markers
|
# Remove any USB-specific markers
|
||||||
rm -f "$TEMP_MOUNT/home/stormux/.firstboot" 2>/dev/null || true
|
sudo rm -f "$TEMP_MOUNT/home/stormux/.firstboot" 2>/dev/null || true
|
||||||
|
|
||||||
# Update any USB-specific configurations if needed
|
# Update any USB-specific configurations if needed
|
||||||
# (Add any specific cleanups here)
|
# (Add any specific cleanups here)
|
||||||
|
|
||||||
umount "$TEMP_MOUNT"
|
sudo umount "$TEMP_MOUNT"
|
||||||
fi
|
fi
|
||||||
rmdir "$TEMP_MOUNT"
|
sudo rmdir "$TEMP_MOUNT"
|
||||||
|
|
||||||
# Success message
|
# Success message
|
||||||
echo
|
echo
|
||||||
|
|||||||
Reference in New Issue
Block a user