when pxebooting with multiple ethers available for pxebooting, after the initial probe finds a .ini file the probe to find and partition the disks does not skip ethers. this means that if we found the .ini file on ether0 and there is more than one available ethernet ctlr, then ether1 will be the first interface we try to boot from. the simple fix is to only probe for the first ether. Notes: Sun Sep 2 00:14:00 EDT 2007 geoff we've run into this problem before, but all the fixes have their own drawbacks. we're about to revise 9load and will bear it in mind. Reference: /n/sources/patch/saved/9pxeload-pxeorder Date: Sun Jun 10 19:41:41 CES 2007 Signed-off-by: quanstro@quanstro.net Reviewed-by: geoff --- /sys/src/boot/pc/load.c Sun Jun 10 19:36:36 2007 +++ /sys/src/boot/pc/load.c Sun Jun 10 19:36:32 2007 @@ -216,7 +216,10 @@ char **partp; for(tp = types; tp->type != Tnil; tp++){ - if(type != Tany && type != tp->type) + if(type == Tnoether){ + if(tp->type == Tether) + continue; + }else if(type != Tany && type != tp->type) continue; if(flag != Fnone){ @@ -288,6 +291,8 @@ i8042a20(); memset(m, 0, sizeof(Mach)); + if(pxe != 0 && debug != 0) + consinit("0", 0); trapinit(); clockinit(); alarminit(); @@ -320,7 +325,10 @@ * because we have to collect the partition tables and * have boot devices for parse. */ - probe(Tany, Fnone, Dany); + if(pxe) + probe(Tnoether, Fnone, Dany); // don't switch horses midstream. + else + probe(Tany, Fnone, Dany); tried = 0; mode = Mauto; --- /sys/src/boot/pc/dat.h Sun Jun 10 19:36:46 2007 +++ /sys/src/boot/pc/dat.h Sun Jun 10 19:36:44 2007 @@ -134,7 +134,8 @@ Tether = 0x03, Tcd = 0x04, - Tany = -1, + Tnoether = 5, + Tany = 6, }; enum { /* name and flag */