Add image effects to grub startup -- splashimage

Source: Internet
Author: User
Tags gz file imagemagick
Add image effects to grub startup-splashimage-Linux Release Technology-Debian information. For more information, see below. When Debian was started, it looked at the blue background (if you installed Lilo, of course, it was another question) and always wanted to add a background to it to make it look better.

Fortunately, Debian can be easily supported. The following is my note:

1. Install Grub. (I think you should have done it before installing the system. If you do not have any information, you can search for it online ).

2. Install ImageMagick. A tool for converting image formats. Grub's background seems to only support xpm files, with a size of 640*480 and 14 colors.

Shell # apt-get install imagemagick

3. convert an image (assuming the file is road.jpg) to a 640*640, 14-color XPM file: # convert road.jpg-colors 14-geometry 480 x! Road. xpm

4. compress the xpm file to generate the gz file: # gzip ?? 9 road. xpm

5. Copy the road.xpm.gz file to/boo/grub: # cp road.xpm.gz/boot/grub

6. Modify the/boot/grub/menu. lst file and add the following lines: splashimage = (hd0, 5)/grub/road.xpm.gz

Note:
1. in step 2, there is an exclamation mark (!) in step 3rd x 640 (!) , Which is easy to ignore. I encountered an error here when I set it for the first time.

2. in step 2, in the middle of step 3rd x 640, this is x rather *. (Because we usually think that the multiplication number is *)

3. When you modify the menu. lst file in step 1, although there is only one row, it is easy to make an error. If the boot partition is an independent partition, the number after the equal sign partition indicates the position of the boot partition (partition number minus 1 ). For example, if the boot partition is on the first 6th partitions of the hard disk, it should be (hd0, 5). If the partition is on the 8th partitions, so we should write it here (hd0, 7 ). If it is 6th partitions on the second hard disk, it should be (hd1, 5); other situations are similar. If boot is not an independent partition, the position of the root partition is followed by the partition number minus 1 ). Note: If the boot is an independent partition, it should be written as (hd0, 5)/grub/road.xpm.gz; if the boot is not an independent partition, it should be written as (hd0, 0)/boot/grub/road.xpm.gz.

4. The position added in the splashimage line should be as early as possible, preferably before and after the position where the background color is set. Because I added this line to the end for the first time, but the result was not successful, I just needed to advance the position.

Note: The splashimage package must be installed. grub is not installed by default. apt-get install splashimage.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.