1.2: Preparing your Raspberry Pi for Class
- Page ID
- 205330
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)Hypothes.is tag: s2020IOSTc1mod2
Learning Objectives
Students will be able to:
Content
- Install Raspian Buster with Desktop on their RasPi without NOOBs.
- Use the Advanced Packaging Tool to install, upgrade and remove software
- Linux command line arguments
Process
- Install Buster Stretch with Desktop on their RasPi without NOOBs.
- Update and upgrade the Raspbian Operating System
- Set up Headless operation with VNC
Prior Knowledge
- Computer file systems
- Download programs from web repositories.
Further Reading
The general overview of this module is that we are going to download Raspbian Sketch, then create an image of it on the microSD card. Once we have the image we will boot up the Pi in Desktop mode and set up a user profile. Then we will register the Pi to the UALR Wifi, and then set up VNC and connect to it in headless mode
Download Raspbian Buster
To download the latest version of Raspbian go to:
https://www.raspberrypi.org/downloads/raspbian/
There are three options, and we will take the option of Raspbian Buster with desktop and recommended software. If your school allows torrent download that is faster, but most campuses do not allow torrent and so you will need to download the zip file. This may take a couple of hours, and if you are installing in class, you should do the download before coming to class
Preparing your microSD Card
In IOST module 1 you installed all the software on your computer that you need for this task. Place a microSD card into a USB adapter sleeve and then place the USB into a USB port on the computer you set up in IOST module 1.
Format microSD Card
This step will show you how to use the SD Card Formatter to format the microSD card. This will clear all data on the card, and be sure you format the microSD card and not your hard drive!
1. From Start Menu, choose SD Card Formatter (you can click through the windows icon and scroll through the Apps to SD Association, or type in the search menu "sd" and the sd card formatter will autoappear
2. Now that you have the SD Card Formatter open you can go and format your microSD card. Now be sure NOT TO FORMAT the C drive. Figure \(\PageIndex{4}\) shows screenshots of this process.
UnZip Raspbian
You now need to go to the folder you downloaded the Raspbian Zip file to. This is a very large Zip file and WinZip can not handle it, and so you need to use another program like 7-Zip, which you installed in the first module (section 1.1.4). Note, the Zip file was not placed in the default Window's download folder but a folder called Installation files, and in it was a subfolder for Raspbian and in that a subfolder identifying the date it was downloaded. It is probably good practice not to unzip files in the default download folder, but make additional folders that help you organize the material you have downloaded. Many people also tend to delete zip files once downloaded, but you may want to save this one because it took so long to download, which would make it easier in the event you need to transfer it to another computer.
You now have the image of a Disc operating system that you will need to transfer to the micro SD card.
Writing Image to microSD Card
You will now use Win32DiskImager to write the Raspbian Image to your microSD card.
Figure \(\PageIndex{6}\) goes over the steps involved with writing an image of the Raspbian operating system to your Pi.
- Insert USB adaptor into USB port of computer with the downloaded Raspbian image.
- Start Win32DiskImager
- Click the blue icon (step 3.a) and open the unzipped image (step 3.b). Make sure the device is the folder the USB adaptor is attached to (E in figure \(\PageIndex{6}\). Set Hash to None and click write.
- A confirmation window opens and click yes after checking that the device you are writing to is the correct target (E here).
- The image will now be transferred to the microSD card. Note, this may take some time (6:24 minutes in the above figure). Once it is complete you should get a message stating: "Write Successful" and you are now ready to transfer the micro SD card to your Raspberry Pi and start it up.
Starting your Pi the First time
The first time we start the Pi will be in Desktop Mode, where we will set up the preferences and get the system MAC address so that we can remotely access the Pi through VNC. Before we connect the monitor, keyboard and mouse we need to install the microSD card. Figure \(\PageIndex{7}\) shows the correct and incorrect way to install the SD card.
Figure \(\PageIndex{8}\) shows a Pi in desktop mode. Note, the last thing you should connect is the power supply.
Turn the Pi on and you will be taken through a startup menu. Follow the instructions.
Proceed through the setup menu, when you get to update software you should skip it if you are in the class as we do not have time, but do it if you are logged in and doing this from your home. In the next section we will learn how to update the software from the command line, and you can do that from home.
Now that the Pi has been setup you can go to preferences and double check your configuration.
1. Set Country: Choose United States, American English, Chicago (if you are in Little Rock), and click "Use US Keyboard".
Accessing Pi through VNC Viewer
Now that you have your Pi up and running you want to remotely access it (in Headless mode) through VNC viewer, which you installed on your laptop or desktop (section 1.1.6). If you are at UALR you need to do this through the IOT WiFi network (not UALR WiFi or guest WiFi) and to do that you need to register your MAC address, which is covered in section 5.1.
Section 5.3 has instructions for running your Pi in headless mode through VNC and section 5.4 on adjusting the screen resolution.