Installing Raspbian

August 14th, 2013 Categories: Ultimate Raspbian

We are going to install the stock Raspbian distribution in the flash drive and SD. Download the latest version of Raspbian wheezy from here.

  1. Unzip the .zip file and dump it to the flash drive.
    • Windows: Use Win32 diskimager
    • Linux: Dump with dd command to SD card. Complete instruction:
      sudo dd if=image.img of=/dev/sdX
      where sdX is the flash drive. Be sure of not confusing it with other storage device as the main hard disk drive. If you only have one disk, the first one will be sda, so the flash drive should be sdb. If you are still unsure I recommend you to see this link where I explain different ways to know which /dev/sdX corresponds with the inserted flash drive.
  2. Now we’ll have in the flash drive two partitions: fat32 with the boot and ext4 with the operating system. Copy the content of the fat32 partition to a folder in your pc.
  3. Remove the fat32 partition from the flash drive and resize the ext4 one.
    • Windows: Paragon Partition Manager. When installing the program you’ll be asked for a product key and serial number that you will get registering for free at the website.
    • Linux: Gparted or another partition manager.
  4. Since the boot size is only 40MB, we can use the rest of the SD as warehouse. Create a fat32 partition with 100MB and set the rest as ext4.
    • Windows: Paragon Partition Manager. This program doesn’t allow to create ext4 partitions, so the warehouse will be FAT32.
    • Linux: Gparted or another partition manager.
  5. Copy the content of the fat32 partition that was in the flash drive (it’s in a folder in your pc) to the fat32 at the SD card.
  6. Finally we’ll have the partitions like this: SD:[FAT32][EXT4] and Flash drive:[EXT4]
  7. Edit the cmdline.txt file of the fat32 partition from the SD, setting root=/dev/sda2 like this:
    dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/sda2 rootfstype=ext4 elevator=deadline rootwait
    Explanation: Raspberry Pi needs a SD card in order to boot, it’ll look for the boot there, but it must look for the operating system in the flash drive. Usually it redirects to mmcblk0p2, that’s the second partition of the SD, where the operating system should be, but we change it to sda2 in order to redirect it to the partition 2 of the first storage device inserted. Actually there’s only one partition in the pendrive, but when we edited the partitions, we left as “sdb2” the remaining partition (it’s called sdb at the pc because there was another one called sda, but it’ll be called sda in the raspberry, not sdb).

Videotutorials for Linux and Windows.

Next step: Raspbian first boot

Tags: , , , , , ,

5 Responses to “Installing Raspbian”

  1. Eigiem
    March 3rd, 2015 at 12:19
    1

    Muy buenas. Al abrir el archivo cmdline.txt, la línea que me aparece es:
    dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/sdb2mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
    ¿Debo poner la misma linea que me aparece en la guía y en el vídeo o con cambiar “mmcblk0p2” por “sda2” sería suficiente?
    Voy a probar a ver como funciona 🙂

    • Eigiem
      March 3rd, 2015 at 12:48
      2

      Comprobado. He tenido que poner la línea entera de la guía sino no lee del USB 😉

  2. Eigiem
    March 3rd, 2015 at 12:47
    3

    Comprobado. He tenido que poner la línea entera de la guía sino no lee del USB 😉

    • cerb
      June 3rd, 2015 at 21:02
      4

      Me alegro de que te funcionara 🙂

  3. Barry Anderson
    November 4th, 2015 at 22:43
    5

    I am extremely new to Raspberry PI and want to install UltimateRaspbian, do I install Raspian first before I can install UltimateRaspbian?

Leave a Comment

Solve this *