- Fixed partition size calculation bugs in migrate_to_lvm.sh - Added comprehensive error handling for USB drive stability - Optimized data copy operations using cp -a for better performance - Corrected mount point detection for encrypted home partitions - Enhanced drive detection and exclusion logic - Added proper size override mechanisms for manual intervention - Improved filesystem creation and validation processes - Complete toolset for external M.2 drive migration scenarios Tested successfully on: - Debian 13 Trixie Live USB environment - 476GB external M.2 drives via USB 3.0 - Complex partition layouts (root/home/EFI + encryption) - Large data transfers (314GB+ encrypted home directories)
29 lines
836 B
Bash
Executable File
29 lines
836 B
Bash
Executable File
#!/bin/bash
|
|
# Create automatic startup script for Clonezilla Live
|
|
|
|
cat > /tmp/auto-backup-startup.sh << 'EOF'
|
|
#!/bin/bash
|
|
# Automatic startup script for Clonezilla Live
|
|
# This runs when auto_backup=true is passed as kernel parameter
|
|
|
|
if grep -q "auto_backup=true" /proc/cmdline; then
|
|
echo "Automatic backup mode detected"
|
|
sleep 3
|
|
|
|
# Mount the backup partition
|
|
mkdir -p /tmp/backup_mount
|
|
mount /dev/sda2 /tmp/backup_mount 2>/dev/null
|
|
|
|
if [ -f /tmp/backup_mount/automated_clonezilla_backup.sh ]; then
|
|
echo "Running automated backup script..."
|
|
/tmp/backup_mount/automated_clonezilla_backup.sh
|
|
else
|
|
echo "Automated backup script not found, starting manual Clonezilla"
|
|
ocs-live-general
|
|
fi
|
|
fi
|
|
EOF
|
|
|
|
chmod +x /tmp/auto-backup-startup.sh
|
|
echo "Auto-startup script created"
|