View Full Version : HOWTO: Spice up your boot text [font resolution and color]
dudinatrix
July 18th, 2005, 09:39 PM
I'm a sucker for tiny, sharp and colorful. [K]ubuntu's boot is big and bland out of the box. This thread will help you make it look better! This will not give you a splash image or hide the boot text, it will only make it look better.
Difficulty: Quick, easy and painless. 2 edits, no installs.
UPDATE: Screenshot example added below. Click here (http://ubuntuforums.org/showthread.php?p=347303#post347303) for a detailed post and sample files to produce output.
STEP 1: Increase resolution (optional)
- Edit /boot/grub/menu.lst
- Add vga=792 to your default boot option.
Example:
title Ubuntu, kernel 2.6.10-5-k7 Default
root (hd0,0)
kernel /vmlinuz root=/dev/hde6 ro quiet splash vga=792
initrd /initrd.img
savedefault
boot
STEP 2: Colorize "[ ok ]" ... these instructions will make it green
- Edit /lib/lsb/init-functions
- Find the log_end_msg () function, all the way at the bottom of the file
- Add GREEN=`$TPUT setaf 2` below RED=`$TPUT setaf 1`
- Change echo "$UP$END[ ok ]" to echo "$UP$END[ ${GREEN}ok${NORMAL} ]"
Here's the full function, changes bolded.
log_end_msg () {
# If no arguments were passed, return
[ -z "$1" ] && return 1
# Only do the fancy stuff if we have an appropriate terminal
# and if /usr is already mounted
TPUT=/usr/bin/tput
EXPR=/usr/bin/expr
if [ -x $TPUT ] && [ -x $EXPR ] && $TPUT hpa 60 >/dev/null 2>&1; then
COLS=`$TPUT cols`
if [ -n "$COLS" ]; then
COL=`$EXPR $COLS - 7`
else
COL=73
fi
UP=`$TPUT cuu1`
END=`$TPUT hpa $COL`
START=`$TPUT hpa 0`
RED=`$TPUT setaf 1`
GREEN=`$TPUT setaf 2`
NORMAL=`$TPUT op`
if [ $1 -eq 0 ]; then
echo "$UP$END[ ${GREEN}ok${NORMAL} ]"
else
echo -e "$UP$START $RED*$NORMAL$END[${RED}fail${NORMAL}]"
fi
else
if [ $1 -eq 0 ]; then
echo " ...done."
else
echo " ...fail!"
fi
fi
return $1
}
STEP 3: You're done! Reboot!
- Reboot, and your resolution should be increased. Your [ ok ] messages should now be green.
Personally, I like this much better. Its simple to add colors and change colors.. just use the above as a base and take it from there! Enjoy :)
You can add MUCH more color than this. For example... To see my latest init-functions file, which produces the output in the crappy screenshot attached, click here (http://ubuntuforums.org/showthread.php?p=347303#post347303). Download the attachment, and replace your init-functions file with mine. Backup first, as always!! Get creative, and post your init-functions file to share with the rest of us.
Thanks to this thread (http://www.ubuntuforums.org/showthread.php?t=41709&page=1&pp=10&highlight=boot+resolution) for getting me started.
- DavidG
(P.S. This is my first HOWTO \\:D/)
csowm5je
July 18th, 2005, 10:37 PM
Thanks.
alvinpd
July 18th, 2005, 10:38 PM
cool and simple...
rpgcyco
July 18th, 2005, 10:41 PM
Cool, thanks for that. :)
- Rpg Cyco
m0biu5
July 18th, 2005, 11:13 PM
What they said - love the increased res. =)
bored2k
July 18th, 2005, 11:34 PM
I personally haven't done this nor I pretend to, but I wanted to point this out: if anyone's having problems with the vga=792 resolution, try vga=791. That's the one that worked when I installed splashy (wich I removed because I missed the text), not 792.
I would only do this trick if I made the text color black, but then I'd miss out on errors.
panickedthumb
July 18th, 2005, 11:47 PM
It should be pointed out that the green "ok" messages violate standards for color blindness compatibility, so if you plan on releasing a distro any time soon, don't include that ;)
I myself kinda like it.
matthew
July 19th, 2005, 12:09 AM
I was actually thinking about this just this morning and you beat me to it. Thanks. BTW, in my /lib/lsb/init-functions I had to add the following line as you have it written in your sample:
GREEN=`$TPUT setaf 2`
autocrosser
July 19th, 2005, 01:34 AM
Hi--
I'm a PPC user (yaboot instead of grub)--I look at my .conf and it is "similar" to yours--
Question--Do you think that changing the line--
append="quiet splash" to append="quiet splash vga=792"
might work or bork my .conf? (check the init message and fgcolor-- thats why I'm interested)
Here is the complete yaboot--
## yaboot.conf generated by the Ubuntu installer
##
## run: "man yaboot.conf" for details. Do not make changes until you have!!
## see also: /usr/share/doc/yaboot/examples for example configurations.
##
## For a dual-boot menu, add one or more of:
## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ
boot=/dev/hda2
init-message="Welcome to Ubuntu Linux!"
device=/pci@f4000000/ata-6@d/disk@0:
partition=7
root=/dev/hda7
timeout=100
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot
fgcolor=light-green
enablecdboot
macosx=/dev/hda9
image=/boot/vmlinux
label=Linux
read-only
initrd=/boot/initrd.img
append="quiet splash"
image=/boot/vmlinux.old
label=old
read-only
initrd=/boot/initrd.img.old
append="quiet splash"
benplaut
July 19th, 2005, 02:53 AM
It should be pointed out that the green "ok" messages violate standards for color blindness compatibility, so if you plan on releasing a distro any time soon, don't include that ;)
I myself kinda like it.
hmm... SuSE 9.2 had it :?
i like it too :)
skyboy
July 19th, 2005, 03:41 AM
Nice trick, thanks :)
.. it's useless but I love those
Heliode
July 19th, 2005, 04:34 AM
Cool, thanks! I was looking for something like this since I switched from Gentoo, which basically had this.
Slightly related; Any idea how you get a tux-penguin in the top of the screen for the number of processors you have right after the kernel is loaded? (Like Gentoo and Knoppix do?)
dudinatrix
July 19th, 2005, 09:30 AM
Glad you guys like it! Like the post above me, I'd also like to have the Tux graphic at the top. Useless tweaks are my favorite. :) If I figure it out I'll post it here.. but if anyone else can do it, let us know how!
Hi--
I'm a PPC user (yaboot instead of grub)--I look at my .conf and it is "similar" to yours--
Question--Do you think that changing the line--
append="quiet splash" to append="quiet splash vga=792"
might work or bork my .conf? (check the init message and fgcolor-- thats why I'm interested)
I'm not a PPC user, so take what I say with a grain of salt. It looks like what you suggested will work. If nothing changes, try vga=791. Worst case scenario, if it doesn't boot, just get into recovery mode and change the .conf back and you should be fine. Good luck!
minio
July 19th, 2005, 10:20 AM
For rsolution and colour depth i found this HOWTO (http://gentoo-wiki.com/HOWTO_Framebuffer:Bootsplash:Grubsplash#Smaller_fo nts_on_framebuffer_for_greater_area). When you scroll the page down you will found table of kernel mode numbers for the 'vga=' parameter. It is for gentoo but i think it should work for Ubuntu also.
autocrosser
July 19th, 2005, 03:06 PM
Well--I tried append="quiet splash vga=792" , append="quiet spash vga=791"---no luck--booted fine (and normal)--then I tried adding the line append="vga=792" , append="vga=791"---still no luck.... O- PPC boots with the penguin logo in the top bar area--I'm a dual 1G system--so I have two O:)
I'll take a look at the Gentoo info--I've used their site before--tried to install the 2004.3 release--never worked well for me :neutral:
(edit)--took a quick look at the Gentoo info--looks like what I need--at work right now, so I'll work with on it this evening!!
Thanks for all the input!!!
Cheers!!
Dean
matthew
July 19th, 2005, 04:30 PM
Hi--
I'm a PPC user (yaboot instead of grub)--I look at my .conf and it is "similar" to yours--
Question--Do you think that changing the line--
append="quiet splash" to append="quiet splash vga=792"
might work or bork my .conf? (check the init message and fgcolor-- thats why I'm interested)
Here is the complete yaboot--
I think that should work, but just to be safe I would advise that you first backup your yaboot.conf file before changing the line. Then try it. If anything goes wrong you can change back to the backed up version.
cutOff
July 19th, 2005, 05:02 PM
Nice trick, thanks :)
.. it's useless but I love those
I agree.
Thanks a lot for the tip!
FLeiXiuS
July 19th, 2005, 05:39 PM
This was very awesome, I grew up with RedHat and loved the colorful boot. Ever since that, every other distro out there didn't use it. I'm guessing users found it blinding? But I liked it. Thanks.
The only problems I have had was with the resolution / tux logo. Ubuntu hasn't seemd to like a really high resolution. On the other hand, knoppix loved it :-P. I'll figure it out..
danf_1979
July 19th, 2005, 06:04 PM
I got plenty of problems with vga=792 and vga=791. For example when I reached gnome I would click on a menu and see nothing, then pass my mouse over the invisible menu and it would appear. Same with desktop icons. There were no icons on my desktop until y passed my mouse over them...
3dfx voodoo3 here... 1024*768 max res in xorg.
autocrosser
July 20th, 2005, 02:25 AM
Well--I tried the Gentoo info--added a line vga=0x317 still no change. I guess I'm going to look at a boot splash--either splashy (have seen some good info on the Breezy forum) or work with the info from http://www.bootsplash.org/
I really like the verbose mode pic in the main page!!!
( http://www.bootsplash.org/verbose-mode.jpg )
If I find info on how to change the yaboot.conf--I'll post them here---
Cheers!!
Dean
darkmatter
July 20th, 2005, 05:38 AM
Nice little hack. Now Ubuntu looks like a Linux box while booting instead of a DOS error. They should make the settings a default for breezy, it would help in smoothing migration by preventing coronary arrest. :smile:
lotusleaf
July 20th, 2005, 07:37 AM
Cool idea/thread, thanks. :mrgreen:
benplaut
July 20th, 2005, 05:46 PM
hmm...
it works, but the resolution is "hourglassing" my screen during bot/shutdown, and in the virtual consoles...
any way to make the resolution slightly bigger, but still nice and small?
matthew
July 21st, 2005, 02:10 AM
Thought I would share another little edit...just for fun. I made the brackets that surround the red "fail" or green "ok" blue. Here's the edit to my /lib/lsb/init-functions:
# Only do the fancy stuff if we have an appropriate terminal
# and if /usr is already mounted
TPUT=/usr/bin/tput
EXPR=/usr/bin/expr
if [ -x $TPUT ] && [ -x $EXPR ] && $TPUT hpa 60 >/dev/null 2>&1; then
COLS=`$TPUT cols`
if [ -n "$COLS" ]; then
COL=`$EXPR $COLS - 7`
else
COL=73
fi
UP=`$TPUT cuu1`
END=`$TPUT hpa $COL`
START=`$TPUT hpa 0`
RED=`$TPUT setaf 1`
GREEN=`$TPUT setaf 2`
BLUE=`$TPUT setaf 4`
NORMAL=`$TPUT op`
if [ $1 -eq 0 ]; then
echo "$UP$END${BLUE}[ ${GREEN}ok${BLUE} ]${NORMAL}"
else
echo -e "$UP$START $RED*$NORMAL$END${BLUE}[${RED}fail${BLUE}]${NORMAL}"
fi
else
if [ $1 -eq 0 ]; then
echo " ...done."
else
echo " ...fail!"
fi
fi
return $1
}
The important parts, of course, are where you see "BLUE." You are all smart...probably don't need to say any more. Just be sure to spell TPUT right...I did a typo and had to use a live cd to unmount the hd from read only and remount it as read/write and edit the file because my computer wouldn't boot. Not difficult, but a bit time consuming.
wabble
August 18th, 2005, 07:39 PM
It should be pointed out that the green "ok" messages violate standards for color blindness compatibility, so if you plan on releasing a distro any time soon, don't include that ;)
I myself kinda like it.
The director of the it department at my old job told me (if i remember correctly) that ibm had done research on the color use for their terminals (you know as/400?) and found out that green was the color that was minimal on making your eyes tired of all colors :wink:
mcduck
August 19th, 2005, 06:54 AM
yeah, at one time many computer monitors had a button that changed the image to green/black to save your eyes.
Anyway, should we bann all colors and meake a B/W distro because everybody can't see every color? I don't think so, as long as the color is not the only thing giving information to user. /I mean using green/red balls at boot instead of ok/failed-text would be a problem to colorblind people, but with text that shouldn't be any problem as long as they can still read ;) And for us that can see all colors green/red texts can be quite helpful, and at least they look better so I think this feature should be used as default..
Thanks for the tip, I've been missing this feature.
Belutz
August 19th, 2005, 12:45 PM
nice tips...
i love it :D
myha
August 22nd, 2005, 05:00 AM
Hi!
Awesomw stuff, thanks!
Does anyone know howto color other console stuff? Like hostname in diffrent color, user,... I know gentoo has this by default.
Rodrigo
August 22nd, 2005, 01:41 PM
Superb, Thanks!
John Nilsson
August 26th, 2005, 10:11 PM
If you find the framebuffer to be to sluggish (as I did) you might want to try SVGATextMode (http://www.ibiblio.org/pub/Linux/utils/console/!INDEX.html) instead. Much snappier.
duminas
September 9th, 2005, 03:19 AM
Nice howto, sir.
I realize I'm bumping, buuuuuuuuuuut figured I'd show mine off (the relevant function)..
log_end_msg (){
[ -z "$1" ] && return 1
TPUT=/usr/bin/tput
EXPR=/usr/bin/expr
if [ -x $TPUT ] && [ -x $EXPR ] && $TPUT hpa 60 >/dev/null 2>&1; then
COLS=`$TPUT cols`
if [ -n "$COLS" ]; then
COL=`$EXPR $COLS - 7`
else
COL=73
fi
UP=`$TPUT cuu1`
END=`$TPUT hpa $COL`
START=`$TPUT hpa 0`
RED=`$TPUT setaf 1`
WHITE=`($TPUT bold; $TPUT setaf 7)`
CYAN=`$TPUT setaf 6`
PRPL=`$TPUT setaf 5`
GREEN=`$TPUT setaf 2`
NORMAL=`$TPUT op`
if [ $1 -eq 0 ]; then
echo "$WHITE$UP$NORMAL$END${CYAN}[${GREEN} ok ${CYAN}]$NORMAL"
else
echo -e "$WHITE$UP$NORMAL$START $RED*$NORMAL$END${PRPL}[${RED}fail${PRPL}]$NORMAL"
fi
else
if [ $1 -eq 0 ]; then
echo " ...done."
else
echo " ...fail!"
fi
fi
return $1
}Probably too much zest, but hey, it looks nice to me.
Thanks again, sir.
dudinatrix
September 12th, 2005, 05:40 PM
duminas has a nice idea.... post your init-functions file if you've got a unique one! All of the boot and shutdown text customization (aside from the resolution) occurs in the /lib/lsb/init-functions file. It's actually pretty flexible. Just recently, I changed all of the text to blue, yellow and green.. and moved the "ok" or "fail" to the left side of the screen rather than the right. See the screenshot (crummy quality, phone shot, but you get the point!). Personally I really like the yellow text, it livens things up a lot, and produces some nice variation on the screen. It's much easier to read.
I cleaned up the init-functions file a bit, and moved all the color options to the top of the file, making them accessible throughout. It could probably be cleaned up more, but it was enough for me.
I've attached two versions of my init-functions. Just BACKUP your original init-functions and replace them with mine below. Simply rename it back to your original to go back to normal.
init-functions-front.txt (remove the .txt): Produces output in screenshot. Results "success, fail" are shown on the left side of the screen before each item. Colorful and easy to read.
init-functions-yellow.txt (remove the .txt): Standard output with colors. Results "[ ok ], [ fail ]" are on the right side, like the default. This just adds color.
benplaut
September 13th, 2005, 01:11 AM
bah... broken in breezy :mad:
dudinatrix
September 13th, 2005, 10:22 AM
bah... broken in breezy :mad:
Ahh bummer. What happens in breezy, nothing? Seems strange, I wouldn't think init-functions be so different that it would break. What did you try to do?
John.Michael.Kane
October 6th, 2005, 03:33 PM
Is there info on how to do this with other colors since your guide only explains how to do it with green. when i try to change green to another color is not seen as that color it stays with green when using this guide..
darkmatter
October 6th, 2005, 05:08 PM
Ahh bummer. What happens in breezy, nothing? Seems strange, I wouldn't think init-functions be so different that it would break.
The init functions in Breazy have been rewriten for use with usplash. Here is the init-functions in Breezy
# /lib/lsb/init-functions for Debian -*- shell-script -*-
#
#Copyright (c) 2002-03 Chris Lawrence
#All rights reserved.
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions
#are met:
#1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#2. 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.
#3. Neither the name of the author nor the names of other contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
#THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
#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 REGENTS 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.
start_daemon () {
local force nice pidfile exec
set -- `POSIXLY_CORRECT=1 getopt "fn:p:" $*`
force=0
nice=0
pidfile=/dev/null
for i in $*; do
case $i in
-f) force=1; shift;;
-n) nice=$2; shift 2;;
-p) pidfile=$2; shift 2;;
--) shift; break;;
esac
done
exec=$1; shift
if [ $force = 1 ]; then
/sbin/start-stop-daemon --start --nicelevel $nice --quiet --startas $exec --pidfile /dev/null --oknodo -- $*
elif [ $pidfile ]; then
/sbin/start-stop-daemon --start --nicelevel $nice --quiet --exec $exec --oknodo --pidfile "$pidfile" -- $*
else
/sbin/start-stop-daemon --start --nicelevel $nice --quiet --exec $exec --oknodo -- $*
fi
}
pidofproc () {
local pidfile line i pids= status
set -- `POSIXLY_CORRECT=1 getopt "p:" $*`
pidfile=
for i in $*; do
case $i in
-p) pidfile=$2; shift 2;;
--) shift; break;;
esac
done
if [ -z "$pidfile" ]; then
pidfile=/var/run/$(basename "$1").pid
fi
if [ -f "$pidfile" ]; then
read -d "" line < "$pidfile"
for i in $line; do
if [ -z "$(echo $p | sed 's/[0-9]//g')" -a -d "/proc/$i" ]; then
pids="$i $pids"
fi
done
if [ -n "$pids" ]; then
echo "$pids"
return 0
else
return 2 # program is dead and /var/run pid file exists
fi
elif [ -x /bin/pidof ]; then
/bin/pidof -o %PPID $1
status="$?"
[ "$status" = 1 ] && return 3 # program is not running
return 0
else
return 4 # program or service is unknown
fi
}
# start-stop-daemon uses the same algorithm as "pidofproc" above.
killproc () {
local pidfile sig status
set -- `POSIXLY_CORRECT=1 getopt "p:" $*`
pidfile=
for i in $*; do
case $i in
-p) pidfile=$2; shift 2;;
--) shift; break;;
esac
done
if [ ! $pidfile ]; then
pidfile=/var/run/$(basename "$1").pid
fi
if [ $2 ]; then
sig=$(echo $2 | sed -e 's/^-\(.*\)/\1/')
sig=$(echo $sig | sed -e 's/^SIG\(.*\)/\1/')
/sbin/start-stop-daemon --stop --pidfile "$pidfile" --signal $sig --quiet
status="$?"
[ "$status" = 1 ] && return 3 # program is not running
return 0
else
/sbin/start-stop-daemon --stop --pidfile "$pidfile" --retry 5 --quiet --oknodo
fi
}
log_success_msg () {
if type usplash_write >/dev/null 2>&1; then
usplash_write "STATUS $*" || true
fi
echo " * $@"
}
log_failure_msg () {
if type usplash_write >/dev/null 2>&1; then
usplash_write "STATUS $*" || true
fi
TPUT=/usr/bin/tput
if [ -x $TPUT ] && $TPUT hpa 60 >/dev/null 2>&1; then
RED=`$TPUT setaf 1`
NORMAL=`$TPUT op`
echo " $RED*$NORMAL $@"
else
echo " * $@"
fi
}
log_warning_msg () {
if type usplash_write >/dev/null 2>&1; then
usplash_write "STATUS $*" || true
fi
TPUT=/usr/bin/tput
if [ -x $TPUT ] && $TPUT hpa 60 >/dev/null 2>&1; then
YELLOW=`$TPUT setaf 3`
NORMAL=`$TPUT op`
echo " $YELLOW*$NORMAL $@"
else
echo " * $@"
fi
}
#
# NON-LSB HELPER FUNCTIONS
#
# int get_lsb_header_val (char *scriptpathname, char *key)
get_lsb_header_val () {
if [ ! -f "$1" ] || [ -z "$2" ]; then
return 1
fi
LSB_S="### BEGIN INIT INFO"
LSB_E="### END INIT INFO"
sed -n "/$LSB_S/,/$LSB_E/ s/# $2: \(.*\)/\1/p" $1
}
# int log_begin_message (char *message)
log_begin_msg () {
if [ -z "$1" ]; then
return 1
fi
if type usplash_write >/dev/null 2>&1; then
usplash_write "TEXT $*" || true
fi
# Only do the fancy stuff if we have an appropriate terminal
# and if /usr is already mounted
TPUT=/usr/bin/tput
EXPR=/usr/bin/expr
if [ -x $TPUT ] && [ -x $EXPR ] && \
$TPUT xenl >/dev/null 2>&1 && \
$TPUT hpa 60 >/dev/null 2>&1; then
COLS=`$TPUT cols`
if [ -n "$COLS" ]; then
COL=`$EXPR $COLS - 7`
else
COL=73
fi
# We leave the cursor `hanging' about-to-wrap
# (see terminfo(5) xenl, which is approximately right).
# That way if the script prints anything then we will
# be on the next line and not overwrite part of the message.
# Previous versions of this code attempted to colour-code
# the asterisk but this can't be done reliably because
# in practice init scripts sometimes print messages even
# when they succeed and we won't be able to reliably know
# where the colourful asterisk ought to go.
printf " * $* "
# Enough trailing spaces for ` [fail]' to fit in; if the
# message is too long it wraps here rather than later,
# which is what we want.
$TPUT hpa `$EXPR $COLS - 1`
printf ' '
else
echo " * $*"
COL=''
fi
}
# int log_end_message (int exitstatus)
log_end_msg () {
# If no arguments were passed, return
[ -z "$1" ] && return 1
if type usplash_write >/dev/null 2>&1; then
if [ $1 -eq 0 ]; then
usplash_write "SUCCESS ok" || true
else
usplash_write "FAILURE failed" || true
fi
fi
if [ "$COL" ]; then
printf "\r"
$TPUT hpa $COL
if [ $1 -eq 0 ]; then
echo "[ ok ]"
else
printf '['
$TPUT setaf 1 # red
printf fail
$TPUT op # normal
echo ']'
fi
else
if [ $1 -eq 0 ]; then
echo " ...done."
else
echo " ...fail!"
fi
fi
return $1
}
bens
October 8th, 2005, 01:11 PM
In brezzy change then line:
echo "[ ok ]"
to:
printf '[ '
$TPUT setaf 2 # green
printf ok
$TPUT op # normal
echo ' ]'
Xk2c
October 17th, 2005, 04:54 PM
In brezzy change then line:.....
Thank you very much. I´ve searched for this patch since I first booted breezy. :)
Elrond
February 10th, 2006, 09:45 PM
In brezzy change then line:
echo "[ ok ]"
to:
printf '[ '
$TPUT setaf 2 # green
printf ok
$TPUT op # normal
echo ' ]'
Where again do I change this? (yes I know in file /lib/lsb/....)
I need to know what line do I have to change....
hornett
June 27th, 2006, 03:00 PM
Sorry to ressurect this thread, but I was wondering if it is possible to apply this change to Dapper?
the log_end_message is what is called by the init scripts, and it looks like this:
log_end_msg () {
# If no arguments were passed, return
[ -z "$1" ] && return 1
# Only do the fancy stuff if we have an appropriate terminal
# and if /usr is already mounted
if log_use_fancy_output; then
RED=`$TPUT setaf 1`
NORMAL=`$TPUT op`
if [ $1 -eq 0 ]; then
echo "."
else
/bin/echo -e " ${RED}failed!${NORMAL}"
fi
else
if [ $1 -eq 0 ]; then
echo "."
else
echo " failed!"
fi
fi
return $1
}
Unfortunately, changing this function makes no change to the screen output!! And besides, the function surely would display "failed!" not "fail" as I actually get from my test script...
#!/bin/bash
. /lib/lsb/init-functions
log_begin_msg "Testing with 0 as my value..."
log_end_msg 0
log_begin_msg "Testing with 1 as my value..."
log_end_msg 1
And nowhere can I find the OK message that is shown when the command completes successfully..! ](*,)
hornett
June 27th, 2006, 03:35 PM
Sorry to ressurect this thread, but I was wondering if it is possible to apply this change to Dapper?
OK, figured this out if anyone is interested....
Somehow the functions are instead being called from /etc/lsb-base-logging.sh so you can remove line 107 in the log_end_message function and insert the following lines:
# echo "[ ok ]"
printf '[ '
$TPUT setaf 2 # green
printf ok
$TPUT op # normal
echo ' ]'
:D Thank me later ;)
myha
June 28th, 2006, 02:52 AM
Sorry to ressurect this thread, but I was wondering if it is possible to apply this change to Dapper?
I am wondering this too, if anyone has a solution please post it here... The standard output is so boring.... :/
Sir_Yaro
July 25th, 2006, 03:43 PM
I am wondering this too, if anyone has a solution please post it here... The standard output is so boring.... :/
here is solution and its works great
http://www.ubuntuforums.org/showpost.php?p=1188438&postcount=41
LadyDoor
September 10th, 2006, 12:29 PM
Is there any thought of updating this for Dapper? It's pretty-factor is much reduced now.
--Door
Xk2c
September 10th, 2006, 01:13 PM
Is there any thought of updating this for Dapper? It's pretty-factor is much reduced now.
--Door
in Dapper the file has changed to :
/etc/lsb-base-logging.sh
in there replace:echo "[ ok ]"
with:
printf '[ '
$TPUT setaf 2 # green
printf ok
$TPUT op # normal
echo ' ]'
HTH
drol
September 15th, 2006, 03:35 AM
Hi!
I am just curious, but is there any way to make the colours bright?
$TPUT setaf 2 # green
I suppose, anything in this line has to be added...?
drol
Xk2c
September 15th, 2006, 05:37 PM
Can´t tell if this colors are more "customizable", sorry.
daywalkerdha
December 17th, 2006, 05:11 PM
Hi,
Earlier i tried to change the bootimage ect. Now all these packages like usplash ,splashy and splashy-themes are a little bit messed up.
After Grub comes the message "Starting...", then a blank screen and then just for half a secound 2 or 3 colorized lines before the login promt.
All i want is a black backgound, white text and an [ OK ] in green or a [ FAILED ] in red at the right from directly after Grub until my x-server starts
Please help me because i really don't have a clou how to do it.
Daniel.
P.s.: I have Edgy Eft installed.
Xk2c
December 17th, 2006, 07:41 PM
All i want is a black backgound, white text and an [ OK ] in green or a [ FAILED ] in red at the right from directly after Grub until my x-server starts
remove "splash" from your kernel options in /boot/grub/menu.lst
daywalkerdha
December 18th, 2006, 04:59 AM
Hi,
i did that earlier but that's where the bootlogo has been removed. The problem is still the same
southernman
August 18th, 2007, 08:50 PM
Dragging this post up yet again... modified the hack for Dapper if anyone is interested.
As was posted above:
printf '[ '
$TPUT setaf 2 # green
printf ok
$TPUT op # normal
echo ' ]'
To get blue brackets surrounding the "ok" text, modify the above to look like this:
$TPUT setaf 4 # blue
printf '[ '
$TPUT setaf 2 # green
printf ok
$TPUT setaf 4 # blue
echo ' ]'
$TPUT op # normal
Important notations:
1- Make sure there are two (2) spaces between setaf / op and the # sign... if you don't - you'll need a rescue cd to get in and make the changes.
2- If the cursor wraps to the next line, it will flash as blue... don't worry, it goes back to white
wOOt! My first hack. Although small, it's encouraging none-the-less!!! :D
kish
August 19th, 2007, 08:40 AM
Thats wonderful
I would like to add these
Vga value for various res
640×480 - 785
800×600 - 788
1024×768 - 791
1152×864 - 355
1280×1024 - 794
1600×1200 - 798
xasx
November 2nd, 2007, 08:15 AM
Does anyone know how this can be done under Gutsy?
And: Is there a way to define these colors when using usplash?
Thanks
xasx
jamieshanks
November 13th, 2007, 12:05 AM
Hi xasx,
Yep, the green OK and white [] works with Gutsy, I just did it :)
Jamie
FoolishGhoul
February 18th, 2008, 05:15 PM
hi folks, good work it seems, only on my gutsy box it doesn't seem to apply...
i don't have an /etc/lsb-base-logging.sh file, and the /lib/lsb/init-functions is not helpful either.
what i want should be really simple - and that is to turn all the text green
...got a bit of green theme going on... :-)
Adnarim
February 23rd, 2008, 02:20 PM
@FoolishGhoul: I'm using Gutsy myself and everything works fine. The file does exist here.
Zorael
March 8th, 2008, 11:13 AM
Could someone please summarise how to do this in Gutsy? I'm confused now and I don't want to botch up my installation. :<
I understand the file we want to change is now /etc/lsb-base-logging.sh, but what to change and where?
I'd love to get mine to display as http://ubuntuforums.org/attachment.php?attachmentid=2356&d=1126560896 does. This includes getting the success/fail text all the way to the left.
Yes
March 8th, 2008, 05:12 PM
For anyone who wants to do this in Gusty or Hardy, there's currently a bug where adding the vga= line to your bootoptions will result in a black bootup screen and ttys. Here's the bug page: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/129910. I got it working thank's to Caravel's post (which I can't seem to find anymore), but only at 1024x768 (my native resolution is 1440x900).
Zorael
March 8th, 2008, 06:30 PM
I got the vga lines to work after adding
fbcon
vesafb
nvidiafb
...to /etc/initramfs-tools/modules, and commenting vesafb and nvidiafb in /etc/modprobe.d/blacklist-framebuffer.
I don't know which of fbcon/vesafb/nvidiafb did the trick, but now my vga=0x031a option works.
But, again, could someone please explain what I need to do to get purdy colors and possibly left-aligned ok/failed stamps during the boot - in Gutsy? This thread would've helped greatly if it weren't written for earlier versions, and the changes needed to make it work in Dapper+ are only fragments from which I can't piece together much. :<
$TPUT setaf 4 # blue
printf '[ '
$TPUT setaf 2 # green
printf ok
$TPUT setaf 4 # blue
echo ' ]'
$TPUT op # normal
...where?? :confused:
Xk2c
March 8th, 2008, 06:55 PM
http://ubuntuforums.org/showpost.php?p=1483546&postcount=45
the location and the things needed to be changed haven't changed since then.
Zorael
March 9th, 2008, 06:20 AM
Okay, there it is, thanks. My apologies, I'm not very knowledgeable in the order of releases pre-Feisty, having only recently discovered (K)Ubuntu, so I hope you can appreciate my confusion.
I take it there is no way to have the [OK] mark aligned to the left of the message?
Perhaps if I copy/pasted some of those lines from log_end_message() to log_begin_message()?
edit: Also, what happens if I "mess up" that file? Naturally I'll be keeping a backup, but will it end up in a state where the system won't boot, or merely in a state where there's no tty output at startup?
martinbc
November 8th, 2008, 10:19 PM
I tried this, but then my keyboard stopped working, after restoring the old init-functions file the keyboard started working again, why is this?
Any ideas?
(Using Ubuntu 8.10, 2.6.27-7-generic)
Ace_NoOne
January 8th, 2009, 04:13 AM
what happens if I "mess up" that file? Naturally I'll be keeping a backup, but will it end up in a state where the system won't boot, or merely in a state where there's no tty output at startup?
I'm not an expert, but worst case you boot from a live CD (e.g. your Ubuntu installation disc) to restore your backups.
I'm not quite sure how to do this on my Intrepid machine though, as the log_failure_msg function looks a bit different there:
log_failure_msg () {
if log_use_fancy_output; then
RED=`$TPUT setaf 1`
GREEN=`$TPUT setaf 2`
NORMAL=`$TPUT op`
/bin/echo -e "${RED}*${NORMAL} $@"
else
echo "$@"
fi
}
sh4d0w808
January 9th, 2009, 03:53 PM
Yes, I see a little bit different implementation in Hardy also, like Ace_NoOne in Intrepid.
Can somebody explain, how to change this function in these systems?
port
January 15th, 2009, 05:02 PM
Did anyone find out how to get this working in 8.10 ?
´silas
January 18th, 2009, 09:40 AM
The latter one made my keyboard and touchpad non-functionable :( I'm becoming quite good at re-installing ubuntu xD
ley_lines
January 18th, 2009, 12:08 PM
The latter one made my keyboard and touchpad non-functionable :( I'm becoming quite good at re-installing ubuntu xD
I did that yesterday as well. But you dont have to re-install. If you made a backup of your original init-functions file then go into your text mode before gdm and remove the new file and restore the back up. I named the original init-functions.bak and entered these commands:
sudo rm lib/lsb/init-functions
sudo mv lib/lsb/init-functions.bak lib/lss/init-functions
and then reboot
pgodfrey
February 5th, 2009, 01:08 PM
@ port. I too am looking to do this to my install but haven't figured out how too just yet. I tried replacing the 'init-functions' with the file a few pages back 'init-functions-front.txt' but ended up with a useless interface. Fortunately I backed up my original file. :)
I'm getting bored looking at the splash screen and look forward to all the scrolling text when booting.......I suppose it's an ADHD thing...I like blinky lights too.
Phil
*edit*
Got the splash off and lots of text displayed - still working on the color
Looking at my /boot/grub/menu.lst file -- I removed quiet splash and that seemed to take care of the splash screen leaving just ro.
Mine looks like this (with the exception of my UUID...it's not actually a bunch of asterisks.
## ## End Default Options ##
title Ubuntu 8.10, kernel 2.6.27-11-generic
uuid =********-****-****-****-************
kernel /boot/vmlinuz-2.6.27-11-generic root=UUID=********-****-****-****-************ ro vga=792
initrd /boot/initrd.img-2.6.27-11-generic
boot
If I put in ro single vga=792, halfway through the boot it popped up a menu asking me if I wanted to repair the system.
vga=792 on my 1440x900 laptop screen looks compressed and wide. It's nice because most of the text doesn't have to wrap around to the next line.
sectorek
March 14th, 2009, 02:32 PM
everything is more less ok. I mean resolution is much better now. At least log is looking much better with VGA 792 on my 1600x900 LCD. But i cant get colors to work.
Im using ubuntu 8.10. Any ideas?
SketchyClown
March 21st, 2009, 04:05 PM
Looking at my /boot/grub/menu.lst file -- I removed quiet splash and that seemed to take care of the splash screen leaving just ro.
Mine looks like this (with the exception of my UUID...it's not actually a bunch of asterisks.
## ## End Default Options ##
title Ubuntu 8.10, kernel 2.6.27-11-generic
uuid =********-****-****-****-************
kernel /boot/vmlinuz-2.6.27-11-generic root=UUID=********-****-****-****-************ ro vga=792
initrd /boot/initrd.img-2.6.27-11-generic
boot
If I put in ro single vga=792, halfway through the boot it popped up a menu asking me if I wanted to repair the system.
vga=792 on my 1440x900 laptop screen looks compressed and wide. It's nice because most of the text doesn't have to wrap around to the next line.
If you look at your /boot/grub/menu.lst and look at the 2nd kernel entry, you will see that it has the ro single listed there. That's your recovery/single user console. Leave single off of the first entry to avoid getting that popup menu about repairing on normal bootup.
Since you have a 1440x900 display you can set the framebuffer to use that resolution by adding either vga=0x365 or vga=868, the codes used for 1440x900.
As for the boot colors, I am still stumped as well. I have tried using the info here, and while I haven't messed anything up with these tips yet, I still have no colors.
stoner_di
June 6th, 2009, 06:15 AM
My problems:
1.I want to ask someone tried to incorporate the bootup logo (in a mini tux top left of the display to load the system).
Perform all necessary for this:
- when compiling the kernel, I select this:
Support for frame buffer devices FB->VESA VGA graphics support FB_VESA
Select all in the:
Console display driver support ->
selct all in the:
Bootup logo LOGO->
-in the GRUB, in the file menu.lst fix this row:
kernel /boot/vmlinuz-2.6.29.3 root=UUID=d5b52903-5.... video=vesafb vga=0x0323 ro quiet
-in the file /etc/modprobe.d/blacklist-framebuffer.conf, comment this row:
#blacklist vesafb
-in the file /etc/initramfs-tools/modules, add:
fbcon
vesafb
-in the end update initramfs this command:
update-initramfs -u
In all my UBUNTU not load boot logo!!!!!!!!
prvul
June 13th, 2009, 11:18 AM
My problems:
1.I want to ask someone tried to incorporate the bootup logo (in a mini tux top left of the display to load the system).
Perform all necessary for this:
- when compiling the kernel, I select this:
Support for frame buffer devices FB->VESA VGA graphics support FB_VESA
Select all in the:
Console display driver support ->
selct all in the:
Bootup logo LOGO->
-in the GRUB, in the file menu.lst fix this row:
kernel /boot/vmlinuz-2.6.29.3 root=UUID=d5b52903-5.... video=vesafb vga=0x0323 ro quiet
-in the file /etc/modprobe.d/blacklist-framebuffer.conf, comment this row:
#blacklist vesafb
-in the file /etc/initramfs-tools/modules, add:
fbcon
vesafb
-in the end update initramfs this command:
update-initramfs -u
In all my UBUNTU not load boot logo!!!!!!!!
Same situation here. I tried everything that could find on net (including everything stoner_di mentioned above), but was unable to get tux logo on boot.
Is this maybe because ubuntu uses upstart as init system?
Is that hard to get this "native" linux feature on ubuntu system?
On most slackware based distros just adding vga=790 to kernel line solves the problem.
Any help would be appriciated
stoner_di
June 14th, 2009, 12:51 AM
Тhank you, Friend.
Nobody else wants to talk about it.
My searches for TUX bootup logo continue. Maybe somewhere in the init fails there is a ban on his appearance. No one developer to help?
Plasma_NZ
March 26th, 2010, 06:17 AM
Yet another person dragging this old topic up again...
Anyone tried on 9.10 64bit ? if so - shout out please .. :D
calin_ionut
June 13th, 2011, 07:20 AM
Anyone got it work? "TUX logo at boot"
Today i installed BURG Bootloader - it`s very nice - and i was wondering if someone know how to make ubuntu boot up in text like this (http://www.twam.info/wp-content/uploads/2009/05/cute_tux.png).
I have modified:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
to
GRUB_CMDLINE_LINUX_DEFAULT=""
but it`s a mess up.
If someone have a solution plese post it.
Cheers!:popcorn:
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.