Howto: Init Hacked



A few of my friends ask me how do you change the init screen before going to run levels. Well here is how. It is actually simple if you know where to write.



Find this file rc.sysinit in /etc/rc.d. If you are using Fedora find somewhere around line 248. The coding will say

# Print a text banner.
echo -en $"\t\tWelcome to Linux Distro Version:\n"
read -r redhat_release < /etc/redhat-release
read -r ahmyi_release < /etc/ahmyi

if [[ "$ahmyi_release" == "ahmyi" ]]; then
 [ "$BOOTUP" = "color" ] && echo -en "\\033[0;31m"
 echo -en "\tAHMYI LINUX "
 [ "$BOOTUP" = "color" ] && echo -en "\\033[0;39m"
 echo -en "on "
fi

if [[ "$redhat_release" == *"Red Hat"* ]]; then
 [ "$BOOTUP" = "color" ] && echo -en "\\033[0;31m"
 echo -en "Red Hat"
 [ "$BOOTUP" = "color" ] && echo -en "\\033[0;39m"
 PRODUCT=$(sed "s/Red Hat \(.*\) release.*/\1/" /etc/redhat-release)
 echo " $PRODUCT"
elif [[ "$redhat_release" == *Fedora* ]]; then
 [ "$BOOTUP" = "color" ] && echo -en "\\033[0;34m"
 echo -en "$redhat_release"
 [ "$BOOTUP" = "color" ] && echo -en "\\033[0;39m"
 PRODUCT=$(sed "s/Fedora \(.*\) \?release.*/\1/" /etc/redhat-release)
# echo " $PRODUCT"
else
 PRODUCT=$(sed "s/ release.*//g" /etc/redhat-release)
 echo "$PRODUCT"
fi


if [ "$PROMPT" != "no" ]; then
 echo -en $"\n\t\tPress 'I' to enter interactive startup. For debugging issues.\n"
 echo -en $"\t\tVisit http://ahmyi.blogspot.com for more details."
 echo
fi

The ones that I highlight it are the ones I amend. I create a file with   at /etc/ called ahmyi with content ahmyi. Done it just in case I was to make a release version. You can skip the file read and just echo it. I think thats about it. By the way if system bootup failure I ain't responsible. Make sure you make a copy of the file you are going to write if anything goes wrong you can always bootup to shell mode to redo your mistakes. Above picture is another glimpse of the init hack I've done but this time changed the konsole resolution to 640x480 for larger view.

Comments

Popular Posts