在最近的更新之后,我在启动菜单中获得了多个相同 linux 内核版本的条目。我试过运行,update-grub2但它也列出了两次相同的 linux-image 版本,即
adnan@adnan-laptop:/boot$ sudo update-grub2
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-26-generic
Found initrd image: /boot/initrd.img-2.6.32-26-generic
Found Windows 7 (loader) on /dev/sda1
Found linux image: /boot/vmlinuz-2.6.32-26-generic
Found initrd image: /boot/initrd.img-2.6.32-26-generic
Found memtest86+ image: /boot/memtest86+.bin
done
Run Code Online (Sandbox Code Playgroud)
如您所见,多次找到 vmlinuz 和 initrd。但是 /boot 中只有一个 vmlinuz 和 initrd 文件
adnan@adnan-laptop:/boot$ ls -l
total 15120
-rw-r--r-- 1 root root 646144 2010-11-24 15:58 abi-2.6.32-26-generic
-rw-r--r-- 1 root root 110601 2010-11-24 15:58 config-2.6.32-26-generic
drwxr-xr-x 3 root root 4096 2011-01-01 18:59 grub
-rw-r--r-- 1 root root 8335528 2010-12-20 23:36 initrd.img-2.6.32-26-generic
-rw-r--r-- 1 root root 160280 2010-03-23 14:40 memtest86+.bin
-rw-r--r-- 1 root root 2156100 2010-11-24 15:58 System.map-2.6.32-26-generic
-rw-r--r-- 1 root root 1336 2010-11-24 16:00 vmcoreinfo-2.6.32-26-generic
-rw-r--r-- 1 root root 4050080 2010-11-24 15:58 vmlinuz-2.6.32-26-generic
Run Code Online (Sandbox Code Playgroud)
有人能告诉我为什么 update-grub2 两次找到 vmlinuz 和 initrd 吗?以及如何阻止这种情况发生。
更新:在这里找到 grub.cfg
我怎么想,你有两个linux图像查找器/etc/grub.d,删除一个,正确的列表是:
00_header
05_debian_theme
10_linux
20_memtest86+
30_os-prober
40_custom
Run Code Online (Sandbox Code Playgroud)
当您更新 grub 时,这些脚本会查找操作系统。