[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Update to the Debian-live Manual...



	Hello,

  I've done a modification to the manual (patch joined), does somebody
can check it and integrate it  ?

	Thanks,
		Fred.
--- live-manual/xml/chapters/basics.xml	2008-11-24 10:27:19.000000000 +0100
+++ live-manual.mod/xml/chapters/basics.xml	2008-11-21 17:21:40.000000000 +0100
@@ -97,9 +97,24 @@
 
 <section>
 <title>Copying USB/HDD image to a USB stick</title>
+
+The generated binary image contains a <acronym>VFAT</acronym>
+partition and a <command>syslinux</command> bootloader,
+ready to be directly written on a USB stick. Plug a USB stick with a
+size larger than <filename>binary.img</filename>'s one, and type :
+
 <screen>
 $ dd if=binary.img of=$USBDRV
 </screen>
+
+where <replaceable>$USBDRV</replaceable> is the device file of your key,
+like <filename>/dev/sda</filename>
+(not a partition like <filename>/dev/sda1</filename> !) ; you can find
+the right device name by looking in <command>dmesg</command>'s output
+after plugging the stick, for example).
+
+<important>This will definitely overwrite any previous contents on
+  your stick !</important>
 </section>
 
 <section>
@@ -123,7 +138,12 @@
 </screen>
 
 <para>
- In contrast with the ISO and USB/HDD image types, netbooting does not support serving a filesystem image with the client so we must serve the files via NFS. The <replaceable>net-root-path</replaceable> and <replaceable>net-root-server</replaceable> options specify the location and server respectfully of the NFS server on the filesytem image will be located at boot-time.
+ In contrast with the ISO and USB/HDD image types, netbooting does not
+ support serving a filesystem image with the client so we must serve
+ the files via NFS. The <replaceable>net-root-path</replaceable>
+ and <replaceable>net-root-server</replaceable> options specify the
+ location and server respectfully of the NFS server where the filesytem
+ image will be located at boot-time.
 </para>
 
 <para>
@@ -135,24 +155,94 @@
 </screen>
 
 <para>
- We must now configure three services:
+ In a net boot, a client runs a small piece of software, usually on
+ the <acronym>EEPROM</acronym> of the Ethernet card, which send
+ a <abbrev>DHCP</abbrev> request  to get an
+ <abbrev>IP</abbrev> address and also information about what to do
+ next : usually getting (through <abbrev>TFTP</abbrev> protocol) a
+ higher level boot software like <application>Grub</application>
+ or <application>PxeLinux</application>, or directly an operating
+ system like <application>Linux</application>.
 </para>
 
-<variablelist>
-<varlistentry><term>NFS server</term>
-<listitem>
 <para>
- This contains the Live filesystem image which the system will use at run-time.
+ For example, you can extract the generated
+ <filename>binary-net.tar.gz</filename> archive
+ in the <filename>/srv/debian-live</filename> directory ; you'll get
+ the filesystem image
+ in <filename>live/filesystem.squashfs</filename>, the kernel,
+ initrd and PXE Linux bootloader
+ in <filename>tftpboot/debian-live/i386</filename>.
 </para>
+
 <para>
- You should install the <command>nfs-kernel-server</command> server package -- <command>nfs-user-server</command> does not function correctly with netboot.
+ We must now configure three services on the server :
 </para>
+
+<variablelist>
+<varlistentry><term>DHCP server</term>
+<listitem>
 <para>
- FIXME
+ We must configure our network's DHCP server to be sure to give a
+ <abbrev>IP</abbrev> address to the computer net booting, and to
+ advertise the location of the PXE bootloader.
+</para>
+
+<para>
+ Here is an example for inspiration, written for the ISC DHCP server
+ (package <literal>dhcp3-server</literal>)
+ in the <filename>/etc/dhcp3/dhcpd.conf</filename> configuration file :
 </para>
 
 <screen>
-/srv/debian-live *(rw,sync,no_root_squash)
+
+# Options DHCP spécifiques à Pxelinux :
+option space pxelinux;
+option pxelinux.magic      code 208 = string;
+option pxelinux.configfile code 209 = text;
+option pxelinux.pathprefix code 210 = text;
+option pxelinux.reboottime code 211 = unsigned integer 32;
+
+
+subnet 192.168.1.0 netmask 255.255.255.0 {   # 192.168.1.0/24
+
+  # IP addresses available for guests
+  range 192.168.1.100 192.168.1.149;
+
+  # allow booting from the net
+  allow bootp;
+
+  # for net booting, server where the first file to be loaded (by TFTP
+  # protocol) ("filename" following definition) lies : so the TFTP
+  # server's name.
+  next-server myserver;
+
+  # net boot configuration for guests with a PXE client :
+  if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
+    # Note : all files for PXE are relatives to the TFTP server's root
+    # path, as usually defined in /etc/inetd.conf.
+
+    # PXE boot loader (first program to be loaded, by TFTP)
+    filename "pxelinux.0";
+
+    # describe some specific pxelinux's options through DHCP options :
+    site-option-space "pxelinux";
+    option pxelinux.magic f1:00:74:7e;
+    if exists dhcp-parameter-request-list {
+      # Always send the PXELINUX options (specified in hexadecimal)
+      option dhcp-parameter-request-list = concat(option dhcp-parameter-request-list,d0,d1,d2,d3);
+    }
+
+    # For a PXE boot menu, different versions are available : simple
+    # text, text with curses, graphic (VESA)
+    #option pxelinux.configfile "pxelinux/config_simple";
+    #option pxelinux.configfile "pxelinux/config_curses";
+    option pxelinux.configfile "pxelinux/config_vesa";
+
+    # automatically reboot after 10 minutes of no activity
+    option pxelinux.reboottime 600;
+  }
+}
 </screen>
 </listitem>
 </varlistentry>
@@ -163,34 +253,54 @@
  This serves the kernel and initial ramdisk to the system at run-time.
 </para>
 <para>
- You should install the <command>tftpd-hpa</command> package.
-</para>
+ You should install the <command>tftpd-hpa</command> package. It can
+ serve all files contained inside a root directory,
+ usually <filename>/var/lib/tftpboot/</filename>, as defined with its
+ <option>-s</option> option. To let it serves files
+ inside <filename>/srv/debian-live/tftpboot</filename>, modify its
+ start definition in <filename>/etc/inetd.conf</filename> with :
 
 <screen>
-$ ls /var/lib/tftpboot/
-initrd.gz  memtest  pxelinux.0  pxelinux.cfg  vmlinuz
+tftp           dgram   udp     wait    root  /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /srv/debian-live/tftpboot -r blksize -v -v
 </screen>
+and reload the super server with
+<command>/etc/init.d/openbsd-inetd reload</command>.
+</para>
 </listitem>
 </varlistentry>
 
-<varlistentry><term>DHCP server</term>
+<varlistentry><term>NFS server</term>
 <listitem>
 <para>
- We must configure our network's DHCP server to advertise the location of the PXE server.
+ Once the guest computer will have downloaded and booted a Linux
+ kernel and its initrd, it will try to mount the Live filesystem image
+ through a NFS server.
 </para>
+
 <para>
- FIXME
+ You should install the <command>nfs-kernel-server</command> server package -- <command>nfs-user-server</command> does not function correctly with netboot.
 </para>
 
+<para>Then, declare that the directory of the filesystem image is
+  available through NFS, by writing
+  in <filename>/etc/exports</filename> :</para>
 <screen>
-next-server 192.168.0.78;
-filename "pxelinux.0";
+/srv/debian-live *(ro,async,subtree_check,no_root_squash)
 </screen>
+
+<para>and let the NFS server knowing it typing following command :</para>
+<screen>
+# exportfs -rv
+</screen>
+
 </listitem>
 </varlistentry>
 
 </variablelist>
 
+<para>Setting all these services is quite error prone, you'll need
+  some patience to let all of them working together.</para>
+
 </section>
 
 </chapter>

Reply to: