Re: Idea for change to boot0

From: Craig Rodrigues <rodrigc_at_crodrigues.org>
Date: Thu, 15 Dec 2011 15:40:46 -0800
Hi,

This is interesting.  I wrote some newer documentation for PXE booting
here:
http://www.freebsd.org/doc/handbook/network-pxe-nfs.html

In 32.8.4, bullet item 1, I mentioned that it is necessary to
configure network booting in the BIOS menu.

With your change, is entering the BIOS menu to configure network booting
still necessary?

--
Craig Rodrigues
rodrigc_at_juniper.net

On Thu, Dec 15, 2011 at 1:21 PM, Andrew Boyer <aboyer_at_averesystems.com> wrote:
> These two changes allow you to set PXE as the default MBR boot selection, which enables you to write a 'reboot to the network' script.  We've found it to be very useful.  What do people think?
>
> Thanks,
> Andrew
>
>> Index: usr.sbin/boot0cfg/boot0cfg.c
>> ===================================================================
>> --- usr.sbin/boot0cfg/boot0cfg.c      (revision 228359)
>> +++ usr.sbin/boot0cfg/boot0cfg.c      (working copy)
>> _at__at_ -169,7 +169,7 _at__at_
>>             o_flag = 1;
>>             break;
>>         case 's':
>> -            s_arg = argtoi(optarg, 1, 5, 's');
>> +            s_arg = argtoi(optarg, 1, 6, 's');
>>             break;
>>         case 't':
>>             t_arg = argtoi(optarg, 1, 0xffff, 't');
>> _at__at_ -472,6 +472,8 _at__at_
>>     printf("default_selection=F%d (", mbr[OFF_OPT] + 1);
>>     if (mbr[OFF_OPT] < 4)
>>       printf("Slice %d", mbr[OFF_OPT] + 1);
>> +    else if (mbr[OFF_OPT] == 5)
>> +        print("PXE");
>>     else
>>       printf("Drive 1");
>>     printf(")\n");
>> Index: sys/boot/i386/boot0/boot0.S
>> ===================================================================
>> --- sys/boot/i386/boot0/boot0.S       (revision 228359)
>> +++ sys/boot/i386/boot0/boot0.S       (working copy)
>> _at__at_ -413,6 +413,7 _at__at_
>>       3:
>> #endif /* ONLY_F_KEYS */
>> #endif /* SIO */
>> +check_selection:
>>               cmpb $0x5,%al                   # F1..F6 or 1..6 ?
>> #ifdef PXE /* enable PXE/INT18 using F6 */
>>               jne 1f;
>> _at__at_ -421,7 +422,6 _at__at_
>> #endif /* PXE */
>>               jae beep                        # Not in F1..F5, beep
>>
>> -check_selection:
>>       /*
>>        * We have a selection.  If it's a bad selection go back to complain.
>>        * The bits in MNUOPT were set when the options were printed.
>
> --------------------------------------------------
> Andrew Boyer    aboyer_at_averesystems.com
>
>
>
>
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"



-- 
Craig Rodrigues
rodrigc_at_crodrigues.org
Received on Thu Dec 15 2011 - 22:40:48 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:22 UTC