determine VGA vs. ttyS* console in %pre ?

Steve Rikli sr at genyosha.net
Wed Dec 6 22:27:40 UTC 2006


Is there a way during %pre to determine what the console is?


My PXE setup has several options for installation, one of which is
booting kernel with "append console=ttyS0" for serial installation,
rather than VGA -- the person doing the install can choose.

At the moment, to use the different console configurations I specify
a different ks.cfg file with different bootloader args, e.g. a PXE
with the above console setting would use this:

  bootloader --append="console=tty0 console=ttyS0,9600n8"

whereas a PXE with no serial console specified might just use:

  bootloader

or other similar permutations in each ks.cfg file.


If something could be done in %pre to determine what the booted kernel
believes is the console, I imagine an %include file could be constructed
based on the result, which would be populated with "bootloader <args>" 
appropriate for the type of installation console being used.

I was poking around e.g. in /proc/tty/ but nothing I see there seems to
be applicable to this purpose.

In a nutshell, I'm trying to craft a modular ks.cfg file rather than
separate ks.cfg files for VGA and serial console.

Same sort of idea as many others have done in %pre , e.g. to derive
disk number/type/size and build a %include file with "part <args>".

Hints/ideas/etc. welcome.

Cheers,
sr.
-- 
|| Steve Rikli             ||| You can use all the quantitative data you ||
|| Systems Administrator   ||| can get, but you still have to distrust   ||
||                         ||| it and use your own intelligence and      ||
|| sr at genyosha.net         ||| judgment.              - Alvin Toffler    ||




More information about the Kickstart-list mailing list