Re: determine VGA vs. ttyS* console in %pre ?

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

 



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@xxxxxxxxxxxxxxxx  Z1aaaaaaa@xxxxxxxxxxxxxxxx

Please do not reply off-list


[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux