StrawberryRho
Posts: 4
Joined: Thu Aug 13, 2015 9:19 am

Headless setup

Thu Aug 13, 2015 9:30 am

Hi

I try to do a headless setup of a Raspberry pi from an Archlinux machine. I downloaded the Raspbian image from the official website and use this command

Code: Select all

dd bs=4M if=2015-05-05-raspbian-wheezy.img of=/dev/sdc
That seems to work fine, at least it takes a while and the SD card blinks as if data is written onto it. Once I've issued this command, I cannot mount the SD card anymore and the only way I found to access it is to destroy the partition table and the master boot record of the SD card. But for all I know, that might be fine. So I tried to insert the SD card into a raspberry pi Model B+ V1.2. It does not get assigned an IP, so I think something went wrong with writing the image onto the SD card. When I start the Raspberry Pi, the ACT LED is green and the PWR LED is red, no matter if I have the SD card inserted or not. I'd expect to see some more LED's flashing up if reading from the SD card would succeed.

What might have gone wrong here?

All help is much appreciated.

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Headless setup

Thu Aug 13, 2015 10:34 am

try a other SD card,
because after burning the Raspbian image to a SD card you can read
from any system the SD card vfat /boot/ partition (56MB?)
even the rest you should be able to mount from your linux system

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Headless setup

Thu Aug 13, 2015 10:39 am

If this is your first (or second or third) time setting up a Pi, you really should get K, V, and M connected so that you can see what's going on.

While it is theoretically possible to do a "headless" setup as the first time out of the gate, the odds are against you for getting everything right the first time.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

StrawberryRho
Posts: 4
Joined: Thu Aug 13, 2015 9:19 am

Re: Headless setup

Thu Aug 13, 2015 11:48 am

Hi

Thanks for the help.

I have only one SD card and it's a new one, so I don't think that's the issue here. And after destroying partition table and master boot record (not sure if both was needed), I can easily mount it again. I will test it with another SD card if I find a cheap one.

I'm not sure what's meant by K, V and M, but I suspect that K stands for Keyboard and M for Monitor. Could also be a mouse. Anyway, I don't have these things and it should be possible to do a headless setup. Further I don't understand what you mean by "getting everything right the first time". The setup, as described by numerous tutorials online, is quite easy...

But I guess that the way I'm setting it up is not obviously faulty, so I'll continue trying.

User avatar
rpdom
Posts: 17275
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Headless setup

Thu Aug 13, 2015 11:57 am

StrawberryRho wrote:I'm not sure what's meant by K, V and M, but I suspect that K stands for Keyboard and M for Monitor. Could also be a mouse.
The usual trio is Keyboard, Video and Mouse.

I mostly run headless. For initial setup I put the card in a reader in a Linux system and sort out all the settings on there first.

I've hardly ever used a mouse with a Pi. I have a TV connected to one, which gets used fairly often to play videos on (controlled via ssh), and a monitor connected to two others (one via HDMI->DVI-D, one via Gert's VGA666-> VGA) which never gets switched on

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: Headless setup

Thu Aug 13, 2015 12:37 pm

Even though the SD card may be brand new, it could still be at fault. Buy a different 4 GB one (they're not that much) and try again.

Also worth trying is a different laptop, as some builtin SD card readers don't work very well for writing the image.
There are 10 types of people: those who understand binary and those who don't.

StrawberryRho
Posts: 4
Joined: Thu Aug 13, 2015 9:19 am

Re: Headless setup

Thu Aug 13, 2015 2:54 pm

Well, thanks for all the help, but I'd rather understand the issue than work around it by buying various new things.

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Headless setup

Thu Aug 13, 2015 3:12 pm

StrawberryRho wrote:Well, thanks for all the help, but I'd rather understand the issue than work around it by buying various new things.
A Raspberry Pi can only perform an initial boot by reading the required files from a FAT-formatted partition on a (micro)SD card.

Most Operating Systems - including all desktop/laptop versions of Windows that I know about - know how to mount and access files on a FAT partition.

It follows - I think - that if you cannot see any files on your prepared SD card then the RPi will not be able to boot from it. In turn, I think that indicates that your (micro)SD card has not been prepared correctly. That might be due to a fault in the SD card, a fault in the card reader/writer that you are using, or something wrong in the way you are writing the card.

I agree, it is possible to carry out an initial installation of Raspbian entirely without any local peripherals attached to the RPi. The trouble is, as you have discovered, when it does not work you have little 'leverage' to try to debug the situation.

JumpZero
Posts: 1137
Joined: Thu Mar 28, 2013 7:35 pm
Location: 127.0.0.1

Re: Headless setup

Thu Aug 13, 2015 4:00 pm

StrawberryRho wrote: Once I've issued this command, I cannot mount the SD card anymore and the only way I found to access it is to destroy the partition table and the master boot record of the SD card.
Do you wait until the command (dd) finishes? dd takes several minutes and issues a success message at the end (telling how many block were written).
--
Jmp0

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Headless setup

Thu Aug 13, 2015 4:03 pm

JumpZero wrote:
StrawberryRho wrote: Once I've issued this command, I cannot mount the SD card anymore and the only way I found to access it is to destroy the partition table and the master boot record of the SD card.
Do you wait until the command (dd) finishes? dd takes several minutes and issues a success message at the end (telling how many block were written).
--
Jmp0
And don't forget to:

Code: Select all

sync;sync;sync
before removing the card.

I think people tend to forget this piece of 20th Century advice, but it can matter. I have had instances where I didn't do it, and the card didn't get written right.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

StrawberryRho
Posts: 4
Joined: Thu Aug 13, 2015 9:19 am

Re: Headless setup

Fri Aug 14, 2015 7:47 pm

It works now!

It's a bit embarrassing but I still don't know what caused the problem, since I did it exactly the same as before. I suspect that something went wrong while downloading the file, I haven't checked the MD5 checksum. This is very unlikely but I don't have a better explanation why it didn't work the first time.

Thank you all guys for the helpful suggestions!

Return to “Troubleshooting”