Move filesystem expansion to first-boot wizard
Instead of a hidden systemd service, expand the filesystem visibly during the first-boot wizard so users can see it happening. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -53,6 +53,28 @@ echo ""
|
||||
|
||||
gum confirm "Ready to begin setup?" || exit 0
|
||||
|
||||
# =============================================================================
|
||||
# Step 0: Expand Filesystem
|
||||
# =============================================================================
|
||||
|
||||
clear
|
||||
gum style \
|
||||
--foreground 212 --bold \
|
||||
"Expanding filesystem..."
|
||||
echo ""
|
||||
|
||||
# Get current and total size
|
||||
ROOT_DEV=$(findmnt -n -o SOURCE /)
|
||||
CURRENT_SIZE=$(df -h / | awk 'NR==2 {print $2}')
|
||||
gum style --foreground 245 "Current size: $CURRENT_SIZE"
|
||||
|
||||
# Run resize2fs with a spinner
|
||||
gum spin --spinner dot --title "Expanding to fill SD card..." -- sudo resize2fs "$ROOT_DEV" 2>/dev/null
|
||||
|
||||
NEW_SIZE=$(df -h / | awk 'NR==2 {print $2}')
|
||||
gum style --foreground 82 "✓ Expanded to: $NEW_SIZE"
|
||||
sleep 1
|
||||
|
||||
# =============================================================================
|
||||
# Configuration Variables
|
||||
# =============================================================================
|
||||
|
||||
Reference in New Issue
Block a user