Page 1 of 8 123 ... LastLast
Results 1 to 10 of 75

Thread: HOWTO: Spice up your boot text [font resolution and color]

  1. #1
    Join Date
    Jun 2005
    Location
    Chicago Suburb
    Beans
    69
    Distro
    Ubuntu 6.10 Edgy

    HOWTO: Spice up your boot text [font resolution and color] (Screenshot now included)

    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 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:
    Code:
    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
    Code:
    echo "$UP$END[ ok ]"
    to
    Code:
    echo "$UP$END[ ${GREEN}ok${NORMAL} ]"
    Here's the full function, changes bolded.
    Code:
    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. 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 for getting me started.

    - DavidG

    (P.S. This is my first HOWTO )
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	09-12-05_1553.jpg 
Views:	3402 
Size:	33.6 KB 
ID:	2360  
    Last edited by dudinatrix; September 12th, 2005 at 11:01 PM. Reason: Added screen shot, 2 sample attachments.

  2. #2
    Join Date
    Mar 2005
    Beans
    16

    Re: HOWTO: Spice up your boot text [font resolution and color]

    Thanks.

  3. #3
    Join Date
    Jul 2005
    Location
    Cebu
    Beans
    3
    Distro
    Ubuntu Breezy 5.10

    Re: HOWTO: Spice up your boot text [font resolution and color]

    cool and simple...

  4. #4
    Join Date
    Dec 2004
    Beans
    86

    Talking Re: HOWTO: Spice up your boot text [font resolution and color]

    Cool, thanks for that.

    - Rpg Cyco

  5. #5
    Join Date
    May 2005
    Beans
    107
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: Spice up your boot text [font resolution and color]

    What they said - love the increased res. =)

  6. #6
    Join Date
    Feb 2005
    Beans
    Hidden!

    Re: HOWTO: Spice up your boot text [font resolution and color]

    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.
    Sylvia: Look at what you've done to him!
    Christof: I have given Truman the chance to lead a normal life. The world, the place you live in, is the sick place.

  7. #7
    Join Date
    Oct 2004
    Beans
    Hidden!

    Re: HOWTO: Spice up your boot text [font resolution and color]

    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.

  8. #8
    Join Date
    Apr 2005
    Location
    Parts Unknown
    Beans
    9,213
    Distro
    Ubuntu Development Release

    Re: HOWTO: Spice up your boot text [font resolution and color]

    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`
    what's a troll? | my blog | my writing | Ubuntu Unleashed

    Don't ask support questions in PMs--post a thread so everyone can benefit!

  9. #9
    Join Date
    Jun 2005
    Location
    Pacific NorthWest
    Beans
    2,782
    Distro
    Ubuntu Development Release

    Question Re: HOWTO: Spice up your boot text [font resolution and color]

    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"
    Last edited by autocrosser; July 19th, 2005 at 06:43 AM.

  10. #10
    Join Date
    Apr 2005
    Location
    Not-So-Sunny Hawaii
    Beans
    Hidden!

    Re: HOWTO: Spice up your boot text [font resolution and color]

    Quote Originally Posted by panickedthumb
    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

Page 1 of 8 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •