Installing OS - headlessly (no display device)

11 posts
by jayachar » Fri Aug 16, 2013 3:24 pm
Is there a way to do Raspbian (or another distro) installation without any display device attached ? Note that, my question is not about running the OS headless, which I think Pidora already supports (perhaps, even Raspbian), but about the initial installation and configuration.

Reason is that I neither have a TV, nor a HDMI capable display device. Only a VGA CRT monitor. I have already placed an order for a HDMI-VGA active converter, but it is going to be a while (3 weeks or so) before I can lay my hands on it. I have also ordered a EasyCap USB2.0 capture-device (found it after ordering the HDMI-VGA active converter), which takes RCA video input. It was pretty inexpensive, and impulsively bought it, since it was from a local seller in eBay, and hopefully I'd receive it within next 4-5 days. Of course, I've no idea if I'd do the job of acting as a display for my RaspberryPi.

However, the urge to do something with RaspberryPi is extremely high :-) !! So I was wondering if something like this is possible (hopefully with Raspbian, since I already have the image being downloaded):

1. Hopefully, Raspbian default installation is DHCP enabled, and it permits a "headless" initial bootup. My home ADSL router, assigns it an IP-address successfully. I can check from the router admin page what this IP-adderess is!
2. Login to the Raspbian over the IP-address found out in previous step, over telnet / ssh, from my PC.
3. Install vncserver, configure it to survive reboots
4. Connect using vnc-client from my PC, and thus avoid a display device directly (physically) connected to RaspberryPi

BTW, by "headless", should I assume without "display device" (HDMI / analog-RCA), or without keyboard & mouse as well ?

Would be good to see if anyone has tried this, or similar steps and can share their experiences.


PS> I am an engineer from Bangalore, India - with several ideas of what I might like to do with RaspberryPi in my spare time.
Posts: 6
Joined: Fri Aug 16, 2013 2:37 pm
by klricks » Sat Aug 17, 2013 12:09 am
I don't know if you can get the NOOBS setup headless. To me headless means network connection (WIFI or wired) with nothing else connected. NOOBS requires interaction, asks you which OS you want to install etc.
You may want to try the raw image Raspbian instead. The images are DHCP enabled. The Pidora image even flashes an LED at bootup to tell you what the IP is.

I prefer to set my router up for IP to MAC address reservation so that the RPi always gets the same IP and there is no config needed on the RPi.

FYI - The better HDMI to VGA converters have there own external power supply.

I don't think the capture device is going to work at all on the RPi. It's meant to capture video from a camera, VCR/DVD player or TV, and save the video to files on your computer.
Go here for my RPi writeup. Basic config, Serial Port add-on etc: Click web icon on right side --->
Posts: 4356
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
by aTao » Sat Aug 17, 2013 12:21 am
What I did, and I think this is "normal" was use a separate computer (the one that you use to communicate with a headless RPi) to download an image and flash an SD card, plug that into the RPi and there it was, all running headless and ready to rock, DHCP enabled, SSH enabled.
Distro is Raspbian.
User avatar
Posts: 1053
Joined: Wed Dec 12, 2012 10:41 am
Location: Howlin Eigg
by jayachar » Sat Aug 17, 2013 4:42 am
Thanks @klricks and @aTao.

Found what I was looking for here in these links:

In summary it is possible. However, quite another matter that, either my SDcard or my RaspPi is busted, unless the downloaded Raspbian image is borked (well, if a zip file opens, it means it matched checksum) though probability of website hosting a bad image is very low ! Now waiting for my 2nd SDcard and RaspPi to arrive.
Posts: 6
Joined: Fri Aug 16, 2013 2:37 pm
by aTao » Sat Aug 17, 2013 6:37 am
The program you used to place the Raspbian image onto the SD card should also be able to copy it back to your host computer. You can then compare the images, if they are the same then your SD card is fine (probably).
You do know that to flash the SD card you cannot just move the image onto it? You must use a program that uses the image to reconstruct a file system on the card.
User avatar
Posts: 1053
Joined: Wed Dec 12, 2012 10:41 am
Location: Howlin Eigg
by DeeJay » Sat Aug 17, 2013 8:03 am
Both a directly-imaged installation of Raspbian, and a NOOBS-installer installation of Raspbian can be accomplished 'headlessly'. In the NOOBS case, the 'trick' is to go into the /images folder on the sd card before first boot and delete all the compressed os image files except the one you want to have installed. The remaining one will be installed by default without seeking user input.

Via either route, Raspbian will run the raspi-config utility the first time it is booted, and in the absence of local interaction will not complete. This is not a problem in practice - simply ssh in to the device and invoke 'sudo raspi-config' manually from the remote console.
How To Ask Questions The Smart Way:
How to Report Bugs Effectively:
User avatar
Posts: 2027
Joined: Tue Jan 01, 2013 9:33 pm
Location: East Midlands, UK
by jayachar » Sat Aug 17, 2013 9:46 am
Thanks again @aTon and @DeeJay.
Got my RaspberryPi working with the latest Raspbian image.

The only difference in my previous trials and current is that, earlier I was burning the image on SD-card using "dd" on linux (exactly, as per the instructions on site) -- and yes, with the right device (checked with "df -H" before/after plugging in the SD card reader). However, the time it succeeded, I used the Win32DiskImager tool to write the image, and it worked fine.

Have got my headless "Raspbian" running perfectly..., with VNC setup to auto-start at bootup, and very happy to finally see the Raspbian desktop!

Facing some issues with the Raspbian freezing-up with heavy activity (or I/O)... but I strongly suspect my el-cheapo smartphone charger (5V, 800mA but possibly overspec'd), to be the culprit ! So far so good.
Posts: 6
Joined: Fri Aug 16, 2013 2:37 pm
by nightfury » Sun Sep 13, 2015 4:12 pm
I am facing the same problem with an headless installation. I am using Ubuntu 14.04 LTS for rashberry pi2.

I added the 'ip=' line to the default command in the cmdline.txt file.

When I try to telnet or ssh to the image on the pi, it keeps refusing the connection.

I am using fedora on my laptop and have configured the wired network manually to

What's wrong with the approach?

Thank you :)
Posts: 2
Joined: Sun Sep 13, 2015 4:03 pm
by davidcoton » Sun Sep 13, 2015 7:59 pm
It's not entirely clear from your post, but it looks as though you have assigned the same address to the Pi and the laptop. They need to be different. OTOH that might just be a typo...
"If it ain't broke, fix it until it is."
“Raspberry Pi is a trademark of the Raspberry Pi Foundation”
Posts: 1870
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
by nightfury » Mon Sep 14, 2015 5:01 pm
Thanks davidcoton.

The IP was a typo. The ubuntu package for raspberry pi does not come with the openssh-server package pre-installed.
Posts: 2
Joined: Sun Sep 13, 2015 4:03 pm
by Rob73 » Fri Apr 01, 2016 11:15 am
Posts: 8
Joined: Thu Mar 10, 2016 3:34 pm