Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> Linux 教學

Linux 核心編譯常見錯誤與解決方案

編輯:Linux 教學

錯誤 1:make modules_install 失敗

if [ -r System.map -a -x /sbin/depmod ]; then /sbin/depmod -ae -F System.map 2.6.12.2; fi
/bin/sh: line 1: 3357 Killed /sbin/depmod -ae -F System.map 2.6.12.2
make: *** [_modinst_post] Error 137

原因: SELinux 阻止寫入 /lib/modules/<version>。

解法:編譯前關閉 SELinux。

錯誤 2:開機顯示 SELinux relabel 警告

修改 /boot/grub/grub.conf 核心參數加入 selinux=0,或編輯 /etc/selinux/config 設 SELINUX=disabled。

錯誤 3:Kernel panic - VFS: Unable to mount root fs

SATA 硬碟未在核心啟用相關驅動。以 lspci 確認控制器型號(如 Intel ICH7),在 make menuconfig 啟用:

  • Device Drivers → SCSI device support → SCSI disk support
  • SCSI low-level drivers → Serial ATA (SATA) support → Intel PIIX/ICH SATA support
  • Block devices → RAM disk support / Initial RAM disk (initrd) support
  • File systems → Miscellaneous filesystems → Compressed ROM file system support (cramfs)

錯誤 4:網卡不識別

缺少 VIA Rhine 驅動。make menuconfig → Networking support → Networking device support → Ethernet (10/100Mbit) → <M> VIA Rhine RevB support。

錯誤 5:LVM 卷組找不到

reading all physical volumes...
no volume group found!
unable to find volume group "VolGroup00"

核心未啟用 LVM。make menuconfig → Device Drivers → [*] Multiple devices driver support (RAID and LVM) → <*> Logical volume manager (LVM) support。

Copyright © Windows教程網 All Rights Reserved