-1

So after much searching, trail and error, I was finally able to create a bootable SD card for my RPi2 Model B. Unfortunately, I did it in a way that I did not want to and I wanted to know where I have gone wrong.

I followed this guid and others that were similar but I failed each time. In the end, I used Rpi filler (ivanx.com/ raspberrypi / , aparently I need more than 10 reputation points for more than two links) from a Mac and it worked.

I think Rpi filler worked and the dd command didn't because the partitions weren't labeled. I am suspicious of this because in the RPi boot problems sticky there is a part that says:

Do not leave the Volume Label (Windows) or Card Name (Mac) option blank, as NOOBS sometimes has trouble with empty card name labels.

I know the above quote is specifically for NOOBS but I'm suspicious that the same applies for Raspbian. I wasn't able to put a name on the partitions with the dd command. Whenever the dd command finished, the partitions had a seemingly random name.

If someone could tell me what I am doing wrong, it would be great. Thanks.

4 Answers4

0

I wasn't able to put a name on the partitions with the dd command...If someone could tell me what I am doing wrong

I'll hazard a guess and say because you are trying to apply dd to a partition. If you use dd to copy a Pi SD card image, you copy it to a device, not a partition on a device.

For more explanation of the difference see here and make sure you read through to the bit about "Image Files".

Put another way, the idea that you would be specifying partition names via dd is nonsensical; dd has no concept of partition. It just copies raw blocks from one place to another which makes it simple and bulletproof if the one place and the other place are the right places.

goldilocks
  • 58,859
  • 17
  • 112
  • 227
  • Yeah, sorry, I'm still a noob when it comes to partitions, file systems, and devices and don't know the correct nomenclature.The root of my question is to figure out why when I did dd bs=[4M/1M] if=*raspbian-jessie.img of=/dev/sdd and put the SD card in my RPi, it never worked. – Gabriel Velasco Aug 21 '16 at 13:30
  • Sorry, I should probably mention that I am applying the dd command to the whole card /sdd, not just a partition on the card /sdd# – Gabriel Velasco Aug 21 '16 at 13:43
0

You have NOT told us what YOU ACTUALLY DID. Post the actual commands you used.

NOTE the tutorial is rather vague and talks about /dev/sdd which won't apply to the SD slot in a Mac, and would be glacially slow if you don't use raw disk mode. PS The linked guide is for Linux NOT OS X.

There are lots of tutorials showing how to do this on a Mac. I use the following script (which includes a few checks to minimise the possibility of overwriting something on the Mac).

#!/bin/bash
# script to restore backup to Pi SD card
# 2016-03-28

DSK='disk3'

# Image name (no ext)
IMG='2016-03-12-jessie-minibian'

# Check for sensible disk
export PTYPE=$(diskutil list  /dev/$DSK | awk '/GUID_partition_scheme/ {print $2}; /Apple/ {print $2}; /Windows_NTFS/ {print $2}' )
if [ "$PTYPE" ]; then
    echo "Disk not a SD Card - Contains "$PTYPE
    exit
elif [ ! /dev/$DSK ]; then
    echo "/dev/$DSK not found"
    exit
fi

echo Ensure SD partitions are unmounted!
diskutil unmountDisk /dev/$DSK

# Check if image exists - else try to uncompress
if [ -s $IMG.img ]; then
echo $IMG.img exists
elif [ -s $IMG.img.gz ]; then
echo Uncompressing $IMG.img.gz
echo Ctl+T to show progress!
time  gunzip -k $IMG.img.gz
fi

echo please wait - This takes some time
echo Ctl+T to show progress!
time sudo dd if=$IMG.img of=/dev/r$DSK bs=1m

exit
Milliways
  • 59,890
  • 31
  • 101
  • 209
  • Actually did: dd bs=4M if=*raspbian-jessie.img of=/dev/sdd in linux. <- Didn't work when I stuck in the RPi. I did this through a Linux box.

    When I used a Mac and RPi Filler, it worked. I was wondering why dd did not work.

    – Gabriel Velasco Aug 21 '16 at 13:31
  • were you root? 2) why is there a * after if= or did you know there was only one file that matched that name?
  • – linuxgnuru Dec 13 '16 at 12:43