个人工具

“UbuntuHelp:Installation/Netboot”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(New page: {{From|https://help.ubuntu.com/community/Installation/Netboot}} {{Languages|php5}} == Netboot Install == This HOWTO describes the steps required to start an installation of Ubuntu over th...)
 
 
(未显示2个用户的17个中间版本)
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/Installation/Netboot}}
 
{{From|https://help.ubuntu.com/community/Installation/Netboot}}
{{Languages|php5}}
+
{{Languages|UbuntuHelp:Installation/Netboot}}
 
== Netboot Install ==
 
== Netboot Install ==
 
+
This HOWTO describes the steps required to start an installation of Ubuntu over the network. This is useful, for example, if you have an old machine with a non-bootable CD-ROM.
This HOWTO describes the steps required to start an installation of Ubuntu over the network (if you have e.g. an old machine with a non-bootable CDROM).  If you have a bootable CDROM and you are looking for a minimal CD image to download packages at install time, look at the [[UbuntuHelp:Installation/MinimalCD]]
+
'''NOTE: This method was broken under Hardy.'''  Technical details of the bug are [https://bugs.launchpad.net/ubuntu/+source/net-retriever/+bug/234486 bug 234486] and [http://www.mail-archive.com/[email protected]/msg905078.html here].  As noted on the bug page, use the installer images from '''hardy-updates''': http://archive.ubuntu.com/ubuntu/dists/hardy-updates/main/installer-amd64/current/images/
 
+
=== Alternatives ===
 +
If you have a bootable optical drive and you are looking for a minimal CD image to download packages at install time, look at the [[UbuntuHelp:Installation/MinimalCD|Installation/MinimalCD]].
 +
See [[UbuntuHelp:Installation/QuickNetboot|Installation/QuickNetboot]] for alternative netboot instructions.
 +
See [[UbuntuHelp:Installation/NetbootInstallFromInternet|Installation/NetbootInstallFromInternet]] for another (simpler) method which requires you to already have Grub installed, but does not require you to configure a DHCP or TFTP server.
 +
=== Introduction ===
 
You must modify the host names and IP addresses in this HOWTO for your own setup. The principles described here are applicable to other DHCP and TFTP servers than those described below; using alternate server software is left as an exercise for the reader.
 
You must modify the host names and IP addresses in this HOWTO for your own setup. The principles described here are applicable to other DHCP and TFTP servers than those described below; using alternate server software is left as an exercise for the reader.
 
+
For instructions on how to use a windows computer as the TFTP and DHCP server, head to [[UbuntuHelp:Installation/WindowsServerNetboot|Installation/WindowsServerNetboot]].
For instructions on how to use a windows computer as the TFTP and DHCP server, head to [[UbuntuHelp:Installation/WindowsServerNetboot]].
+
This HOWTO will get you as far as running the installer; if you want to perform automated or unattended installs of Ubuntu, see [[UbuntuHelp:Installation/LocalNet|Installation/LocalNet]].
 
+
See [[UbuntuHelp:Installation/QuickNetboot]] for alternative step by step instructions.
+
 
+
~- (This HOWTO will get you as far as running the installer - if you want to perform automated or unattended installs of Ubuntu, see [[UbuntuHelp:Installation/LocalNet]]). -~
+
 
+
 
=== The scenario ===
 
=== The scenario ===
 
+
One old Celeron 420Mhz with non-bootable CD-ROM, (kanga, 172.31.0.242). This is the target for installation. It has a bootable floppy disk.
One old Celeron 400Mhz with non-bootable CDROM, (kanga, 172.31.0.242). This is the target for installation. It has a bootable floppy disk.
+
A DHCP server (roo, 172.31.0.252), using dnsmasq as the DHCP server. roo has a pretty much home made Linux on it. I added tftp-hpa to it (installation of tftp on Ubuntu or Debian is explained in further detail below). dnsmasq's tftp support is enough to netboot, but this example uses a separate tftp daemon.
 
+
Assumption: You're firewalled and will not expose services used for this exercise to the world. You have a reasonably fast network connection, not 56k dial-up.
A DHCP server (roo, 172.31.0.252), using dnsmasq as the DHCP server. roo has a pretty much home made Linux on it. I added tftp-hpa to it (installation of tftp on Ubuntu or Debian is explained in further detail below).
+
 
+
Assumption: You're firewalled and will not expose services used for this exercise to the world. You have a reasonable (ADSL) network connection.
+
 
+
 
=== Setup DHCP-BOOT ===
 
=== Setup DHCP-BOOT ===
 
 
==== On roo (the DHCP server): ====
 
==== On roo (the DHCP server): ====
 
 
* In /etc/dnsmasq.conf, add the line:
 
* In /etc/dnsmasq.conf, add the line:
 
<pre><nowiki>
 
<pre><nowiki>
 
   dhcp-boot=pxelinux.0,roo,172.31.0.252
 
   dhcp-boot=pxelinux.0,roo,172.31.0.252
</nowiki></code>
+
</nowiki></pre>
 
+
This machine already serves an IP address to kanga via DHCP. (See "DHCP Note" below for help setting up this sort of arrangement.)
This machine already serves an IP address to kanga via DHCP.
+
 
+
 
* Restart dnsmasq.
 
* Restart dnsmasq.
 
+
<pre><nowiki>
 +
  /etc/init.d/dnsmasq restart
 +
</nowiki></pre>
 
==== Install the tftp-server ====
 
==== Install the tftp-server ====
 
 
There are two different versions for the Trivial File Transfer Protocol server, the original tftpd and tftpd-hpa. For Etherboot installation (see below) tftpd will suffice, but it cannot do PXE installs due to the lack of the tsize option. Use tftpd-hpa instead. On Ubuntu or Debian (adapt for other distros or install from source):
 
There are two different versions for the Trivial File Transfer Protocol server, the original tftpd and tftpd-hpa. For Etherboot installation (see below) tftpd will suffice, but it cannot do PXE installs due to the lack of the tsize option. Use tftpd-hpa instead. On Ubuntu or Debian (adapt for other distros or install from source):
 
 
<pre><nowiki>
 
<pre><nowiki>
 
   apt-get install tftpd-hpa tftp-hpa xinetd
 
   apt-get install tftpd-hpa tftp-hpa xinetd
</nowiki></code>
+
</nowiki></pre>
 
+
 
(Note: xinetd is not part of the default install)
 
(Note: xinetd is not part of the default install)
 
 
===== If you have an installation CD =====
 
===== If you have an installation CD =====
 
 
* Insert the installation CD in the drive
 
* Insert the installation CD in the drive
 
 
* Copy the netboot files into a suitable directory, e.g. /var/lib/tftpboot
 
* Copy the netboot files into a suitable directory, e.g. /var/lib/tftpboot
 
Dapper:
 
Dapper:
 
<pre><nowiki>
 
<pre><nowiki>
 
   sudo cp -av /media/cdrom0/install/netboot/* /var/lib/tftpboot/
 
   sudo cp -av /media/cdrom0/install/netboot/* /var/lib/tftpboot/
</nowiki></code>
+
</nowiki></pre>
 
+
 
===== If you do not have an installation CD =====
 
===== If you do not have an installation CD =====
 
+
* Download the appropriate netboot.tar.gz file from http://cdimage.ubuntu.com/netboot/
* Download the Ubuntu netboot tar file from: [http://archive.ubuntu.com/ubuntu/dists/warty/main/installer-i386/current/images/netboot/pxeboot.tar.gz Ubuntu Warty netboot archive],  [http://archive.ubuntu.com/ubuntu/dists/hoary/main/installer-i386/current/images/netboot/netboot.tar.gz Ubuntu Hoary netboot archive], [http://archive.ubuntu.com/ubuntu/dists/breezy/main/installer-i386/current/images/netboot/netboot.tar.gz Ubuntu Breezy netboot archive], [http://archive.ubuntu.com/ubuntu/dists/dapper/main/installer-i386/current/images/netboot/netboot.tar.gz Ubuntu Dapper netboot archive], [http://archive.ubuntu.com/ubuntu/dists/edgy/main/installer-i386/current/images/netboot/netboot.tar.gz Ubuntu Edgy netboot archive] , or [http://archive.ubuntu.com/ubuntu/dists/feisty/main/installer-i386/current/images/netboot/netboot.tar.gz Ubuntu Feisty netboot archive].
+
 
+
 
* Unpack into a suitable directory, e.g. /var/lib/tftpboot
 
* Unpack into a suitable directory, e.g. /var/lib/tftpboot
 
Warty:
 
Warty:
第63行: 第47行:
 
   tar -xvzf pxeboot.tar.gz -C /var/lib/tftpboot/
 
   tar -xvzf pxeboot.tar.gz -C /var/lib/tftpboot/
 
   chown -R nobody:nogroup /var/lib/tftpboot
 
   chown -R nobody:nogroup /var/lib/tftpboot
</nowiki></code>
+
</nowiki></pre>
 
Hoary, Breezy, Dapper, Edgy, Feisty:
 
Hoary, Breezy, Dapper, Edgy, Feisty:
 
<pre><nowiki>
 
<pre><nowiki>
 
   tar -xvzf netboot.tar.gz -C /var/lib/tftpboot/
 
   tar -xvzf netboot.tar.gz -C /var/lib/tftpboot/
 
   chown -R nobody:nogroup /var/lib/tftpboot
 
   chown -R nobody:nogroup /var/lib/tftpboot
</nowiki></code>
+
</nowiki></pre>
 
+
 
* Enable the tftpd server. Add the following as /etc/xinet.d/tftp.
 
* Enable the tftpd server. Add the following as /etc/xinet.d/tftp.
 
<pre><nowiki>
 
<pre><nowiki>
第83行: 第66行:
 
         interface  = 172.31.0.252
 
         interface  = 172.31.0.252
 
   }
 
   }
</nowiki></code>
+
</nowiki></pre>
 
+
* Restart xinetd
* Restart xinetd  
+
<pre><nowiki>
<pre><nowiki>  
+
 
  killall -HUP xinetd
 
  killall -HUP xinetd
</nowiki></code>
+
</nowiki></pre>
 
+
 
==== If your target PC for installation can network boot ====
 
==== If your target PC for installation can network boot ====
 
 
* Reboot the target PC
 
* Reboot the target PC
 
 
* Interrupt the boot and enter the Bios settings screen
 
* Interrupt the boot and enter the Bios settings screen
 
 
* Choose the 'Network Boot' option
 
* Choose the 'Network Boot' option
 
 
* Resume booting
 
* Resume booting
 
 
* Marvel as the Ubuntu installer starts over the net
 
* Marvel as the Ubuntu installer starts over the net
 
+
''Warning - don't forget to reset the BIOS to 'Boot from the hard disk' next time you reboot the PC ;-)''
''Warning - don't forget to reset the bios to 'Boot from the hard disk' next time you reboot the PC ;-)''
+
 
+
 
+
 
==== If your target PC for installation cannot network boot ====
 
==== If your target PC for installation cannot network boot ====
 
 
=====  On any machine: =====
 
=====  On any machine: =====
 
+
* Build a gPXE boot floppy, CD, or USB key. Complete instructions are [http://etherboot.org/wiki/howtos here]. gPXE evolved from Etherboot, and is maintained by the Etherboot project.  
* Build an Etherboot boot floppy. kanga (the installation target) has an 3Com 3c905 NIC
+
 
+
* Download and unpack Etherboot (etherboot-5.3.9.tar.bz2 from [http://sourceforge.net/project/showfiles.php?group_id=4233&package_id=4250 SourceForge] in my case).
+
 
+
* Documentation from the [http://etherboot.sourceforge.net/doc/html/documentation.html Etherboot documentation page].
+
 
+
* Make the boot floppy (insert disk into drive :).
+
<pre><nowiki>
+
  make bin/3c90x.zfd0
+
</nowiki></code>
+
  (Subsititute your NIC type for 3c90x)
+
 
+
 
===== Start the install =====
 
===== Start the install =====
 
+
* Boot the install target (kanga) from the gPXE boot media.
* Boot the install target (kanga) from the etherboot boot floppy
+
 
+
 
* Marvel as the Ubuntu installer starts over the net.
 
* Marvel as the Ubuntu installer starts over the net.
 
 
== Q&A ==
 
== Q&A ==
** '''Q:''' I've noticed you didn't add the interface MAC address. Each and every tutorial I've see stressed the importance of the MAC address to allow the net booting machine authorized on the boot server, is this redundent and can be ignored altogether? --SivanGreen
+
* '''Q:''' I've noticed you didn't add the interface MAC address. Each and every tutorial I've see stressed the importance of the MAC address to allow the net booting machine authorized on the boot server, is this redundant and can be ignored altogether? --SivanGreen
 
+
* '''A:''' "It Depends"(tm)  Either way will work - each has pros and cons.  You don't need it, but that increases the risk of some other machine's system getting installed over.
** '''A:''' "It Depends"(tm)  Either way will work - each has pros and cons.  You don't need it, but that increases the risk of some other machine's system getting installed over.
+
* '''Q:''' Hmm, has someone gotten this to work? Using etherboot-5.3.12 with defaults (cd src ; make bin/via-rhine.zfd0 - the defaults include -DPXE_IMAGE and -DPXE_EXPORT ), the boot process seems to stop after loading the file from TFTP:
 
+
<code><nowiki>Loading 192.168.0.2:pxelinux.0 ..(PXE)done</nowiki></code>
 
+
Also, it may be worth mentioning that the images from http://rom-o-matic.net/ (the referred-to Etherboot manual has a link to this site) don't support PXE images at all. --PeterParkkali
** '''Q:''' Hmm, has someone gotten this to work? Using etherboot-5.3.12 with defaults (cd src ; make bin/via-rhine.zfd0 - the defaults include -DPXE_IMAGE and -DPXE_EXPORT ), the boot process seems to stop after loading the file from TFTP:
+
* '''A:''' I have had good luck with both.  I have used rom-o-matic.net for 4 or 5 nics, they do support pxe.
  <code><nowiki>Loading 192.168.0.2:pxelinux.0 ..(PXE)done</nowiki></code>
+
* '''Q:''' The kernel in the Breezy netboot images doesn't contain driver XXXX which I need to install with.  How can I rebuild the netboot kernel image & initrd.gz to include XXXX? --KeithHopkins
  Also, it may be worth mentioning that the images from http://rom-o-matic.net/ (the referred-to Etherboot manual has a link to this site) don't support PXE images at all. --PeterParkkali
+
* '''Q:''' If you installed netboot for a beta release, such as Feisty, do you need to update netboot again to install the official Feisty release later on?  Would the differences be limited to the operation of the netboot installation script, or would you potentially end up with a hybrid target system, such as a mixture of the beta kernel with the release userland?  --Allan
 
+
* '''A:''' The hybrid target system is unlikely unless the netboot image can find its matching kernel online.  If the netboot installer seeks an old kernel version which is no longer available in the repository, it will fail.  --[[UbuntuWiki:RyanStonecipherFisher|Ryan|Stonecipher-Fisher]]
** '''A:''' I have had good luck with both.  I have used rom-o-matic.net for 4 or 5 nics, they do support pxe.  
+
 
+
** '''Q:''' The kernel in the Breezy netboot images doesn't contain driver XXXX which I need to install with.  How can I rebuild the netboot kernel image & initrd.gz to include XXXX? --KeithHopkins
+
 
+
 
== Note ==
 
== Note ==
 
On 2005-12-14 I tried to net-install a Breezy system, which bailed out during the second phase of the install with a <code><nowiki>libesd-alsa0: Conflicts: libesd0 but 0.2.36-1ubuntu5 is to be installed</nowiki></code> message. This is due to the archives being broken. If you run into this error, do the following. Edit the <code><nowiki>pxelinux.cfg/default</nowiki></code> file on your install server and add a category:
 
On 2005-12-14 I tried to net-install a Breezy system, which bailed out during the second phase of the install with a <code><nowiki>libesd-alsa0: Conflicts: libesd0 but 0.2.36-1ubuntu5 is to be installed</nowiki></code> message. This is due to the archives being broken. If you run into this error, do the following. Edit the <code><nowiki>pxelinux.cfg/default</nowiki></code> file on your install server and add a category:
第146行: 第99行:
 
label desktop
 
label desktop
 
         kernel ubuntu-installer/i386/linux
 
         kernel ubuntu-installer/i386/linux
         append base-config/package-selection=~t<sup>ubuntu-standard$|~t</sup>ubuntu-desktop$ vga=normal initrd=ubuntu-installer/i386/initrd.gz ramdisk_size=16432 root=/dev/rd/0 rw  --
+
         append base-config/package-selection=~t^ubuntu-standard$|~t^ubuntu-desktop$ vga=normal initrd=ubuntu-installer/i386/initrd.gz ramdisk_size=16432 root=/dev/rd/0 rw  --
</nowiki></code>
+
</nowiki></pre>
Then start the netboot and type "desktop" at the prompt. (You can, of course, also change the <code><nowiki>label linux</nowiki></code> settings, just add <code><nowiki>base-config/package-selection=~t<sup>ubuntu-standard$|~t</sup>ubuntu-desktop$</nowiki></code> text to the append line, as shown above. Adding a category, as I did, is less invasive, it won't break extra things). Now the install should proceed just like a regular installation.
+
Then start the netboot and type "desktop" at the prompt. (You can, of course, also change the <code><nowiki>label linux</nowiki></code> settings, just add <code><nowiki>base-config/package-selection=~t^ubuntu-standard$|~t^ubuntu-desktop$</nowiki></code> text to the append line, as shown above. Adding a category, as I did, is less invasive, it won't break extra things). Now the install should proceed just like a regular installation.
 
+
 
== Note ==
 
== Note ==
 
For machines behind DHCP-enabled routers using the etherboot floppy method, the automatic detection of DHCP and TFTP servers may default to the router's IP.  In the following workaround, the target and server computers use the IPs for "kanga" and "roo" from the above example, respectively.  After extracting the tarball for Etherboot, one can add the following lines to the file "Config" in the extracted "src/" directory:
 
For machines behind DHCP-enabled routers using the etherboot floppy method, the automatic detection of DHCP and TFTP servers may default to the router's IP.  In the following workaround, the target and server computers use the IPs for "kanga" and "roo" from the above example, respectively.  After extracting the tarball for Etherboot, one can add the following lines to the file "Config" in the extracted "src/" directory:
第159行: 第111行:
 
CFLAGS+=    -DSTATIC_GATEWAY_IP=\"172.31.0.252\"
 
CFLAGS+=    -DSTATIC_GATEWAY_IP=\"172.31.0.252\"
 
CFLAGS+=    -DSTATIC_BOOTFILE=\"tftp://172.31.0.252/pxelinux.0\"
 
CFLAGS+=    -DSTATIC_BOOTFILE=\"tftp://172.31.0.252/pxelinux.0\"
</nowiki></code>
+
</nowiki></pre>
 
Running the appropriate make command for the target machine's interface will then create a bootable floppy which only connects to the chosen server.  The DHCP server and dnsmasq are not necessary to use static IPs.
 
Running the appropriate make command for the target machine's interface will then create a bootable floppy which only connects to the chosen server.  The DHCP server and dnsmasq are not necessary to use static IPs.
 
2006-08-08 RSF
 
2006-08-08 RSF
 
 
----
 
----
 
I needed to disable the J-Micron SATA controller on Asus N4L-VM motherboard to make the network boot ROM run.
 
I needed to disable the J-Micron SATA controller on Asus N4L-VM motherboard to make the network boot ROM run.
 
----
 
----
See also: [[UbuntuHelp:Installation/LocalNet]] and http://wiki.heinous.org/index.php/Ubuntu_Notes
+
See also: [[UbuntuHelp:Installation/LocalNet|Installation/LocalNet]] and http://wiki.heinous.org/index.php/Ubuntu_Notes
 
+
 
== Note ==
 
== Note ==
 
As of 12/9/2006, the heinous.org link is dead.
 
As of 12/9/2006, the heinous.org link is dead.
 
Also, etherboot does not support PCMCIA/PCcard.  AFAIK, laptops with only PCMCIA NICs (wired or wireless) can not be ether booted.
 
Also, etherboot does not support PCMCIA/PCcard.  AFAIK, laptops with only PCMCIA NICs (wired or wireless) can not be ether booted.
 
+
== Note ==
 +
Following these instructions 11/11/07 with DHCP and TFTP from a SUSE 10 server / DELL C400 client, I needed to set filename "pxelinux.0" in the dhcpd.conf. I'm sure that for apt to work later it needs the "option domain-name-servers X.X.X.X; as well (i.e. the IP of your DNS server / ADSL router). Don't forget [[UbuntuHelp:Installation/LocalNet|Installation/LocalNet]]. That's the best page for this.
 +
== DHCP Note ==
 +
I had a d-link router as my DHCP server, and had to do the following to get my linux box to be the DHCP server: 1) switched my workstation to have a static ip (from "networking" under gnome-control-center). 2) turned off the DHCP server in my router (I assume this helps). 3) used these config lines in my /etc/dnsmasq.conf:
 +
<pre><nowiki>
 +
  dhcp-boot=pxelinux.0,jhome,192.168.0.103
 +
  dhcp-range=192.168.0.5,192.168.0.99,12h
 +
  dhcp-option=3,192.168.0.1
 +
</nowiki></pre>
 +
The IP on the last line is the IP address of the router (gateway).  Hope that helps. -- Jason
 +
== Etherboot note ==
 +
It is now possible to just to create and download an etherboot floppy image from http://www.rom-o-matic.net/ customized for your card.
 +
== Multiple Network Interface Note ==
 +
If the system has multiple network interfaces (like a laptop with both wired and wireless Ethernet) the installer may select the wrong interface for downloading installer components.  You can control it by specifying the boot parameter "netcfg/choose_interface".  For example, using the default install option and specifying eth1 would be: install netcfg/choose_interface=eth1
 
----
 
----
CategoryDocumentation CategoryCleanup
+
[[category:CategoryInstallation]]
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2010年5月19日 (三) 22:50的最新版本

Netboot Install

This HOWTO describes the steps required to start an installation of Ubuntu over the network. This is useful, for example, if you have an old machine with a non-bootable CD-ROM. NOTE: This method was broken under Hardy. Technical details of the bug are bug 234486 and here. As noted on the bug page, use the installer images from hardy-updates: http://archive.ubuntu.com/ubuntu/dists/hardy-updates/main/installer-amd64/current/images/

Alternatives

If you have a bootable optical drive and you are looking for a minimal CD image to download packages at install time, look at the Installation/MinimalCD. See Installation/QuickNetboot for alternative netboot instructions. See Installation/NetbootInstallFromInternet for another (simpler) method which requires you to already have Grub installed, but does not require you to configure a DHCP or TFTP server.

Introduction

You must modify the host names and IP addresses in this HOWTO for your own setup. The principles described here are applicable to other DHCP and TFTP servers than those described below; using alternate server software is left as an exercise for the reader. For instructions on how to use a windows computer as the TFTP and DHCP server, head to Installation/WindowsServerNetboot. This HOWTO will get you as far as running the installer; if you want to perform automated or unattended installs of Ubuntu, see Installation/LocalNet.

The scenario

One old Celeron 420Mhz with non-bootable CD-ROM, (kanga, 172.31.0.242). This is the target for installation. It has a bootable floppy disk. A DHCP server (roo, 172.31.0.252), using dnsmasq as the DHCP server. roo has a pretty much home made Linux on it. I added tftp-hpa to it (installation of tftp on Ubuntu or Debian is explained in further detail below). dnsmasq's tftp support is enough to netboot, but this example uses a separate tftp daemon. Assumption: You're firewalled and will not expose services used for this exercise to the world. You have a reasonably fast network connection, not 56k dial-up.

Setup DHCP-BOOT

On roo (the DHCP server):

  • In /etc/dnsmasq.conf, add the line:
  dhcp-boot=pxelinux.0,roo,172.31.0.252

This machine already serves an IP address to kanga via DHCP. (See "DHCP Note" below for help setting up this sort of arrangement.)

  • Restart dnsmasq.
  /etc/init.d/dnsmasq restart

Install the tftp-server

There are two different versions for the Trivial File Transfer Protocol server, the original tftpd and tftpd-hpa. For Etherboot installation (see below) tftpd will suffice, but it cannot do PXE installs due to the lack of the tsize option. Use tftpd-hpa instead. On Ubuntu or Debian (adapt for other distros or install from source):

  apt-get install tftpd-hpa tftp-hpa xinetd

(Note: xinetd is not part of the default install)

If you have an installation CD
  • Insert the installation CD in the drive
  • Copy the netboot files into a suitable directory, e.g. /var/lib/tftpboot

Dapper:

  sudo cp -av /media/cdrom0/install/netboot/* /var/lib/tftpboot/
If you do not have an installation CD

Warty:

  tar -xvzf pxeboot.tar.gz -C /var/lib/tftpboot/
  chown -R nobody:nogroup /var/lib/tftpboot

Hoary, Breezy, Dapper, Edgy, Feisty:

  tar -xvzf netboot.tar.gz -C /var/lib/tftpboot/
  chown -R nobody:nogroup /var/lib/tftpboot
  • Enable the tftpd server. Add the following as /etc/xinet.d/tftp.
  service tftp
  {
        disable                 = no
        socket_type             = dgram
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -v -s /var/lib/tftpboot
        only_from   = 172.31.0.240/28
        interface   = 172.31.0.252
  }
  • Restart xinetd
 killall -HUP xinetd

If your target PC for installation can network boot

  • Reboot the target PC
  • Interrupt the boot and enter the Bios settings screen
  • Choose the 'Network Boot' option
  • Resume booting
  • Marvel as the Ubuntu installer starts over the net

Warning - don't forget to reset the BIOS to 'Boot from the hard disk' next time you reboot the PC ;-)

If your target PC for installation cannot network boot

On any machine:
  • Build a gPXE boot floppy, CD, or USB key. Complete instructions are here. gPXE evolved from Etherboot, and is maintained by the Etherboot project.
Start the install
  • Boot the install target (kanga) from the gPXE boot media.
  • Marvel as the Ubuntu installer starts over the net.

Q&A

  • Q: I've noticed you didn't add the interface MAC address. Each and every tutorial I've see stressed the importance of the MAC address to allow the net booting machine authorized on the boot server, is this redundant and can be ignored altogether? --SivanGreen
  • A: "It Depends"(tm) Either way will work - each has pros and cons. You don't need it, but that increases the risk of some other machine's system getting installed over.
  • Q: Hmm, has someone gotten this to work? Using etherboot-5.3.12 with defaults (cd src ; make bin/via-rhine.zfd0 - the defaults include -DPXE_IMAGE and -DPXE_EXPORT ), the boot process seems to stop after loading the file from TFTP:

Loading 192.168.0.2:pxelinux.0 ..(PXE)done Also, it may be worth mentioning that the images from http://rom-o-matic.net/ (the referred-to Etherboot manual has a link to this site) don't support PXE images at all. --PeterParkkali

  • A: I have had good luck with both. I have used rom-o-matic.net for 4 or 5 nics, they do support pxe.
  • Q: The kernel in the Breezy netboot images doesn't contain driver XXXX which I need to install with. How can I rebuild the netboot kernel image & initrd.gz to include XXXX? --KeithHopkins
  • Q: If you installed netboot for a beta release, such as Feisty, do you need to update netboot again to install the official Feisty release later on? Would the differences be limited to the operation of the netboot installation script, or would you potentially end up with a hybrid target system, such as a mixture of the beta kernel with the release userland? --Allan
  • A: The hybrid target system is unlikely unless the netboot image can find its matching kernel online. If the netboot installer seeks an old kernel version which is no longer available in the repository, it will fail. --Ryan|Stonecipher-Fisher

Note

On 2005-12-14 I tried to net-install a Breezy system, which bailed out during the second phase of the install with a libesd-alsa0: Conflicts: libesd0 but 0.2.36-1ubuntu5 is to be installed message. This is due to the archives being broken. If you run into this error, do the following. Edit the pxelinux.cfg/default file on your install server and add a category:

label desktop
        kernel ubuntu-installer/i386/linux
        append base-config/package-selection=~t^ubuntu-standard$|~t^ubuntu-desktop$ vga=normal initrd=ubuntu-installer/i386/initrd.gz ramdisk_size=16432 root=/dev/rd/0 rw  --

Then start the netboot and type "desktop" at the prompt. (You can, of course, also change the label linux settings, just add base-config/package-selection=~t^ubuntu-standard$|~t^ubuntu-desktop$ text to the append line, as shown above. Adding a category, as I did, is less invasive, it won't break extra things). Now the install should proceed just like a regular installation.

Note

For machines behind DHCP-enabled routers using the etherboot floppy method, the automatic detection of DHCP and TFTP servers may default to the router's IP. In the following workaround, the target and server computers use the IPs for "kanga" and "roo" from the above example, respectively. After extracting the tarball for Etherboot, one can add the following lines to the file "Config" in the extracted "src/" directory:

CFLAGS+=    -DUSE_STATIC_BOOT_INFO
CFLAGS+=    -DSTATIC_CLIENT_IP=\"172.31.0.242\"
CFLAGS+=    -DSTATIC_SUBNET_MASK=\"255.255.255.0\"
CFLAGS+=    -DSTATIC_SERVER_IP=\"172.31.0.252\"
CFLAGS+=    -DSTATIC_GATEWAY_IP=\"172.31.0.252\"
CFLAGS+=    -DSTATIC_BOOTFILE=\"tftp://172.31.0.252/pxelinux.0\"

Running the appropriate make command for the target machine's interface will then create a bootable floppy which only connects to the chosen server. The DHCP server and dnsmasq are not necessary to use static IPs. 2006-08-08 RSF


I needed to disable the J-Micron SATA controller on Asus N4L-VM motherboard to make the network boot ROM run.


See also: Installation/LocalNet and http://wiki.heinous.org/index.php/Ubuntu_Notes

Note

As of 12/9/2006, the heinous.org link is dead. Also, etherboot does not support PCMCIA/PCcard. AFAIK, laptops with only PCMCIA NICs (wired or wireless) can not be ether booted.

Note

Following these instructions 11/11/07 with DHCP and TFTP from a SUSE 10 server / DELL C400 client, I needed to set filename "pxelinux.0" in the dhcpd.conf. I'm sure that for apt to work later it needs the "option domain-name-servers X.X.X.X; as well (i.e. the IP of your DNS server / ADSL router). Don't forget Installation/LocalNet. That's the best page for this.

DHCP Note

I had a d-link router as my DHCP server, and had to do the following to get my linux box to be the DHCP server: 1) switched my workstation to have a static ip (from "networking" under gnome-control-center). 2) turned off the DHCP server in my router (I assume this helps). 3) used these config lines in my /etc/dnsmasq.conf:

  dhcp-boot=pxelinux.0,jhome,192.168.0.103
  dhcp-range=192.168.0.5,192.168.0.99,12h
  dhcp-option=3,192.168.0.1

The IP on the last line is the IP address of the router (gateway). Hope that helps. -- Jason

Etherboot note

It is now possible to just to create and download an etherboot floppy image from http://www.rom-o-matic.net/ customized for your card.

Multiple Network Interface Note

If the system has multiple network interfaces (like a laptop with both wired and wireless Ethernet) the installer may select the wrong interface for downloading installer components. You can control it by specifying the boot parameter "netcfg/choose_interface". For example, using the default install option and specifying eth1 would be: install netcfg/choose_interface=eth1