Setup Raspbian SD Card

Submitted by code_admin on Wed, 07/25/2018 - 10:38

Insturctions are at:
http://elinux.org/RPi_Easy_SD_Card_Setup

Other bad sets:
https://lawrencematthew.wordpress.com/2013/08/04/installing-raspbian-os…

Download image from https://www.raspberrypi.org/downloads/
Download image.

Used this command to find details of image I downloaded:

  1. parted -s ${RASIMG} unit KiB print
  2. parted -s ${RASIMG} unit MiB print

Used GParted to wipe everything from SDCard
Used GParted to create partitions that match the SD Card Image (Using MiB units)
Once created right click and use Manage flags to add the lba flag

Check the SD card looks the same as the image

  1. sudo parted -s /dev/mmcblk0 unit KiB print

Using the KiB units alter the following commands to write to SD card

  1. sudo dd if=${RASIMG} of=/dev/mmcblk0p1 bs=1024 skip=4096 count=64512
  2. sudo dd if=${RASIMG} of=/dev/mmcblk0p2 bs=1024 skip=68608 count=1286144

Once write completes (and it takes a while) use GParted to resize the partition to take the whole of the SD card

Resize partition

Boot, it goes into rasp-config, then resize the filesystem,

Headless config

See Here

RJM Article Type
Quick Reference