1.update-grub
输出: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-grub
这是一个链接 target is -----> /etc/alternatives/desktop-grub
3. file(or ls -l) /etc/alternatives/desktop-grub
输出:desktop-grub: symbolic link to /usr/share/desktop-base/active-theme/grub/grub-4x3.png
同样这是一个链接,最终指向/usr/share/desktop-base/active-theme/grub/grub-4x3.png
而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.bkp
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