How to get the latest ubuntu image for Beaglebone Black (via MicroSD Card)?

Hi,

As far as I know the USB IP address of the BBB is 192.168.7.2.
If the USB is connected you can always SSH into the BBB using this address.

However, the BBB does not set a default route for the USB interface, so will not reach the internet via USB. Nor as far as I can see, does it set a DNS server by default when using USB only.

For USB internet access you will need to configure internet connection sharing on your windows computer to forward traffic, or if connected via linux, you will need to enable ipv4 forwarding and set up some iptable rules.

This is what Robert has explained.

The first set of magic commands releases the USB IP address (192.168.7.2 by default), and then uses dhcp to set a new address, this should also set a default route and dns server, depending on your local dhcp server. This requires Windows ICS to be setup correctly to work and probably any AV and firewall software that you are using.

You will also need to be connected via the serial console to do this. If you try from an SSH connection, you will loose connection after the flush command.

If you put both commands on the same line separated by a semicolon, it would still kick you off, but should work as expected. You can then ssh back in to whatever IP address the BBB acquired by dhcp.

I would have thought you could just leave the IP address as the default (192.168.7.2) and set the gateway as 192.168.7.1 and configure a DNS server which is how it is done when connecting via Linux. However I don’t use Window and I don’t know how well ICS works. I know people have problems with it.

The second set of commands is to configure a Linux computer to forward traffic from the USB connection and setup some simple IPtable rules.

By far the easiest way to connect a BBB to the internet is to just use an ethernet cable.
Even when using ethernet, you can still ssh into the BBB using a USB cable, the default address should be 192.168.7.2

Thanks Benedict for the explanation.
Unfortunatley, my work computer is configured so that I cannot do ICS.

I’m at home with the work computer connected by Wifi. The BBB is connected to the router with an ethernet cable, and via USB to the work computer. I use the USB cable provided with the board (it used to work until I flashed the new version of Linux, and even yesterday evening shortly after flashing)

I can’t SSH. I use Putty, and tried 192.168.7.2, or the IP address of the BBB provided by the router. None of these work.

That is very strange. if you ping the addresses do you get a reply ?

I would also suggest in investing in a USB to ttl serial cable when you can

Also as you are using a work computer at home, are you by any chance using a VPN to connect to your work ? If so, it could be that all IP traffic is being routed via VPN.

I think your issues are with your Windows computer. I have the same version of software on my BBB and there are no issues SSH’ing via ethernet or USB for me from my Linux laptop.

‘use’ to work, check what user (debian) that you are trying to login with…

Regards,

Brilliant!!! That was it : if I stop the VPN, the BBB is back!

Here is what I did :

  1. Flash the Linux again, for a fresh start
  2. Remove the SD card
  3. Plug the ethernet cable from the router to the BBB
  4. Plug the BBB to the computer via USB

In this configuration, with the VPN on, the BBB appears as a new drive but no way to SSH it on 192.168.7.2.
If I switch off the VPN, everything comes back: I can SSH (user: debian), ping Google, etc.

But now, I have another problem: when I try apt-get update I get

No space left on device

df -H says:

debian@BeagleBone:~$ df -H
Filesystem      Size  Used Avail Use% Mounted on
udev            222M     0  222M   0% /dev
tmpfs            51M  1.4M   50M   3% /run
/dev/mmcblk1p1  3.7G  3.5G     0 100% /
tmpfs           254M     0  254M   0% /dev/shm
tmpfs           5.3M     0  5.3M   0% /run/lock
tmpfs            51M   21k   51M   1% /run/user/1000

What’s wrong with the memory? What is this mmcblk1p1 which takes so much space? Is it needed or can I remove it?

debian@BeagleBone:~$ ls -al /dev/mmcblk1p1
brw-rw---- 1 root disk 179, 1 Dec  1 15:55 /dev/mmcblk1p1
debian@BeagleBone:~$ lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mmcblk1      179:0    0  3.6G  0 disk
`-mmcblk1p1  179:1    0  3.6G  0 part /
mmcblk1boot0 179:256  0    2M  1 disk
mmcblk1boot1 179:512  0    2M  1 disk
debian@BeagleBone:~$ lsblk -fs
NAME         FSTYPE FSVER LABEL  UUID                                 FSAVAIL FSUSE% MOUNTPOINT
mmcblk1p1    ext4   1.0   rootfs 583bc30a-0c29-4258-ae99-aa4d1504cfa1       0    95% /
`-mmcblk1
mmcblk1boot0
mmcblk1boot1

mmcblk1p1 is your root fs on the eMMC.
I have no idea how much space the XFCE image takes.
I only have old BBB’s with 2GB eMMC so I can’t fit the image on it anyway. I usually just use the minimal non desktop version.

This is the xfce snapshot, it takes most of the 4GB eMMC (3.2/3.3)…

If you really really need xfce use a microSD…

Regards,

Then I need to disable the flasher, otherwise it will flash the eMMC each time I boot the board

Actually, I may not need xfce.
What I need (in the future, when everything is set) is to connect a 4.3" capacitive touch LCD cape (that I bought recently) and use it for interfacing with Python (using tk possibly). I thought this was only possible with xfce. But if xfce is not needed, then I can flash a smaller image.

After that, I’m planning to run some AI applications, so I also need memory.

What should I do?

Depends on how you build your interface. You don’t necessarily need a full desktop.
You could try LVGL, it is mostly C based though but does have bindings for micro python. They are probably others.

In the past I have used QT with a framebuffer backend and that was on a 2GB eMMC BBB.

Thanks, so I can try to flash a smaller image.
I see here 2 possible versions: minimal and IOT. What’s the difference, and which one do you suggest?

not sure of the difference. You can always start with the minimal and then install packages as required

I have found a thread somewhere saying that the IOT has everything but xfce, and the minimal has mostly netork and you need to install the rest (such as python).
I don’t feel comfortable with that right now, I’ll try the IOT version. They said it takes around 2GB.

It took 6 minutes to flash, and now I have some space left:

debian@BeagleBone:~$ df -H
Filesystem      Size  Used Avail Use% Mounted on
udev            225M     0  225M   0% /dev
tmpfs            51M  1.4M   50M   3% /run
/dev/mmcblk1p1  3.7G  2.2G  1.4G  62% /
tmpfs           254M     0  254M   0% /dev/shm
tmpfs           5.3M     0  5.3M   0% /run/lock
tmpfs            51M     0   51M   0% /run/user/1000

apt-get update and upgrade did work.
All looks good now. Thanks again for your help everyone!

Hi
I have installed some of the packages I require (such as gnuplot, libopencv-dev) and there is now only a small space left for the rest. I may run out of memory.

debian@BeagleBone:~$ df -H
Filesystem      Size  Used Avail Use% Mounted on
udev            224M     0  224M   0% /dev
tmpfs            51M  1.4M   50M   3% /run
/dev/mmcblk1p1  3.7G  3.4G  170M  96% /
tmpfs           254M     0  254M   0% /dev/shm
tmpfs           5.3M     0  5.3M   0% /run/lock
tmpfs            51M     0   51M   0% /run/user/1000

So I think I have 2 options:

  1. Start again but from the minimal version, as you suggested,
  2. Keep the IOT version but run it from a SD card.

As I said, I’m not comfortable with the first option, because I fear that I will miss some important packages or libraries.

In the second case, I have 2 questions:

  • Right now, the flasher is enabled, so each time I insert the SD card and boot, it flashes the eMMC, which is not what I need. How can I turn the flasher off?
  • If I boot from a SD card and install some packages, are they installed in the SD card as well or in the eMMC?

If they are installed in the SD card, then using a 64GB card should enable to install everything I need.

sounds like some of your packages are pulling in some hefty dependencies.

You could try doing an ‘apt-get clean’
This will remove the downloaded deb files from the apt cache - assuming apt is caching them. This will give you back some space depending on how much you have downloaded.

But it sounds like you will probably be better of running from SD.
If you boot from the SD card, then all installed packages are on the SD card only.

I don’t think the eMMC is mounted when booting from SD.

I think (not sure, Robert will hopefully tell you) that the flasher is a systemd service, that you can disable. There is a post on the forum somewhere mentioning the flasher.

If you are going to run from SD, just download the non-flasher version and put that on the SD card.

Found it!

Then 2 modes…
Basic user-mode…

sudo beagle-flasher

bootup “auto” flasher mode…

sudo enable-beagle-flasher

Edit:
No, actually these are 2 ways of flashing from the SD card (manual and automatic).
Back to the question : how to disable auto flash from SD card?

I found this line at the end of /boot/uEnv.txt:

##enable Generic eMMC Flasher:
#cmdline=init=/usr/sbin/init-beagle-flasher

Should I uncomment it ?