Opcode|Hardwaretype|Hardwareaddresslength|Hopcount
TransactionID
Numberofseconds|Flags
ClientIPaddress
YourIPaddress
ServerIPaddress
GatewayIPaddress
Clienthardwareaddress
Serverhostname
Bootfilename
Vendorspecificinfo
1 BOOTREQUEST, Boot request.
2 BOOTREPLY, Boot reply.
Hardware type:
1 Ethernet.
6 IEEE 802.
7 ARCNET.
global:sm= 255.255.255.0:ds=157.171.1.4:gw=157.171.5.10:ht=ethernet:hd=/tftpboot:
client01:tc=global:ha=00:00:C0:12:B1:01:ip=157.151.7.200:bf=client01:
client02:tc=global:ha=00:00:C0:C1:B1:11:ip=157.151.7.201:bf=client02:
Policka:
sm maska podsiete
ds IP adresa DNS serveru
gw IP adresa default gateway
ht Typ hardveru
bf Meno boot suboru
hd Meno adresara v ktorom sa sa nachadza
ha Ethernetova hardverova adresa
ip IP adresa
tc Meno ktoru globalnu sekciu pouzit
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "mydomain.org";
# pre WINS
option netbios-name-servers 192.168.1.1;
host client01 {
hardware ethernet 00:00:D0:C4:24:D6;
fixed-address 192.168.1.9;
filename "/tftpboot/client01";
}
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
range 192.168.1.150 192.168.1.200;
}
DEVICE = eth0
IPADDR = 0.0.0.0
NETMASK = 255.255.255.0
NETWORK =
BROADCAST = 0.0.0.255
GATEWAY = none
ONBOOT = yes
DYNAMIC = dhcp
interface eth0
send dhcp-lease-time 3600;
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name;
require subnet-maska, domain-name-servers;
Opcode
Data
1 RRQ. Read request.
2 WRQ. Write request.
3 DATA. Read or write the next block of data.
4 ACK. Acknowledgment.
5 ERROR. Error message.
6 OACK. Option acknowledgment.
mknbi -linux -a nfsroot=ip_serveru:/export/root/meno_stroja
-i rom -k zImage -o meno_stroja
mknbi -linux -a nfsroot=151.157.1.1:/export/root/client01
-I rom -k zImage -o client01
make bootrom
dd if=image.flo of=/dev/fd0
DEFAULT linux
# Pre ramdisk
APPEND initrd=rootfs.gz root=/dev/ram rw\
ip=192.168.1.2:192.168.1.1:192.168.1.1:255.255.255.0:node1:eth0:off
# Pre NFS
APPEND root=/dev/nfs nfsroot=192.168.1.1:/export/root/node1,rw ip=ip-adresa
option space PXE;
option PXE.mtftp-ip code 1 = ip-address;
option PXE.mtftp-cport code 2 = unsigned integer 16;
option PXE.mtftp-sport code 3 = unsigned integer 16;
option PXE.mtftp-tmout code 4 = unsigned integer 8;
option PXE.mtftp-delay code 5 = unsigned integer 8;
option PXE.discovery-control code 6 = unsigned integer 8;
option PXE.discovery-mcast-addr code 7 = ip-address;
subnet 192.168.1.0 netmask 255.255.255.0 {
class "pxeclients" {
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
option vendor-class-identifier "PXEClient";
vendor-option-space PXE;
option PXE.mtftp-ip 0.0.0.0;
#meno suboru ktory boot ROMka stiahne
filename "pxelinux.0";
#meno serveru odkial ho dostane
next-server 192.168.1.1;
}
host node1 {
hardware ethernet fe:ed:fa:ce:de:ad;
fixed-address 192.168.1.2;
}
}
}
Dolezita je volba: PXE.mtftp-ip(1) | http://hobbes.jct.ac.il/docs/Diskless-HOWTO.html |
---|---|
(2) | http://frank.harvard.edu/~coldwell/diskless/ |
(3) | http://www.linux-mag.com/2000-04/networknirvana_01.html |
(4) | http://www.networksorcery.com/enp/protocol/bootp.htm |
[RFC 951] BOOTSTRAP PROTOCOL (BOOTP) | |
[RFC 1534] Interoperation Between DHCP and BOOTP | |
[RFC 2132] DHCP Options and BOOTP Vendor Extensions | |
(5) | http://www.networksorcery.com/enp/protocol/dhcp.htm |
[RFC 2131] Dynamic Host Configuration Protocol. | |
(6) | HOWTO dokumentacia: |
http://www.tldp.org | |
Diskless-HOWTO zamerany na Etherboot and Netboot | |
Diskless-root-NFS-HOWTO | |
Diskless-root-NFS-other-HOWTO | |
Remote-boot-mini-HOWTO | |
Network-Boot-HOWTO | |
PXE using etherboot: HOWTO |