0

I'm trying to install an SD card with the jessie image for my Raspberry Pi 3 that will work in remote (without screen). The card is formated in FAT32 with gparted (I use Xubuntu).

My problem is that usb-creator-gtk returns an error "Unable to write image to disk" when I want to install the 2016-03-18-raspbian-jessie.img.

If I try with unetbootin it ends well and file seems to be copied properly but as you can see there are only 5 files included one ubninit of 4Go. It seems that only one partition of the image file is writen to the disk but the other partition remains an archive. When I insert the card in my Pi 3 the led indicator is red (no blinking, no green).

vivaldi@vivaldi-SATELLITE-C670-11X:~/Téléchargements$ ll /mnt/sdb1
total 3939456
drwxr-xr-x 2 root root       4096 janv.  1  1970 ./
drwxr-xr-x 5 root root       4096 avril 18 14:53 ../
-r-xr-xr-x 1 root root      32768 avril 18 16:11 ldlinux.sys*
-rwxr-xr-x 1 root root      55012 avril 18 16:11 menu.c32*
-rwxr-xr-x 1 root root        145 avril 18 16:11 syslinux.cfg*
-rwxr-xr-x 1 root root 4033871872 avril 18 16:11 ubninit*
-rwxr-xr-x 1 root root      26140 avril 18 16:02 ubnkern*

Last, I try with :

dd if=2016-03-18-raspbian-jessie.img of=/dev/sdb1 bs=4M
dd bs=4M if=/dev/sdb1 of=from-sd-card.img
truncate --reference 2016-03-18-raspbian-jessie.img from-sd-card.img
diff -s from-sd-card.img 2016-03-18-raspbian-jessie.img

dd returns no error and diff report that the files are identical but my problem is that I'm unable to mount the card after this to check the data are copied properly :

vivaldi@vivaldi-SATELLITE-C670-11X:~/Téléchargements$ fdisk -l /dev/sdb1
Impossible d'ouvrir /dev/sdb1

I use fdisk -l to find start block in order to mount with the -o offset=xxxx option.

My second problem is that the LED indicator is red on when I insert the SD card in the Pi 3, which mean it cannot find the boot loader.

I have no idea what to do now, what could be the reason for all these failures ?

Thank you,

Manicore
  • 103
  • 4
  • Just follow the guide: https://www.raspberrypi.org/documentation/installation/installing-images/linux.md . Then boot it , connect lan cable and try to ping. Should it works. – Huczu Apr 18 '16 at 14:29
  • But led indicator is red, that means the boot loader is not found and/or the Raspberry Pi cannot find a valid image on the SD card. – Manicore Apr 18 '16 at 14:33
  • It means that you didn't follow the guide. Don't worry about sd card. After writing using dd you will have 2 partitions. FAT32 and EXT4. FAT32 has near 60MB and got config&kernel files, rest is OS. – Huczu Apr 18 '16 at 14:41
  • 1
    What is it you are trying to do? Install the jessie image? If it works on the pi, it is correct, and it sounds like your question is something about how to view the partitions somewhere else. *But if you are trying to create a custom image*, I can give you an answer, but I will not bother typing it out until you make it clear what you are trying to do. – goldilocks Apr 18 '16 at 15:15
  • @goldilocks Hi, I'm trying to install the SD card with the jessie image, it's my first installation. – Manicore Apr 18 '16 at 15:17
  • @Huczu I follow the guide until the end and complet the installation with `truncate` and `diff`, but still the LED indicator is red on and `gparted` doesn't see any partition on SD card after all this. – Manicore Apr 18 '16 at 15:21

1 Answers1

1

dd if=2016-03-18-raspbian-jessie.img of=/dev/sdb1 bs=2M

Look carefully at this part:

of=/dev/sdb1
        ^^^^

That's not a block device. That's a data partition. The jessie image is not a filesystem. It is a block device image, including the MBR (i.e., device formatting) and two partitions. If you want to look inside the image partitions, see here. If you want to write the image to an SD device properly, refer to the device, not a partition on the device.

dd if=2016-03-18-raspbian-jessie.img of=/dev/sdb bs=2M
                                             ^^^

Using dd is by far the simplest, least error prone method available. If you have a system which has a functional version (such as GNU/Linux or OSX), then use it. Don't bother with any of the other goofy things involving zany GUI installers.

goldilocks
  • 56,430
  • 17
  • 109
  • 217