cleanup: Archive old complex scripts and documentation

- 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)
This commit is contained in:
root
2025-10-09 00:30:03 +02:00
parent 871a57947d
commit 72f9838f55
36 changed files with 4657 additions and 2661 deletions

View File

@@ -0,0 +1,154 @@
# Internal NVMe Boot Repair Summary
## Problem
After resizing the home partition, the internal NVMe drive (nvme0n1) was showing a "reset system" message on boot, suspected GRUB issue.
## Root Cause
The GRUB bootloader needed to be reinstalled after the partition resize, and boot failure flags needed to be cleared from the GRUB environment.
## Solution Applied
### 1. Updated GRUB Configuration
```bash
sudo update-grub
```
- Regenerated `/boot/grub/grub.cfg` with current system configuration
- Found and registered kernel images: 6.8.0-84 and 6.8.0-83
### 2. Reinstalled GRUB Bootloader
```bash
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu --recheck /dev/nvme0n1
```
- Installed GRUB to internal NVMe drive
- Files installed to `/boot/efi/EFI/ubuntu/`:
- shimx64.efi (secure boot shim)
- grubx64.efi (GRUB bootloader)
- grub.cfg (initial configuration)
### 3. Cleared Boot Failure Flags
```bash
sudo grub-editenv - unset recordfail
sudo grub-editenv - unset boot_success
```
- Removed any boot failure tracking that might cause "reset system" message
- GRUB environment now clean
## Current System Status
### Boot Configuration
- **Currently Running From**: External USB M.2 (sda - migration-vg)
- Root: `/dev/mapper/migration-vg-root` → mounted as `/`
- Home: `/dev/mapper/luks-home-internal` (on external) → mounted as `/home`
- **Internal Drive**: NVMe (nvme0n1 - internal-vg) - NOW BOOTABLE
- EFI: `/dev/nvme0n1p1` → mounted as `/boot/efi`
- Boot: `/dev/internal-vg/boot` → mounted as `/boot`
- Root: `/dev/internal-vg/root` (ready but not currently root)
- Home: `/dev/internal-vg/home` (LUKS encrypted, not currently mounted)
### EFI Boot Entries
```
BootOrder: 0001,001C,001B,0000,... (Ubuntu is first)
Boot0001* Ubuntu - Points to /boot/efi/EFI/ubuntu/shimx64.efi
Boot001F* USB HDD - Currently active (external M.2)
```
### Partition Layout
**Internal NVMe (nvme0n1):**
- nvme0n1p1: 511MB EFI partition (757B-A377)
- nvme0n1p2: 476.4GB LVM (internal-vg)
- internal-vg/root: 56GB ext4
- internal-vg/boot: 2GB ext4
- internal-vg/home: 404GB LUKS encrypted
- internal-vg/swap: 8GB swap
**External M.2 (sda):**
- sda1: EFI partition
- sda2: 476.4GB LVM (migration-vg)
- Identical structure to internal-vg
## Testing the Fix
### To Boot from Internal Drive:
1. **Shutdown the system**:
```bash
sudo shutdown -h now
```
2. **Disconnect the external USB M.2 drive** (sda)
3. **Power on the system**
4. **Expected Behavior**:
- System should boot from internal NVMe
- No more "reset system" message
- GRUB menu should appear normally
- System will boot into internal-vg volumes
### If You Want to Keep Both Drives Connected:
1. Change boot order in BIOS to prefer internal NVMe over USB
2. Or use BIOS boot menu (usually F12) to manually select internal drive
## Verification Commands
Check internal drive boot readiness:
```bash
./verify_internal_boot.sh
```
Check EFI boot entries:
```bash
efibootmgr -v
```
Verify GRUB configuration:
```bash
sudo cat /boot/grub/grub.cfg | grep -A5 "menuentry"
```
## Important Notes
1. **Both drives have identical LVM structure** (internal-vg and migration-vg)
- Both have root, boot, home, and swap volumes
- Home volumes are both LUKS encrypted
2. **Current /etc/fstab** is configured for internal-vg:
```
/dev/internal-vg/root → /
/dev/internal-vg/boot → /boot
/dev/internal-vg/home → /home (via LUKS)
```
This is correct for booting from internal drive.
3. **System is currently running from external drive** due to boot order/USB boot
- This is temporary for testing
- Internal drive is fully configured and ready
4. **No data loss risk** - all changes were to bootloader configuration only
## Next Steps
Once you've verified the internal drive boots correctly:
1. **Run the backup** to clone internal-vg to migration-vg:
```bash
sudo ./lvm_block_backup.sh
```
This will create a block-level backup of internal drive to external drive.
2. **Keep external drive as emergency backup**:
- Can boot from it if internal drive fails
- Already has identical LVM structure
## Files Created
- `verify_internal_boot.sh` - Script to verify boot configuration
- `BOOT_FIX_SUMMARY.md` - This documentation
## What Was Fixed
✅ GRUB bootloader reinstalled to internal NVMe
✅ GRUB configuration updated with current kernels
✅ Boot failure flags cleared
✅ EFI boot entry verified
✅ Internal drive ready to boot
The "reset system" message should no longer appear when booting from the internal drive.