- Move all old complex backup scripts to old_scripts/ - Archive previous documentation versions - Clean up temporary files and debian packages - Update README to focus on new simple system - Keep only the enhanced simple backup system in main directory Main directory now contains only: - simple_backup_gui.py (GUI interface) - enhanced_simple_backup.sh (CLI interface) - list_drives.sh (helper) - simple_backup.sh (basic CLI) - SIMPLE_BACKUP_README.md (detailed docs) - README.md (project overview)
7.4 KiB
Internal Drive Recovery - Complete Configuration
✅ What Was Fixed
Your internal NVMe drive is now fully configured to boot independently from the external M.2 backup drive.
Changes Made:
1. Fixed LUKS Encryption Configuration (/etc/crypttab)
Problem: Both internal and external drives have the same LUKS UUID, causing the system to mount home from whichever drive it found first (which was the external).
Solution: Changed /etc/crypttab to use device path instead of UUID:
# OLD (using UUID - ambiguous):
luks-home-internal UUID=e4d30f4f-3aac-48a7-a1ca-83539598555b none luks
# NEW (using device path - specific):
luks-home-internal /dev/internal-vg/home none luks
Backup: /etc/crypttab.backup.20251006
2. Updated Initramfs
Regenerated the initial RAM filesystem to include the new crypttab configuration:
sudo update-initramfs -u -k all
This ensures the system uses the internal drive's home partition during boot.
3. Reinstalled GRUB Bootloader
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu
- Created Ubuntu EFI boot entry (Boot0001)
- Installed to internal drive's EFI partition (nvme0n1p1)
4. Set EFI Boot Order
sudo efibootmgr -o 0001,001C,001B,0000,...
- Ubuntu (Boot0001) is now the FIRST boot option
- System will boot from internal drive by default
- External drive boot entries (001F USB HDD) are lower priority
📊 Current System Configuration
Internal NVMe Drive (nvme0n1) - PRIMARY
nvme0n1 (476.9 GB)
├─ nvme0n1p1 → /boot/efi (EFI partition, 511MB)
└─ nvme0n1p2 → internal-vg (LVM)
├─ root (56GB) → / (root filesystem)
├─ boot (2GB) → /boot (kernel images)
├─ home (404GB) → /home (LUKS encrypted) ← NOW CONFIGURED
└─ swap (8GB) → swap
External M.2 USB (sda) - BACKUP
sda (476.9 GB)
├─ sda1 → EFI partition (unmounted)
└─ sda2 → migration-vg (LVM)
├─ root (56GB) → (unmounted)
├─ boot (2GB) → (unmounted)
├─ home (404GB) → (unmounted, LUKS encrypted)
└─ swap (8GB) → (inactive)
Mount Points (After Reboot)
/dev/internal-vg/root → /
/dev/internal-vg/boot → /boot
/dev/mapper/luks-home-internal → /home (from internal-vg/home)
/dev/internal-vg/swap → swap
/dev/nvme0n1p1 → /boot/efi
🔐 LUKS Encryption Details
Both drives have identical LUKS setup:
- UUID: e4d30f4f-3aac-48a7-a1ca-83539598555b (same on both!)
- Type: LUKS2
- Cipher: aes-xts-plain64
- Keysize: 512 bits
The system now uses device path (/dev/internal-vg/home) instead of UUID to ensure it mounts the internal drive's home partition.
🚀 Testing Instructions
Test 1: Boot with Both Drives Connected
sudo reboot
Expected: System boots from internal drive, uses internal home partition.
Verify after boot:
mount | grep -E "/ |/boot|/home"
# Should show all mounts from internal-vg
Test 2: Boot with ONLY Internal Drive (Full Independence Test)
# 1. Shutdown system
sudo shutdown -h now
# 2. Physically disconnect external USB M.2 drive (sda)
# 3. Power on system
# Expected: System boots completely from internal NVMe
If everything works, you'll have:
- GRUB menu appears (no "reset system" message should appear after first clean boot)
- System boots to login screen
- Can log in with encrypted home partition
- All data accessible from internal drive
🔍 Verification Commands
After reboot, run these to verify internal drive is being used:
# Check what's mounted where
lsblk -o NAME,SIZE,TYPE,MOUNTPOINT
# Verify home is from internal drive
sudo cryptsetup status luks-home-internal
# Should show: device: /dev/mapper/internal--vg-home
# Check boot order
efibootmgr | grep -A1 BootOrder
# Should show: BootOrder: 0001,... (Ubuntu first)
# Verify all internal volumes
mount | grep internal-vg
📝 Configuration Files Modified
-
/etc/crypttab- Updated to use internal-vg/home device path- Backup:
/etc/crypttab.backup.20251006
- Backup:
-
/boot/initrd.img-*- Regenerated with new crypttab -
/boot/efi/EFI/ubuntu/- GRUB bootloader reinstalled -
UEFI NVRAM - Boot order updated (Boot0001 first)
🛡️ About the "Reset System" Message
The "reset system" message you saw before GRUB is a Lenovo BIOS/UEFI firmware notification, not a GRUB error.
Why it appears:
- BIOS detected improper shutdown or boot failure
- Partition resize triggered hardware change detection
- BIOS boot counter wasn't acknowledged
How to clear it:
Option 1 (Easiest): Enter BIOS setup during boot
- Press F1 during Lenovo logo
- Just enter BIOS (don't need to change anything)
- Press F10 to save and exit
- This acknowledges the BIOS warning
Option 2: Clean shutdown cycle
sudo shutdown -h now
# Wait 10 seconds
# Power on
# BIOS may clear flag after successful boot
Option 3: Wait for successful boots
- After 2-3 successful clean boots, BIOS usually clears the flag automatically
✨ What You Can Do Now
1. Use Internal Drive Normally
Your internal NVMe is fully functional and independent. You can:
- Boot without external drive connected
- Use system normally with all data on internal drive
- Keep external drive disconnected
2. Run the Backup
Now you can create a proper block-level backup:
cd ~/Nextcloud/entwicklung/Werkzeuge/backup_to_external_m.2
sudo ./lvm_block_backup.sh
This will clone internal-vg to migration-vg on the external drive.
3. Keep External as Emergency Backup
The external drive can serve as:
- Bootable backup: If internal fails, boot from external
- Recovery system: Access data if internal has issues
- Migration tool: Already has identical LVM structure
📚 Related Files in This Directory
lvm_block_backup.sh- Block-level backup script (internal → external)BOOT_FIX_SUMMARY.md- Details about GRUB reinstallationverify_internal_boot.sh- Boot configuration verification scriptclear_bios_boot_flag.sh- BIOS message diagnostic toolREADME_BACKUP.md- Backup strategy documentation
⚠️ Important Notes
-
Same LUKS UUID: Both drives have identical UUIDs because they were cloned. The device path in crypttab ensures the right one is used.
-
Don't mix drives during boot: If both drives are connected and you manually select the wrong one in BIOS boot menu, the system might use the external drive instead.
-
Backup before cloning: The
lvm_block_backup.shwill OVERWRITE the external drive's volumes. Make sure any unique data on the external is backed up first. -
Home data: Currently your home directory data is on the external drive. After the first clean reboot, verify if you need to copy any recent data from external to internal before running the backup.
🎯 Summary
Status: ✅ Internal drive is fully configured and ready
Changes:
- Crypttab uses internal drive explicitly
- Initramfs updated
- GRUB reinstalled
- Boot order corrected (Ubuntu first)
Next Step:
- Test - Reboot to verify internal drive works
- Backup - Run
lvm_block_backup.shto clone to external - Normal Use - Use internal drive, keep external as backup
BIOS Message: Will likely clear after 1-2 clean boots or entering BIOS setup (F1)