Instructions for building a PXE boot image.
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 12 Feb 2008 16:36:30 +0000 (16:36 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Tue, 12 Feb 2008 16:36:30 +0000 (16:36 +0000)
.hgignore
Makefile.in
TODO
configure.ac
virt-p2v.1
virt-p2v.1.html
virt-p2v.1.txt
virt-p2v.pod

index d31fe3a..7b3d0f6 100644 (file)
--- a/.hgignore
+++ b/.hgignore
@@ -3,6 +3,7 @@
 \.iso$
 \.img$
 ^virt-p2v-.*\.tar\.gz$
+^virt-p2v-.*\.tar$
 ^livecd\.ks$
 ^livecd-test\.ks$
 ^livecd-post\.sh$
@@ -13,3 +14,4 @@
 ^config\.status$
 ^Makefile$
 ^p2v\.ks$
+^tftpboot/
\ No newline at end of file
index 413c43c..aa8d8b4 100644 (file)
@@ -30,6 +30,7 @@ HAVE_PERLDOC  := @HAVE_PERLDOC@
 HAVE_QEMU      := @HAVE_QEMU@
 HAVE_QEMU_KVM  := @HAVE_QEMU_KVM@
 HAVE_LIVECD_CREATOR := @HAVE_LIVECD_CREATOR@
+HAVE_LIVECD_ISO_TO_PXEBOOT := @HAVE_LIVECD_ISO_TO_PXEBOOT@
 
 LABEL          := $(PACKAGE)-$(VERSION)
 ISO            := $(LABEL).iso
@@ -42,6 +43,7 @@ all:
        @echo "                 Boot built/named ISO (uses qemu)"
        @echo "make update    Update an existing live CD ISO with new"
        @echo "                 virt-p2v script, without doing full rebuild"
+       @echo "make pxe       Build a PXE image (in tftpboot/ subdirectory)"
        @echo "make man       Make man pages (needs POD)"
 
 # Build live CD.
@@ -87,6 +89,15 @@ update: checkroot checkscript
        -./iso-attach delete $(ISO) 2>/dev/null
        ./iso-attach add $(ISO) virt-p2v
 
+# PXE boot.
+
+ifeq ($(HAVE_LIVECD_ISO_TO_PXEBOOT),livecd-iso-to-pxeboot)
+
+pxe: checkroot checkscript
+       livecd-iso-to-pxeboot $(ISO)
+
+endif
+
 # Check that we are root.
 
 checkroot:
@@ -158,9 +169,22 @@ website: man dist
        cp virt-p2v.1.css $(WEBSITE_DIR)
        cp $(PACKAGE)-$(VERSION).tar.gz $(WEBSITE_DIR)
 
+# Upload everything.
+
+upload: upload_iso upload_pxe
+
 # Upload ISO.
 
 upload_iso:
        scp -l 300 $(ISO) et.redhat.com:public_html/tmp/
 
+# Upload PXE image.
+
+PXE_TAR := $(PACKAGE)-$(VERSION)-pxeboot.tar
+
+upload_pxe:
+       tar cf $(PXE_TAR) tftpboot
+       scp -l 300 $(PXE_TAR) et.redhat.com:public_html/tmp/
+       rm $(PXE_TAR)
+
 .PHONY:        build boot checkroot
\ No newline at end of file
diff --git a/TODO b/TODO
index 87c5a3a..c2b0d8e 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,5 +1,3 @@
-PXE boot shell script, documentation, upload to site.
-
 # Detect if network is already present, and don't try to set it up again
 # (for PXE boot case).
 
index 6f147e5..1fa4752 100644 (file)
@@ -81,6 +81,9 @@ fi
 dnl Check for recommended livecd-creator (for building ISOs).
 AC_CHECK_PROG(HAVE_LIVECD_CREATOR,livecd-creator,livecd-creator)
 
+dnl Check for optional livecd-iso-to-pxeboot.
+AC_CHECK_PROG(HAVE_LIVECD_ISO_TO_PXEBOOT,livecd-iso-to-pxeboot,livecd-iso-to-pxeboot)
+
 dnl Check for optional perldoc (for building manual pages).
 AC_CHECK_PROG(HAVE_PERLDOC,perldoc,perldoc)
 
index 9020837..67c5e15 100644 (file)
 .\" ========================================================================
 .\"
 .IX Title "VIRT-P2V 1"
-.TH VIRT-P2V 1 "2008-02-07" "virt-p2v-0.9.3" "Virtualization Support"
+.TH VIRT-P2V 1 "2008-02-12" "virt-p2v-0.9.6" "Virtualization Support"
 .SH "NAME"
 virt\-p2v \- P2V (physical to virtual machine) migration tool
 .SH "SUMMARY"
@@ -156,13 +156,17 @@ machine over the network to the virtualization host machine over ssh.
 Therefore \f(CW\*(C`sshd\*(C'\fR must be running on the virtualization host, and must
 be accessible to that host.  See \fB\s-1SERVER\s0 \s-1REQUIREMENTS\s0\fR section below.
 .PP
-The \f(CW\*(C`virt\-p2v\*(C'\fR script must only be run from the live \s-1CD\s0.  It isn't
-designed to run outside this environment and could do Bad Things to
-your machine if you try it.  The script contains some checks to try to
-stop you from doing this.
+The \f(CW\*(C`virt\-p2v\*(C'\fR script must only be run from the live \s-1CD\s0 environment.
+It isn't designed to run outside this environment and could do Bad
+Things to your machine if you try it.  The script contains some checks
+to try to stop you from doing this.
 .PP
 Virt\-p2v does not modify the physical machine, its disks,
 configuration etc.
+.PP
+\&\s-1USB\s0 key and \s-1PXE\s0 boot options are also available.  See sections
+\&\fB\s-1PXE\s0 \s-1BOOTING\s0\fR and \fB\s-1BOOTING\s0 \s-1FROM\s0 A \s-1USB\s0 \s-1KEY\s0\fR
+below.
 .SH "STANDARD USAGE"
 .IX Header "STANDARD USAGE"
 After booting the live \s-1CD\-R\s0, you are presented with a series of
@@ -574,10 +578,29 @@ or the equivalent manual command:
 .Vb 1
 \& ./iso-attach virt-p2v-VERSION.iso virt-p2v
 .Ve
-.SH "BOOTING FROM A USB KEY INSTEAD OF A CD"
-.IX Header "BOOTING FROM A USB KEY INSTEAD OF A CD"
-If you wish to boot from a \s-1USB\s0 keydrive, use the livecd-iso-to-disk
-tool:
+.PP
+Note that \s-1ISO\s0 attachments only work with real (and emulated) CD\-Rs,
+not with other methods of booting such as \s-1USB\s0 keys and \s-1PXE\s0.
+.SH "PXE BOOTING"
+.IX Header "PXE BOOTING"
+If you wish to boot over the network using \s-1PXE\s0, use the
+\&\f(CW\*(C`livecd\-iso\-to\-pxeboot\*(C'\fR script (part of \f(CW\*(C`livecd\-tools\*(C'\fR).
+.PP
+.Vb 1
+\& livecd-iso-to-pxeboot virt-p2v-$VERSION.iso
+.Ve
+.PP
+then copy the generated subdirectory \f(CW\*(C`tftpboot/\*(C'\fR to the
+right place for your \s-1PXE\s0 configuration.
+.PP
+Pre-built \s-1PXE\s0 boot images are also available on the website.
+.PP
+General configuration of \s-1DHCP\s0, \s-1TFTP\s0 and \s-1PXE\s0 for network booting are
+outside the scope of this document.
+.SH "BOOTING FROM A USB KEY"
+.IX Header "BOOTING FROM A USB KEY"
+If you wish to boot from a \s-1USB\s0 keydrive, use the \f(CW\*(C`livecd\-iso\-to\-disk\*(C'\fR
+script (part of \f(CW\*(C`livecd\-tools\*(C'\fR):
 .PP
 .Vb 1
 \& livecd-iso-to-disk virt-p2v-$VERSION.iso /dev/sdX1
index a4fa6e5..579808f 100644 (file)
@@ -38,7 +38,8 @@
                <li><a href="#iso_attachments">ISO ATTACHMENTS</a></li>
        </ul>
 
-       <li><a href="#booting_from_a_usb_key_instead_of_a_cd">BOOTING FROM A USB KEY INSTEAD OF A CD</a></li>
+       <li><a href="#pxe_booting">PXE BOOTING</a></li>
+       <li><a href="#booting_from_a_usb_key">BOOTING FROM A USB KEY</a></li>
        <li><a href="#testing_an_iso_under_qemu_or_kvm">TESTING AN ISO UNDER QEMU OR KVM</a></li>
        <li><a href="#mailing_list">MAILING LIST</a></li>
        <li><a href="#see_also">SEE ALSO</a></li>
@@ -77,12 +78,15 @@ CUSTOM LIVE CD</strong> section below.</p>
 machine over the network to the virtualization host machine over ssh.
 Therefore <code>sshd</code> must be running on the virtualization host, and must
 be accessible to that host.  See <strong>SERVER REQUIREMENTS</strong> section below.</p>
-<p>The <code>virt-p2v</code> script must only be run from the live CD.  It isn't
-designed to run outside this environment and could do Bad Things to
-your machine if you try it.  The script contains some checks to try to
-stop you from doing this.</p>
+<p>The <code>virt-p2v</code> script must only be run from the live CD environment.
+It isn't designed to run outside this environment and could do Bad
+Things to your machine if you try it.  The script contains some checks
+to try to stop you from doing this.</p>
 <p>Virt-p2v does not modify the physical machine, its disks,
 configuration etc.</p>
+<p>USB key and PXE boot options are also available.  See sections
+<strong>PXE BOOTING</strong> and <strong>BOOTING FROM A USB KEY</strong>
+below.</p>
 <p>
 </p>
 <hr />
@@ -601,12 +605,27 @@ built an existing <code>virt-p2v-*.iso</code>, you can just do:</p>
 <p>or the equivalent manual command:</p>
 <pre>
  ./iso-attach virt-p2v-VERSION.iso virt-p2v</pre>
+<p>Note that ISO attachments only work with real (and emulated) CD-Rs,
+not with other methods of booting such as USB keys and PXE.</p>
 <p>
 </p>
 <hr />
-<h1><a name="booting_from_a_usb_key_instead_of_a_cd">BOOTING FROM A USB KEY INSTEAD OF A CD</a></h1>
-<p>If you wish to boot from a USB keydrive, use the livecd-iso-to-disk
-tool:</p>
+<h1><a name="pxe_booting">PXE BOOTING</a></h1>
+<p>If you wish to boot over the network using PXE, use the
+<code>livecd-iso-to-pxeboot</code> script (part of <code>livecd-tools</code>).</p>
+<pre>
+ livecd-iso-to-pxeboot virt-p2v-$VERSION.iso</pre>
+<p>then copy the generated subdirectory <code>tftpboot/</code> to the
+right place for your PXE configuration.</p>
+<p>Pre-built PXE boot images are also available on the website.</p>
+<p>General configuration of DHCP, TFTP and PXE for network booting are
+outside the scope of this document.</p>
+<p>
+</p>
+<hr />
+<h1><a name="booting_from_a_usb_key">BOOTING FROM A USB KEY</a></h1>
+<p>If you wish to boot from a USB keydrive, use the <code>livecd-iso-to-disk</code>
+script (part of <code>livecd-tools</code>):</p>
 <pre>
  livecd-iso-to-disk virt-p2v-$VERSION.iso /dev/sdX1</pre>
 <p>(Replace /dev/sdX1 with the actual USB device).</p>
index 81ded16..22682f8 100644 (file)
@@ -24,14 +24,17 @@ DESCRIPTION
     Therefore "sshd" must be running on the virtualization host, and must be
     accessible to that host. See SERVER REQUIREMENTS section below.
 
-    The "virt-p2v" script must only be run from the live CD. It isn't
-    designed to run outside this environment and could do Bad Things to your
-    machine if you try it. The script contains some checks to try to stop
-    you from doing this.
+    The "virt-p2v" script must only be run from the live CD environment. It
+    isn't designed to run outside this environment and could do Bad Things
+    to your machine if you try it. The script contains some checks to try to
+    stop you from doing this.
 
     Virt-p2v does not modify the physical machine, its disks, configuration
     etc.
 
+    USB key and PXE boot options are also available. See sections PXE
+    BOOTING and BOOTING FROM A USB KEY below.
+
 STANDARD USAGE
     After booting the live CD-R, you are presented with a series of
     questions. This section explains each question.
@@ -396,9 +399,26 @@ BUILDING A CUSTOM LIVE CD
 
      ./iso-attach virt-p2v-VERSION.iso virt-p2v
 
-BOOTING FROM A USB KEY INSTEAD OF A CD
-    If you wish to boot from a USB keydrive, use the livecd-iso-to-disk
-    tool:
+    Note that ISO attachments only work with real (and emulated) CD-Rs, not
+    with other methods of booting such as USB keys and PXE.
+
+PXE BOOTING
+    If you wish to boot over the network using PXE, use the
+    "livecd-iso-to-pxeboot" script (part of "livecd-tools").
+
+     livecd-iso-to-pxeboot virt-p2v-$VERSION.iso
+
+    then copy the generated subdirectory "tftpboot/" to the right place for
+    your PXE configuration.
+
+    Pre-built PXE boot images are also available on the website.
+
+    General configuration of DHCP, TFTP and PXE for network booting are
+    outside the scope of this document.
+
+BOOTING FROM A USB KEY
+    If you wish to boot from a USB keydrive, use the "livecd-iso-to-disk"
+    script (part of "livecd-tools"):
 
      livecd-iso-to-disk virt-p2v-$VERSION.iso /dev/sdX1
 
index 6978b2f..5b57631 100644 (file)
@@ -27,14 +27,18 @@ machine over the network to the virtualization host machine over ssh.
 Therefore C<sshd> must be running on the virtualization host, and must
 be accessible to that host.  See B<SERVER REQUIREMENTS> section below.
 
-The C<virt-p2v> script must only be run from the live CD.  It isn't
-designed to run outside this environment and could do Bad Things to
-your machine if you try it.  The script contains some checks to try to
-stop you from doing this.
+The C<virt-p2v> script must only be run from the live CD environment.
+It isn't designed to run outside this environment and could do Bad
+Things to your machine if you try it.  The script contains some checks
+to try to stop you from doing this.
 
 Virt-p2v does not modify the physical machine, its disks,
 configuration etc.
 
+USB key and PXE boot options are also available.  See sections
+B<PXE BOOTING> and B<BOOTING FROM A USB KEY>
+below.
+
 =head1 STANDARD USAGE
 
 After booting the live CD-R, you are presented with a series of
@@ -469,10 +473,28 @@ or the equivalent manual command:
 
  ./iso-attach virt-p2v-VERSION.iso virt-p2v
 
-=head1 BOOTING FROM A USB KEY INSTEAD OF A CD
+Note that ISO attachments only work with real (and emulated) CD-Rs,
+not with other methods of booting such as USB keys and PXE.
+
+=head1 PXE BOOTING
+
+If you wish to boot over the network using PXE, use the
+C<livecd-iso-to-pxeboot> script (part of C<livecd-tools>).
+
+ livecd-iso-to-pxeboot virt-p2v-$VERSION.iso
+
+then copy the generated subdirectory C<tftpboot/> to the
+right place for your PXE configuration.
+
+Pre-built PXE boot images are also available on the website.
+
+General configuration of DHCP, TFTP and PXE for network booting are
+outside the scope of this document.
+
+=head1 BOOTING FROM A USB KEY
 
-If you wish to boot from a USB keydrive, use the livecd-iso-to-disk
-tool:
+If you wish to boot from a USB keydrive, use the C<livecd-iso-to-disk>
+script (part of C<livecd-tools>):
 
  livecd-iso-to-disk virt-p2v-$VERSION.iso /dev/sdX1