vicigeeksimple guides
Browse

Platform maintenance

ViciBox kernel upgrade

Kernel upgrade procedure notes for ViciBox installations.

vicibox-kernel-upgrade-guide.md298 linesReproduced unmodified

Verbatim source

ViciBox kernel upgrade

Reproduced verbatim from the documentation shipped with the VICIdial source. VICIdial is a project of the VICIDIAL Group and eflo.net. Vicigeek is not affiliated with them. vicidial.org/docs is authoritative for your installed revision.
ViciBox kernel upgrade source document
# ViciBox Kernel Upgrade Guide

---

## Fixing Broken Repositories (ViciBox 7 / Leap 42.1)

**Why repos are broken:** openSUSE Leap 42.1 reached End-of-Life in May 2017. The OBS (Open Build Service) project repos have been removed.

### ViciBox 7 Repository Status

| Repository | Status | Action |
|------------|--------|--------|
| Apache_Leap_42.1 | ❌ BROKEN | Disable |
| Packman_Leap_42.1 | ✅ Working | Keep |
| Perl_openSUSE_Leap_42.1 | ❌ BROKEN | Disable |
| home:vicidial:asterisk-11_Leap_42.1 | ❌ BROKEN | Disable |
| home:vicidial_Leap_42.1 | ❌ BROKEN | Disable |
| openSUSE_Leap_42.1_OSS | ✅ Working | Keep |
| openSUSE_Leap_42.1_Updates | ✅ Working | Keep |
| server:database_openSUSE_Leap_42.1 | ❌ BROKEN | Disable |

### Commands to Disable Broken Repos

```bash
# Disable all broken repos (run these before any zypper operations)
zypper mr -d Apache_Leap_42.1
zypper mr -d Perl_openSUSE_Leap_42.1
zypper mr -d home:vicidial:asterisk-11_Leap_42.1
zypper mr -d home:vicidial_Leap_42.1
zypper mr -d server:database_openSUSE_Leap_42.1
```

### Or Remove Broken Repos Completely

```bash
# Remove repos entirely (cleaner solution)
zypper rr Apache_Leap_42.1
zypper rr Perl_openSUSE_Leap_42.1
zypper rr home:vicidial:asterisk-11_Leap_42.1
zypper rr home:vicidial_Leap_42.1
zypper rr server:database_openSUSE_Leap_42.1
```

### Check Repository Status

```bash
# List all repos with details
zypper lr -d

# Test refresh all enabled repos
zypper --non-interactive refresh
```

### Working Repos for ViciBox 7 (Leap 42.1)

After cleanup, these repos should remain enabled:
- `Packman_Leap_42.1` - Multimedia codecs
- `openSUSE_Leap_42.1_OSS` - Base OS packages
- `openSUSE_Leap_42.1_Updates` - Security updates

---

## Step-by-Step Instructions

### Step 1: Check Current Kernel Version
```bash
uname -r
uname -a
```
Example output: `4.1.36-44-default`

### Step 2: Check OS Version
```bash
cat /etc/os-release
```
This determines which repos and kernels are available.

### Step 3: Check Disk Space
```bash
df -h /boot
```
Ensure at least 200MB free in /boot for new kernel.

### Step 4: List Repository Status
```bash
zypper lr -u
```

### Step 5: Disable Broken/EOL Repositories
For older ViciBox versions with dead repos:
```bash
# Disable non-working repos (adjust names as needed)
zypper mr -d Apache_Leap_42.1
zypper mr -d Perl_openSUSE_Leap_42.1
zypper mr -d home:vicidial:asterisk-11_Leap_42.1
zypper mr -d server:database_openSUSE_Leap_42.1
```

### Step 6: Refresh Repositories
```bash
zypper --non-interactive refresh
```
Ignore GPG expiry warnings for EOL distros.

### Step 7: Search Available Kernels
```bash
zypper search -s kernel-default
```
Look for versions newer than your current (`i` = installed, `v` = available).

### Step 8: List Pending Updates
```bash
zypper list-updates | grep kernel
```

### Step 9: Create Backup (Recommended)
```bash
# Backup current kernel config
cp /boot/vmlinuz-$(uname -r) /boot/vmlinuz-$(uname -r).backup
cp /boot/initrd-$(uname -r) /boot/initrd-$(uname -r).backup

# Backup GRUB config
cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.backup
```

### Step 10: Stop VICIdial Services (Optional but Recommended)
```bash
# Graceful shutdown of dialers
/usr/share/astguiclient/ADMIN_keepalive_ALL.pl --stop

# Wait for active calls to complete (if production)
asterisk -rx 'core show channels count'
```

### Step 11: Install Kernel Update
```bash
# Install with auto GPG import
zypper --non-interactive --gpg-auto-import-keys update kernel-default
```

Or install specific version:
```bash
zypper install kernel-default-4.1.39-56.1
```

### Step 12: Verify Installation
```bash
# Check installed kernels
rpm -qa | grep kernel-default

# Check boot files created
ls -la /boot/vmlinuz* /boot/initrd*

# Verify GRUB configuration
grep -E 'menuentry|vmlinuz' /boot/grub2/grub.cfg | head -20
```

### Step 13: Reboot System
```bash
# Schedule reboot (gives time for calls to end)
shutdown -r +5 "Kernel upgrade - rebooting in 5 minutes"

# Or immediate reboot
shutdown -r now
```

### Step 14: Verify New Kernel After Reboot
```bash
uname -r
# Should show new version (e.g., 4.1.39-56-default)

# Check system uptime
uptime

# Verify VICIdial services
ps aux | grep -E 'asterisk|httpd|mysql' | grep -v grep
asterisk -rx 'core show version'
```

---

## ViciBox Version-Specific Notes

### ViciBox 7 (Leap 42.1) - EOL
- Latest kernel: 4.1.39-56
- Many repos are dead - disable them first
- Consider upgrading to ViciBox 12

### ViciBox 10 (Leap 15.1)
```bash
zypper refresh
zypper update kernel-default
```

### ViciBox 11 (Leap 15.4)
```bash
zypper refresh
zypper update kernel-default
```

### ViciBox 12 (Leap 15.6) - Current
```bash
zypper refresh
zypper update kernel-default
# Kernels up to 6.4.x available
```

---

## Rollback to Previous Kernel

If new kernel causes issues:

### Method 1: GRUB Menu at Boot
1. Reboot server
2. Press `Esc` at GRUB menu
3. Select "Advanced options"
4. Choose previous kernel version

### Method 2: Change Default Kernel
```bash
# List available kernels
grep menuentry /boot/grub2/grub.cfg

# Set previous kernel as default
grub2-set-default "openSUSE Leap 42.1, with Linux 4.1.36-44-default"

# Update GRUB
grub2-mkconfig -o /boot/grub2/grub.cfg

# Reboot
reboot
```

### Method 3: Remove Bad Kernel
```bash
# Boot into old kernel first, then:
zypper remove kernel-default-4.1.39-56.1
```

---

## Troubleshooting

### Server Won't Boot After Kernel Update
1. Access via console/KVM/IPMI
2. Select old kernel from GRUB menu
3. Once booted, investigate boot logs:
   ```bash
   journalctl -b -1  # Previous boot logs
   dmesg | grep -i error
   ```

### Asterisk Won't Start After Reboot
```bash
# Check Asterisk logs
tail -100 /var/log/asterisk/messages

# Restart Asterisk
systemctl restart asterisk

# Check DAHDI (if using hardware)
dahdi_cfg -v
```

### VICIdial Services Not Starting
```bash
# Start keepalive script
/usr/share/astguiclient/ADMIN_keepalive_ALL.pl --cu3way

# Check cron jobs
crontab -l | grep keepalive
```

---

## Quick Reference Commands

```bash
# Check current kernel
uname -r

# Check available updates
zypper list-updates

# Update kernel only
zypper update kernel-default

# Update entire system
zypper update

# Reboot
shutdown -r now

# Verify after reboot
uname -r && uptime && asterisk -rx 'core show version'
```