Installing OS - headlessly (no display device)


7 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.

thanks,
Jay

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:
http://home.budget.net/~klricks/Comp/RPi/Rpi.html Click web icon on right side --->
Posts: 1566
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: 620
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:
http://www.tristancollins.me/computing/headless-raspbian-installation/
http://forgetfulprogrammer.wordpress.com/2013/06/03/raspberry-pi-headless-installation/

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 RaspberryPi.org 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: 620
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: http://www.catb.org/~esr/faqs/smart-questions.html
How to Report Bugs Effectively: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
User avatar
Posts: 2033
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 elinux.com 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