determine VGA vs. ttyS* console in %pre ?
John Summerfield
debian at herakles.homelinux.org
Fri Dec 8 21:37:23 UTC 2006
Steve Rikli wrote:
>>
>>I'm mildly confused... What you will see in the commandline is those
>>console arguments. It's how the kernel knows what to use.
>
>
> Exactly -- and that's what I was after.
>
> `grep console= /proc/cmdline` and playing sed games with a script
> during %pre gives me the "console=<args>" stuff which was appended
> to the kernel during PXE.
>
> I.e. my script could return something like "ttyS0,9600n8" for a
> serial console install, and "" for a VGA install.
>
> That script in %pre builds a very simple %include file which contains
> a "bootloader --append=<args>" string, which I then use in the general
> section of ks.cfg .
>
> One less bit of hardcoded data in all my ks.cfg files -- thanks to all!
When you want answers to Qs like this, it's a good idea to switch to the
shell on tty2 and have a look around. There's useful stuff in /proc
(commandline for the kernel, maybe some stuff for processes), there's
the environment - the console stuff may be there too.
You _can_ find your server if you're doing ftp/http (nfs too I think),
and potentially get more info there, perhaps a profile or script that
makes futher customisations.
--
Cheers
John
-- spambait
1aaaaaaa at coco.merseine.nu Z1aaaaaaa at coco.merseine.nu
Please do not reply off-list
More information about the Kickstart-list
mailing list