lmello's LILO splash

The place to post your Salix wallpapers, screenshots etc.
Post Reply
User avatar
Tim CowChip
Posts: 301
Joined: 27. May 2011, 03:35
Location: Cascade Locks, OR

lmello's LILO splash

Post by Tim CowChip » 19. May 2012, 22:51

I tried using lmello's LILO splash http://salixos.org/forum/viewtopic.php? ... bmp#p10575 and got an unsupported bitmap error.
I know its an old post and recently upgraded LILO.

Code: Select all

root[chris]# lilo -v -C /etc/lilosetup.conf
LILO version 23.2 (released 09-Apr-2011)
  * Copyright (C) 1992-1998 Werner Almesberger  (until v20)
  * Copyright (C) 1999-2007 John Coffman  (until v22)
  * Copyright (C) 2009-2011 Joachim Wiedorn  (since v23)
This program comes with ABSOLUTELY NO WARRANTY. This is free software 
distributed under the BSD License (3-clause). Details can be found in 
the file COPYING, which is distributed with this software.
Compiled at 19:24:22 on Aug 11 2011

Reading boot sector from /dev/sda
Using BITMAP secondary loader
Calling map_insert_data
Mapping bitmap file /boot/salix-black.bmp
Fatal: Unsupported bitmap
my /etc/lilosetup.conf

Code: Select all

# LILO configuration file
# Generated by LiloSetup
#
# Start LILO global section
# Append any additional kernel parameters:
append = "vt.default_utf8=1 "
boot = /dev/sda
lba32
compact

# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
  bitmap=/boot/salix-black.bmp
  bmp-colors = 2,,,3,,,
  bmp-table = 85p,130p,1,17,17
  bmp-timer = ,,,,2
# Standard menu.
# Or, you can comment out the bitmap menu above and 
# use a boot message with the standard menu:
# message = /boot/boot_message.txt

# Wait until the timeout to boot (if commented out, boot the
# first entry immediately):
prompt
# Timeout before the first entry boots.
# This is given in tenths of a second, so 600 for every minute:
timeout = 50
# Override dangerous defaults that rewrite the partition table:
change-rules
reset

# Normal VGA console
vga = normal
# VESA framebuffer console @ 1600x1200x16m
# vga=799
# VESA framebuffer console @ 1600x1200x64k
# vga=798
# VESA framebuffer console @ 1600x1200x32k
# vga=797
# VESA framebuffer console @ 1600x1200x256
# vga=796
# VESA framebuffer console @ 1280x1024x16m
# vga=795
# VESA framebuffer console @ 1280x1024x64k
# vga=794
# VESA framebuffer console @ 1280x1024x32k
# vga=793
# VESA framebuffer console @ 1280x1024x256
# vga=775
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x16m
# vga=789
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# End LILO global section
#
# LiloSetup can be executed from a LiveCD. This means that lilo
# could be issued from a 'chrooted' Linux partition, which would
# happen to be the first Linux partition listed below.
# Therefore the following paths are relevant only when viewed
# from that 'chrooted' partition's perspective. Please take this
# constraint into consideration if you must modify this file
# or else LiloSetup will fail.
#
# If later on you want to use this configuration file directly
# with lilo in a command line, use the following syntax:
# "lilo -v -C /etc/lilosetup/conf" instead of the traditional
# "lilo -v" command. You must of course issue that command from
# the operating system holding /etc/lilosetup.conf & ensure that
# all partitions referenced in it are mounted on the appropriate
# mountpoints.
#
# Linux bootable partition config begins
image = /boot/vmlinuz-huge-2.6.37.6
root = /dev/disk/by-uuid/5ee98a2d-5011-4044-a692-4124c23d005d
label = Salix
read-only
# Linux bootable partition config ends
#
# Linux bootable partition config begins
image = /media/disk/boot/vmlinuz-linux
root = /dev/disk/by-uuid/67f35b73-ec67-4c02-b748-f1da89338b6a
label = Archbang
initrd = /media/disk/boot/initramfs-linux-fallback.img
read-only
# Linux bootable partition config ends
Its a really nice looking splash. Is there something I can do to make it a supported bitmap?
ImageImage

User avatar
Tim CowChip
Posts: 301
Joined: 27. May 2011, 03:35
Location: Cascade Locks, OR

Re: lmello's LILO splash

Post by Tim CowChip » 20. May 2012, 00:18

I tried rebuilding LILO

SLKBUILD

Code: Select all

#Maintainer: Thorsten Muehlfelder <thenktor(at)gmx.de>

pkgname=lilo
pkgver=23.2
pkgrel=13tm
arch=x86_64
source=("ftp://ftp.slackware.at/slackware64-current/slackware64/a/lilo-$pkgver-$arch-1.txz")

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"$pkgname (Linux Loader)"
"Generic Boot Loader for Linux ('LInux LOader') by Werner Almesberger."
"LILO boots Linux from your hard drive. It can also boot other"
"operating systems such as MS-DOS and OS/2, and can even boot DOS from"
"the second hard drive. LILO comes with utilities and documentation"
"that make it easier to install, such as 'liloconfig' and 'QuickStart'."
"NOTE: Installing boot loaders is inherently dangerous. Be sure to have"
"some means to boot your system from a different media if you install"
"LILO on your hard disk."
)

build() {
	cd $startdir/src/
	#
	# just take the slackware package and add our own background bitmap and settings
	#

	# background bitmap
	mv salix-black.bmp boot/ || return 1
	rm boot/slack.bmp

	# liloconfig
	mv liloconfig sbin/ || return 1
	chmod 755 sbin/liloconfig

	## tweak some lilo default settings in original liloconfig
	#sed -i s/slack.bmp/salix-black.bmp/g sbin/liloconfig
	#sed -i s/bmp-timer\ =\ .*/bmp-timer\ =\ 65,29,0,255/ sbin/liloconfig
	#sed -i s/bmp-colors\ =\ .*/bmp-colors\ =\ 2,,,3,,,/ sbin/liloconfig
	#sed -i s/timeout\ =\ .*/timeout\ =\ 50/ sbin/liloconfig
	#sed -i s/APPEND=\"/APPEND=\"quiet\ / sbin/liloconfig

	# mv everything to the new package
	mv boot install sbin var $startdir/pkg/
	mv usr/* $startdir/pkg/usr/
}
build-lilo.sh

Code: Select all

#!/bin/bash
#Automatically Created by slkbuild 0.8.6
#Maintainer: Thorsten Muehlfelder <thenktor(at)gmx.de>

######Begin Redundant Code######################################
check_for_root() {
	if [ "$UID" != "0" ]; then
		echo "You need to be root"
		exit 1
	fi
}

clean_dirs () {
        for COMPLETED in src pkg; do
                if [ -e $COMPLETED ]; then
                        rm -rf $COMPLETED
                fi
        done
}

clean_old_builds () {
	rm -rf $package.{t[xlgb]z,md5}
	clean_dirs
}

set_pre_permissions() {
	cd $startdir/src
	find . -perm 664 -exec chmod 644 {} \;
	find . -perm 600 -exec chmod 644 {} \;
	find . -perm 444 -exec chmod 644 {} \;
	find . -perm 400 -exec chmod 644 {} \;
	find . -perm 440 -exec chmod 644 {} \;
	find . -perm 777 -exec chmod 755 {} \;
	find . -perm 775 -exec chmod 755 {} \;
	find . -perm 511 -exec chmod 755 {} \;
	find . -perm 711 -exec chmod 755 {} \;
	find . -perm 555 -exec chmod 755 {} \;
}


gzip_man_and_info_pages() {
	for DOCS in man info; do
		if [ -d "$startdir/pkg/usr/share/$DOCS" ]; then
			mv $startdir/pkg/usr/share/$DOCS $startdir/pkg/usr/$DOCS
			if [[ ! "$(ls $startdir/pkg/usr/share)" ]]; then
				rm -rf $startdir/pkg/usr/share
			fi
		fi
		if [ -d "$startdir/pkg/usr/$DOCS" ]; then
			# I've never seen symlinks in info pages....
			if [ "$DOCS" == "man" ]; then
				(cd $startdir/pkg/usr/$DOCS
				for manpagedir in $(find . -type d -name "man*" 2> /dev/null) ; do
					( cd $manpagedir
					for eachpage in $( find . -type l -maxdepth 1 2> /dev/null) ; do
						ln -s $( readlink $eachpage ).gz $eachpage.gz
						rm $eachpage
					done )
				done)
			fi
			find $startdir/pkg/usr/$DOCS -type f -exec gzip -9 '{}' \;
		fi
	done
	[ -a $startdir/pkg/usr/info/dir.gz ] && rm -f $startdir/pkg/usr/info/dir.gz
}

set_post_permissions() {
	for DIRS in usr/share/icons usr/doc; do
		if [ -d "$startdir/pkg/$DIRS" ]; then
			if [ "$DIRS" == "usr/doc" ]; then
				find $startdir/pkg/$DIRS -type f -exec chmod 644 {} \;
				find $startdir/pkg/$DIRS -type d -exec chmod 755 {} \;
			fi
		fi
		[ -d $startdir/pkg/$DIRS ] && chown root:root -R $startdir/pkg/$DIRS
	done
	[ -d $startdir/pkg/usr/bin ] && find $startdir/pkg/usr/bin -user root -group bin -exec chown root:root {} \;
}

copy_build_script() {
	mkdir -p $startdir/pkg/usr/src/$pkgname-$pkgver/
	[ -f $startdir/SLKBUILD ] && cp $startdir/SLKBUILD	$startdir/pkg/usr/src/$pkgname-$pkgver/SLKBUILD
}

create_package() {
	ls -lR $startdir/pkg
	cd $startdir/pkg
	/sbin/makepkg -p -l y -c n $startdir/$package.txz
	cd $startdir
	md5sum $package.txz > $startdir/$package.md5
}

strip_binaries() {
	cd $startdir/pkg
	find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
	xargs strip --strip-unneeded 2> /dev/null
	find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
	xargs strip --strip-unneeded 2> /dev/null
}
#########End Redundant Code#####################################
#########Begin Non Redundant Code##############################

prepare_directory() {
	NOSRCPACK=""
	mkdir $startdir/src
	mkdir -p $startdir/pkg/usr/src/$pkgname-$pkgver
	for SOURCES in ${source[@]}; do
		protocol=$(echo $SOURCES | sed 's|:.*||')
	        file=$(basename $SOURCES | awk -F= '{print $NF}')
		if [ ! -f "$file" ]; then
			if [ "$protocol" = "http" -o "$protocol" = "https" -o "$protocol" = "ftp" ]; then
				echo -e "\nDownloading $(basename $SOURCES)\n"
        	                wget -c --no-check-certificate $SOURCES -O $file
				if [ ! "$?" == "0" ]; then
					echo "Download failed"
					exit 2
				fi 
			else
				echo "$SOURCES does not appear to be a url nor is it in the directory"
				exit 2
			fi
		fi
		cp -LR $file $startdir/src
		if ! [ "$protocol" = "http" -o "$protocol" = "https" -o "$protocol" = "ftp" ]; then
			if ! [[ $NOSRCPACK -eq 1 ]]; then
				cp -LR $startdir/$(basename $SOURCES) $startdir/pkg/usr/src/$pkgname-$pkgver/
			fi
		fi
	done
}

extract_source() {
	cd $startdir/src
	if [[ "$(ls $startdir/src)" ]]; then	
		for FILES in ${source[@]}; do
	        	FILES="$(basename $FILES | awk -F= '{print $NF}')"
			file_type=$(file -biLz "$FILES")
			unset cmd
			case "$file_type" in
				*application/x-tar*)
					cmd="tar -xf" ;;
				*application/x-zip*)
					cmd="unzip" ;;
				*application/zip*)
					cmd="unzip" ;;
				*application/x-gzip*)
					cmd="gunzip -d -f" ;;
				*application/x-bzip*)
					cmd="bunzip2 -f" ;;
				*application/x-xz*)
					cmd="xz -d -f" ;;
				*application/x-lzma*)
					cmd="lzma -d -f" ;;
				*application/x-rar*)
					cmd="unrar x" ;;
			esac
			if [ "$cmd" != "" ]; then
				echo "$cmd $FILES"
	        	        $cmd $FILES
			fi
		done
	elif [ ! "$source" ]; then
		echo -n "" # lame fix
	else
		echo "no files in the src directory $startdir/src"
		exit 2
	fi
}

build() {
	cd $startdir/src/
	#
	# just take the slackware package and add our own background bitmap and settings
	#

	# background bitmap
	mv /home/chris/slkbuilds/lilo/salix-black.bmp boot/ || return 1
	rm boot/slack.bmp

	# liloconfig
	mv /home/chris/slkbuilds/lilo/liloconfig sbin/ || return 1
	chmod 755 sbin/liloconfig

	## tweak some lilo default settings in original liloconfig
	#sed -i s/slack.bmp/salix-black.bmp/g sbin/liloconfig
	#sed -i s/bmp-timer\ =\ .*/bmp-timer\ =\ 65,29,0,255/ sbin/liloconfig
	#sed -i s/bmp-colors\ =\ .*/bmp-colors\ =\ 2,,,3,,,/ sbin/liloconfig
	#sed -i s/timeout\ =\ .*/timeout\ =\ 50/ sbin/liloconfig
	#sed -i s/APPEND=\"/APPEND=\"quiet\ / sbin/liloconfig

	# mv everything to the new package
	mv boot install sbin var $startdir/pkg/
	mv usr/* $startdir/pkg/usr/
}

create_slackdesc() {
mkdir $startdir/pkg/install
cat <<"EODESC" >$startdir/pkg/install/slack-desc
lilo: lilo (Linux Loader)
lilo: 
lilo: Generic Boot Loader for Linux ('LInux LOader') by Werner Almesberger.
lilo: LILO boots Linux from your hard drive. It can also boot other
lilo: operating systems such as MS-DOS and OS/2, and can even boot DOS from
lilo: the second hard drive. LILO comes with utilities and documentation
lilo: that make it easier to install, such as 'liloconfig' and 'QuickStart'.
lilo: NOTE: Installing boot loaders is inherently dangerous. Be sure to have
lilo: some means to boot your system from a different media if you install
lilo: LILO on your hard disk.
lilo: 
EODESC
}

create_source_file(){
	[ -f $package.src ] && rm $package.src
	if [ ! -z $sourcetemplate ]; then
		echo $sourcetemplate/SLKBUILD >> $package.src
		for SOURCES in ${source[@]}; do
			protocol=$(echo $SOURCES | sed 's|:.*||')
			if ! [ "$protocol" = "http" -o "$protocol" = "https" -o "$protocol" = "ftp" ]; then
				if [ ! -z $sourcetemplate ]; then
					echo $sourcetemplate/$(basename $SOURCES) >> $package.src
				else
					echo $(basename $SOURCES) >> $package.src
				fi
			else
				echo $SOURCES >> $package.src
			fi
		done
	fi
}
post_checks(){
	# Ideas taken from src2pkg :)
	if [ -d "$startdir/pkg/usr/doc/$pkgname-$pkgver" ]; then
		for DIRS in usr/doc/$pkgname-$pkgver usr/doc; do
			cd $startdir/pkg/$DIRS
			if [[ $(find . -type f) = "" ]] ; then
				cd ..
				rmdir $DIRS
			fi
		done
	fi
	# if the docs weren't deleted ...
	if [ -d "$startdir/pkg/usr/doc/$pkgname-$pkgver" ]; then
		cd $startdir/pkg/usr/doc/$pkgname-$pkgver
		#remove zero lenght files
		if [[ $(find . -type f -size 0) ]]; then
			echo "Removing some zero lenght files"
			find . -type f -size 0 -exec rm -f {} \;
		fi
	fi
	# check if we need to add code to handle info pages
	if [[ -d $startdir/pkg/usr/info ]] && [[ ! $(grep install-info $startdir/pkg/install/doinst.sh &> /dev/null) ]] ; then
		echo "Found info files - Adding install-info command to doinst.sh"
		INFO_LIST=$(ls -1 $startdir/pkg/usr/info)
		echo "" >> $startdir/pkg/install/doinst.sh
		echo "if [ -x usr/bin/install-info ] ; then" >> $startdir/pkg/install/doinst.sh
		for page in $(echo $INFO_LIST) ; do
			echo " usr/bin/install-info --info-dir=usr/info usr/info/$page 2>/dev/null" >> $startdir/pkg/install/doinst.sh
		done
		echo "fi" >> $startdir/pkg/install/doinst.sh
	fi
	[[ -e $startdir/pkg/usr/info/dir ]] && rm -f $startdir/pkg/usr/info/dir

	if [ -d $startdir/pkg/etc ]; then
		cd $startdir/pkg/
		for conf in $(find ./etc -type f) ; do
			conf=${conf: 2}
			dotnew=( "${dotnew[@]}" "$conf" )
		done
	fi
	if [[ "$dotnew" ]]; then
        for files in ${dotnew[@]} ; do
                fullfile="${startdir}/pkg/${files}"
                if [ -e "$fullfile" ]; then
                        mv $fullfile ${fullfile}.new
                else
                        echo "$fullfile was not found"
                        exit 2
                fi
        done
        cat<<"EODOTNEW" >>$startdir/pkg/install/doinst.sh
#Added by slkbuild 0.8.6
dotnew() {
        NEW="${1}.new"
        OLD="$1"
        if [ ! -e $OLD ]; then
                mv $NEW $OLD
        elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
                rm $NEW
        fi
}
EODOTNEW
for i in ${dotnew[@]}; do
echo "dotnew $i" >> $startdir/pkg/install/doinst.sh
done
fi
}

####End Non Redundant Code############################

#Variables

startdir=$(pwd)
SRC=$startdir/src
PKG=$startdir/pkg

pkgname=lilo
pkgver=23.2
pkgrel=13tm
arch=x86_64
numjobs=1
package=$pkgname-$pkgver-$arch-13tm
source=("ftp://ftp.slackware.at/slackware64-current/slackware64/a/lilo-23.2-x86_64-1.txz")
docs=()
export CFLAGS="-O2 -fPIC"
export CXXFLAGS="-O2 -fPIC"
export SLKCFLAGS="-O2 -fPIC"
export LIBDIRSUFFIX="64"
export ARCH="x86_64"

#Execution

check_for_root
clean_old_builds
prepare_directory
extract_source
set_pre_permissions
build
if [ ! "$?" = "0" ]; then
	echo "build() failed."
	exit 2
fi
create_slackdesc
post_checks
strip_binaries
gzip_man_and_info_pages
set_post_permissions
copy_build_script
create_package
create_source_file
echo "Package has been built."

but I still get the same error.
ImageImage

Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: lmello's LILO splash

Post by Shador » 20. May 2012, 00:50

Bootloaders often require images to be in a very specific format due to the very restricted environment. Have a look here for lilo: https://wiki.archlinux.org/index.php/Graphical_Lilo
Image

User avatar
Tim CowChip
Posts: 301
Joined: 27. May 2011, 03:35
Location: Cascade Locks, OR

Re: lmello's LILO splash

Post by Tim CowChip » 20. May 2012, 01:33

Thanks Shador. I was able to create an optimum palette with 256 colors, though the arch wiki suggests 16 and it worked great.
I was about to try the method from This site, which also mentions indexing the bitmap, but the arch wiki was very easy to follow, as arch wiki's generally are.
ImageImage

Post Reply