In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to configure Linux GRUB startup background". In daily operation, I believe many people have doubts about how to configure Linux GRUB startup background. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the questions of "how to configure Linux GRUB startup background"! Next, please follow the editor to study!
The GRUB background is just an image that appears as a background when the Linux system starts. You may know that Grub is the widely used boot loader bootloader 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.
What preparatory work is needed before starting
ImageMagick (used on the command line only) or GIMP (used in GUI) 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 Applications-> Image Graphics-> GIMP program GNU Image Manipulation Program)
Step 2, now we need to scale the image to the size of 640 × 480 according to the actual situation. To do this, you need to click Image Image-> to zoom the image Scale 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 Scale button
Step 3, then we need to index the image so that it uses only 14 colors. To do this, click the image Image-> mode Mode-> index Indexed. Click the generate optimal palette generate optimum palette option and set the maximum color value maximum number of colors to 14 (below).
Click the convert 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 compress Compress 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.confgenerated 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 .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 ImageMagickImageMagick-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:
Maximum use of 14 colors with a resolution of 640 × 480 using 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.
(the original picture is in wallconvert.com)
What is GRUB background (Splash)?
The GRUB background (Splash) is just an image that appears as a background when the Linux system starts. You probably know that Grub (short for GRand Unified Bootloader) is the widely used boot loader bootloader 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
ImageMagick (used on the command line only) or GIMP (used in GUI) 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 Applications-> Image Graphics-> GIMP program GNU Image Manipulation Program)
Step 2, now we need to scale the image to the size of 640 × 480 according to the actual situation. To do this, you need to click Image Image-> to zoom the image Scale 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 Scale button
Step 3, then we need to index the image so that it uses only 14 colors. To do this, click the image Image-> mode Mode-> index Indexed. Click the generate optimal palette generate optimum palette option and set the maximum color value maximum number of colors to 14 (below).
Click the convert 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 compress Compress 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.confgenerated 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 .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 ImageMagickImageMagick-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:
Maximum use of 14 colors with a resolution of 640 × 480 using 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.
At this point, the study on "how to configure Linux GRUB startup background" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.