我需要运行" update-initramfs"和" update-grub"之后" sudo make&& sudo make modules_install&& sudo make install"?

时间:2017-10-21 05:36:26

标签: linux linux-kernel

我正在攻击linux-4.13.4。我找到了一些关于如何编译和创建内核的帖子,比如this one

我不确定我们需要做什么

sudo update-initramfs -c -k 4.13.4 
sudo update-grub

sudo make -j 32 && sudo make modules_install -j 32 && sudo make install -j 32

因为我发现当我在日志结束时运行sudo make -j 32 && sudo make modules_install -j 32 && sudo make install -j 32

  ...
  ...
  INSTALL sound/usb/snd-usbmidi-lib.ko
  INSTALL sound/usb/usx2y/snd-usb-usx2y.ko
  INSTALL virt/lib/irqbypass.ko
  INSTALL sound/usb/usx2y/snd-usb-us122l.ko
  DEPMOD  4.13.4
sh ./arch/x86/boot/install.sh 4.13.4 arch/x86/boot/bzImage \
    System.map "/boot"
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.4 /boot/vmlinuz-4.13.4
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.13.4 /boot/vmlinuz-4.13.4


update-initramfs: Generating /boot/initrd.img-4.13.4    <----


run-parts: executing /etc/kernel/postinst.d/pm-utils 4.13.4 /boot/vmlinuz-4.13.4
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.13.4 /boot/vmlinuz-4.13.4
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.13.4 /boot/vmlinuz-4.13.4
run-parts: executing /etc/kernel/postinst.d/vboxadd 4.13.4 /boot/vmlinuz-4.13.4
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.13.4 /boot/vmlinuz-4.13.4


Generating grub configuration file ...    
Found linux image: /boot/vmlinuz-4.13.4    <----
Found initrd image: /boot/initrd.img-4.13.4
Found linux image: /boot/vmlinuz-4.13.4.old
Found initrd image: /boot/initrd.img-4.13.4
Found linux image: /boot/vmlinuz-4.10.0-37-generic
Found initrd image: /boot/initrd.img-4.10.0-37-generic
Found linux image: /boot/vmlinuz-4.10.0-35-generic
Found initrd image: /boot/initrd.img-4.10.0-35-generic
Found linux image: /boot/vmlinuz-4.10.0-28-generic
Found initrd image: /boot/initrd.img-4.10.0-28-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done

如果我再次运行sudo update-initramfs -c -k 4.13.4sudo update-grub,日志似乎与上一个的最后一部分相同

wxf@wxfvbox:~/kernelSources/linux-4.13.4$ sudo update-initramfs -c -k 4.13.4
update-initramfs: Generating /boot/initrd.img-4.13.4


wxf@wxfvbox:~/kernelSources/linux-4.13.4$ sudo update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.13.4
Found initrd image: /boot/initrd.img-4.13.4
Found linux image: /boot/vmlinuz-4.13.4.old
Found initrd image: /boot/initrd.img-4.13.4
Found linux image: /boot/vmlinuz-4.10.0-37-generic
Found initrd image: /boot/initrd.img-4.10.0-37-generic
Found linux image: /boot/vmlinuz-4.10.0-35-generic
Found initrd image: /boot/initrd.img-4.10.0-35-generic
Found linux image: /boot/vmlinuz-4.10.0-28-generic
Found initrd image: /boot/initrd.img-4.10.0-28-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done

所以,我的问题是我需要在update-initramfs之后运行update-grubsudo make && sudo make modules_install && sudo make install吗?

0 个答案:

没有答案