我正在通过引导和 chroot 的组合来准备操作系统映像。某些操作(例如构建内核模块)依赖于uname输出,它甚至在 chroot 内部报告主机配置。该配置与正在部署的配置不同。结果是找不到内核头文件,其他步骤也搞砸了。
uname
人们可以发挥创意并用uname伪造它的 shell 脚本替换它,但有什么更实用的方法呢?
linux compiling chroot linux-kernel cpu-architecture
chroot ×1
compiling ×1
cpu-architecture ×1
linux ×1
linux-kernel ×1