惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
WordPress大学
WordPress大学
阮一峰的网络日志
阮一峰的网络日志
博客园 - 司徒正美
月光博客
月光博客
宝玉的分享
宝玉的分享
Recent Announcements
Recent Announcements
小众软件
小众软件
H
Hackread – Cybersecurity News, Data Breaches, AI and More
美团技术团队
博客园 - 三生石上(FineUI控件)
A
About on SuperTechFans
J
Java Code Geeks
云风的 BLOG
云风的 BLOG
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
IT之家
IT之家
Vercel News
Vercel News
量子位
Martin Fowler
Martin Fowler
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
腾讯CDC
有赞技术团队
有赞技术团队

Posts on Noah Bailey

How to turn anything into a router Deploy to Cloudfront from GitHub using OpenID Connect Backup Postgres databases with Kubernetes CronJobs The spelling error made 200 billion times a day Restarting Kubernetes pods using a CronJob You've just bought a new domain. Now what? Who Sawed My Motherboard??? Linux on the P8 Aliexpress Mini Laptop Recovering Mysql/Mariadb after a nasty crash Using EXIF data to pick my next lens Converting and developing RAW photos on Linux automatically Thank you, 2016 iPhone Don't Make It Work Self-hosted Surveillance with ZoneMinder Backups, Monitoring, and Security for small Mastodon servers Block web scanners with ipset & iptables Executing commands over SSH with GitHub Actions Debian Sid on encrypted ZFS Protect your dangerously insecure redis server Debian: the luxurious boring lifestyle Monitor radiation with a Raspberry Pi Simple Linux server alerts: Know your performance, errors, security, syslog, and security Basic Linux server security with fail2ban, ossec, and firewall Windows 11 will create heaps of needless trash Domesticated Kubernetes Networking The Cursed Certificate Our mostly disposable and entirely stupid world Trying out OpenBSD (as a Linux geek) Making VoIP Calls with Antique Rotary Phones Monitoring WAN speed with speedtest-cli and ElasticSearch
NUC crashes on debian 11 - How I fixed it
2021-12-13 · via Posts on Noah Bailey

I recently installed Debian Bullseye on an old Intel NUCCAY6H mini PC I had lying around. It’s a great little device for a home server, as it’s very cheap, fits 16G of memory, and with 4 mini-cores it’s no slouch.

The first install attempt didn’t go well, with missing firmware for the NIC causing hanging for a couple minutes during boot. This happens quite a bit with Debian’s hard-line stance on binary blobs, so I re-installed with the non-free install media.

After a couple hours, the machine locked up again. It seemed I had more problems to solve…

TLDR/Spoiler: You have to turn off PXE boot, or the system randomly crashes.


Perhaps the NIC driver?

First place to look was the crappy Realtek NIC onboard. These are known for acting strangely, so I figured it was either responsible for the link going down, or the entire system locking up.

# lspci | grep Eth

03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)

So, I installed the dkms package for the nic firmware:

sudo apt install r8168-dkms
Backing up initrd.img-5.10.0-9-amd64 to /boot/initrd.img-5.10.0-9-amd64.old-dkms
Making new initrd.img-5.10.0-9-amd64
(If next boot fails, revert to initrd.img-5.10.0-9-amd64.old-dkms image)
update-initramfs.........

After a reboot, things appeared to work fine, and the NIC worked fine. Same gigabit speed, and more or less the same. I was hopeful this would fix it, but alas it crashed again about 20 minutes later.

Microcode maybe?

So, I looked at the dmesg output. First thing that jumped out was this section:

[    1.787738] BERT: Error records from previous boot:
[    1.787742] [Hardware Error]: event severity: fatal
[    1.787744] [Hardware Error]:  Error 0, type: fatal
[    1.787746] [Hardware Error]:   section_type: Firmware Error Record Reference
[    1.787747] [Hardware Error]:   Firmware Error Record Type: SOC Firmware Error Record Type1 (Legacy CrashLog Support)
[    1.787749] [Hardware Error]:   Revision: 0
[    1.787750] [Hardware Error]:   Record Identifier: 2000200000000
[    1.787754] [Hardware Error]:   00000000: 00020002 00000001 0000031a 00000000  ................
[    1.787756] [Hardware Error]:   00000010: 00000000 00000000 00000000 00000000  ................
[    1.787758] [Hardware Error]:   00000020: 00000000 00000000 00000000 00000000  ................
[    1.787760] [Hardware Error]:   00000030: 00000000 00000000 00000000 00000000  ................

After some Duckduckgo’ing, it seemed some people with old fashioned SandyBridge boards had this issue on UEFI boot, and the cure was a microcode update.

I already had non-free sources enabled, so I decided to install it.

apt install intel-microcode

After a reboot, the kernel hardware errors were gone!

The crashes however, weren’t.

BIOS? Boot ROMs?

So I did something I almost never do… Consult the useless vendor documentation.

After a bit, I found this page which advises:

If Network Boot is enabled in BIOS, random restarts or blue screen errors can occur.

  1. Press F2 during start to enter BIOS Setup.
  2. Go to Advanced > Boot > Boot Configuration.
  3. Disable Network Boot - OR - enable Boot Network Devices Last.
  4. Press F10 to save and exit BIOS.

I tried it and… Tada!! No more crashes!

I also noticed that the interface name changed from enp3s0 to enp2s0 which is sort of suspicious. Turning of PXE absolutely shouldn’t have that effect on the system…

I’m not going to loosen my tinfoil hat though.