Skip to content
Mark Van den Borre edited this page Feb 25, 2014 · 45 revisions

How to install spreadpi onto your raspberry pi

  • First, do realise that spreads and spreadpi are both work in progress! They are not yet ready for general public use. That said, by all means, do experiment with spreadpi!
  • Choose an SD card.
    • Make sure it's the fastest and the most reliable you can get. If it's not class 10, don't even think about using it. Buy a well known brand of card from a reputable shop.
    • In terms of size, 2Gb is enough for testing. You probably want more space for production diybookscanner use.
  • Get a spreadpi image to flash onto your SD card.
    wget http://buildbot.diybookscanner.eu/spreadpi_git%403f01918_8627.img.gz
  • Unzip the spreadpi image.
    gunzip spreadpi_git@3f01918_8627.img.gz
  • Check your computer's local storage.
    mount
  • Insert your SD card into your sd card reader. Now check again.
    mount
    .
  • What was the difference? You should have one extra line of output saying something like:
/dev/mmcblk0 on /media/usb0 type ext4 (rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered)

In this example, the "/dev/mmcblk0" is how your computer refers to your SD card. This could be different on your machine!

  • Flash your spreadpi image to your SD card.
    sudo dd if=spreadpi_git@3f01918_8627.img of=/dev/mmcblk0
  • Insert your spreadpi SD card into your raspberry pi.
  • Plug your pi into the local network. Make sure you have your linux machine also connected by cable to the local network.
  • Boot your raspberry pi.
  • Now we'll try to find out the ip address of your pi.
  • On your linux machine, install a network mapper.
    sudo apt-get install nmap
  • Now let's check our linux machine's ip address.
    /sbin/ifconfig|grep -A1 eth0
    wlan0     Link encap:Ethernet  HWaddr 00:27:10:bb:e2:f1
    inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
    .
  • Aha! Nmap can find the raspberry pi on your local network.
    sudo nmap -p22 192.168.1.101/24|grep -B4 Raspberry
    Nmap scan report for 192.168.1.1
    Host is up (0.0018s latency).
    PORT   STATE  SERVICE
    22/tcp open ssh
    MAC Address: B8:27:EB:4C:00:00 (Raspberry Pi Foundation)

Mounting a spreadpi .img file

  • losetup /dev/loop0 image.img
  • kpartx -a /dev/loop0
  • mount /dev/mapper/loop0p2 /mnt/test/
  • <To mount the boot partition,
    mount /dev/mapper/loop0p1
Clone this wiki locally