Code: Select all
USE="bootsplash"
Code: Select all
if [ ! -f /usr/bin/convert ]; then su -c 'emerge imagemagick'; fi
convert -depth 24 original.jpg destination.jpg
ln -sf ./destination.jpg /usr/share/bootsplash-0.4/bootsplash.jpg
cd /usr/share/bootsplash-0.4/
cp ./initrd ./initrd.bak
splash -s -f ./bootsplash.cfg > ./initrd #make sure you use the correct cfg file!
mount /boot #su if necessary
cp /boot/initrd /boot/initrd.bak
cp ./initrd /boot/initrd
umount /boot
rebootJoffer wrote:I came across this thread and decided "Neat let's work!". Patch worked seamlessly, splash created the initrd properly in the right location, however, on reboot, nothing but Tux. Not a bad thing, but not the ideal. SO, for all those folx having silent not-quit-failures (RickDB, Joffer and others) try this ...mynameisjonas wrote:i still think that your problem is with where initrd is placed and grub.conf notation but then, what do i know
GRUB can take device names in paths to specify filesystem locations, and that is what tooke me from Tux to the Gentoo boot splash from the original post. modify your initrd= line to resemble the following:
initrd=(rootdev)/location/of/initrd
i.e.
initrd=/(hd0,)/boot/initrd
That worked for me when nothing else would. Good luck!
Code: Select all
# Only do this if the kernel has support
[ -f /proc/splash ] && \
# switch to a usable image on all consoles \
for TTY in `seq 0 5`; \
do /usr/bin/splash -s -u $TTY /usr/share/bootsplash-0.4/gentoo-console-1280x1024.cfg; \
done; \
# clear the screen \
/usr/bin/clearCode: Select all
#!/sbin/runscript
#
# Script to randomly switch between boot splash screens.
#
#
# Depend
#
depend() {
need localmount
}
#
# Start
#
start() {
ebegin "Boot splash screen will be created on shutdown"
eend $?
}
#
# Stop
#
stop() {
ebegin "Creating boot splash screen"
# Variables
# Mount boot partition?
MountBoot="true"
# Location of boot partition
Boot="/boot"
# Directory where initrd is stored
BootDir="$Boot"
# Bootsplash directory
BootSplash="/usr/share/bootsplash-0.4"
# Directory where splash screens are stored
Images="$BootSplash/images"
# Mount /boot
if [ "$MountBoot" == "true" ]
then
mounted=$(mount | grep "$Boot")
if [ -z "$mounted" ]
then
mount $Boot
fi
fi
# Count number of splash screens
if [ ! -d "$Images" ]
then
echo "$Images does not exist..."
exit 1
fi
cd $Images
files=$(ls *.cfg)
count=0
for file in $files
do
count=$(echo "$count + 1" | bc)
done
# Determine last splash screen
oldsplash=""
if [ -f "$Images/lastboot" ]
then
oldsplash=$(cat $Images/lastboot)
fi
# Create new splash screen
splash=$oldsplash
while [ "$splash" == "$oldsplash" ]
do
# Generate random number
RandomDevice="/dev/urandom"
MaxRand="$count"
hex=$(dd if=/dev/urandom bs=1 count=8 2>/dev/null |
od -tx1 | head -1 | cut -d' ' -f2- |
tr -d ' ' | tr '[a-f]' '[A-F]')
dec=$(echo "ibase=16; $hex" | bc)
random=$(echo "$dec % $MaxRand + 1" | bc)
# Find new splash screen
i=0
for file in $files
do
i=$(echo "$i + 1" | bc)
if [ "$i" == "$random" ]
then
splash="$file"
fi
done
# echo -e "Old: $oldsplash \t New: $splash"
done
# Create new ram disk with splash screen
splash -s -f $Images/$splash > $BootDir/initrd
# Write new splash screen to lastboot
echo "$splash" > $Images/lastboot
# Create symbolic links for shutdown
file=$(echo $splash | cut -d "." -f 1)
cd $BootSplash
ln -sf $Images/$splash bootsplash.cfg
ln -sf $Images/$file.jpg bootsplash.jpg
# Unmount /boot
if [ "$MountBoot" == "true" ]
then
mounted=$(mount | grep "$Boot")
if [ -n "$mounted" ]
then
umount $Boot
fi
fi
eend $?
}


Code: Select all
* media-gfx/bootsplash [ Masked ]
Latest version available: 0.4
Latest version installed: [ Not Installed ]
Size of downloaded files: 365 kB
Homepage: http://linux.tkdack.com
Description: Graphical backgrounds for frame buffer consoles
Code: Select all
L 100 2 0 1
N C:\BOOTSECT.DOS
R BX
0
R CX
200
W
Q
Code: Select all
@ECHO OFF
C:
cd \DOS\VBEPLUS
VBEPLUS.EXE >NULL
cd \DOS\REFRESH
UNIRFRSH.COM >NULL
cd \DOS
LOADLIN.EXE bzImage root=/dev/hda10 hdb=ide-scsi vga=0x31A video=riva:test,mtrr,ywrap
Code: Select all
emerge bootsplashCode: Select all
All ebuilds that could satisfy "bootsplash" have been masked


