BRAZHKO.info

Блог о компьютерном железе и IT-технологиях

Как самому сделать картинку для GRUB

| Нет комментариев

Необходимое условие – размер 640×480, 14 цветов, xpm формат, сжатие gzip’ом.

Воспользуемся GIMP’ом.

Для начала необходимо в папку /usr/share/gimp/2.0/scripts положить cкрипт grub-pixmap.scm следующего содержания:

; Copyright (c) 2002, Mark A. Moss
; All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions are met:
;
; * Redistributions of source code must retain the above copyright notice,
; this list of conditions and the following disclaimer.
; * Redistributions in binary form must reproduce the above copyright notice,
; this list of conditions and the following disclaimer in the
; documentation and/or other materials provided with the distribution.
; * Neither this program nor the names of its contributors may be
; used to endorse or promote products derived from this software without
; specific prior written permission.
;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AN
; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
; DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
; SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
; CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
; OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;
; Send me an e-mail to moss7552@kettering.edu if you have any problems with this
; script.
(define (script-fu-grub-pixmap img drw filename)
(gimp-undo-push-group-start img)
(gimp-image-scale img 640 480)
(gimp-convert-indexed img 1 0 14 0 0 "")
(gimp-undo-push-group-end img)
(gimp-file-save 0 img drw filename filename)
)
(script-fu-register "script-fu-grub-pixmap"
"/File/Grub Boot Image..."
"Save this image in the format used by the Grand Unified Boot Loader. (http://www.gnu.org/software/grub/)"
"Mark Moss"
""
"January 31, 2002"
"*"
SF-IMAGE "Input Image" 0
SF-DRAWABLE "Input Layer" 0
SF-FILENAME "Output File" "splash.xpm.gz"
)

Запускаем GIMP, открываем любую понравившуюся картинку и в меню “Файл” выбираем “Grub Boot Image…”. В появившемся диалоговом окне указываем, куда сохранить готовое изображение.

Добавить комментарий

Войти с помощью: 

Обязательные поля отмечены *.