From owner-freebsd-current@FreeBSD.ORG Fri Dec 16 14:36:26 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1733106564A for ; Fri, 16 Dec 2011 14:36:26 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 95BEB8FC0C for ; Fri, 16 Dec 2011 14:36:26 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 555D97300A; Fri, 16 Dec 2011 15:52:47 +0100 (CET) Date: Fri, 16 Dec 2011 15:52:47 +0100 From: Luigi Rizzo To: Andrew Boyer Message-ID: <20111216145247.GB79885@onelab2.iet.unipi.it> References: <94847CD1-4361-424C-A2F6-75CAE918E2A9@averesystems.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <94847CD1-4361-424C-A2F6-75CAE918E2A9@averesystems.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-current@freebsd.org Subject: Re: Idea for change to boot0 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Dec 2011 14:36:26 -0000 On Thu, Dec 15, 2011 at 04:21:51PM -0500, Andrew Boyer 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? seems good to me. John's comments also apply, no need to use cryptic parameters in boot0cfg cheers luigi > Thanks, > Andrew > > > Index: usr.sbin/boot0cfg/boot0cfg.c > > =================================================================== > > --- usr.sbin/boot0cfg/boot0cfg.c (revision 228359) > > +++ usr.sbin/boot0cfg/boot0cfg.c (working copy) > > @@ -169,7 +169,7 @@ > > 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'); > > @@ -472,6 +472,8 @@ > > 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) > > @@ -413,6 +413,7 @@ > > 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; > > @@ -421,7 +422,6 @@ > > #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@averesystems.com > > > > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"