mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
20170216-7 选题
This commit is contained in:
parent
7db47a0e4e
commit
544c09d539
@ -0,0 +1,150 @@
|
||||
How to change the Linux Boot Splash screen
|
||||
============================================================
|
||||
|
||||
### On this page
|
||||
|
||||
1. [What we need to proceed.][1]
|
||||
2. [Change the Grub splash screen by using the GUI][2]
|
||||
3. [Change the Grub splash screen on the command line][3]
|
||||
|
||||
**What is a Splash screen?**
|
||||
|
||||
A splash screen is nothing but the picture that's gets displayed in the background while booting the Linux operating system. You might be knowing that Grub (**GR**and **U**nified **B**ootloader) is the commonly used famous bootloader among major Linux distributions. If you take Redhat as an example, it displays a blank or black background during the booting of the system.
|
||||
|
||||
The splash screen definitions are defined in the grub.conf file and the splash screen image file resides in the /boot partition. If you are bored of the default blank screen and want to change it to whatever you like, then just perform the steps below to change it.
|
||||
|
||||
### What we need to proceed.
|
||||
|
||||
1\. ImageMagick (Only required For command Line Method): or GIMP (For GUI Method)
|
||||
2\. A sample image.
|
||||
|
||||
###
|
||||
Change the Grub splash screen by using the GUI
|
||||
|
||||
Let's proceed with the GUI method in which we will use GIMP as image editor.
|
||||
|
||||
**Step 1**. Open the image using GIMP (follow the path; Applications --> Graphics --> GNU Image Manipulation Program )
|
||||
|
||||
**Step 2**. Now we need to scale the image size to 640 x 480 for proper implementation. For this, go to option Image--> Scale Image. Keep in mind below specs for this. Change Width to 640 and Height to 480\. Do not change rest of the things.
|
||||
|
||||
[
|
||||
![Scale image](https://www.howtoforge.com/images/how_to_change_the_linux_splash_screen/scale.JPG)
|
||||
][4]
|
||||
|
||||
Click on the **Scale** button.
|
||||
|
||||
**Step 3:** Then we need to index our image so that only 14 colors are used. To do this, go to option Image --> Mode --> Indexed. Tick the "generate optimum palette" option and enter 14 as the maximum number of colors (as shown below).
|
||||
|
||||
[
|
||||
![Limit color palette to 14 colors](https://www.howtoforge.com/images/how_to_change_the_linux_splash_screen/index.JPG)
|
||||
][5]
|
||||
|
||||
Click on the convert Button.
|
||||
|
||||
**Step 4:** Save the file. I'll use the name "UxTechno.xpm" below:
|
||||
|
||||
[
|
||||
![Save the image file.](https://www.howtoforge.com/images/how_to_change_the_linux_splash_screen/save.JPG)
|
||||
][6]
|
||||
|
||||
**Step 5: **Zip the file. To do this, go to the location of the file --> Right click on it and select the "Compress" Option. Then select "gzip" as compression method:
|
||||
|
||||
[
|
||||
![](https://www.howtoforge.com/images/how_to_change_the_linux_splash_screen/compress.JPG)
|
||||
][7]
|
||||
|
||||
**Step 6:** Now copy or move "UxTechno.xpm.gz" file to the location /boot/grub/UxTechno.xpm.gz
|
||||
|
||||
**Step 7:** Now edit the line splashimage parameter in the /boot/grub/grub.conf File as shown below and save the file. The final content shall 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 reboot the server, you will see your customized boot splash image as below:
|
||||
|
||||
[
|
||||
![](https://www.howtoforge.com/images/how_to_change_the_linux_splash_screen/Uxtecho_splash.JPG)
|
||||
][8]
|
||||
|
||||
### Change the Grub splash screen on the command line
|
||||
|
||||
If you are a big fan of the command line, then follow this method.
|
||||
|
||||
**Step 1:**
|
||||
|
||||
Before proceeding, we need to change the image pixel resolution. For this purpose, we should have the ImageMagick software installed on the Linux system. Cross check this using below command on CentOS / RHEL.
|
||||
|
||||
rpm -qa|grep -i ImageMagick
|
||||
|
||||
IWhen the command returns no (blank) output, then this means you don't have ImageMagick installed on your system. You have to install it using the below command.
|
||||
|
||||
yum install ImageMagick
|
||||
|
||||
When you recheck, you will get similar output as below:
|
||||
|
||||
rpm -qa|grep -i ImageMagick
|
||||
|
||||
ImageMagick-6.5.4.7-5.el6.x86_64
|
||||
|
||||
So let's proceed with the configuration. I have taken the UxTechno Logo as splash screen image.
|
||||
|
||||
**Step 2: **Covert the pixel depth using below command:
|
||||
|
||||
convert -depth 8 -colors 14 -resize 640x480 uxtechno_logo.jpg uxtechno_logo.xpm
|
||||
|
||||
Definition of above option is as follows:
|
||||
|
||||
1. It has to be max 14 colors.
|
||||
2. It has got to be 640x480 resolution.
|
||||
3. It should be in xpm format.
|
||||
|
||||
**Step 3: **Thengzip the file.
|
||||
|
||||
gzip uxtechno_logo.xpm
|
||||
|
||||
**Step 4: **Copy the file to the /boot partition.
|
||||
|
||||
cp uxtechno_logo.xpm.gz /boot/grub/
|
||||
|
||||
**Step 5: **Change the splashimage parameter in the /boot/grub/grub.conf file as below & save the file.
|
||||
|
||||
```
|
||||
splashimage=(hd0,0)/grub/uxtechno_logo.xpm
|
||||
```
|
||||
|
||||
**Step 6:** Finally reboot the server using the reboot command. The boot screen will display the splash image as shown in step 7 of the GUI install procedure.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.howtoforge.com/tutorial/how-to-change-the-linux-splash-screen/
|
||||
|
||||
作者:[MANMOHAN MIRKAR][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://www.howtoforge.com/tutorial/how-to-change-the-linux-splash-screen/
|
||||
[1]:https://www.howtoforge.com/tutorial/how-to-change-the-linux-splash-screen/#what-we-need-to-proceed
|
||||
[2]:https://www.howtoforge.com/tutorial/how-to-change-the-linux-splash-screen/#change-the-grub-splash-screen-by-using-the-gui
|
||||
[3]:https://www.howtoforge.com/tutorial/how-to-change-the-linux-splash-screen/#change-the-grub-splash-screennbspon-the-command-line
|
||||
[4]:https://www.howtoforge.com/images/how_to_change_the_linux_splash_screen/big/scale.JPG
|
||||
[5]:https://www.howtoforge.com/images/how_to_change_the_linux_splash_screen/big/index.JPG
|
||||
[6]:https://www.howtoforge.com/images/how_to_change_the_linux_splash_screen/big/save.JPG
|
||||
[7]:https://www.howtoforge.com/images/how_to_change_the_linux_splash_screen/big/compress.JPG
|
||||
[8]:https://www.howtoforge.com/images/how_to_change_the_linux_splash_screen/big/Uxtecho_splash.JPG
|
Loading…
Reference in New Issue
Block a user