In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to modify the Linux GRUB startup background, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
What is GRUB background (Splash)?
The GRUB background (Splash) is just an image that appears as a background when the Linux system starts. You may know that Grub (short for GRand Unified Bootloader) is a widely used boot loader in mainstream Linux distributions. Take RedHat as an example, you will find that it appears blank or has a black background when the system starts.
The relevant definition of the GRUB background (Splash) is in the grub.conf file, and the splash background image should be stored in the / boot partition. If you find the default blank screen rather boring and want to modify it as you wish, read each step below.
What preparatory work is needed before starting
1.ImageMagick (used on the command line only) or GIMP (used in GUI)
two。 A sample image
Use GUI to modify the Splash background of Grub
First of all, let's use GUI to operate, here we use GIMP as the image editor.
Step 1. Open the image using GIMP (path: apply-- > image-- > GIMP program)
Step 2. Now we need to scale the image to the 640x480 size according to the actual situation. To do this, you need to click Image-> Zoom the image. Remember to set the parameters in the following figure. Modify the width to 640 and the height to 480. Everything else remains the same.
Click the Zoom button
Step 3, then we need to index the image so that it uses only 14 colors. To do this, click Image-> Mode-- > Index. Click the generate optimal palette option and set the maximum color value to 14 (below).
Click the convert button
Step 4. Save the file. It is saved here with the file name "UxTechno.xpm".
Step 5. Compress the file in Zip. To do this, go to the saved location of the file-> right-click and select the compression option, and select the gzip method to compress.
Step 6. Now copy or move "UxTechno.xpm.gz" to / boot/grub/UxTechno.xpm.gz.
Step 7. In this step, open the / boot/grub/grub.conf file to edit the splashimage parameters as follows, and save the file.
Finally, the content of the file should look like this:
# grub.conf
Generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a / boot partition. This means
That # all kernel and initrd paths are relative to / boot/, eg. # root
(hd0,0) # kernel / vmlinuz-version ro root=/dev/sda2 # initrd
/ initrd- [generic-] version.img # boot=/dev/sda default=0 timeout=5
Splashimage= (hd0,0) / grub/UxTechno.xpm.gz
Hiddenmenu
Title Red Hat Enterprise Linux (2.6.32-220.el6.x86_64)
Root (hd0,0)
Kernel / vmlinuz-2.6.32-220.el6.x86_64 ro root=UUID=1d8c5075-1a5b-4fdc-ba15-0458b65c6012 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb
Crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM initrd
/ initramfs-2.6.32-220.el6.x86_64.img
When you restart the server, you will see a splash background image with the following effect:
Use the command line to modify the Splash background of Grub
If you are a big fan of the command line, use the following methods.
Step 1. Before we begin, we need to modify the pixel resolution of the image. To do this, we also need to install ImageMagick on the Linux system. Use the following command on CentOS / RHEL to cross-check.
# rpm-qa | grep-I ImageMagick
If the command does not return output (that is, blank), it means that ImageMagick is not installed on your system. You must run the following command to install it.
# yum install ImageMagick
Once installed and re-checked, you will get output similar to the following:
# rpm-qa | grep-I ImageMagick
ImageMagick-6.5.4.7-5.el6.x86_64
Then, continue with the next configuration. Here I use UxTechno's logo to do the splash background image.
Step 2. Use the following command to convert the pixel depth.
# convert-depth 8-colors 14-resize 640x480 uxtechno_logo.jpg uxtechno_logo.xpm
The meaning of the above options is as follows:
1. Maximum use of 14 colors
two。 Resolution is 640x480
3. Use xpm format
Step 3, compress the file in Zip.
# gzip uxtechno_logo.xpm
Step 4. Copy the file to the / boot partition.
# cp uxtechno_logo.xpm.gz / boot/grub/
Step 5. Modify the splashimage parameters in the / boot/grub/grub.conf file as follows, and save the file.
Splashimage= (hd0,0) / grub/uxtechno_logo.xpm
Step 6. Finally, restart the server using the reboot command. The launch interface displays the image from step 7 of using the GUI formula.
Thank you for reading this article carefully. I hope the article "how to modify the GRUB startup background of Linux" shared by the editor will be helpful to you. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.