Raspberry Pi Lab

Tag: dd

Create A Baseline Image

by on Dec.30, 2013, under Installation

sd-cardNow that you have installed the stock image, configured the video, set-up the WiFi, and updated the system, it it time to do a baseline image of your new, working system.

By making your own image, you will be able to re-flash your SD card back to this current state at some point in the future.  Like, for example, if your file systems gets corrupted.

To do this you need to…

  • Properly shutdown your Rpi.  Run ‘sudo shutdown now -h‘.  The ‘h’ means halt.
  • Remove the SD card from the RPi and mount it on your Linux PC.
  • Determine the device id of the SD card.  ‘sudo fdisk -l‘.   NOT the mounted partition.  For example.  My device is /dev/mmcbkl0 but mounted partitions are /dev/mmcblk0p1 and /dev/mmcblk0p2.  You want ONLY the device.
  • Now we’ll make an image of the card… sudo dd bs=1M if=/dev/mmcblk0 of=/home/myhomedir/imagename.img
  • sudo sync
  • Remove the card, replace it in the RPi and boot up.

NOTE:  This will take quite some time to complete.  The dd command displays absolutely no indication that it is working and may appear frozen.  Be patient.

NOTE II:  The stock Occidentalis image is only 2.6Gb.  But your image, if you followed all the steps I have outlined in my previous articles, will be the full size of your SD card.  In my case, that is 8Gb.

 

Leave a Comment :, , , , , more...

Installing Occidentalis

by on Dec.26, 2013, under Installation

First step is to download the latest version of Occidentalis here.

The download page states that an SD Card of at least 4Gb will be necessary to install the Occidentalis image.  No problem.  I have a couple of 8gb SD cards and a 4Gb card.  Since this is my first install and I don’t know how much additional space I’ll need.  I’m going to go ahead a chose the smaller, 4Gb card.

tux-transparentNext, I’ll follow the install instructions found here.  These are  instructions for Raspbian Wheezy, but they should work to get my Occidentalis up and running.

Ok, so the “instructions” on that page are a bit, shall we say, wordy.  Here is what I did to get the SD card imaged.  I’ve already downloaded Occidentalis and extracted the archive to the HDD on my laptop.

1.  Mount the SD card on my laptop.

2. Determine the disk. NOT the partition.  Using the ‘sudo fdisk -l’ command I was able to determine that my 4Gb SD card is ‘/dev/mmcblk0’.  This will be different on your computer.

3. Next I’ll write the image to the disk using the ‘dd’ command.  Like this…’sudo dd bs=1M if=<your image file>.img of=/dev/<disk# from step 2>’.

Note… You will see that my dd command had a capital M in the ‘bs-1M’ parameter. There is no lower case m as a byte multiplier in dd.  See ‘man dd’ for more details.

Also note… The dd command gives absolutely no indication of it’s progress and can appear frozen.  Be patient.  This process could take several minutes.  Fortunately, my SD card reader has an activity LED, so I knew it was working.  Like I said… patience.

4.  Run the command ‘sudo sync’.  This will flush the write cache and unmount the SD card.  It is now safe to remove the card.

5.  I re-inserted the SD card.  Two partitions were mounted and appeared healthy  Of course, I issued the ‘sudo sync’ again before removeing the card.

6.  Put the card in the Rpi and it should work.  That is according to all the instructions.  It didn’t work for me and that will be the topic of my next article.

 

 

 

 

 

Leave a Comment :, , , more...

Archives

All entries, chronologically...

Our Partners

Please take a minute to visit our partners

Looking for something?

Search the Site

If you can't find what you are looking for, please leave a comment somewhere, subscribe to our feed and hopefully your question will be answered shortly, so please visit again!