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