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