如何从启动菜单中删除重复的 Ubuntu 映像?

如何从启动菜单中删除重复的 Ubuntu 映像?

我已经在我的电脑上安装了 Ubuntu 18.04.1 和 Windows 10华硕 gl503ge笔记本电脑。

以下是 grub 检测到的内容:

artur@arturGL503GE:~$ sudo update-grub
[sudo] password for artur: 
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.15.0-45-generic
Found initrd image: /boot/initrd.img-4.15.0-45-generic
Found linux image: /boot/vmlinuz-4.15.0-44-generic
Found initrd image: /boot/initrd.img-4.15.0-44-generic
Found Windows Boot Manager on /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for EFI firmware configuration
done

如你所见,由于某种原因,有两个 Linux 映像vmlinuz-4.15.0-**45**-genericvmlinuz-4.15.0-**44**-generic

输出如下lsblk

artur@arturGL503GE:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0    7:0    0 140,7M  1 loop /snap/gnome-3-26-1604/74
loop1    7:1    0   140M  1 loop /snap/gnome-3-26-1604/59
loop2    7:2    0    13M  1 loop /snap/gnome-characters/139
loop3    7:3    0    21M  1 loop /snap/gnome-logs/25
loop4    7:4    0   3,3M  1 loop /snap/gnome-system-monitor/36
loop5    7:5    0  14,5M  1 loop /snap/gnome-logs/45
loop6    7:6    0 147,3M  1 loop /snap/skype/66
loop7    7:7    0  12,2M  1 loop /snap/gnome-characters/69
loop8    7:8    0  93,4M  1 loop /snap/telegram-desktop/551
loop9    7:9    0  34,6M  1 loop /snap/gtk-common-themes/818
loop10   7:10   0  93,4M  1 loop /snap/telegram-desktop/524
loop11   7:11   0  34,8M  1 loop /snap/gtk-common-themes/1122
loop12   7:12   0 140,7M  1 loop /snap/gnome-3-26-1604/78
loop13   7:13   0  89,5M  1 loop /snap/core/6130
loop14   7:14   0   2,3M  1 loop /snap/gnome-calculator/260
loop15   7:15   0  91,1M  1 loop /snap/core/6259
loop16   7:16   0    91M  1 loop /snap/core/6350
loop17   7:17   0   3,7M  1 loop /snap/gnome-system-monitor/57
loop18   7:18   0  93,4M  1 loop /snap/telegram-desktop/534
loop19   7:19   0   1,6M  1 loop /snap/gnome-calculator/154
loop20   7:20   0 132,1M  1 loop /snap/postman/81
sda      8:0    0 232,9G  0 disk 
├─sda1   8:1    0   499M  0 part 
├─sda2   8:2    0   100M  0 part /boot/efi
├─sda3   8:3    0    16M  0 part 
└─sda4   8:4    0 232,3G  0 part 
sdb      8:16   0 931,5G  0 disk 
├─sdb1   8:17   0   1,9G  0 part /windows
├─sdb2   8:18   0  32,6G  0 part /
├─sdb3   8:19   0 465,7G  0 part /home
└─sdb4   8:20   0 431,4G  0 part 
sdc      8:32   0 238,5G  0 disk 
└─sdc1   8:33   0 238,5G  0 part /media/artur/Backup

答案1

这是正常的。Ubuntu 安装会保留两个内核:当前内核和上一个内核。这是针对因某种原因无法启动最新内核的情况。

如果您删除相应的linux-generic-...包,它vmlinuz也将被删除。

我不建议这么做。

答案2

如果您确实要删除备份,那么:
sudo apt purge vmlinuz-4.15.0-45-generic
并且如果有任何文件它拒绝删除文件:
sudo rm -r '/path/to/file'
但这可能会毁了您的系统。

相关内容