Index: usr.sbin/boot0cfg/boot0cfg.c =================================================================== --- usr.sbin/boot0cfg/boot0cfg.c (revision 228534) +++ usr.sbin/boot0cfg/boot0cfg.c (working copy) @@ -169,7 +169,10 @@ o_flag = 1; break; case 's': - s_arg = argtoi(optarg, 1, 5, 's'); + if (strcasecmp(optarg, "pxe") == 0) + s_arg = 6; + else + s_arg = argtoi(optarg, 1, 5, 's'); break; case 't': t_arg = argtoi(optarg, 1, 0xffff, 't'); @@ -472,8 +475,10 @@ 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] == 4) + printf("Drive 1"); else - printf("Drive 1"); + printf("PXE"); printf(")\n"); } Index: usr.sbin/boot0cfg/boot0cfg.8 =================================================================== --- usr.sbin/boot0cfg/boot0cfg.8 (revision 228534) +++ usr.sbin/boot0cfg/boot0cfg.8 (working copy) @@ -146,6 +146,9 @@ .Ar slice . Values between 1 and 4 refer to slices; a value of 5 refers to the option of booting from a second disk. +The special string +.Dq PXE +or a value of 6 can be used to boot via PXE. .It Fl t Ar ticks Set the timeout value to .Ar ticks . Index: sys/boot/i386/boot0/boot0.S =================================================================== --- sys/boot/i386/boot0/boot0.S (revision 228534) +++ 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.