MultiNetBoot: Difference between revisions

From LLL
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
----
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
----
=[http://ehyloxame.co.cc UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY]=
----
=[http://ehyloxame.co.cc CLICK HERE]=
----
</div>
= Net boot chosing between multiple systems =
= Net boot chosing between multiple systems =


Nowadays, many systems (Kubuntu, SuSE, Fedora, ...) allow network booting or installing. In order to do this, you usually need to copy a subfolder from the installation CD to your tftp server, and set this as your root.
Nowadays, many systems (Kubuntu, SuSE, Fedora, ...) allow network booting or installing. In order to do this, you usually need to copy a subfolder from the installation CD to your tftp server, and set this as your root.


However, until syslinux 3.72 and its <code>pxechain.com</code> module, it was not easily possible to set up a boot menu allowing to chose among one of many systems.
However, until syslinux 3.72 and its &lt;code&gt;pxechain.com&lt;/code&gt; module, it was not easily possible to set up a boot menu allowing to chose among one of many systems.


With <code>pxechain.com</code>, it has become very simple to set up a global boot menu, as described below.
With &lt;code&gt;pxechain.com&lt;/code&gt;, it has become very simple to set up a global boot menu, as described below.


== Preparation ==
== Preparation ==
Line 11: Line 19:
* Download syslinux-3.72 (or later) from http://www.kernel.org/pub/linux/utils/boot/syslinux/
* Download syslinux-3.72 (or later) from http://www.kernel.org/pub/linux/utils/boot/syslinux/
* Compile it
* Compile it
* Copy <code>modules/pxechain.com</code>, <code>com32/menu/menu.c32</code> and <code>core/pxelinux.0</code> to your tftproot (usually <code>/var/lib/tftpboot</code>)
* Copy &lt;code&gt;modules/pxechain.com&lt;/code&gt;, &lt;code&gt;com32/menu/menu.c32&lt;/code&gt; and &lt;code&gt;core/pxelinux.0&lt;/code&gt; to your tftproot (usually &lt;code&gt;/var/lib/tftpboot&lt;/code&gt;)
* Set up your DHCP server to point to the pxlinux.0 in your tftp root by putting the following into your <code>dhcpd.conf</code>, and restart it:
* Set up your DHCP server to point to the pxlinux.0 in your tftp root by putting the following into your &lt;code&gt;dhcpd.conf&lt;/code&gt;, and restart it:
<code><pre>
&lt;code&gt;&lt;pre&gt;
  filename "pxelinux.0";
  filename &quot;pxelinux.0&quot;;
</pre></code>
&lt;/pre&gt;&lt;/code&gt;


== Setting up the various systems you want to chose among ==
== Setting up the various systems you want to chose among ==


Copy the boot environments of the systems that you want to chose amongst as subdirectories of your tftp root : <code>/var/lib/tftpboot/udpcast</code> , <code>/var/lib/tftpboot/kubuntu</code>, ...
Copy the boot environments of the systems that you want to chose amongst as subdirectories of your tftp root : &lt;code&gt;/var/lib/tftpboot/udpcast&lt;/code&gt; , &lt;code&gt;/var/lib/tftpboot/kubuntu&lt;/code&gt;, ...


== Making index file ==
== Making index file ==


Set up the root level's PXElinux configuration file to be an index. Create the <code>/var/lib/tftpbot/pxelinux.cfg</code> directory, and store the following in <code>/var/lib/tftpboot/pxelinux.cfg/default</code> :
Set up the root level's PXElinux configuration file to be an index. Create the &lt;code&gt;/var/lib/tftpbot/pxelinux.cfg&lt;/code&gt; directory, and store the following in &lt;code&gt;/var/lib/tftpboot/pxelinux.cfg/default&lt;/code&gt; :


<code><pre>
&lt;code&gt;&lt;pre&gt;
default menu.c32
default menu.c32
prompt 0
prompt 0
Line 39: Line 47:
         kernel pxechain.com
         kernel pxechain.com
         append ::KubuntuNet/pxelinux.0
         append ::KubuntuNet/pxelinux.0
</pre></code>
&lt;/pre&gt;&lt;/code&gt;


For each system you've got one paragraph, starting with a LABEL line (to give it a unique name), followed by a menu line (to set the name displayed in the menu).
For each system you've got one paragraph, starting with a LABEL line (to give it a unique name), followed by a menu line (to set the name displayed in the menu).
The <code>kernel pxechain.com</code> line tells pxelinux to chain another pxe boot loader (the one present in the system's image). The last line (<code>append</code> ...) points towards the boot loader of the system to be loaded.
The &lt;code&gt;kernel pxechain.com&lt;/code&gt; line tells pxelinux to chain another pxe boot loader (the one present in the system's image). The last line (&lt;code&gt;append&lt;/code&gt; ...) points towards the boot loader of the system to be loaded.


== How it works / why it is needed ==
== How it works / why it is needed ==


pxechain.com works by patching the DHCP information received from the server such that the boot filename points into the subdirectory of the chosen system (parameter of the <code>append</code> line), rather than the root.  
pxechain.com works by patching the DHCP information received from the server such that the boot filename points into the subdirectory of the chosen system (parameter of the &lt;code&gt;append&lt;/code&gt; line), rather than the root.  


Directly saying <code>kernel udpcast/pxelinux.0</code> would not work: Although the correct <code>pxelinux.0</code> would be loaded, all dependant files (<code>pxelinux.cfg/default</code>, <code>linux</code>, <code>initrd</code>, ...) would again be loaded relatively to the root. Indeed the boot loader derives its "working directory" from the DHCP packet, which would not be patched using this simplistic approach.
Directly saying &lt;code&gt;kernel udpcast/pxelinux.0&lt;/code&gt; would not work: Although the correct &lt;code&gt;pxelinux.0&lt;/code&gt; would be loaded, all dependant files (&lt;code&gt;pxelinux.cfg/default&lt;/code&gt;, &lt;code&gt;linux&lt;/code&gt;, &lt;code&gt;initrd&lt;/code&gt;, ...) would again be loaded relatively to the root. Indeed the boot loader derives its &quot;working directory&quot; from the DHCP packet, which would not be patched using this simplistic approach.

Revision as of 04:55, 24 November 2010


Net boot chosing between multiple systems

Nowadays, many systems (Kubuntu, SuSE, Fedora, ...) allow network booting or installing. In order to do this, you usually need to copy a subfolder from the installation CD to your tftp server, and set this as your root.

However, until syslinux 3.72 and its <code>pxechain.com</code> module, it was not easily possible to set up a boot menu allowing to chose among one of many systems.

With <code>pxechain.com</code>, it has become very simple to set up a global boot menu, as described below.

Preparation

  • Download syslinux-3.72 (or later) from http://www.kernel.org/pub/linux/utils/boot/syslinux/
  • Compile it
  • Copy <code>modules/pxechain.com</code>, <code>com32/menu/menu.c32</code> and <code>core/pxelinux.0</code> to your tftproot (usually <code>/var/lib/tftpboot</code>)
  • Set up your DHCP server to point to the pxlinux.0 in your tftp root by putting the following into your <code>dhcpd.conf</code>, and restart it:

<code><pre>

filename "pxelinux.0";

</pre></code>

Setting up the various systems you want to chose among

Copy the boot environments of the systems that you want to chose amongst as subdirectories of your tftp root : <code>/var/lib/tftpboot/udpcast</code> , <code>/var/lib/tftpboot/kubuntu</code>, ...

Making index file

Set up the root level's PXElinux configuration file to be an index. Create the <code>/var/lib/tftpbot/pxelinux.cfg</code> directory, and store the following in <code>/var/lib/tftpboot/pxelinux.cfg/default</code> :

<code><pre> default menu.c32 prompt 0 menu title Hitchhiker PXE boot menu

LABEL udpcast

       menu label Udpcast
       kernel pxechain.com
       append ::udpcast/pxelinux.0

LABEL KubuntuNet

       menu Kubuntu network install
       kernel pxechain.com
       append ::KubuntuNet/pxelinux.0

</pre></code>

For each system you've got one paragraph, starting with a LABEL line (to give it a unique name), followed by a menu line (to set the name displayed in the menu). The <code>kernel pxechain.com</code> line tells pxelinux to chain another pxe boot loader (the one present in the system's image). The last line (<code>append</code> ...) points towards the boot loader of the system to be loaded.

How it works / why it is needed

pxechain.com works by patching the DHCP information received from the server such that the boot filename points into the subdirectory of the chosen system (parameter of the <code>append</code> line), rather than the root.

Directly saying <code>kernel udpcast/pxelinux.0</code> would not work: Although the correct <code>pxelinux.0</code> would be loaded, all dependant files (<code>pxelinux.cfg/default</code>, <code>linux</code>, <code>initrd</code>, ...) would again be loaded relatively to the root. Indeed the boot loader derives its "working directory" from the DHCP packet, which would not be patched using this simplistic approach.