FATAL: kernel too old

error

[ 3.399884] Freeing unused kernel image memory: 1348K
[ 3.401079] Write protecting the kernel read-only data: 20480k
[ 3.403804] Freeing unused kernel image memory: 2004K
[ 3.405016] Freeing unused kernel image memory: 812K
[ 3.405278] Run /sbin/init as init process
FATAL: kernel too old
[ 3.484534] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
[ 3.484974] CPU: 0 PID: 1 Comm: init Not tainted 5.4.195 #1
[ 3.485185] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014
[ 3.485519] Call Trace:
[ 3.486318] dump_stack+0x50/0x63
[ 3.486505] panic+0xf6/0x2b7
[ 3.486595] do_exit.cold+0x50/0xda
[ 3.486687] do_group_exit+0x35/0x90
[ 3.486792] __x64_sys_exit_group+0xf/0x10
[ 3.486929] do_syscall_64+0x43/0x110
[ 3.487082] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 3.487337] RIP: 0033:0x7f9c420f1bf1
[ 3.487612] Code: f7 d8 89 01 48 83 c8 ff c3 be e7 00 00 00 ba 3c 00 00 00 eb 11 0f 1f 40 00 89 d0 0f 05 48 3d 00 f0 ff ff 77 1c f4 89 f0 0f 05 <48> 3d 00 f0 ff ff 76 e7 f7 d8 89 05 df 15 01 00 eb dd 0f 1f 44 00
[ 3.488129] RSP: 002b:00007ffef044c498 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
[ 3.488380] RAX: ffffffffffffffda RBX: 00007ffef044c620 RCX: 00007f9c420f1bf1
[ 3.488551] RDX: 000000000000003c RSI: 00000000000000e7 RDI: 000000000000007f
[ 3.488827] RBP: 00007ffef044c840 R08: 0000000000000054 R09: 0000000000000000
[ 3.489139] R10: 00007f9c420f8929 R11: 0000000000000246 R12: 00007ffef044c5f8
[ 3.489380] R13: 0000000000000000 R14: 00007ffef044c600 R15: 0000000000000000
[ 3.490061] Kernel Offset: disabled
[ 3.490398] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00 ]---

environment

host arch linux kernel buildroot glibc
ubuntu 20.04 x86_64 5.4.0-195/5.4.195 2022.02.3 2.34

config of buildroot

  1. C library choose glibc
  2. Kernel Headers choose Linux 5.4.x kernel headers
  3. qemu-system-x86_64 -kernel use Linux 5.4.0-195

error analysis

  1. FATAL: kernel too old was throwed by glibc: /sysdeps/unix/sysv/linux/dl-osinfo.h

  2. Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00 was throwed by kernel: /kernel/panic.c/panic(const char *fmt, ...)

  3. in package/glibc/glibc.mk, will add glibc compile option from buildroot's config BR2_TOOLCHAIN_HEADERS_AT_LEAST

  4. and BR2_TOOLCHAIN_HEADERS_AT_LEAST option in .config is 5.4

  5. but in C.1 Configuring and compiling the GNU C Library, kernel version rule is: X.Y.Z(buildroot is 5.4, missing Z)

--enable-kernel=version
This option is currently only useful on GNU/Linux systems. The version parameter should have the form X.Y.Z and describes the smallest version of the Linux kernel the generated library is expected to support. The higher the version number is, the less compatibility code is added, and the faster the code gets.

temporary solution

modify buildroot's .config BR2_TOOLCHAIN_HEADERS_AT_LEAST to 5.4.0

recompile and start ok


Bugzilla

https://bugs.busybox.net/show_bug.cgi?id=14916

reference

  1. linux kernel 报错: FATAL: kernel too old
  2. C.1 Configuring and compiling the GNU C Library
  3. can new glibc versions be used with an old kernel
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 175,606评论 5 421
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 74,099评论 2 335
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 124,531评论 0 291
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 47,776评论 0 248
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 56,573评论 3 330
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 43,055评论 1 246
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 34,117评论 3 358
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 32,652评论 0 229
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 36,703评论 1 271
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 32,406评论 2 279
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 33,992评论 1 288
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 30,105评论 3 285
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 35,321评论 3 282
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 27,283评论 0 14
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 28,415评论 1 232
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 38,410评论 2 309
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 38,107评论 2 314