我已经基于Ubuntu 中的linux-headers
和linux-source
软件包编译了一个新的内核和一组模块。 各种编译步骤都进行得很顺利,直到我尝试了make install
以下失败:
root@thorne-ul-dt:/usr/src/linux-source-4.4.0# make install
sh ./arch/x86/boot/install.sh 4.4.21 arch/x86/boot/bzImage \
System.map "/boot"
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.21 /boot/vmlinuz-4.4.21
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.21 /boot/vmlinuz-4.4.21
update-initramfs: Generating /boot/initrd.img-4.4.21
gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-4.4.21 with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
arch/x86/boot/Makefile:191: recipe for target 'install' failed
make[1]: *** [install] Error 1
arch/x86/Makefile:260: recipe for target 'install' failed
make: *** [install] Error 2
现在,到目前为止,我读到的所有内容都表明或最终归结为文件系统已满。通常是 /boot 或 /tmp,如果不是空间,则是 inode。所以我检查了我的 PC,一切看起来都很好。
root@thorne-ul-dt:/usr/src/linux-source-4.4.0# df -h
Filesystem Size Used Avail Use% Mounted on
udev 7.7G 0 7.7G 0% /dev
tmpfs 1.6G 19M 1.6G 2% /run
/dev/mapper/ubuntu--vg-root 1.8T 1.4T 398G 78% /
tmpfs 7.7G 2.4M 7.7G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 7.7G 0 7.7G 0% /sys/fs/cgroup
/dev/sda2 237M 100M 125M 45% /boot
/dev/sda1 511M 12M 500M 3% /boot/efi
cgmfs 100K 0 100K 0% /run/cgmanager/fs
tmpfs 1.6G 64K 1.6G 1% /run/user/1000
root@thorne-ul-dt:/usr/src/linux-source-4.4.0# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
udev 1994762 656 1994106 1% /dev
tmpfs 1999935 1078 1998857 1% /run
/dev/mapper/ubuntu--vg-root 121274368 17644654 103629714 15% /
tmpfs 1999935 21 1999914 1% /dev/shm
tmpfs 1999935 13 1999922 1% /run/lock
tmpfs 1999935 18 1999917 1% /sys/fs/cgroup
/dev/sda2 62496 304 62192 1% /boot
/dev/sda1 0 0 0 - /boot/efi
cgmfs 1999935 14 1999921 1% /run/cgmanager/fs
tmpfs 1999935 35 1999900 1% /run/user/1000
内核映像到底需要多少空间或者多少个 inode?
我尝试执行purge-old-kernels
apt-get update && apt-get auto-remove` 以防万一,但它们没有帮助。
当文件系统似乎有可用空间和可用 inode 时,什么原因导致make install
内核失败?gzip: stdout: No space left on device