William Vaughn

Formatting and reinstalling raspian on Raspberry Pi 3

I am repurposing one of my Raspberry Pi’s and need to format the microSD card. I did this from my arch linux laptop.

Formatting the disk with parted

I started from the official Raspberry Pi Install Docs and that eventually linked me out to this blog by Norman Dunbar. I looked through it but decided to follow this guide using parted to format the disk from the command line. I came back to Norman Dunbar’s blog later on for instructions on loading NOOBS onto the microSD in prep for installing raspian.

# parted /dev/sda --script -- mklabel msdos
# parted /dev/sda --script -- mkpart primary fat32 1MiB 100%
# mkfs.vfat -F32 /dev/sda1
# parted /dev/sda print
Model: Generic- SD/MMC (scsi)
Disk /dev/sda: 31.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  31.9GB  31.9GB  primary  fat32        lba

Loading an Image onto the microSD

I looked into the official instructions for installing boot images onto the microSD here. Those instructions are complicated and involve using dd a whole lot. I decided I really don’t want to brick my laptop and I should use NOOBs. The Raspberry Pi docs link to this blog by Norman Dunbar for loading NOOBs onto the disk, it’s pretty easy.

Verify the sha1 of the downloaded NOOBS zip is the same as the one on the downloads page.

$ sha1sum ~/Downloads/NOOBS_v3_4_0.zip

Find where the disk is mounted.

$ mount | grep -i sda

For me, this informed me that I needed to go here to extract the NOOBS zip.

$ cd /run/media/nackjicholson/571C-B47B
$ unzip ~/Downloads/NOOBS_v3_4_0.zip
$ cd ~

Unmounting the disk.

# unmount /dev/sda

Done! This microSD is ready for the pi.

Installing Raspian with NOOBS

Start up the Raspberry Pi 3 with the NOOBS disk, follow the easy to use application to install an OS.