Cause its quite annoying to install Raspbian Jessie Lite manually on your SD card, I made a script which installs Raspbian Jessie Lite on your SD card.
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Install the Skript
Copy the code here: https://pastebin.com/5yCfgE0B
Create a new file named install-lite.sh or something like this and paste the copied code in it.
Save it and make it executable with chmod +x <the files name here>
Step 2: Installation Guide
- Execute the script with sudo ./<your files name here> (If you forgot the sudo you won't be able to execute the script)
- Type in your user password to continue (because of the sudo)
- The available devices will be listed (!!! Beware, that /dev/sda is mostly your hard drive)
- Choose you SD-Card from the list above and type in the name of the disk (without the ending of any partition!)
(e.g.: /dev/mmcblk0 - NOT /dev/mmcblk0p1) and press RETURN
- Type in y and press RETURN to contine. Otherwise you'll exit the script
- Choose a volume label for the SD-Card and press RETURN (If you type in nothing, the name of you SD-Card will be "RJLite" which stands for Raspbian Jessie Lite)
Remember: This is not the hostname of your Raspberry Pi
- If you will asked if you wanna proceed creating an ext4 partition on SD-Card type in y and press RETURN, otherwise the script won't go further and exit
- Now you can choose between:
- An existing Image:
- Type y and RETURN
- All images including raspbian-jessie-lite in their name will be listed to help finding the image
- Type in the path to the image (Autocomplete is enabled!) and RETURN
- The image is going to be written on the SD-Card now
- The image will be downloaded, unzipped and written to the SD-Card
- This could take a while!
- All partitions from SD-Card will be shown in terminal
- Type in the path to boot partition (mostly the first partition like /dev/mmcblk0p1) and RETURN
- Type in the path to root partition (mostly the second partition like /dev/mmcblk0p2) and RETURN
- The partitions will be mounted in /media/<USERNAME>/boot and root.
- The ssh file will be created in boot automatically
- Now you have to setup WIFI
- Choose a hostname and press RETURN (If you type in nothing, the name will be "raspberrypi")
- Type in the Name/SSID of your WIFI and press RETURN
- Type in the passphrase/PSK of you WIFI and press RETURN
- If you want to generate ssh-keys for your Raspberry Pi type in y and press RETURN
- Press RETURN 3 times
- If you want to disable PasswordAuthentication press type in y and press RETURN
- Now remove the SD-Card from your device (the card is unmounted automatically)
- Put the Card in your Raspberry Pi SD port and turn the Raspberry Pi on
- After a while you should be able to connect to without typing in a password
- If it's the first time you will be asked for it if the raspberrypi is a trustable device
- ssh pi@<hostname> or ssh pi@<IP Adress of Raspberry Pi here>
If there are any problems with the script please tell me in the comments or write me a message or an E-Mail
Step 3: Support for OS-X and Windows
Because I'm using Linux I used the bash for coding the script.
I think It'll be a good alternative to install and setup it manual.
So it would be cool if some people could code this for OS-X and Windows, so that this lite tool is available for the most people.
If you need any explanation send me a message or comment below.
Participated in the
Microcontroller Contest 2017