From owner-freebsd-current@FreeBSD.ORG Fri Dec 16 01:16:24 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 7F250106566C for ; Fri, 16 Dec 2011 01:16:24 +0000 (UTC) (envelope-from aboyer@averesystems.com) Received: from zimbra.averesystems.com (75-149-8-245-Pennsylvania.hfc.comcastbusiness.net [75.149.8.245]) by mx1.freebsd.org (Postfix) with ESMTP id EC7A68FC08 for ; Fri, 16 Dec 2011 01:16:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zimbra.averesystems.com (Postfix) with ESMTP id 56965446001; Thu, 15 Dec 2011 20:17:19 -0500 (EST) X-Virus-Scanned: amavisd-new at averesystems.com Received: from zimbra.averesystems.com ([127.0.0.1]) by localhost (zimbra.averesystems.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2SZVs6LwfcBm; Thu, 15 Dec 2011 20:17:13 -0500 (EST) Received: from [192.168.4.3] (c-24-131-84-46.hsd1.pa.comcast.net [24.131.84.46]) by zimbra.averesystems.com (Postfix) with ESMTPSA id 2D73B446006; Thu, 15 Dec 2011 20:17:11 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Andrew Boyer In-Reply-To: Date: Thu, 15 Dec 2011 20:16:13 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <4CA52BC4-EBC1-4125-95BC-EBA32B51607B@averesystems.com> References: <94847CD1-4361-424C-A2F6-75CAE918E2A9@averesystems.com> To: Craig Rodrigues X-Mailer: Apple Mail (2.1084) 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 01:16:24 -0000 On Dec 15, 2011, at 6:40 PM, Craig Rodrigues wrote: > Hi, >=20 > This is interesting. I wrote some newer documentation for PXE booting > here: > http://www.freebsd.org/doc/handbook/network-pxe-nfs.html >=20 > In 32.8.4, bullet item 1, I mentioned that it is necessary to > configure network booting in the BIOS menu. >=20 > With your change, is entering the BIOS menu to configure network = booting > still necessary? >=20 > -- > Craig Rodrigues > rodrigc@juniper.net >=20 Nope. You can just do: # boot0cfg -s 6 # reboot It saves you from waiting around until the BIOS screen comes up, hitting = the wrong button, etc. etc. On systems with a lot of memory the BIOS = start times are getting ridiculous. -Andrew > On Thu, Dec 15, 2011 at 1:21 PM, 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? >>=20 >> Thanks, >> Andrew >>=20 >>> Index: usr.sbin/boot0cfg/boot0cfg.c >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> --- usr.sbin/boot0cfg/boot0cfg.c (revision 228359) >>> +++ usr.sbin/boot0cfg/boot0cfg.c (working copy) >>> @@ -169,7 +169,7 @@ >>> o_flag =3D 1; >>> break; >>> case 's': >>> - s_arg =3D argtoi(optarg, 1, 5, 's'); >>> + s_arg =3D argtoi(optarg, 1, 6, 's'); >>> break; >>> case 't': >>> t_arg =3D argtoi(optarg, 1, 0xffff, 't'); >>> @@ -472,6 +472,8 @@ >>> printf("default_selection=3DF%d (", mbr[OFF_OPT] + 1); >>> if (mbr[OFF_OPT] < 4) >>> printf("Slice %d", mbr[OFF_OPT] + 1); >>> + else if (mbr[OFF_OPT] =3D=3D 5) >>> + print("PXE"); >>> else >>> printf("Drive 1"); >>> printf(")\n"); >>> Index: sys/boot/i386/boot0/boot0.S >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> --- 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 >>>=20 >>> -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. >>=20 >> -------------------------------------------------- >> Andrew Boyer aboyer@averesystems.com >>=20 >>=20 >>=20 >>=20 >> _______________________________________________ >> 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" >=20 >=20 >=20 > --=20 > Craig Rodrigues > rodrigc@crodrigues.org -------------------------------------------------- Andrew Boyer aboyer@averesystems.com