Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Elegant Textual Boot Process and Console Colors

  1. #1
    Join Date
    Jun 2005
    Location
    San Luis Obispo, CA
    Beans
    31
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    HOWTO: Elegant Textual Boot Process and Console Colors

    Introduction:
    Hi, first of all, hope you all are enjoying Dapper! As far as I know this HOWTO will work on Dapper as well as Edgy. Any other version I am unsure of how they handle logging and whatnot.

    If you have any questions or comments, feel free to respond on the forums or email me.

    Warning:
    This HOWTO is going to instruct you to change files that help your computer start and run in a functional manner. Modifying these files is dangerous to say the least and will require use of "sudo." With that being said, if you are careful to follow the instructions you should end up with no problems and may want to even change some things on your own to further personalize things!

    Step 1: Modifying GRUB
    This step will remove use of USPLASH without uninstalling it, as well as up your TTY1-6 console resolutions.
    Code:
    sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_bak
    sudo gedit /boot/grub/menu.lst
    Study the structure of the file reading some of the comments if you are not already familiar with it. What we want to change is the end of our stable primary kernel line. It should look something like this:
    Code:
    kernel        /boot/vmlinuz-2.6.15-23-386 root=/dev/sda2 ro quiet splash
    Remove splash from the line:
    Code:
    kernel        /boot/vmlinuz-2.6.15-23-386 root=/dev/sda2 ro quiet
    Next, find a sutiable VGA mode from the following link: http://www.8ung.at/spblinux/grub.htm
    I will use 795 since I can support 24 bit color at 1280x1024 resolution. Add vga=XXX on to the end of the same line;
    Code:
    kernel        /boot/vmlinuz-2.6.15-23-386 root=/dev/sda2 ro quiet vga=795
    Now when you reboot, your computer will boot without the USPLASH logo and will instead be a high resolution console showing you basically the same information we have seen from before.

    Step 2: Adding Color to the Boot Process
    This will change the look of the output from step 1. It will colorize the messages to make it a little easier on the human eyes.
    Code:
    sudo cp /etc/lsb-base-logging.sh /etc/lsb-base-logging.sh_bak
    Download the attachment lsb-base-logging.sh.tar.bz2 to your home folder.
    Code:
    sudo tar xvfj lsb-base-logging.sh.tar.bz2
    sudo chown root:root lsb-base-logging.sh.tar.bz2
    sudo cp lsb-base-logging.sh /etc/lsb-base-logging.sh
    I modified this script to make things turn blue and green and yellow and whatnot. You'll notice the colors during boot only if you followed step one. However, the changes are always visible after boot when you start and stop process from /etc/init.d.

    If you want to take a stab at modifying it for yourself and changing the colors, go ahead, it's not overly difficult to study and learn the process. To test out your progress save your file and run
    Code:
    /etc/init.d/xxx stop
    Where xxx is a process that you don't utilize. For example, I used pcimcia a lot because my computer doesn't have any pcmcia components.

    Step 3: Colorzing the Prompt
    This final amenity will colorize everything in front of what you type in the terminal, i.e. the eft@edgy:~$ sorda deals.
    This step is very simple. And can be endlessly customized if you so feel.
    Code:
    cp ~/.bashrc ~/.bashrc_bak
    gedit ~/.bashrc
    Look for the following:
    Code:
    # set a fancy prompt (non-color, unless we know we "want" color)
    case "$TERM" in
    xterm-color)
        PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
        ;;
    *)
        PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
        ;;
    esac
    
    # Comment in the above and uncomment this below for a color prompt
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
    and replace it with:
    Code:
    # set a fancy prompt (non-color, unless we know we "want" color)
    #case "$TERM" in
    #xterm-color)
    #    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
    #    ;;
    #*)
    #    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
    #    ;;
    #esac
    
    # Comment in the above and uncomment this below for a color prompt
    PS1='${debian_chroot:+($debian_chroot)}\[\033[32m\]\u@\h\[\033[00m\]:\[\033[34m\]\w\[\033[00m\]\$ '
    For details on how to customize this, check out this website: http://www-128.ibm.com/developerwork.../l-tip-prompt/

    Step 4: Reboot and Enjoy!

    Revert to Original Settings:
    Code:
    sudo cp /boot/grub/menu.lst_bak /boot/grub/menu.lst
    sudo cp /etc/lsb-base-logging.sh_bak /etc/lsb-base-logging.sh
    cp ~/.bashrc_bak ~/.bashrc
    Attached Files Attached Files
    Last edited by Mais; October 20th, 2006 at 01:55 AM. Reason: Added HOWTO into title

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

    Re: Elegant Textual Boot Process and Console Colors

    this can be useful for the prompt:
    http://www.samisgreat.com/2004/05/ba...r-chooser.html

    i once found a little applet to make a prompt with, i'll try and find it again
    So... a 1337 java programmer walks into a bar...

  3. #3
    Join Date
    Jun 2005
    Location
    San Luis Obispo, CA
    Beans
    31
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Elegant Textual Boot Process and Console Colors

    Quote Originally Posted by benplaut
    this can be useful for the prompt:
    http://www.samisgreat.com/2004/05/ba...r-chooser.html

    i once found a little applet to make a prompt with, i'll try and find it again

    Ahh that is a handy tool! The choices are limited, but those are probably the most used ones. Thanks!
    My HowTo Guides:
    Keep your touchpad from interrupting your typing: here.
    Nice, colored, text based boot and console: here.

  4. #4
    Join Date
    Sep 2005
    Beans
    14

    Re: Elegant Textual Boot Process and Console Colors

    I'm having issues @ 795 (It bitches with "unsupported mode") tho', @794 runs perfectly this is a gf3 (old, I know, but works).

    do you know how to put the console at a refresh of 75Hz? (60Hz is annoying!)

    on gentoo I used vesa-tng (which allowed me to set up FB 1280x1024x24@75)

    colorfull console looks great! thx!

  5. #5
    Join Date
    Jun 2005
    Location
    San Luis Obispo, CA
    Beans
    31
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Elegant Textual Boot Process and Console Colors

    Quote Originally Posted by pejcao View Post
    I'm having issues @ 795 (It bitches with "unsupported mode") tho', @794 runs perfectly this is a gf3 (old, I know, but works).

    do you know how to put the console at a refresh of 75Hz? (60Hz is annoying!)

    on gentoo I used vesa-tng (which allowed me to set up FB 1280x1024x24@75)

    colorfull console looks great! thx!
    Glad to hear that it works! As far as changing your refresh rate, I just don't know enough about video drivers and frame buffers. I made this howto after examining my Gentoo install. I missed having all the colors. So it is basically a hack to mimic that, I truthfully don't understand the whole process that is going on in the background for low-level video communication.
    My HowTo Guides:
    Keep your touchpad from interrupting your typing: here.
    Nice, colored, text based boot and console: here.

  6. #6
    Join Date
    Aug 2005
    Beans
    994

    Re: Elegant Textual Boot Process and Console Colors

    thanks! works great. my bootup looks very sharp. now, do you know how to get gnome-terminal to have full colors, not just the prompt?



    also, I like having a nice grub menu. here's what I do:

    sudo nano /boot/grub/menu.lst

    under hidemenu, comment "hidemenu" so the grub menu will always show up. and under pretty colors, change the colors to:

    color light-blue/black light-cyan/blue
    I think it looks very clean.
    Last edited by bionnaki; October 20th, 2006 at 02:20 AM.

  7. #7
    Join Date
    Jun 2005
    Location
    San Luis Obispo, CA
    Beans
    31
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Elegant Textual Boot Process and Console Colors

    Quote Originally Posted by bionnaki View Post
    thanks! works great. my bootup looks very sharp. now, do you know how to get gnome-terminal to have full colors, not just the prompt?



    also, I like having a nice grub menu. here's what I do:

    sudo nano /boot/grub/menu.lst

    under hidemenu, comment "hidemenu" so the grub menu will always show up. and under pretty colors, change the colors to:



    I think it looks very clean.
    If I understand what you are asking correctly, I think it is up to whatever program you are running to display any colors.

    For example, type ls somewhere in your system where you have a mishmash of different types of files. ls outputs in color by type; folders, for example are blue and .deb is red.

    When I get back from class I will put the "pretty colors" into the main post. I forgot about that as I use gfxboot for grub and have I nice image based menu. Thanks!
    My HowTo Guides:
    Keep your touchpad from interrupting your typing: here.
    Nice, colored, text based boot and console: here.

  8. #8
    Join Date
    Aug 2005
    Beans
    994

    Re: Elegant Textual Boot Process and Console Colors

    I did a fresh install of edgy and tried to use this how-to. I havent had any luck. the color changes to the terminal are the only mods that work in edgy - as far as I can tell. hmmmm...
    Last edited by bionnaki; October 27th, 2006 at 10:16 AM.

  9. #9
    Join Date
    Jun 2005
    Location
    San Luis Obispo, CA
    Beans
    31
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Elegant Textual Boot Process and Console Colors

    unfortunately this how-to isn't going to work for edgy as the bootup process has changed significantly. In the coming weeks I'll take a hard look at how this can be done for edgy.
    My HowTo Guides:
    Keep your touchpad from interrupting your typing: here.
    Nice, colored, text based boot and console: here.

  10. #10
    Join Date
    Aug 2005
    Beans
    994

    Re: Elegant Textual Boot Process and Console Colors

    thanks!

Page 1 of 2 12 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
  •