BobAGI
Posts: 17
Joined: Tue Jul 03, 2012 1:06 pm

Headless minimum hardware start?

Wed Jul 04, 2012 6:18 am

I am in a situation that I have the Pi but not much more in the way of keyboards, mouse, display etc but I would like to check it out nevertheless....
What I do have is a small network (wired and WiFi), a spare Ethernet cable, an HTC Desire phone charger (5V 1A USB connector that fits the Pi), a Win7 X64 laptop and a 2Gb SD-card which has been used in a Canon camera.
So I figured that could perhaps be used as follows:
- Phone charger as power supply
- Network cable to router
- SD-card loaded with a Linux image
- Putty on Windows laptop to connect to the Pi

As far as I have read in various posts this should bring up the Pi, but I am not sure about how to get SSH running. Apparently it is not enabled "out of the box" in the SD images, so how can I enable it prior to starting up the Pi?

Can it be enabled by me editing some start script file on the SD card from Windows7 before the SD card is used on the Pi? I do have editors which do not change the line ending standard of a text file they edit....

If this does not work then I have to wait out the vacation until I get back home... :cry:

uxlol
Posts: 1
Joined: Wed Jul 04, 2012 10:03 am

Re: Headless minimum hardware start?

Wed Jul 04, 2012 10:05 am

Also interested in this,

even some sort of list of commands we could type that would allow us to enable SSH and reboot with SSH enabled.

I dont have any display devices I can use to see whats going on, but I can plug a USB keyboard into it to enable ssh blindly

I am using Debian “squeeze” btw


... interested!!

BobAGI
Posts: 17
Joined: Tue Jul 03, 2012 1:06 pm

Re: Headless minimum hardware start?

Wed Jul 04, 2012 10:39 am

Meanwhile I managed to find a good page describing how to set up a Pi like i wanted.
It is here: http://www.penguintutor.com/linux/raspberrypi-headless
Notice that it states that you need a Linux computer to do the necessary editing of the network control file. But as far as I know the default is to use DHCP so it will probably find an address without this. The problem is to locate that address for use with Putty. But I think that looking in the router one could figure out which address it has received. One idea could be:
list all connected devices before starting the Pi, then start it and then again list the devices.
There should be a new device which is the Pi....

Once a SSH connection is establish one can fix whatever needs to be fixed for the network.

Final note:
The distribution they use in the tutorial is NOT the one on the Download page! It's called Wheezy and it can be found here: http://www.raspberrypi.org/archives/1435
The difference is that it has SSH enabled by default (and possibly other stuff too...)

dktucson
Posts: 36
Joined: Tue Jun 12, 2012 2:57 am

Re: Headless minimum hardware start?

Wed Jul 04, 2012 8:04 pm

I setup mine headless with a vncserver loading at boot so no SSH needed. I did have to have all the hardware hooked up to set it up initially but after the config was good I pulled the hdmi, keyboard & mouse. I setup wireless so I'm down to just a power cable--no "spaghetti pi". Pics at http://dktucson.dyndns.info:86 the site is hosted on the headless pi .
A 2gb card leaves little to no room for storage..I opted for an 8GB

BobAGI
Posts: 17
Joined: Tue Jul 03, 2012 1:06 pm

Re: Headless minimum hardware start?

Wed Jul 04, 2012 8:37 pm

Now I tested with the Wheezy beta distribution on the 2GB SD card.
I had transferred it using the Win32DiskImager application and it looked just fine there.
In Win7 disk manager the SDCard afterwards has two partitions and 100 Mb free space so it looks pretty OK to me.
So I attached the SDCard to the Pi, hooked in a network cable to my router and fired up the Pi.

But I had no luck...
I could not find any address that was in my router's DHCP table which corresponded to the Pi.
Then I pulled the network cable off the router and inserted in another slot, same result. But then I also noted that the router did not light up the LED corresponding to the port I attached the network cable to...
It seems like there is a problem with the Ethernet port on the Pi not being able to hook up to my router.
My laptop sits on another port and its corresponding LED is lit up.

Any ideas what could be wrong?

dktucson
Posts: 36
Joined: Tue Jun 12, 2012 2:57 am

Re: Headless minimum hardware start?

Wed Jul 04, 2012 10:06 pm

This is where you absolutely need a monitor for the initial boots to see if you are getting any kernel panics etc. I used an SD card for my first go-round that had voltage issues. I replaced it with a SanDisk of same size and that progressed past the error point in boot..onto network detection and DHCP assignment.
You really need a monitor or TV with the rca jack so you can see if you're hosed from the get-go.

User avatar
penguintutor
Posts: 376
Joined: Tue May 08, 2012 9:11 am
Location: UK
Contact: Website

Re: Headless minimum hardware start?

Wed Jul 04, 2012 10:47 pm

BobAGI
Meanwhile I managed to find a good page describing how to set up a Pi like i wanted.
Thanks for the comment.
I've made a few changes to the page based on the comments you included.

1/ Not for beginners?
When I created that page it was based on discussions on the forum I was having with people that were already quite familiar with Linux, rather than aiming at people that are new to Linux. I therefore made a few assumptions about the person that was reading. The more I follow the forums it seams that other people have a network connection, but no TV and so sounds like others may be having this problem.

I still think that most people looking to get started with the Raspberry Pi really should be looking to connect it to some kind of TV or monitor before going headless, but I've added a couple of things to make it a little easier (spelling out the dhcp search process and providing the link to Wheezy).

2/ Regarding the link to the Wheezy Debian image.
I didn't link to the Wheezy image partly because of 1 above, (those I were discussing this with were already using Wheezy) but also because I didn't want to make the document date too quickly.

Many of the other tutorials on my site have been around for many years, some of which were even converted from other UNIX ebooks (AIX / Solaris) I wrote before becoming more involved in Linux, and in that time they have needed very few updates (I've recently just gone through updating them which was more format conversion than changes to the commands etc.). Tutorials which are very specific about the distribution end up in my blog rather than the tutorials.

Whilst the Raspberry Pi is still in it's early stages it looks like I may have to update them fairly regularly anyway - so I've now added the link to the Beta download blog post.

I'm also hoping the Wheezy image becomes the default fairly soon, because ssh enabled by default and the raspi-config tool are going to make it much easier for new users.



Fixing Wireless problems headless

Regarding your current problem it's going to be very difficult to diagnose a network problem without some kind of monitor. Not impossible but I wouldn't recommend it. Obviously checking your physical connections / ethernet cable etc should be the first thing to try - is it a straight cable rather than a x-over? Have you tested the cable on another computer? How about that particular port on the router?. You can also try looking on the router to see if it is giving out a DHCP lease, which varies depending upon the router you are using.

Failing that you really do need to get down to hand editing the OS files using a separate Linux computer. But I would only recommend this for someone that has a reasonable amount of experience with Linux already as it's pretty messy.

If you mount the SD card then you can included commands to run at startup by using the /etc/rc.local file. This can be used to issue commands and save the output onto the SD card which you can then read by reading the SD card on a linux computer.

eg. you could log the output of the ifconfig file (which shows the status of the interfaces and whether they have an ipaddress) by adding

ifconfig > /home/pi/ifconfig_out.txt

You can also view any of the log files that are created when the SD card is in another linux computer (eg. look at syslog / messages / dmesg)

But I'd really recommend connecting to a TV / monitor and taking a look by running the commands directly rather than trying to diagnose a network problem without connecting to a screen.

BobAGI
Posts: 17
Joined: Tue Jul 03, 2012 1:06 pm

Re: Headless minimum hardware start?

Thu Jul 05, 2012 5:45 am

Thanks for your comments!
The only reason I tried the headless approach was that I picked up the Pi in the mail on Monday, then headed out to our vacation home by the sea, which meant I have no other stuff available than the gear I had already brought out for other reasons.

For example I do not have an HDMI cable here so hooking up to my monitor is not workable. I have a DVI and a VGA cable, which does not help. For power supply I thought that I could use the phone charger (right voltage, current and cable connector) and I found an old network cable here too.
Then I also found a 2GB camera SD-card made by Transcend. So what I missed was the keyboard/mouse/display.

Being curious about the Pi I read a number of forum posts and suddenly realized it would be possible to go headlesss....
That is why I tried it.
I have a few virtual machines (VMWare) running various Ubuntus, so I can fire up one and possibly connect the SD-card to it and do the editing of the scripts so that the logging you suggested can be done. This way I can at least see if the Pi starts up at all....
Will give it a try later today (hopefully).

okyup
Posts: 6
Joined: Wed Jul 04, 2012 4:11 am

Re: Headless minimum hardware start?

Thu Jul 05, 2012 5:48 am

I booted with a keyboard and ethernet cable attached, logged in blindly, typed "service ssh start" then was able to SSH in from putty.

BobAGI
Posts: 17
Joined: Tue Jul 03, 2012 1:06 pm

Re: Headless minimum hardware start?

Thu Jul 05, 2012 5:51 am

Which distribution did you use?

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: Headless minimum hardware start?

Thu Jul 05, 2012 6:15 am

The Raspbian distros have ssh enabled by default so you could use those.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

User avatar
Jim JKla
Posts: 2218
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK

Re: Headless minimum hardware start?

Thu Jul 05, 2012 8:08 am

There's some wheezy noob guides on the wiki re-headless.
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick

BobAGI
Posts: 17
Joined: Tue Jul 03, 2012 1:06 pm

Re: Headless minimum hardware start?

Thu Jul 05, 2012 7:21 pm

I have made another test:
- Mounted the SDCard in Ubuntu10
- Edited the /etc/network/interfaces file so it looked like this:

Code: Select all

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.0.59
network 192.168.0.0
netmask 255.255.255.0
gateway 192.168.0.129
- synced and unmounted from Ubuntu
- Started the Pi with the changed SD-card

Since there was no change to the observed network behaviour I then re-mounted the SD-Card in Ubuntu and looked at var/log for any clues...
I think that the Linux system was not started at all, because the var/log/boot file contained just the text:
(Nothing has been logged yet.)

So either the SD-card is not bootable or there is something else that needs a monitor to determine.
Is there something one has to do to make the SD-card bootable following writing the distro image to it?

BobAGI
Posts: 17
Joined: Tue Jul 03, 2012 1:06 pm

Re: Headless minimum hardware start?

Thu Jul 05, 2012 8:29 pm

Are you required to activate the boot logging before var/log/boot is written on startup?
I have seen suggestions to this effect for Debian where one has to enable it in the file /etc/default/bootlogd by writing an entry:
BOOTLOGD_ENABLE=yes
However in my Wheezy SD-card image there is no such file...
I am wondering because my boot log file is basically empty as described above.

dktucson
Posts: 36
Joined: Tue Jun 12, 2012 2:57 am

Re: Headless minimum hardware start?

Thu Jul 05, 2012 10:46 pm

When mine booted (Debian Squeeze)..it just took off & loaded. Early on as i was doing the initial boots I had the following halts..one with a mention of a volatge detection which was related to the type of SD card I used..then halts (kernel panic) with certain combination of a cheap KB & mouse..using a lenovo keyboard and cheap mouse I was OK and it booted to a login prompt.
no intractive boot screen at all--have the SD card in--supply power and if you had a monitor you'd see all the stuff loading.

gaardvark
Posts: 2
Joined: Fri Jul 06, 2012 3:47 am

Re: Headless minimum hardware start?

Fri Jul 06, 2012 5:25 am

Hi,

I too am trying to set my Rpi up for headless use. I'm using the Wheezy image (2012-06-18-wheezy-beta.img) downloaded from http://www.raspberrypi.org/archives/1435.

My Rpi seems to boot fine as long as it is connected to a video display through HDMI. I haven't tried other displays. However, after having done the basic setup with raspi-config, enabling sshd, it works fine until I try running headless. At that point it won't boot.

I thought I had figured something out last night when modified the config.txt uncommenting the line: config_hdmi_boost=4

I also tried: config_hdmi_boost=0

Assuming the value range from 0 - 7 with 7 being max boost, but still no joy.

I was able to reboot the Rpi without the HDMI cable connected and still reach it through ssh. However, I discovered tonight that did not work after a cold start. To be clear, the change made to config.txt was saved and was still there after restarting (hot or cold) but after performing a system halt and power cycling to restart, I would not be able to reconnect via ssh and pinging the ip address timed out.

I would appreciate any suggestions on how to make it run headless with only power and network connected.

Thanks, George

BobAGI
Posts: 17
Joined: Tue Jul 03, 2012 1:06 pm

Re: Headless minimum hardware start?

Fri Jul 06, 2012 9:53 am

I will have to give up until such time as I have a better SD-card. The one I have used is a:
Transcend SD 2GB (marking on the back side shows MM8GF02GWMCU-PA)
It came from a Canon camera I bought 3 years ago.
Probably not good enough...

User avatar
clickykbd
Posts: 117
Joined: Wed Jun 06, 2012 2:21 am
Location: Austin, Texas
Contact: Website

Re: Headless minimum hardware start?

Fri Jul 06, 2012 10:23 am

The only 2GB Transcend mentioned in the wiki happens to be one of the ones claiming problems (not the same exact code as yours, but maybe related):

http://elinux.org/RPi_VerifiedPeriphera ... m_SD_Cards

I would really recommend you find a composite TV you can jack into until you find a working SD card. Maybe there is one at an office or neighbors? You just need to verify it's getting up and running, the rest you can muddle through with the methods you were previously using at home.

User avatar
clickykbd
Posts: 117
Joined: Wed Jun 06, 2012 2:21 am
Location: Austin, Texas
Contact: Website

Re: Headless minimum hardware start?

Fri Jul 06, 2012 10:32 am

Another thought though. With no display... likely the only way to troubleshoot SD cards is with serial-console cable. You can grab an FTDI serial adapter and some jumpers and follow the instructions here.

http://www.skpang.co.uk/blog/archives/424

But I have a feeling your methods would work if you just picked up a known-good model SD card and got past that hurdle.

BobAGI
Posts: 17
Joined: Tue Jul 03, 2012 1:06 pm

Re: Headless minimum hardware start?

Fri Jul 06, 2012 12:16 pm

FINALLY! :D
I found a bag with SD-cards in my laptop case and among these was a SanDisk SDHC 4GB disk.
So I imaged Wheezy onto this disk and then opened it in my Ubuntu virtual machine so I could edit its network connection data for a static address 192.168.0.59 (as described above).
When I then used it on the Pi it activated the network (as seen on the router LED) and it responded to ping.
So I used Putty to connect SSH, which worked! 8-) :lol:

That is how far I am now, but I thought that I should update the thread with this result.
The root cause for me was the old 2GB SD-card. A newer 4GB card worked fine.

Question about the Forum: :?:
How can one mark a thread as SOLVED????

User avatar
clickykbd
Posts: 117
Joined: Wed Jun 06, 2012 2:21 am
Location: Austin, Texas
Contact: Website

Re: Headless minimum hardware start?

Fri Jul 06, 2012 1:16 pm

I think only moderators can change titles of the OP (unless you are attempting to do so within 30 minutes of creation, within that window the author can edit too).

gaardvark
Posts: 2
Joined: Fri Jul 06, 2012 3:47 am

Re: Headless minimum hardware start?

Fri Jul 06, 2012 5:05 pm

gaardvark wrote:Hi,
...
I was able to reboot the Rpi without the HDMI cable connected and still reach

Thanks, George
c/connected/disconnected/

oops!

Return to “Beginners”