Table of Contents
Here’s the way how I installed RASPBIAN JESSIE LITE into Raspberry Pi B+.
I used linux machine for OS, LASPBIAN installation. For Windows and Mac, there are good utilities and it’s easy to install raspbian.
What I Prepared
What I Bought
I bought the following item.
- Raspberry Pi MODEL B (PLUS) & 専用ケ-ス model B+ Case
- Transcend microSDHC card 8GB Class4 (無期限保証) TS8GUSDHC4
Raspberry Pi とケースのセットを買いました。
MicroSDHCカードはもっと容量の小さいものでもよかったのですが、 今後多くの容量が必要になるかもしれないので 8GB のものを選びました。 8GBまでなら値段はさほど変わりません。
Items in My House
Raspberry Pi のセットアップ・使用のために必要になったもので、 既に家にあったものです。
- Monitor + HDMI cable (TV in these days are equipped HDMI port, so you can substitute TV if you have HDMI cable)
- USB keybord
- Micro USB power cable (I substitute smartphone power cable and adapter)
You can get all of them in Amazon.
Install OS into SD Card
Prepare OS
In the page Raspberry Pi Download, follow links and get zip archive of RASPBIAN JESSIE LIGHT. If you want to use desktop environment, choose Raspbian without “LITE”.
Place the zip file at your working directory and extract it.
1 2 3 4 |
cp ~/Downloads/2015-11-21-raspbian-jessie-lite.zip workdir/ cd workdir unzip 2015-11-21-raspbian-jessie-lite.zip # => 2015-11-21-raspbian-jessie-lite.img |
Write OS onto SD Card
Insert your SD card into the computer. And confirm device file of the SD card.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
% sudo fdisk -l Disk /dev/sda: 214.7 GB, 214748364800 bytes 255 heads, 63 sectors/track, 26108 cylinders, total 419430400 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000129e5 Device Boot Start End Blocks Id System /dev/sda1 * 2048 398460927 199229440 83 Linux /dev/sda2 398462974 419428351 10482689 5 Extended /dev/sda5 398462976 419428351 10482688 82 Linux swap / Solaris Disk /dev/sdb: 8026 MB, 8026849280 bytes 224 heads, 16 sectors/track, 4374 cylinders, total 15677440 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdb1 8192 15677439 7834624 b W95 FAT32 |
You can see the device file is /dev/sdb
from “Disk /dev/sdb: 8026 MB”. If it is mounted, unmount it.
Next, let’s write OS image onto the SD card. Wait some minutes for finishing.
1 2 3 4 5 |
% sudo dd bs=4M if=2015-11-21-raspbian-jessie-lite.img of=/dev/sdb 347+1 records in 347+1 records out 1458569216 bytes (1.5 GB) copied, 227.75 s, 6.4 MB/s |
Lastly, execute the following command end exit.
1 |
% sudo sync |
Confirmation
Connect the devices and check.
First, insert the SD card into Raspberry Pi, and connect monitor and keyboard to it.
Turn on the monitor.
Connect Raspberry Pi to power cable, and Raspberry Pi will boot automatically.
Then, login prompt will be shown. And type user “pi”, and password “raspberry” and login.
After logging in, execute sudo shutdown -h now
and wait Raspberry Pi shutdown.
Expand Filesystem
Install Raspbian in the above instruction, the disk space is limited to 2 GB, even if you use 8 GB SD card. Then, let’s expand the filesystem.
Login to the Raspberry Pi, and execute sudo raspi-config
.
1
% sudo raspi-config
Configuration screen appears, and select 1. Expand Filesystem. Raspberry Pi will say "The filesystem will be enlarged upon the next boot".
You can reboot with the command sudo shutdown -r now
. After the rebooting, you can check filesystem size with df
command.