1. Установка программ
Код: Выделить всё
emerge bootsplash
etc-update
У меня поставился bootsplash-0.6-r16 С ACCEPT_KEYWORDS лучше не ставить, с ним чуть сложнее всё получается.
На gentoo.org рекомендуют ставить патч для bootsplash, но мы этого делать не будем, так он старый и не поддерживает новые baselayout, => результат может быть весьма неожиданный. Тем более, что сейчас из всего архива с патчем надо будет всего один файл, который по какой-то непонятной для причине есть и последних bootsplash, но не устанавливается.
2. Настройка ядра
В ядрах vanilla нет нужного нам патча для bootsplash, но его можно взять из уже имеющегося у нас архива /usr/portage/distfiles/bootsplash-0.6-r16.tar.bz2
Копируем нужный патч в каталог с ядром и устанавливем его.
Код: Выделить всё
bzcat bootsplash-3.1.4-2.6.3.diff.bz2 | patch -p1
В ядрах gentoo, love, mm и некоторых других патч этот уже есть, остаётся только правильно сконфигурировать.
Код: Выделить всё
cp .config ../ && make mrproper && cp ../.config . && make menuconfig
Проверьре, чтобы все эти опции были включены. Заметьте, что фреймбуфер нужен именно vesa.
Код: Выделить всё
Block Devices ->
[*] Loopback device support
[*] RAM disk support
(4096) Default RAM disk size
[*] Initial RAM disk (initrd) support
Console Drivers ->
[*] VGA text console
[*] Video mode selection support
Console Drivers -> Frame-buffer support ->
[*] Support for frame buffer devices
[*] VESA VGA graphics console
[*] Use splash screen instead of boot logo
Компилируем и устанавливаем ядро. (для 2.6.х !!)
make && make modules_install
mount /boot
cp System.map /boot && cp arch/i386/boot/bzImage /boot
3. Настройка загрузчика
Разберём настройку загрузчика Grub, так как почти все джентульмены используют именно его. Для lilo всё делается аналогично, но опции ядра надо добавить в append и vga соответственно.
Возьмём уже готовый initrd. Легко догадаться, что вместо 1024х768 надо подставить другое значение, если у Вас другое разрешение.
Код: Выделить всё
cp /usr/share/bootsplash/initrd-gentoo-1024x768 /boot
nano -w /boot/grub/grub.conf
Редактируем. Вот пример из моего grub.conf
Код: Выделить всё
title Linux 2.6.5 love-sources with splash
root (hd0,0)
kernel /bzImage-love ro root=/dev/hda6 video=vesa:1024x768@76,ywrap,mtrr vga=0x317 splash=silent
initrd /initrd-gentoo-1024x768
Вот табличка из файла /usr/src/linux/Documentation/fb/vesafb.txt из которой Вам станет ясно, какое значение прописать в параметре vga.
Параметр splash может быть silent или verbose. Пишем silent, так как самое интересное впереди.
В параметре initrd пишем название только что скопированного файла.
Код: Выделить всё
| 640x480 800x600 1024x768 1280x1024
----+-------------------------------------
256 | 0x301 0x303 0x305 0x307
32k | 0x310 0x313 0x316 0x319
64k | 0x311 0x314 0x317 0x31A
16M | 0x312 0x315 0x318 0x31B
Теперь внесём скрипт bootsplash в загрузочный уровень default.
Код: Выделить всё
rc-update add bootsplash default
Всё, bootsplash установлен, и (может быть


Но пойдём дальше и добавим в загрузку элементы анимации.
4. Анимация
Выкачиваем этот файл.
распаковываем его содержимое:
Код: Выделить всё
tar zxvf bootsplash-animations.tar.gz -C /etc/bootsplash/default
cd /etc/bootsplash/default
mv bootsplash-animations animations
Внесём изменения в конфигурационный файл коммандой
Код: Выделить всё
echo 'BOOTSPLASH_ANIMATIONS="yes"' >> /etc/conf.d/bootsplash
Прошу заметить, что env-update делать не нужно.
Создайте файл /etc/bootsplash/default/config/animations.cfg такого содержания:
Код: Выделить всё
checkroot start:bootanim start hdd.mng &
checkfs start:bootanim stop &
keymaps start:bootanim start key.mng &
urandom start:bootanim stop &
netmount start: bootanim start network.mng &
checkroot stop:bootanim start -x 0 -y 50 halt.mng &
В последствии его можно легко изменить и дополнить. Тут, я думаю, проблем не возникнет. Все анимированные картинки лежат в /etc/bootsplash/default/animations.
ВАЖНО! Проверьте, есть ли в каталоге /sbin скрипт bootanim, если нет, то создайте его с таким содержанием:
(Этот скрипт есть в самом последнем bootsplash, но почему-то, как я уже говорил, не устанавливается, очевидно баг. Также он есть в патче для bootsplash и baselayout, который imho устанавливать нет никакого смысла)
Код: Выделить всё
#!/bin/bash
# $Header:
#
# bootanim - boot animation wrapper script for fbmngplay
#
# This script parses /usr/share/splash/current/config/bootsplash-XxY.cfg
# to determine the correct animation position.
#
# (C) 2002 SuSE AG. Written by Stefan Reinauer <stepan@suse.de>
#
# modified by Michael Aichler <micha at aichler dot net>
#
usage()
{
echo "Usage: `basename $0` COMMAND [OPTIONS] mng1 [mng2 ...]"
cat << EOF
Available commands:
start starts given animation
stop fades out all running animations
kill immediately stops all animations
next kills current and starts next animation.
Options for use with start command:
EOF
echo -e "`fbmngplay -h 2>&1 | grep -v \"usage:\" | grep \"-\"`\n"
}
#!/bin/bash
# $Header:
#
# bootanim - boot animation wrapper script for fbmngplay
#
# This script parses /usr/share/splash/current/config/bootsplash-XxY.cfg
# to determine the correct animation position.
#
# (C) 2002 SuSE AG. Written by Stefan Reinauer <stepan@suse.de>
#
# modified by Michael Aichler <micha at aichler dot net>
#
usage()
{
echo "Usage: `basename $0` COMMAND [OPTIONS] mng1 [mng2 ...]"
cat << EOF
Available commands:
start starts given animation
stop fades out all running animations
kill immediately stops all animations
next kills current and starts next animation.
Options for use with start command:
EOF
echo -e "`fbmngplay -h 2>&1 | grep -v \"usage:\" | grep \"-\"`\n"
}
if [ "$UID" -ne "0" ]; then
echo "$0 must be started as user root!!!"
echo "Exiting..."
exit 1
fi
test -f /etc/conf.d/bootsplash && . /etc/conf.d/bootsplash
test "${BOOTSPLASH_ANIMATIONS}" != "yes" && exit 0
if [ ! -x /sbin/splash ]; then
echo "`basename $0`: can't find splash utility"
exit 1
fi
BOOTSPLASH_THEME="$(/sbin/splash theme)"
DIRECTORY=/etc/bootsplash/${BOOTSPLASH_THEME}/animations
OPTIONS=""
FILES=""
buffer=""
console=""
case "$1" in
start)
# We fall through here.
;;
stop)
sleep $2
killall -q -2 fbmngplay
exit 0
;;
kill)
killall -q fbmngplay
exit 0
;;
next)
killall -q -USR1 fbmngplay
exit 0
;;
*)
echo "`basename $0`: illegal parameter."
usage
exit 1
;;
esac
shift
# We end up in bootanim start
for arg in $*; do
if [ "${arg#*.}" == "mng" ]; then
FILES="$FILES $arg"
else
test "$arg" == "-b" && buffer="true"
test "$arg" == "-c" && console="true"
OPTIONS="$OPTIONS $arg"
fi
done
test -z "$buffer" && OPTIONS="$OPTIONS -b"
test -z "$console" && OPTIONS="$OPTIONS -c 1"
CMDLINE="fbmngplay $OPTIONS"
for file in $FILES; do
CMDLINE="$CMDLINE ${DIRECTORY}/${file}"
done
eval "$CMDLINE &"
if [ "$UID" -ne "0" ]; then
echo "$0 must be started as user root!!!"
echo "Exiting..."
exit 1
fi
test -f /etc/conf.d/bootsplash && . /etc/conf.d/bootsplash
test "${BOOTSPLASH_ANIMATIONS}" != "yes" && exit 0
if [ ! -x /sbin/splash ]; then
echo "`basename $0`: can't find splash utility"
exit 1
fi
BOOTSPLASH_THEME="$(/sbin/splash theme)"
DIRECTORY=/etc/bootsplash/${BOOTSPLASH_THEME}/animations
OPTIONS=""
FILES=""
buffer=""
console=""
case "$1" in
start)
# We fall through here.
;;
stop)
sleep $2
killall -q -2 fbmngplay
exit 0
;;
kill)
killall -q fbmngplay
exit 0
;;
next)
killall -q -USR1 fbmngplay
exit 0
;;
*)
echo "`basename $0`: illegal parameter."
usage
exit 1
;;
esac
shift
# We end up in bootanim start
for arg in $*; do
if [ "${arg#*.}" == "mng" ]; then
FILES="$FILES $arg"
else
test "$arg" == "-b" && buffer="true"
test "$arg" == "-c" && console="true"
OPTIONS="$OPTIONS $arg"
fi
done
test -z "$buffer" && OPTIONS="$OPTIONS -b"
test -z "$console" && OPTIONS="$OPTIONS -c 1"
CMDLINE="fbmngplay $OPTIONS"
for file in $FILES; do
CMDLINE="$CMDLINE ${DIRECTORY}/${file}"
done
eval "$CMDLINE &"
Вот и всё. Темы можно найти на сайте Bootsplash, а также командой emerge bootsplash-themes-livecd
