Stuck in loading after realtime-kernel on fresh install

I’m on 24.04 ubuntu pro I enabled realtime-kernel on a fresh install. when to reboot and now Im stuck on black screen. what is going with this? has anyone have this problem? My hardware is pretty new. I didn’t have a problem with 24.10.

1 Like

Are you able to boot to the previous kernel, and continue using the system - to get you back up and running?

Here’s a guide for how to get back to a previous kernel. Once that’s done and you’re running, it’s possible to diagnose what went wrong via the system journal with journalctl.

Booting Ubuntu with a Previous Kernel

Prerequisites

  • A working Ubuntu installation with at least one previous kernel installed
  • Access to the GRUB boot menu

Step-by-Step Instructions

1. Access the GRUB Menu

  1. Restart your computer
  2. As soon as your computer starts to boot, press and hold the Shift key (for BIOS systems) or Esc key (for UEFI systems)
  3. The GRUB menu should appear

2. Select Advanced Options

  1. In the GRUB menu, look for “Advanced options for Ubuntu”
  2. Press Enter to access the advanced options

3. Choose a Previous Kernel

  1. You’ll see a list of installed kernels
  2. Each entry will look something like:
    • Ubuntu, with Linux 6.x.x-xx-generic
    • Ubuntu, with Linux 6.x.x-xx-generic (recovery mode)
  3. The kernels are listed from newest to oldest
  4. Use the arrow keys to select the previous working kernel version
  5. Press Enter to boot with the selected kernel

4. Verify the Kernel Version

  1. Once Ubuntu has booted, open a terminal
  2. Type uname -r and press Enter
  3. Confirm you’re running the intended kernel version

5. Make the Change Permanent (Optional)

If you want to make this kernel your default:

  1. Open a terminal
  2. Edit the GRUB configuration:
    sudo nano /etc/default/grub
    
  3. Find the line GRUB_DEFAULT=0
  4. Change it to GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux [your-kernel-version]"
  5. Save the file (Ctrl+X, then Y, then Enter)
  6. Update GRUB:
    sudo update-grub
    

Troubleshooting

  • If GRUB menu doesn’t appear: Try pressing Shift or Esc repeatedly during boot
  • If kernel won’t boot: Select recovery mode for that kernel
  • If system won’t boot at all: Boot from a live USB and repair GRUB

Notes

  • Keep at least two working kernels installed for backup
  • Don’t remove the current kernel until you’ve confirmed the older one works
  • Consider creating a backup before making permanent changes

Analyzing Previous Boot Logs with journalctl

Listing All Previous Boots

  1. View a list of all recorded boots:
journalctl --list-boots

This will show output like:

-3 hash1234... Tue 2024-12-03 08:15:01 UTC—Tue 2024-12-03 09:20:33 UTC
-2 hash5678... Tue 2024-12-03 09:25:17 UTC—Tue 2024-12-03 10:15:42 UTC
-1 hash9012... Tue 2024-12-03 10:20:01 UTC—Tue 2024-12-03 11:30:15 UTC
 0 hashabcd... Tue 2024-12-03 11:35:22 UTC—...

Where:

  • 0 is the current boot
  • -1 is the previous boot
  • -2 is two boots ago, etc.

Analyzing Specific Boot Logs

View Logs from a Specific Boot

# View logs from the previous boot
journalctl -b -1

# View logs from two boots ago
journalctl -b -2

Focus on Kernel Messages

# View only kernel messages from previous boot
journalctl -b -1 -k

# View kernel messages with priority warnings and above
journalctl -b -1 -k -p warning

Common Issues to Look For

  1. View kernel errors and critical messages:
journalctl -b -1 -p err..alert -k
  1. Check for hardware-related issues:
journalctl -b -1 | grep -i "hardware"
journalctl -b -1 | grep -i "firmware"
  1. Look for driver issues:
journalctl -b -1 | grep -i "driver"
  1. Check for specific subsystem issues:
# Graphics
journalctl -b -1 | grep -i "gpu\|nvidia\|amd\|intel"

# Storage
journalctl -b -1 | grep -i "ata\|disk\|drive"

# Network
journalctl -b -1 | grep -i "network\|ethernet\|wifi"

Useful Filtering Options

  1. Show only the last portion of logs:
journalctl -b -1 -n 100   # Last 100 lines
  1. Follow logs in real-time (for current boot):
journalctl -f -k
  1. Show logs within a specific time window:
journalctl -b -1 --since "10 minutes ago"

Exporting Logs

  1. Export logs to a file:
journalctl -b -1 > previous-boot.log
  1. Export in JSON format for programmatic analysis:
journalctl -b -1 -o json > previous-boot.json

Tips for Analysis

  • Start with high-priority messages (errors and warnings)
  • Look for messages around the time of failure
  • Compare logs between working and non-working boots
  • Search for specific hardware components that might be causing issues
  • Check for missing drivers or firmware
  • Look for failed services or timing issues

Common Error Indicators

  • “Failed to load kernel module”
  • “Hardware error”
  • “Firmware bug”
  • “Call Trace”
  • “Kernel panic”
  • “Out of memory”
  • “I/O error”

Hope that helps. Feel free to post snippets from the journal if you’re unsure what’s important and what isn’t. Make sure to surround those snippets with three backticks, to format it:

```
like this
```

Yes, its turns out I couldn’t use zfs. So I reinstall without zfs and its worked fine. Its suck I cant use zfs

1 Like