Content-Length: 347483 | pFad | https://github.com/freebsd/freebsd-src/commit/2fa7cf8a5

2E Allow boot0cfg to force a PXE boot via boot0 on the next boot. · freebsd/freebsd-src@2fa7cf8 · GitHub
Skip to content

Commit 2fa7cf8

Browse files
committed
Allow boot0cfg to force a PXE boot via boot0 on the next boot.
- Fix boot0 to check for PXE when using the pre-set setting for the preferred slice. - Update boot0cfg to use slice 6 to select PXE. Accept a 'pxe' argument instead of a number for the 's' option as a way to select PXE as well. Submitted by: Andrew Boyer aboyer averesystems MFC after: 2 weeks
1 parent 1eeaa29 commit 2fa7cf8

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

sys/boot/i386/boot0/boot0.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ got_key:
413413
3:
414414
#endif /* ONLY_F_KEYS */
415415
#endif /* SIO */
416+
check_selection:
416417
cmpb $0x5,%al # F1..F6 or 1..6 ?
417418
#ifdef PXE /* enable PXE/INT18 using F6 */
418419
jne 1f;
@@ -421,7 +422,6 @@ got_key:
421422
#endif /* PXE */
422423
jae beep # Not in F1..F5, beep
423424

424-
check_selection:
425425
/*
426426
* We have a selection. If it's a bad selection go back to complain.
427427
* The bits in MNUOPT were set when the options were printed.

usr.sbin/boot0cfg/boot0cfg.8

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ Set the default boot selection to
146146
.Ar slice .
147147
Values between 1 and 4 refer to slices; a value of 5 refers to the
148148
option of booting from a second disk.
149+
The special string
150+
.Dq PXE
151+
or a value of 6 can be used to boot via PXE.
149152
.It Fl t Ar ticks
150153
Set the timeout value to
151154
.Ar ticks .

usr.sbin/boot0cfg/boot0cfg.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,10 @@ main(int argc, char *argv[])
169169
o_flag = 1;
170170
break;
171171
case 's':
172-
s_arg = argtoi(optarg, 1, 5, 's');
172+
if (strcasecmp(optarg, "pxe") == 0)
173+
s_arg = 6;
174+
else
175+
s_arg = argtoi(optarg, 1, 6, 's');
173176
break;
174177
case 't':
175178
t_arg = argtoi(optarg, 1, 0xffff, 't');
@@ -472,8 +475,10 @@ display_mbr(u_int8_t *mbr)
472475
printf("default_selection=F%d (", mbr[OFF_OPT] + 1);
473476
if (mbr[OFF_OPT] < 4)
474477
printf("Slice %d", mbr[OFF_OPT] + 1);
475-
else
478+
else if (mbr[OFF_OPT] == 4)
476479
printf("Drive 1");
480+
else
481+
printf("PXE");
477482
printf(")\n");
478483
}
479484

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/freebsd/freebsd-src/commit/2fa7cf8a5

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy