SlideShare a Scribd company logo
1 of 9
Download to read offline
PXE Network Booting the
Raspberry Pi
While developing using Yocto and using a Raspberry Pi 3B+ I
was finding it very inefficient to flash an sd card over again. I
knew I could leverage the bootloader to network boot but I
gladly found out that by using PXE you can network boot
without an sd card. For this you will need:
A device running Linux that supports dnsmasq and nfs
A compatible Raspberry Pi (see following table)
An ethernet connection between the server and the Pi
You can boot multiple Raspberries albeit with some limitations.
For the server I will be using my laptop powered by Arch Linux
.
Raspberry Pi (client) Setup
The following table summarises the support of your device
depending on its model.
Raspberry Pi Model PXE Support/Configuration
Raspberry Pi 1 Follow instructions https://3mdeb.com/app-dev/pxe-server-with-raspberry-pi-1
Raspberry Pi 2 Follow instructions https://blockdev.io/network-booting-a-raspberry-pi-2
Raspberry Pi 3B Follow instructions https://blockdev.io/network-booting-a-raspberry-pi-3/
Raspberry Pi 3B+ Working out of the box
Raspberry Pi 4 TBD, visit https://www.raspberrypi.org/documentation/hardware/raspberrypi/booteeprom.md
Server configuration
Install and configure dnsmasq (for DHCP and TFTP) and nfs:
sudo pacman -S nfs-utils dnsmasq
Create the TFTP and NFS root directories and copy over your
previously built rootfs and boot files.
sudo mkdir -p /srv/nfs
sudo mkdir /srv/tftp
# copy the rootfs
sudo cp -a ${rootfs-directory} /srv/nfs/rootfs
# copy the bootfiles, these are normally the files
you encounter
# in the sdcard boot partition
sudo cp -a ${boofiles-directory} /srv/tftp
Edit cmdline.txt and replace the rootfs parameters with:
root=/dev/nfs
nfsroot=192.168.77.1:/srv/nfs/rootfs,nfsvers=3 rootwait
1
1
2
3
4
5
6
7
1
Configure nfs-server
Example /etc/exports configuration
/srv/nfs
192.168.77.0/24(rw,sync,no_subtree_check,no_root_squash)
Edit /etc/nfs.conf and enable udp, nfsv2 (if needed) and nfsv3
as exemplified:
[nfsd]
udp=y
vers2=y
vers3=y
1
1
2
3
4
Configure dnsmasq
PXE, TFTP and DHCP are handed by dnsmasq. Be sure you
have control over the network and aren't colliding with existing
services. In my case I am using a usb to ethernet converter
hooked up to a switch to which I connect the raspberries.
Example /etc/dnsmasq.conf configuration:
port=0
interface=usb0
dhcp-
range=192.168.77.2,192.168.77.100,255.255.255.0
pxe-service=0,"Raspberry Pi Boot"
log-dhcp
enable-tftp
tftp-root=/srv/tftp
1
2
3
4
5
6
7
Network configuration
Set up your NIC with a static address. If you are using
NetworkManager you have a number of front-ends including
the cli tools nmcli and nmtui, as an example my network
configuration file /etc/NetworkManager/system-
connections/usb0.nmconnection looks like:
[connection]
id=usb0
uuid=eaa72b36-beef-3367-a17c-43d4597b5123
type=ethernet
autoconnect-priority=-100
permissions=
[ethernet]
duplex=half
mac-address=00:B5:6D:0D:B1:47
mac-address-blacklist=
speed=100
[ipv4]
address1=192.168.77.1/24
dns-search=
ignore-auto-routes=true
method=manual
never-default=true
[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=link-local
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Final Steps
Restart the services, check their status to make sure there was
no configuration error and if it doesn't work you can always
fire up wireshark and debug it. If that doesn't help feel free to
leave a comment below.
sudo systemctl restart dnsmasq nfs-server
Limitations
This scheme isn't safe to use with multiple devices without
built-in measures to the rootfs. I am curious if this can be dealt
with server side, let me know in the comments if you have any
idea.
1
References
https://3mdeb.com/app-dev/pxe-server-with-raspberry-pi-1
https://blockdev.io/network-booting-a-raspberry-pi-2
https://blockdev.io/network-booting-a-raspberry-pi-3/
https://www.raspberrypi.org/documentation/hardware/raspberr
https://wiki.archlinux.org/index.php/dnsmasq
https://wiki.archlinux.org/index.php/NFS
https://wiki.archlinux.org/index.php/PXE
https://wiki.archlinux.org/index.php/TFTP
https://wiki.archlinux.org/index.php/Network_configuration#DH
https://wiki.archlinux.org/index.php/NetworkManager

More Related Content

What's hot

NUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline TutorialNUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline TutorialGagah Arifianto
 
Configuration of Smtp Server On CentOS 8
Configuration of Smtp Server On CentOS 8Configuration of Smtp Server On CentOS 8
Configuration of Smtp Server On CentOS 8Kaan Aslandağ
 
Raspberry zero usb in linux
Raspberry zero usb in linuxRaspberry zero usb in linux
Raspberry zero usb in linuxGSHCO
 
Day 5 ubuntu boot camp
Day 5 ubuntu boot campDay 5 ubuntu boot camp
Day 5 ubuntu boot campDarlene Parker
 
Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)Bud Siddhisena
 
Glusterfs session #18 intro to fuse and its trade offs
Glusterfs session #18 intro to fuse and its trade offsGlusterfs session #18 intro to fuse and its trade offs
Glusterfs session #18 intro to fuse and its trade offsPranith Karampuri
 
Configuring the boot menu in ubuntu
Configuring the boot menu in ubuntuConfiguring the boot menu in ubuntu
Configuring the boot menu in ubuntuCOMSATS
 
Linux Common Command
Linux Common CommandLinux Common Command
Linux Common CommandJeff Yang
 
How to mount and unmount filesystem
How to mount and unmount filesystemHow to mount and unmount filesystem
How to mount and unmount filesystemCOMSATS
 
One Page Linux Manual
One Page Linux ManualOne Page Linux Manual
One Page Linux Manualdummy
 
Large Scale Deployment of Linux
Large Scale Deployment of LinuxLarge Scale Deployment of Linux
Large Scale Deployment of LinuxKshitij Agarwal
 
Andresen 8 21 02
Andresen 8 21 02Andresen 8 21 02
Andresen 8 21 02FNian
 

What's hot (20)

Fedora Linux
Fedora LinuxFedora Linux
Fedora Linux
 
NUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline TutorialNUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline Tutorial
 
Linux Command Line
Linux Command LineLinux Command Line
Linux Command Line
 
Configuration of Smtp Server On CentOS 8
Configuration of Smtp Server On CentOS 8Configuration of Smtp Server On CentOS 8
Configuration of Smtp Server On CentOS 8
 
Raspberry zero usb in linux
Raspberry zero usb in linuxRaspberry zero usb in linux
Raspberry zero usb in linux
 
My First BCC
My First BCCMy First BCC
My First BCC
 
Day 5 ubuntu boot camp
Day 5 ubuntu boot campDay 5 ubuntu boot camp
Day 5 ubuntu boot camp
 
FHS
FHSFHS
FHS
 
DDR PC3200
DDR PC3200DDR PC3200
DDR PC3200
 
Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)Recipe of a linux Live CD (archived)
Recipe of a linux Live CD (archived)
 
Glusterfs session #18 intro to fuse and its trade offs
Glusterfs session #18 intro to fuse and its trade offsGlusterfs session #18 intro to fuse and its trade offs
Glusterfs session #18 intro to fuse and its trade offs
 
Configuring the boot menu in ubuntu
Configuring the boot menu in ubuntuConfiguring the boot menu in ubuntu
Configuring the boot menu in ubuntu
 
Linux Common Command
Linux Common CommandLinux Common Command
Linux Common Command
 
How to mount and unmount filesystem
How to mount and unmount filesystemHow to mount and unmount filesystem
How to mount and unmount filesystem
 
DNS (BIND) on CentOS
DNS (BIND) on CentOSDNS (BIND) on CentOS
DNS (BIND) on CentOS
 
Unix for developers
Unix for developersUnix for developers
Unix for developers
 
One Page Linux Manual
One Page Linux ManualOne Page Linux Manual
One Page Linux Manual
 
Sup intro
Sup introSup intro
Sup intro
 
Large Scale Deployment of Linux
Large Scale Deployment of LinuxLarge Scale Deployment of Linux
Large Scale Deployment of Linux
 
Andresen 8 21 02
Andresen 8 21 02Andresen 8 21 02
Andresen 8 21 02
 

Similar to PXE Network Booting The Raspberry Pi

Hands_on_multipath_p1.pdf
Hands_on_multipath_p1.pdfHands_on_multipath_p1.pdf
Hands_on_multipath_p1.pdfHossein Mehrara
 
NFS is an excellent way of sharing files between linux and other unix systems
NFS is an excellent way of sharing files between linux and other unix systemsNFS is an excellent way of sharing files between linux and other unix systems
NFS is an excellent way of sharing files between linux and other unix systemsAshish Mamgain
 
Hadoop installation
Hadoop installationHadoop installation
Hadoop installationAnkit Desai
 
Network File System (NFS)
Network File System (NFS)Network File System (NFS)
Network File System (NFS)abdullah roomi
 
Linux internet server security and configuration tutorial
Linux internet server security and configuration tutorialLinux internet server security and configuration tutorial
Linux internet server security and configuration tutorialannik147
 
Linux network file system (nfs)
Linux   network file system (nfs)Linux   network file system (nfs)
Linux network file system (nfs)Raghu nath
 
Edup wifi for raspberry zero
Edup wifi  for raspberry zeroEdup wifi  for raspberry zero
Edup wifi for raspberry zeroSoheilSabzevari2
 
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google CloudDrupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google CloudDropsolid
 
Free radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmapleFree radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmapleChanaka Lasantha
 
9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_trainingvideos
 
Practical Tips for Novell Cluster Services
Practical Tips for Novell Cluster ServicesPractical Tips for Novell Cluster Services
Practical Tips for Novell Cluster ServicesNovell
 
3. configuring a compute node for nfv
3. configuring a compute node for nfv3. configuring a compute node for nfv
3. configuring a compute node for nfvvideos
 
Managing the system and network connection Linux
Managing the system and network connection LinuxManaging the system and network connection Linux
Managing the system and network connection LinuxShriharsh Shendre
 
Linux Capabilities - eng - v2.1.5, compact
Linux Capabilities - eng - v2.1.5, compactLinux Capabilities - eng - v2.1.5, compact
Linux Capabilities - eng - v2.1.5, compactAlessandro Selli
 

Similar to PXE Network Booting The Raspberry Pi (20)

Hands_on_multipath_p1.pdf
Hands_on_multipath_p1.pdfHands_on_multipath_p1.pdf
Hands_on_multipath_p1.pdf
 
NFS is an excellent way of sharing files between linux and other unix systems
NFS is an excellent way of sharing files between linux and other unix systemsNFS is an excellent way of sharing files between linux and other unix systems
NFS is an excellent way of sharing files between linux and other unix systems
 
Hadoop installation
Hadoop installationHadoop installation
Hadoop installation
 
Network File System (NFS)
Network File System (NFS)Network File System (NFS)
Network File System (NFS)
 
Linux
LinuxLinux
Linux
 
Dev ops
Dev opsDev ops
Dev ops
 
PHP selber bauen
PHP selber bauenPHP selber bauen
PHP selber bauen
 
Linux internet server security and configuration tutorial
Linux internet server security and configuration tutorialLinux internet server security and configuration tutorial
Linux internet server security and configuration tutorial
 
Linux network file system (nfs)
Linux   network file system (nfs)Linux   network file system (nfs)
Linux network file system (nfs)
 
Sun raysetup
Sun raysetupSun raysetup
Sun raysetup
 
Edup wifi for raspberry zero
Edup wifi  for raspberry zeroEdup wifi  for raspberry zero
Edup wifi for raspberry zero
 
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google CloudDrupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
Drupaljam 2017 - Deploying Drupal 8 onto Hosted Kubernetes in Google Cloud
 
Free radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmapleFree radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmaple
 
9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training
 
Bsd routers
Bsd routersBsd routers
Bsd routers
 
Practical Tips for Novell Cluster Services
Practical Tips for Novell Cluster ServicesPractical Tips for Novell Cluster Services
Practical Tips for Novell Cluster Services
 
Nfs
NfsNfs
Nfs
 
3. configuring a compute node for nfv
3. configuring a compute node for nfv3. configuring a compute node for nfv
3. configuring a compute node for nfv
 
Managing the system and network connection Linux
Managing the system and network connection LinuxManaging the system and network connection Linux
Managing the system and network connection Linux
 
Linux Capabilities - eng - v2.1.5, compact
Linux Capabilities - eng - v2.1.5, compactLinux Capabilities - eng - v2.1.5, compact
Linux Capabilities - eng - v2.1.5, compact
 

Recently uploaded

DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsvanyagupta248
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptxrouholahahmadi9876
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...Amil baba
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdfKamal Acharya
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...drmkjayanthikannan
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 

Recently uploaded (20)

DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 

PXE Network Booting The Raspberry Pi

  • 1. PXE Network Booting the Raspberry Pi
  • 2. While developing using Yocto and using a Raspberry Pi 3B+ I was finding it very inefficient to flash an sd card over again. I knew I could leverage the bootloader to network boot but I gladly found out that by using PXE you can network boot without an sd card. For this you will need: A device running Linux that supports dnsmasq and nfs A compatible Raspberry Pi (see following table) An ethernet connection between the server and the Pi You can boot multiple Raspberries albeit with some limitations. For the server I will be using my laptop powered by Arch Linux .
  • 3. Raspberry Pi (client) Setup The following table summarises the support of your device depending on its model. Raspberry Pi Model PXE Support/Configuration Raspberry Pi 1 Follow instructions https://3mdeb.com/app-dev/pxe-server-with-raspberry-pi-1 Raspberry Pi 2 Follow instructions https://blockdev.io/network-booting-a-raspberry-pi-2 Raspberry Pi 3B Follow instructions https://blockdev.io/network-booting-a-raspberry-pi-3/ Raspberry Pi 3B+ Working out of the box Raspberry Pi 4 TBD, visit https://www.raspberrypi.org/documentation/hardware/raspberrypi/booteeprom.md
  • 4. Server configuration Install and configure dnsmasq (for DHCP and TFTP) and nfs: sudo pacman -S nfs-utils dnsmasq Create the TFTP and NFS root directories and copy over your previously built rootfs and boot files. sudo mkdir -p /srv/nfs sudo mkdir /srv/tftp # copy the rootfs sudo cp -a ${rootfs-directory} /srv/nfs/rootfs # copy the bootfiles, these are normally the files you encounter # in the sdcard boot partition sudo cp -a ${boofiles-directory} /srv/tftp Edit cmdline.txt and replace the rootfs parameters with: root=/dev/nfs nfsroot=192.168.77.1:/srv/nfs/rootfs,nfsvers=3 rootwait 1 1 2 3 4 5 6 7 1
  • 5. Configure nfs-server Example /etc/exports configuration /srv/nfs 192.168.77.0/24(rw,sync,no_subtree_check,no_root_squash) Edit /etc/nfs.conf and enable udp, nfsv2 (if needed) and nfsv3 as exemplified: [nfsd] udp=y vers2=y vers3=y 1 1 2 3 4
  • 6. Configure dnsmasq PXE, TFTP and DHCP are handed by dnsmasq. Be sure you have control over the network and aren't colliding with existing services. In my case I am using a usb to ethernet converter hooked up to a switch to which I connect the raspberries. Example /etc/dnsmasq.conf configuration: port=0 interface=usb0 dhcp- range=192.168.77.2,192.168.77.100,255.255.255.0 pxe-service=0,"Raspberry Pi Boot" log-dhcp enable-tftp tftp-root=/srv/tftp 1 2 3 4 5 6 7
  • 7. Network configuration Set up your NIC with a static address. If you are using NetworkManager you have a number of front-ends including the cli tools nmcli and nmtui, as an example my network configuration file /etc/NetworkManager/system- connections/usb0.nmconnection looks like: [connection] id=usb0 uuid=eaa72b36-beef-3367-a17c-43d4597b5123 type=ethernet autoconnect-priority=-100 permissions= [ethernet] duplex=half mac-address=00:B5:6D:0D:B1:47 mac-address-blacklist= speed=100 [ipv4] address1=192.168.77.1/24 dns-search= ignore-auto-routes=true method=manual never-default=true [ipv6] addr-gen-mode=stable-privacy dns-search= method=link-local 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
  • 8. Final Steps Restart the services, check their status to make sure there was no configuration error and if it doesn't work you can always fire up wireshark and debug it. If that doesn't help feel free to leave a comment below. sudo systemctl restart dnsmasq nfs-server Limitations This scheme isn't safe to use with multiple devices without built-in measures to the rootfs. I am curious if this can be dealt with server side, let me know in the comments if you have any idea. 1