drmacro
Posts: 37
Joined: Tue Mar 08, 2016 4:26 pm

Raspbian SD card image

Mon Apr 24, 2017 11:21 pm

I use the following on ubuntu to get a raspbian image to an sd card:

sudo dd bs=4M if=2017-04-10-raspbian-jessie.img of=/dev/sdc

Works fine unless I'm using a new sd card. In that case, it works the second time.

After the first time there the usual 4G root partition with home, bin, etc, root, ... and a partition with the rest of the sd card, but no boot partition.

The second time there is a ~20M boot and a 4G root partition, and the rest of the drive is not partitioned until after raspbian boots and expands root.

What's up with the first dd command?

Regards,
Mac

ghans
Posts: 7874
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Raspbian SD card image

Tue Apr 25, 2017 6:56 am

Did you try physically ejecting the card after each dd invocation ?

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

jahboater
Posts: 4761
Joined: Wed Feb 04, 2015 6:38 pm

Re: Raspbian SD card image

Tue Apr 25, 2017 7:24 am

Also try typing "sync" before ejecting the card.

drmacro
Posts: 37
Joined: Tue Mar 08, 2016 4:26 pm

Re: Raspbian SD card image

Tue Apr 25, 2017 2:32 pm

I use sync after the write by default. Doesn't make any difference.

And physically ejecting makes no difference.

I suspect it has something to do with the partition table before the dd command. But it is whatever Sandisk ships from the factory.

fruitoftheloom
Posts: 20900
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Raspbian SD card image

Tue Apr 25, 2017 2:45 pm

drmacro wrote:I use the following on ubuntu to get a raspbian image to an sd card:

sudo dd bs=4M if=2017-04-10-raspbian-jessie.img of=/dev/sdc

Works fine unless I'm using a new sd card. In that case, it works the second time.

After the first time there the usual 4G root partition with home, bin, etc, root, ... and a partition with the rest of the sd card, but no boot partition.

The second time there is a ~20M boot and a 4G root partition, and the rest of the drive is not partitioned until after raspbian boots and expands root.

What's up with the first dd command?

Regards,
Mac
Maybe try Etcher: https://etcher.io

FYI DD erases all partitions & existing data on SD Card.
Retired disgracefully.....

Return to “Advanced users”