1.update-grublinux
输出:Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-4.9.0-kali3-amd64
Found initrd image: /boot/initrd.img-4.9.0-kali3-amd64
Found Windows 7 on /dev/sda1
done工具
2.file /usr/share/images/desktop-base/desktop-grub.png图片
输出:/usr/share/images/desktop-base/desktop-grub.png: symbolic link to /etc/alternatives/desktop-grubget
这是一个连接 target is -----> /etc/alternatives/desktop-grubit
3. file(or ls -l) /etc/alternatives/desktop-grubio
输出:desktop-grub: symbolic link to /usr/share/desktop-base/active-theme/grub/grub-4x3.pngdate
一样这是一个连接,最终指向/usr/share/desktop-base/active-theme/grub/grub-4x3.pngfile
而grub-4x3.png就是咱们须要更改的grub的背景图片下载
4.先将原文件备份:mv /usr/share/desktop-base/active-theme/grub/grub-4x3.png /usr/share/desktop-base/active-theme/grub/grub-4x3.png.bkpim
5.将下载好的图片放到文件目录下并重命名:cp /root/下载/xxxx.png /usr/share/desktop-base/active-theme/grub/grub-4x3.png
6.在图片选取的过程当中的我发现须要.png格式的图片才行,eg:.jpg .jpeg不行,因此就须要图片转换工具
在这里我用的是imagemagick
用法:convert xxx.jpg xxx.png (在当前目录下)
7.update-grub