Raspberry Pi For Dummies. McManus Sean

Читать онлайн.
Название Raspberry Pi For Dummies
Автор произведения McManus Sean
Жанр Зарубежная образовательная литература
Серия
Издательство Зарубежная образовательная литература
Год выпуска 0
isbn 9781119412021



Скачать книгу

yet: You queue up the actions you want to carry out and then trigger them all when you’ve finished. (If you can’t set a partition to delete because it has a Key icon beside it, right-click the partition and choose Unmount from the menu that appears.)

      5. Click the unallocated partition and click the Add Partition button (the one on the toolbar that has a picture of a blank page with a plus sign on it).

      The pop-up window, which you can see in the foreground in Figure 2-3, appears.

      6. Click the menu to change the file system to fat32, and then click the Add button.

      Again, this doesn’t take effect yet.

      7. Click the tick (or check mark) button on the toolbar to carry out the actions you’ve queued up – removing the existing partitions and adding a single new FAT32 partition.

       FIGURE 2-3: GParted, running on the Ubuntu desktop.

Copying NOOBS to the SD or MicroSD card

      You should now have a formatted SD or MicroSD card and the .zip file for NOOBS that you downloaded from the Raspberry Pi website. To install NOOBS on the SD or MicroSD card, you simply copy the files inside the .zip file to the card.

      On a Windows PC, double-click the NOOBS .zip file to open it, select all the files in it, and then copy them to the formatted SD card. You can do this by using Ctrl+A to select the files and Ctrl+C to copy them, navigating to the SD card, and then using Ctrl+V to paste them.

      On a Mac, double-click the NOOBS .zip file and you will see a folder containing all the files you need. From the Edit menu, choose Select All and drag all the files onto the SD Card icon on the desktop. It takes about 15 minutes to copy everything across. When it’s finished, eject the SD card by dragging it into the trash can, which has now transformed into an Eject icon.

      On Linux, you can use the desktop environment (where available) to copy the NOOBS files to the SD card. In Ubuntu, you can simply go to the NOOBS .zip file, double-click it to open it, select all the files in it, and drag them to the SD card to copy them across.

      Alternatively, you can follow these steps to unzip and copy the files using the Linux command line:

      1. Remove and reinsert the card so that it mounts automatically.

      2. Open a terminal window.

      You can do this by using Dash Home in Ubuntu, the applications menu in your distribution, or a keyboard shortcut (Ctrl+Alt+T in Ubuntu).

      3. Enter sudo fdisk – l, where the last character is the letter l.

This gives you a list of available disks, as shown in Figure 2-4.

      4. Study this list to find the SD or MicroSD card.

      In Figure 2-4, the screen lists two disks, with the information about each one starting with the word Disk. The file size is usually a good indicator of which is the SD card. The first one (Disk /dev/sda) is 500.1GB, which is a hard drive. The second one (Disk /dev/sdd) is just 7948MB. That’s roughly 8GB, so that’s the SD card. Note the card’s partition name, which in this case is sdd1.

      5. Find out where the card is mounted.

      Use the mount command and search for the directory where the card has been mounted in the file system. In this case, the card’s partition name is sdd1, so enter the following:

      mount | grep – i sdd1

      Figure 2-4 shows the output from this, which tells you where the card is mounted. In this case, it’s mounted on /media/65E8-9564.

      6. Use cd to go to the directory where the card is mounted:

      cd /media/65E8-9564

      7. Unzip the NOOBS download onto the card.

      This NOOBS download was stored in the folder /home/ubuntu/Downloads, so we can unzip it onto the SD card using this command:

      unzip /home/ubuntu/Downloads/NOOBS_v2_3_0.zip

      You can usually type the first couple of characters of each part of the path and then tap the Tab key on the keyboard to have Linux complete it for you, so you don’t have to remember the whole filename. It might take five minutes or so to unzip and copy the files across to the card.

       FIGURE 2-4: A list of available disks.

      Using Your NOOBS Card

      After you have a card with NOOBS on it, you’re ready to set up your Raspberry Pi. In the next chapter, we show you how to connect your Raspberry Pi up, insert the SD or MicroSD card, and finish installing the operating system.

      Flashing an SD or MicroSD card

      If you've got a NOOBS card, you're all set and can proceed to Chapter 3. Some operating systems may not be available through NOOBS, though, including RISC OS, which we cover in Appendix B on this book’s companion website. (At the time of writing, RISC OS is available through NOOBS for the Raspberry Pi 2, but not for the Pi 3.) To create a card for such operating systems, you can't use NOOBS and must instead download the operating system as an image file, and then use a process called flashing your card to convert that single image file into all the files you need on your MicroSD or SD card.

      You can find links to download operating system images at www.raspberrypi.org/downloads. You can also download Raspbian as an image file, if you prefer not to use NOOBS to install it.

      To flash your card (also called burning an image to the card), you can use Etcher, which is available for Windows, Mac and Linux. Download it at https://etcher.io/.

After installing Etcher, run it and you'll see an elegant and simple interface. (See Figure 2-5.) Follow these steps to flash your card:

      1. On the left side of the interface, choose the image file you want to copy to the card.

      Image files sometimes download inside a .zip file, and Etcher can burn those images without you needing to extract them from the .zip file first.

      2. In the central pane, choose the drive that contains the card you want to burn your image to.

      This process will erase the disk you burn to, so check it carefully. It's a sensible precaution to disconnect any drives that you don't currently need connected to avoid the risk of accidentally wiping them.

      3. Click the Flash! button on the right.

      The image file is copied to your card and converted into all the files you’ll need to run your OS.

       FIGURE 2-5: Etcher enables you to burn operating system images to your SD card.

Chapter 3

      Connecting Your Raspberry Pi

      IN THIS CHAPTER

      ❯❯ Inserting the SD or MicroSD card

      ❯❯