Idea for change to boot0
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
> =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.
--------------------------------------------------
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"
討論串 (同標題文章)
完整討論串 (本文為第 1 之 9 篇):