PXE » Historique » Version 1
Laurent GUERBY, 16/01/2012 17:13
1 | 1 | Laurent GUERBY | h1. PXE |
---|---|---|---|
2 | 1 | Laurent GUERBY | |
3 | 1 | Laurent GUERBY | PXE permets depuis le BIOS de booter sur le réseau. Il peut servir a installer Linux. |
4 | 1 | Laurent GUERBY | |
5 | 1 | Laurent GUERBY | h2. Notes Mehdi |
6 | 1 | Laurent GUERBY | |
7 | 1 | Laurent GUERBY | Sur la VM dhcp : |
8 | 1 | Laurent GUERBY | |
9 | 1 | Laurent GUERBY | |
10 | 1 | Laurent GUERBY | * j'ai mis les 2 pour PXE |
11 | 1 | Laurent GUERBY | * micro script sur dhcp.ttnn : /tftpboot/update-debian-installer.sh |
12 | 1 | Laurent GUERBY | * pour installer squeeze à ttnn y'a juste à mettre l'ip/mac sur la VM dhcp pour autoriser la machine à installer à utiliser le PXE /etc/dhcp/dhcpd.conf |
13 | 1 | Laurent GUERBY | |
14 | 1 | Laurent GUERBY | <pre> |
15 | 1 | Laurent GUERBY | root@dhcp:~# cat /tftpboot/update-debian-installer.sh |
16 | 1 | Laurent GUERBY | #!/bin/bash |
17 | 1 | Laurent GUERBY | |
18 | 1 | Laurent GUERBY | |
19 | 1 | Laurent GUERBY | cd /tftpboot/ |
20 | 1 | Laurent GUERBY | |
21 | 1 | Laurent GUERBY | rm -rf debian-installer{,.daily} |
22 | 1 | Laurent GUERBY | |
23 | 1 | Laurent GUERBY | # daily |
24 | 1 | Laurent GUERBY | for arch in amd64 i386 ; do |
25 | 1 | Laurent GUERBY | wget "http://d-i.debian.org/daily-images/$arch/daily/netboot/netboot.tar.gz" -O - | tar -xzf - ./debian-installer |
26 | 1 | Laurent GUERBY | done |
27 | 1 | Laurent GUERBY | mv debian-installer{,.daily} |
28 | 1 | Laurent GUERBY | |
29 | 1 | Laurent GUERBY | # stable |
30 | 1 | Laurent GUERBY | for arch in amd64 i386 ; do |
31 | 1 | Laurent GUERBY | wget -r -nH --cut-dirs=8 "ftp://ftp.fr.debian.org/debian/dists/squeeze/main/installer-$arch/current/images/netboot/debian-installer/$arch/" |
32 | 1 | Laurent GUERBY | done |
33 | 1 | Laurent GUERBY | |
34 | 1 | Laurent GUERBY | </pre> |
35 | 1 | Laurent GUERBY | |
36 | 1 | Laurent GUERBY | h2. Notes Laurent GUERBY |
37 | 1 | Laurent GUERBY | |
38 | 1 | Laurent GUERBY | Pour une install avec acces internet wifi et filaire vers le PC a installer |
39 | 1 | Laurent GUERBY | |
40 | 1 | Laurent GUERBY | <pre> |
41 | 1 | Laurent GUERBY | apt-get install tftpd-hpa isc-dhcp-server bind9 |
42 | 1 | Laurent GUERBY | |
43 | 1 | Laurent GUERBY | cd /srv/tftp |
44 | 1 | Laurent GUERBY | wget http://ftp.nl.debian.org/debian/dists/squeeze/main/installer-amd64/current/images/netboot/netboot.tar.gz |
45 | 1 | Laurent GUERBY | tar xfz netboot.tar.gz |
46 | 1 | Laurent GUERBY | #OR# wget http://ftp.nl.debian.org/debian/dists/testing/main/installer-amd64/current/images/netboot/netboot.tar.gz |
47 | 1 | Laurent GUERBY | |
48 | 1 | Laurent GUERBY | # tail -3 /etc/network/interfaces |
49 | 1 | Laurent GUERBY | allow-hotplug eth0 |
50 | 1 | Laurent GUERBY | #NetworkManager#iface eth0 inet dhcp |
51 | 1 | Laurent GUERBY | iface eth0 inet manual |
52 | 1 | Laurent GUERBY | |
53 | 1 | Laurent GUERBY | # tail -1 /etc/default/isc-dhcp-server |
54 | 1 | Laurent GUERBY | INTERFACES="eth0" |
55 | 1 | Laurent GUERBY | # tail /etc/dhcp/dhcpd.conf |
56 | 1 | Laurent GUERBY | subnet 10.0.0.0 netmask 255.255.255.0 { |
57 | 1 | Laurent GUERBY | option routers 10.0.0.5; |
58 | 1 | Laurent GUERBY | option domain-name-servers 10.0.0.5; |
59 | 1 | Laurent GUERBY | range 10.0.0.10 10.0.0.20; |
60 | 1 | Laurent GUERBY | filename "pxelinux.0"; |
61 | 1 | Laurent GUERBY | next-server 10.0.0.5; |
62 | 1 | Laurent GUERBY | } |
63 | 1 | Laurent GUERBY | |
64 | 1 | Laurent GUERBY | ip a add 10.0.0.5/24 dev eth0 |
65 | 1 | Laurent GUERBY | echo 1 > /proc/sys/net/ipv4/ip_forward |
66 | 1 | Laurent GUERBY | iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE |
67 | 1 | Laurent GUERBY | iptables -A FORWARD -i eth0 -o wlan0 -j ACCEPT |
68 | 1 | Laurent GUERBY | #iptables -A INPUT -i eth0 -j ACCEPT |
69 | 1 | Laurent GUERBY | |
70 | 1 | Laurent GUERBY | /etc/init.d/isc-dhcp-server restart |
71 | 1 | Laurent GUERBY | /etc/init.d/bind9 restart |
72 | 1 | Laurent GUERBY | |
73 | 1 | Laurent GUERBY | plug machine on eth0 and boot |
74 | 1 | Laurent GUERBY | </pre> |