Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux fun: give the GRUB2 bootstrap a background

2025-03-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Centos/RedHat Linux operating systems are not configured with grub background by default. It may not matter if you use it as a server. If you use it yourself, you always want to make it look beautiful. In this article, add a background image to the grub boot interface and modify the resolution. Environment Centos7.7 MinimalCentos8.0 Minimal Find a nice background

Find a beautiful image and upload it to the server.

#After uploading, copy the image to the/boot/grub2/images folder. [root@client ~]# mkdir /boot/grub2/images[root@client ~]# cp -p background.jpg /boot/grub2/images/[root@client ~]# chmod 777 !$/ background.jpg

Edit/etc/default/grub file [root@client ~]# vim /etc/default/grub_TIMEOUT=5GRUB_DISTRIBUTOR="$(sed 's, release .*$, GRUB g' /etc/system-release)"GRUB_DEFAULT=savedGRUB_DISABLE_SUBMENU=trueGRUB_TERMINAL_OUTPUT="gfxterm"GRUB_BACKGROUND=/boot/grub2/images/background.jpgGRUB_GFXMODE= 144@x900,1024x768, 640x480GRUB_CMDLINE_LINUX ="crashkernel=auto spectre_v2= retpol rd.lvm.lv = centre.com os/root rd.lvm.lv=centos/swap rhgb quiet"GRUB_DISABLE_RECOVERY="true"GRUB_TERMINAL_OUTPUT This variable is implicitly recognized as"console"in Centos/RHEL systems, It needs to be modified to "gfxterm" to display the image background. Add the GRUB_BACKGROUND variable to specify the location of the background of the picture. Add the GRUB_GFXMODE variable to specify the resolution of the grub boot interface. Regenerate the grub.cfg configuration file [root@client ~]#grub2-mkconfig -o/boot/grub2/grub.cfg [root@client ~]# reboot

Then restart the operating system.

renderings

Centos7 renderings

Centos8 rendering

summary

Setting up background images is required in conjunction with the "gfxterm" graphical terminal. The image format needs to be.png, jpg,.jpeg,.tga suffix.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report