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