Recipe: 003-Direct Network
003 : Direct Network Connection
For the markdown version of this recipe on the Pi-Kitchen GitHub site see:
This recipe places the direct network connection scripts on to the SD-Card.
The cmdline.txt allows you to specify the IP address of the Raspberry Pi on boot.
This allows you to setup an IP address suitable for a direct network link (using a single network cable to a PC or laptop).
The resulting connection is just like a normal network so you can share files using SMB and remote connect using SSH, as well as use X-Forwarding to remotely run graphical programs (or use VNC).
The direct connection IP address is set to 169.254.69.69
How to use
Enable/Disable by running
The ingredient files should be placed in the following location on the NOOBS RECOVERY partition:
This recipe uses the following files:
Plus the following files in the _SETTINGS folder:
It is assumed that the following file(s) are placed in the following location on the NOOBS RECOVERY partition:
You will need the following _SETTINGS file(s):
NOTE: Files which are configured manually or may contain sensitive information are placed in the _SETTTINGS directory on the SD-Card. This is so that it is easier to support different configurations and remove sensitive information from the setup if needed.
Perform the following actions:
Ensure you update cmdline.internet with the PC’s IP address as the gateway.
You can download all the ingredient files, and extracted directly to the NOOBS SD-Card (ensuring you remove the ZIP file’s name from the directory – the files should be extracted to
The Recipe Files
Each recipe will use one file for each of the partitions it installs to – boot, root and data).
You will need to suitably rename or copy the content of each of the following files into your recipe files (i.e.
RaspbianPiKitchen_root.txt) and place them in your os folder in the NOOBS partition (i.e.
For more information see the Pi-Kitchen: Creating Flavours guide.
# #Recipe: 001-direct-network #Configure the boot settings: #-- Only one cmdline.txt file should be applied at any one time (only comment one out) #- Direct network settings - for direct connections with a PC using just a network cable ../../pi-kitchen/001-direct-network/direct/cmdline.txt #- Normal network settings - for normal use with a standard home network #../../pi-kitchen/001-direct-network/normal/cmdline.txt #- Internet Connection Sharing requires specific settings for you own network so stored in _SETTINGS #../../pi-kitchen/_SETTINGS/001-direct-network/internet/cmdline.txt # #Add switchip files: ../../pi-kitchen/001-direct-network/direct/cmdline.txt /network/direct ../../pi-kitchen/001-direct-network/normal/cmdline.txt /network/normal ../../pi-kitchen/_SETTINGS/001-direct-network/internet/cmdline.txt /network/internet
# #Recipe: 001-direct-network #Add switchip files: #- switchip.sh should be set as executable ../../pi-kitchen/001-direct-network/switchip.sh /home/pi/bin +x
Enjoy baking your Raspberry Pi SD-Card fresh from the Pi-Kitchen.