[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Changing font size in console



On Mon, 6 Aug 2001 13:31:49 +0800 "Moke Tsing Moh Lim" <moke amcpl net>
imparted to us:

> Hi,
> 
> I would like to change the font on all my console (without X) to
> something
> that RedHat 7.1 Installation bootup screen.  It is twice as small as
> the
> default screen I have after I setup the box.
> 
> Those font seem great to me as I can view most of the log within a
> single
> line.
> 
> Any help, please.

For some reason they made it harder than it used to be. It used to be
you could add a single line to lilo.conf and get what you wanted. Now it
starts out right then shanges to the monster font again part of the way
through the boot process. I found a fix, though I don't know if it's the
best approach.

First, edit lilo.conf and add the line

vga=ask

someplace before the first kernel 'image=' entry. Then reboot and try
the options. For me 6 is great. Realize at this point it will change
part way through. Once you have what you want change 'ask' to the
setting you need. Mine is vga=6 which is about right.

It took me some time to find out what was clobebring it during boot. I
finally tracked it down to the file /sbin/setsysfont as being the
culprit. Not knowing how to fix it, and not wanting to spend a lot of
time on it, I took the lazy approach: I commented out some lines in it.
As a matter of fact, I commented everything out so it now looks like
this:

#!/bin/sh

PATH=/bin:/usr/bin

#if [ -f /etc/sysconfig/i18n ]; then
#  . /etc/sysconfig/i18n
#fi

#if [ -x /bin/consolechars -o -x /usr/bin/consolechars ]; then
#  if [ -n "$SYSFONT" ]; then
#    ARGS=$SYSFONT
#    if [ -n "$UNIMAP" ]; then
#       ARGS="$ARGS --sfm $UNIMAP"
#    fi
#    if [ -n "$SYSFONTACM" ]; then
#       ARGS="$ARGS --acm $SYSFONTACM"
#    fi
#    consolechars -f $ARGS
#  fi
#elif [ -x /usr/bin/setfont ]; then
#  if [ -n "$SYSFONT" -a -n "$UNIMAP" ]; then
#    /usr/bin/setfont $SYSFONT -u $UNIMAP
#  elif [ -n "$SYSFONT" ]; then
#    /usr/bin/setfont $SYSFONT
##  else
##    /usr/bin/setfont
#  fi
#else
#  echo $"can't set font"
#  exit 1
#fi
exit 0


Done. Now I have 80x60 character display.

If you use a boot floppy (as I usually do) the above won't work
properly. The setsysfont still works, but lilo.conf won't have any
effect. So, I mount the boot floppy and change syslinux.cfg to this:

default lin
prompt 1
display boot.msg
timeout 500
label lin
	kernel vmlinuz
	append initrd=initrd.img root=/dev/hdb6 vga=6



Now, you can manually do that every time, or if you're lazy (like me)
you can edit /sbin/mkbootdisk to do it automatically. I won't include
the whole script. Here's what I changed which is near the bottom of the
file:



cat > $MOUNTDIR/syslinux.cfg <<EOF
default lin
prompt 1
display boot.msg
timeout 500
label lin
	kernel vmlinuz
	append $INITRDARG root=$rootdev vga=6
EOF

chmod 644 $MOUNTDIR/syslinux.cfg


That's one part. I changed the timeout is all I did, so unless you need
or want to do it, you can leave that part alone. Here's the main bit of
change:



cat >> $MOUNTDIR/boot.msg <<EOF

Press <return> (or wait 50 seconds) to boot your Red Hat Linux system
from
$rootdev. You may override the default linux kernel parameters by typing
"lin <params>", followed by <return> if you like.

params are:

1             single-user mode
single        single-user mode
<nothing>     normal multiuser mode

EOF



Now I can go on my own merry little way being just as lazy as I please
and not have to mess with anything again. Well, until I reinstall or
upgrade.

-- 
Nice little planet you've got there. Shame if anything were to happen to
it.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]