Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


093031aa0b23d7d06a0d4e46f3323674b35bb8a7
[palacios.git] / manual / network_boot / Network_Booting_Kitten_using_PXE.tex
1
2 \documentclass[11pt]{article}
3
4 \begin{document}
5
6 \title{\ \\ \LARGE\bf
7 Booting Kitten using PXE
8 }
9
10 \author{Yuan Tang, Lei Xia}
11
12 \maketitle
13
14 PXE allows us to boot up Kitten/Palacios remotely from a network server, which makes testing Palacios on physical machine more easily. Following is the instruction on how to set up the PXE server.
15
16 \section{Requirements}
17
18 \begin{itemize}
19 \item DHCP server. DHCP enables Kitten booting machine get an IP address automatically from the PXE server.
20 \item TFTP server. When booting machine starts, TFTP allows it to download Kitten kernel image and initial root file system from PXE sever.
21 \item {\em bzImage} and {\em init\_task}. The Kitten/Palacios boot image file and the inital root file system image. After booting machine starts, it will be copied through TFTP. After building your Kitten, these two files are typically located at:
22 \begin{verbatim}
23     your_kitten_path/arch/x86_64/boot/bzImage
24     your_kitten_path/init_task
25 \end{verbatim}
26 \end{itemize}
27
28 \section{DHCP Setup}
29 Install the DHCP service, and configure the file {\em /etc/dhcpd.conf}, add the booting machine's MAC address into config file, allow the booting machine to get IP address from DHCP server at booting time.
30 \begin{verbatim}
31     option domain-name "cs.northwestern.edu";
32     default-lease-time 600;
33     max-lease-time 7200;
34
35     allow booting;
36     allow bootp;
37
38     <-- Change below section according to your network configuration --->
39     subnet 165.124.184.0 netmask 255.255.254.0 {
40         range 165.124.184.90 165.124.184.95;
41         option broadcast-address 165.124.184.255;
42         option routers 165.124.184.1;
43         option domain-name-servers 165.124.180.10;
44     }
45
46     group {
47       <--- In which IP address the booting machine can find the booting image -->
48       next-server 165.124.184.209;
49       host v-test-intel-lab {
50         <-- Replace below with the IP address assigned to the booting machine -->
51         fixed-address 165.124.184.92;
52         <--- Replace below with the MAC address of the booting machine -->
53         hardware ethernet  00:1B:21:41:CF:4C;   
54         filename "pxelinux.0";
55       }
56     } 
57 \end{verbatim}
58 Now you can start the DHCP server.
59 \begin{verbatim}
60 [jdoe@newskysaw test]$ service dhcpd restart
61 \end{verbatim}
62
63
64 \section{TFTP Setup}
65 After installing the tftp service, enables the tftp by editing the file {\em /etc/xinetd.d/tftp} (which looks like as below), just delete the line {\em disable = yes} in the configure file.
66 \begin{verbatim}
67     service tftp
68     {
69         socket_type             = dgram
70         protocol                = udp
71         wait                    = yes
72         user                    = root
73         server                  = /usr/sbin/in.tftpd
74         server_args             = -s /tftpboot
75         per_source              = 11
76         cps                     = 100 2
77         flags                   = IPv4
78     }
79
80 \end{verbatim}
81 Then copy the Kitten boot images to the tftp boot directory, which typically locates at {\em /tftpboot}:
82 \begin{verbatim}
83 [jdoe@newskysaw test]$ cp your_kitten_path/arch/x86_64/boot/bzImage /tftpboot/bzImage
84 [jdoe@newskysaw test]$ cp your_kitten_path/init_task /tftpboot/init_task
85 \end{verbatim}
86 Now start the TFTP service.
87 \begin{verbatim}
88     service xinetd restart
89 \end{verbatim}
90
91 \section{PXE Configuration}
92 In this step we will set up the PXE booting configuration. 
93 Create the directory {\em pxelinux.cfg} in {\em /tftpboot}.In {\em pxelinux.cfg}, create a new file with the filename as the booting machine's MAC address.
94 \begin{verbatim}
95 [jdoe@newskysaw test]$ cd /tftpboot
96 [jdoe@newskysaw test]$ cd pxelinux.cfg
97 [jdoe@newskysaw test]$ touch 01-00-1b-21-41-cf-4c
98 \end{verbatim}
99 Edit the booting configuration file {\em 01-00-1b-21-41-cf-4c}, make sure replace the kernel image and init image files with yours.
100 \begin{verbatim}
101     default kitten
102     label kitten
103         kernel bzImage
104         append serial.baud=115200 console=serial initrd=init_task
105
106     prompt 1 
107     timeout 20
108 \end{verbatim}
109 Also, you can add more than one booting options.
110 \section{Testing}
111
112 At this point things should be ready to go. Power on the client machine, select network booting. PXE should then go searching for the DHCP server, It will get an IP address and then try to grab (via TFTP) the booting image files. Finally, the kernel should proceed to boot Kitten.
113
114 If the client fails to connect to the PXE server, you should check the firewall settings, make sure to allow the booting client's connection request.
115 \end{document}
116
117
118
119
120