Recipe: 003-Direct Network
Recipe Card
003 : Direct Network Connection
Recipe Files | Ingredients |
---|---|
(flavour)_boot.txt | 003-direct-network_INGREDIENTS.zip |
For the markdown version of this recipe on the Pi-Kitchen GitHub site see:
003-Direct Network Connection.md
Description
This recipe places the direct network connection scripts on to the SD-Card.
See Super Easy Direct Network Connection.
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 sudo ./bin/switchip.sh
Ingredients
The ingredient files should be placed in the following location on the NOOBS RECOVERY partition:
pi-kitchen/003-direct-network
This recipe uses the following files:
direct/cmdline.txt
normal/cmdline.txt
switchip.sh
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:
pi-kitchen/_SETTINGS/003-direct-network
You will need the following _SETTINGS file(s):
internet/cmdline.txt
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 pi-kitchen/003-direct-network
).
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. os/Raspbian
).
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.
[…] Recipe: 001-Direct Network […]
Where do I find internet/cmdline.txt?
Unfortunately on NOOBS based installs, the boot partition isn’t viewable directly from windows, you’ll have to use a linux computer/liveCD to access these files.
You can still use the older method of installing using img files, which makes the boot partition available from windows.