Skip to content
March 16, 2013 / lasseathome

Kickstarting Raspberry Pi

I recently invested in my first Raspberry Pi device and this is my story of how I it started it the first time. The things that were available:
Raspberry Pi, USB keyboard and mouse, SanDisk SDHC Ultra Secure Digital memory card, a Linux laptop with SD card reader.

  1. Downloaded the disk image from the site http://www.raspberrypi.org/downloads
  2. Unzipped the image file.
  3. Inserted my 8GB flash card, and located it to reside in /dev/mmcblk0p1
  4. Started the shell command line and did my
    > sudo bash
    to get root privileges for doing dd.
  5. Downloaded the image to the flash card (note that the last letter and number for the device need to be removed from that which was identified above).
    > dd bs=1M if=2013-02-09-wheezy-raspbian.img of=/dev/mmcblk0
  6. Inserted the SD card in Raspberry Pi, together with USB keyboard & mouse, HDMI cable.
  7. Started it and configured it with languages, ssh server on, changed the default password, etc.

Wheeha, now it is up and running. This was a really nice piece of thing, so now it is time to do some fun stuff.

Bonus: changing user pi to username

Some other things I did to get rid of the default user “pi” to my normal user “username” (in real life this is something else..). At the console I went to super user mode with “sudo bash”. Then with the nano editor I changed the lines representing the pi-user line in the file /etc/passwd from the first to the second line below (in essence all instances of “pi” were changed to “username”)

pi:x:1000:1000:,,,:/home/pi:/bin/bash
username:x:1000:1000:,,,:/home/username:/bin/bash

In the same way I changed all the occurrences of “pi” to “username” in the files “/etc/sudoers”, “/etc/shadow”, “/etc/gshadow” and “/etc/group”

Then I moved the home directory:

cd /home/
mv pi username
This will give a home directory that is consistent with /etc/passwd after this the Raspberry Pi is ready for reboot.

All these Bonus things are beyond the kickstart. I used them to get a user ID 1000 that agrees between many of my Linux systems.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: