On 10-Jul-00 Alan Edmonds wrote:
> Mike Smith wrote:
>> > 1) not probe for a console
>>
>> Nothing probes for a console, apart from boot2 in the boot-from-disk case
>> if the -P flag is found in /boot.config.
>
> Okay. Maybe I used the word probe incorrectly. As I understand
> pxeboot (and loader(8)), in the case of an unspecified console,
> it searches for a console. It first looks for the internal
> video/keyboard (vidconsole) and then for COMCONSOLE. It uses
> the first one it finds.
Bzzzt. UTSL. The console variable overrides the detection. However,
/boot/loader.rc isn't run until after the loader has initialized, so the
console won't kick in until after loader.rc has been loaded and ran. Thus,
you won't see the first few messages over the serial console.
>> > 2) use a serial port as the default com port
>>
>> I think you mean "use a serial port as the console". You can build
>> "pxeboot" without keyboard/video support by commenting out the vidconsole
>> entry in the definition of the consoles array in
>> sys/boot/i386/loader/conf.c
>
> You are right, I meant console. I need to proofread a bit.
> I've been stuck deep in the code and fresh air screws up my head.
>
> I've done that and that solves the problem. However, it's
> a bit of a kludge in my book.
There should be no need. However, note that it won't take effect until
after loader.rc.
>> > I know I can put set console="comconsole" in /boot/loader.rc.
>> > Normally, this is set in the boot blocks, but we don't
>> > have these in pxeboot.
>>
>> Actually, you will find that if you have correctly configured your PXE
>> environment, "pxeboot" will correctly find and parse /boot/loader.rc, and
>> this is the preferred mechanism for enabling serial console output in the
>> PXE environment.
>
>
> Except if pxeboot can't read loader.rc you could be hosed.
> Since pxeboot is loaded over the network, you might not
> be able to mount the root fs and read /boot/loader.rc.
> I was just trying to set the default case to assume serial console
> like you can with boot[012].
boot0 doesn't support a serial console, neither does boot1.
If you want, you can change pxeldr.s to pass in the serial console
flag to force a serial console. From <sys/reboot.h>:
#define RB_SERIAL 0x1000 /* user serial port as console */
Then pull up sys/boot/i386/pxeldr/pxeldr.s and after this:
# Setup the arguments that the loader is expecting from boot[12]
#
movw $bootinfo_msg, %si # %ds:(%si) -> boot args message
callw putstr # display the message
movw $MEM_ARG, %bx # %ds:(%bx) -> boot args
movw %bx, %di # %es:(%di) -> boot args
xorl %eax, %eax # zero %eax
movw $(MEM_ARG_SIZE/4), %cx # Size of arguments in 32-bit
# dwords
rep # Clear the arguments
stosl # to zero
orb $KARGS_FLAGS_PXE, 0x8(%bx) # kargs->bootflags |=
# KARGS_FLAGS_PXE
popl 0xc(%bx) # kargs->pxeinfo = *PXENV+
Add:
orw $0x1000,(%bx) # kargs->howto |= RB_SERIAL
At some point in time when a decent keyboard probe routine is in place
in boot2, I'll merge the same check (as a tweakable knob at compile time)
into pxeldr.s and cdldr.s.
> Thanks for the clarifications.
> --
> Alan Edmonds Director of International Technology
> DigitalConvergence.:Com
> [EMAIL PROTECTED]
> Phone: +1-214-292-6040
--
John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message