The invention belongs to the technical field of computers, and discloses a method and device for multiple platforms to share the same PXE
server to automatically install an OS, and the method comprises the steps: obtaining an
operating system mirror image file, placing the
operating system mirror image file in a corresponding shared
directory according to the platform to which the
operating system mirror image file belongs, and generating a corresponding configuration file; the
server to be tested is connected with the PXE
server through the switch; acquiring a request
signal of the to-be-tested server, and determining a platform to which the to-be-tested server belongs according to the
IP address range of the to-be-tested server; according to the platform to which the to-be-tested server belongs, distributing a corresponding shared
directory for the to-be-tested server to select; and after receiving the corresponding shared
directory, the server to be tested selects the required mirror image file of the operating
system for installation. Different platform servers are enabled to install the OS in one PXE server, the resource
reuse rate is improved, management is simplified, and IP
confusion is avoided. The technical problem that servers of different platforms cannot install an operating
system in one PXE server is solved.