How to open ports on compiled ubuntu-13.04-console-armhf-2013-07-22.tar.xz

I downloaded ubuntu-13.04-console-armhf-2013-07-22.tar.xz and succesfuly followed instructions to write in onto micro sd card.
I mounted and edited /media/rootfs/etc/networks to include

auto lo
iface lo inet loopback

auto eth0
iface lo inet loopback
iface eth0 inet static
address 192.168.0.128
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 192.168.0.1 204.194.232.200 204.194.234.200

The sd card in BBB appears to boot properly (by looking at leds), and by turning off and on using power switch
I can also successfully ping 192.168.0.128

ping 192.168.0.128
PING 192.168.0.128 (192.168.0.128) 56(84) bytes of data.
64 bytes from 192.168.0.128: icmp_req=1 ttl=64 time=0.453 ms
64 bytes from 192.168.0.128: icmp_req=2 ttl=64 time=0.180 ms

However, when I run >nmap -A 192.168.0.1, I get:

nmap -A 192.168.0.128

Starting Nmap 6.00 ( http://nmap.org ) at 2013-10-05 13:23 EDT
Nmap scan report for beaglebone.local (192.168.0.128)
Host is up (0.0022s latency).
All 1000 scanned ports on beaglebone.local (192.168.0.128) are closed

Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 0.56 seconds

I’ve tried a number of options like in /media/rootfs/etc/rc.local (after remounting on host). adding

iptables -F
ufw logging on
ufw allow from 192.168.0.0/24
service networking start
service ssh start

but none of this worked at getting port 22 open so I can ssh over ethernet (I’ve never been successful at ssh’ng over usb0/ethernet despite trying many times).
Any suggestion on how to get port 22 open for ssh’ng by editing files when mounted on host? Or what my next best alternative might be. I am successful in
BBB when ssh’ng over eth0 with an sd card that was made using ubuntu-raring-13.04-armhf-3.8.13-bone20.img.xz

I need to figure out how torun compiled kernel so I can work at using the A/D driver from Zubair Lutfullah. Any suggestion or help is appreciated. Thanks
Bit Pusher

The behavior you describe is what I have sometimes got when it doesn’t have the right root partition mounted. If you boot up with a micro sd card installed, it may be trying to mount that filesystem as root. Does it behave itself when the external SD card is removed?

I have had three problems so far:

  1. System gets into a mode where it will boot, machine is pingable, USB is working (because ctrl-alt-del works on a USB keyboard) but none of the services are running (can’t ssh to the unit) and the HDMI video isn’t working (have a signal but not displaying anything). Once the unit gets into this mode, the only recovery is to re-flash it. It has done this twice.

  2. Sometimes when power is applied it will not boot. The LEDs don’t light, nothing. Cycling power to the unit via plug/unplug of the power supply clears the problem’

  3. Commenting the entries out of /etc/network/interfaces for usb0 has no effect. I have commented out the lines in /etc/network/interfaces but it still comes up active.

My guess is that your system is trying to mount the sd card as the root partition and none of your service daemons are there. Which image are you running? I think for me the problem of booting with an sd card was fixed with the image found on BBB-eMMC-flasher-ubuntu-13.04-2013-09-27 but even running that image it ended up “hanging” once in that mode where it won’t boot from either eMMC or sd, interface comes up, is pingable, but no services start, no display from HDMI, keyboard works. That sounds to me like the problem you are facing. The only way out of that mode I have found so far is re-flashing the unit.

Thanks George, I actually do want to boot the operating system on the SD card which has two partitions made according to instructions at http://eewiki.net/display/linuxonarm/BeagleBone+Black. The operating system I installed on the SD card is ubuntu-13.04-console-armhf-2013-07-22.tar.xz. The LEDs are operating as I expect from booting my other image (which also boots the SD card) but was a downloaded image as opposed to a compiled image. When I apply power, the LEDs light up after a few seconds as expected. When I hold the reset switch down, then after about 8-10 seconds, the LEDs turn off, again as expected when an SD running machine is turned off. Everything looks right except for the closed ports.

So 'ssh' should work by default with the console image. Two potential
issues i see, your using a static IP. Can i assume you've tested
pinging this device from another pc on your network? Second, are you
using the raw ip address with ssh, or the device name?

Either way, openssh-server is installed by default, with the default
port 22 configuration..

Regards,

In fact, port 80 should also be alive with apache, I'm thinking your
network is NOT actually setup correctly..

Regards,

Hi Robert, pinging from a remote works fine; either with it's name (I have it in /etc/hosts on the remote), or with its IP address. ssh does not work with either, when trying ssh (or nmap or ping), I mostly use the IP address, not the name. The problem is no ports are open

On the "image" SD, both 22 and 80 are open, and openssh-server is running. I edited /etc/network/interfaces to be the same on the 'compiled version' SD, but no ports are open.

What is the "exact" file name of the one that doesn't work?

Regards,

On the "image" SD, both 22 and 80 are open, and openssh-server is running. I
edited /etc/network/interfaces to be the same on the 'compiled version' SD,
but no ports are open.

What is the "exact" file name of the one that doesn't work?

Just reviewed all 4 debian images i'm currently supporting.. Here are
the results...

voodoo@hades:~$ nmap -v -A 192.168.0.109

Starting Nmap 6.40 ( http://nmap.org ) at 2013-10-08 09:20 CDT
NSE: Loaded 110 scripts for scanning.
NSE: Script Pre-scanning.
Initiating Ping Scan at 09:20
Scanning 192.168.0.109 [2 ports]
Completed Ping Scan at 09:20, 0.00s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 09:20
Completed Parallel DNS resolution of 1 host. at 09:20, 0.00s elapsed
Initiating Connect Scan at 09:20
Scanning arm (192.168.0.109) [1000 ports]
Discovered open port 80/tcp on 192.168.0.109
Discovered open port 22/tcp on 192.168.0.109
Completed Connect Scan at 09:20, 0.13s elapsed (1000 total ports)
Initiating Service scan at 09:20
Scanning 2 services on arm (192.168.0.109)
Completed Service scan at 09:20, 6.14s elapsed (2 services on 1 host)
NSE: Script scanning 192.168.0.109.
Initiating NSE at 09:20
Completed NSE at 09:20, 0.84s elapsed
Nmap scan report for arm (192.168.0.109)
Host is up (0.0085s latency).
Not shown: 998 closed ports
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 6.0p1 Debian 4 (protocol 2.0)

ssh-hostkey: 1024 09:c2:c9:29:ce:fb:da:47:46:3f:12:eb:86:e8:3d:53 (DSA)
2048 13:6a:f5:5f:18:11:c6:cf:1e:8f:49:52:2d:a1:65:fb (RSA)
_256 d4:bf:c8:70:91:50:ee:4a:e4:c0:4c:bb:26:d2:51:0f (ECDSA)

80/tcp open http Apache httpd 2.2.22 ((Debian))

_http-methods: POST OPTIONS GET HEAD
_http-title: Site doesn't have a title (text/html).

Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

NSE: Script Post-scanning.
Initiating NSE at 09:20
Completed NSE at 09:20, 0.00s elapsed
Read data files from: /usr/bin/../share/nmap
Service detection performed. Please report any incorrect results at
http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 7.35 seconds

http://elinux.org/BeagleBoardDebian#eMMC:_BeagleBone_Black
BBB-eMMC-flasher-debian-7.1-2013-09-27.img.xz
Ports 22/80 open according to nmap...

http://elinux.org/BeagleBoardDebian#Debian_7_.28wheezy.29
debian-7.1-console-armhf-2013-09-26.tar.xz
Ports 22/80 open according to nmap...

http://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-Debian7
debian-7.1-minimal-armhf-2013-08-25.tar.xz
Ports 22/80 open according to nmap...

http://eewiki.net/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-Debian7(smallflash)
debian-7.1-bare-armhf-2013-08-25.tar.xz
Ports 22/80 closed as openssh-server/apache is NOT installed...

If you happen to be running an "older" image it's not my problem...
Otherwise what's the point of me pushing 'updated/fixed' images???

Regards,

Robert, the downloaded file was

ubuntu-13.04-console-armhf-2013-07-22.tar.xz

I downloaded it about 2 months ago using something like

http://eewiki.net/display/linuxonarm/BeagleBone+Black

everything went well except ssh’ng to the BBB after plugging in theSD card and powering up (although it looks like it is booting)
-Ken

Robert, the downloaded file was

ubuntu-13.04-console-armhf-2013-07-22.tar.xz

I downloaded it about 2 months ago using something like

wget -c
https://rcn-ee.net/deb/minfs/raring/ubuntu-13.04-minimal-armhf-2013-08-25.tar.xz

(except it's now 8-25 rather than 7-22 and console rather than minimal) and
I compiled and prepared the SC card using instructions either from or
similar to

http://eewiki.net/display/linuxonarm/BeagleBone+Black

everything went well except ssh'ng to the BBB after plugging in theSD card
and powering up (although it looks like it is booting)
-Ken

That image works here.. (ip didn't come up right away so i had to dhclient eth0)

Starting Nmap 6.40 ( http://nmap.org ) at 2013-10-09 10:14 CDT
NSE: Loaded 110 scripts for scanning.
NSE: Script Pre-scanning.
Initiating Ping Scan at 10:14
Scanning 192.168.0.109 [2 ports]
Completed Ping Scan at 10:14, 0.00s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 10:14
Completed Parallel DNS resolution of 1 host. at 10:14, 0.00s elapsed
Initiating Connect Scan at 10:14
Scanning arm (192.168.0.109) [1000 ports]
Discovered open port 22/tcp on 192.168.0.109
Discovered open port 80/tcp on 192.168.0.109
Completed Connect Scan at 10:14, 0.13s elapsed (1000 total ports)
Initiating Service scan at 10:14
Scanning 2 services on arm (192.168.0.109)
Completed Service scan at 10:14, 6.16s elapsed (2 services on 1 host)
NSE: Script scanning 192.168.0.109.
Initiating NSE at 10:14
Completed NSE at 10:14, 0.73s elapsed
Nmap scan report for arm (192.168.0.109)
Host is up (0.0087s latency).
Not shown: 998 closed ports
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 6.1p1 Debian 4 (protocol 2.0)

ssh-hostkey: 1024 3d:89:81:7c:31:db:18:d6:79:f8:62:2f:a2:11:26:39 (DSA)
2048 bb:c6:f8:3b:01:04:39:90:47:03:fa:14:d4:db:6d:49 (RSA)
_256 8d:54:03:5b:29:fe:26:85:05:81:7e:97:14:c7:28:b9 (ECDSA)

80/tcp open http Apache httpd 2.2.22 ((Ubuntu))

_http-methods: GET HEAD POST OPTIONS
_http-title: Site doesn't have a title (text/html).

Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

NSE: Script Post-scanning.
Initiating NSE at 10:14
Completed NSE at 10:14, 0.00s elapsed
Read data files from: /usr/bin/../share/nmap
Service detection performed. Please report any incorrect results at
http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 7.62 seconds

voodoo@hades:/opt/github/linux-dev$ ssh ubuntu@192.168.0.109
The authenticity of host '192.168.0.109 (192.168.0.109)' can't be established.
ECDSA key fingerprint is 8d:54:03:5b:29:fe:26:85:05:81:7e:97:14:c7:28:b9.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.109' (ECDSA) to the list of known hosts.
ubuntu@192.168.0.109's password:
Welcome to Ubuntu 13.04 (GNU/Linux 3.8.13-bone28 armv7l)

* Documentation: https://help.ubuntu.com/
Last login: Sun Aug 25 17:18:09 2013
ubuntu@arm:~$

Regards,

Robert, I will look into it, but by dhclient eth0, do you mean switch
from static ip address in /etc/network/interfaces to a dhcp
specification for eth0? Or do I have to start a dhcp client server? Or
something else? Just giving me a direction should be enough. Thanks again.
-Ken

Robert, I got the downloaded image version working fine; the trouble was trying to access a compiled version working; I am still unsuccessful with this, and have given up on it for now, and am just working with the image version for now; I wll come back to it later, but currently have no idea how to start with addressing it without being able to interact with the BBB at all (with the compiled version). Anyways, thanks for taking the time.
-Ken