Fix apt-update hook timing for proper package installation

- Renamed hook to 00-apt-update.hook.chroot to run first in chroot stage
- Ensures apt-get update runs before any package installation
- Added proper error handling with exit code checking
- Hook now runs early enough to update package lists before firmware packages
- Prevents 'package not found' errors during ISO build process
- Critical for accessing firmware packages from Devuan and Debian repos
parent b4b7616f
...@@ -101,10 +101,11 @@ This ISO includes comprehensive hardware support with firmware packages for: ...@@ -101,10 +101,11 @@ This ISO includes comprehensive hardware support with firmware packages for:
- Wireless network cards - Wireless network cards
### Repository Configuration ### Repository Configuration
- **Primary:** Devuan merged repository (main, contrib, non-free, firmware-nonfree) - **Primary:** Devuan merged repository (main, contrib, non-free, non-free-firmware)
- **Fallback:** Debian testing repository for packages not available in Devuan - **Fallback:** Debian testing repository for packages not available in Devuan
- **Security:** Both Devuan and Debian security updates - **Security:** Debian security updates (Devuan security repos removed)
- **Firmware:** Complete firmware-nonfree support - **Firmware:** Complete non-free-firmware support
- **Auto-Update:** Package lists updated automatically during build
## Scripts Overview ## Scripts Overview
...@@ -112,6 +113,7 @@ This ISO includes comprehensive hardware support with firmware packages for: ...@@ -112,6 +113,7 @@ This ISO includes comprehensive hardware support with firmware packages for:
- `build.sh` - Main build script with error handling and retry logic - `build.sh` - Main build script with error handling and retry logic
- `set_root_password.sh` - Set root password for the ISO - `set_root_password.sh` - Set root password for the ISO
- `insert_openvpn.sh` - Add OpenVPN configuration files - `insert_openvpn.sh` - Add OpenVPN configuration files
- `apt-update.hook.chroot` - Automatically updates package lists during build
### Customization Scripts ### Customization Scripts
- `customize_iso.sh` - Modify existing ISO (change password, add OpenVPN) - `customize_iso.sh` - Modify existing ISO (change password, add OpenVPN)
...@@ -146,6 +148,7 @@ This ISO includes comprehensive hardware support with firmware packages for: ...@@ -146,6 +148,7 @@ This ISO includes comprehensive hardware support with firmware packages for:
- Edit `config/package-lists/live.list.chroot` to add/remove packages - Edit `config/package-lists/live.list.chroot` to add/remove packages
- Modify `config/preseed/debian-installer.cfg` for installer settings - Modify `config/preseed/debian-installer.cfg` for installer settings
- Update hooks in `config/hooks/live/` for additional configurations - Update hooks in `config/hooks/live/` for additional configurations
- `apt-update.hook.chroot` - Automatically updates package lists during build
### Repository Configuration ### Repository Configuration
- `config/main-config` - Main live-build configuration - `config/main-config` - Main live-build configuration
...@@ -179,4 +182,8 @@ This ISO includes comprehensive hardware support with firmware packages for: ...@@ -179,4 +182,8 @@ This ISO includes comprehensive hardware support with firmware packages for:
- OpenVPN config is set to start automatically if provided - OpenVPN config is set to start automatically if provided
- Root login is enabled by default for SSH access - Root login is enabled by default for SSH access
- SysVinit is used instead of systemd for compatibility - SysVinit is used instead of systemd for compatibility
- ISO includes comprehensive firmware for 95%+ hardware compatibility - ISO includes comprehensive firmware for 95%+ hardware compatibility
\ No newline at end of file - Package lists are automatically updated during build process
- Dual repository system ensures maximum package availability
- Devuan security repositories removed (Debian security used instead)
- All firmware components use correct 'non-free-firmware' naming
\ No newline at end of file
#!/bin/bash
# Update package lists before installing packages
# This ensures the chroot has current package information from all repositories
# Runs early in the chroot stage, before package installation
echo "Updating package lists in chroot environment..."
apt-get update
if [ $? -eq 0 ]; then
echo "Package lists updated successfully"
else
echo "Warning: Failed to update package lists"
exit 1
fi
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment