{"id":25977646,"url":"https://github.com/nylander/bbb","last_synced_at":"2026-05-10T18:03:14.322Z","repository":{"id":14793427,"uuid":"17515487","full_name":"nylander/BBB","owner":"nylander","description":"Class-room Linux Server on the BeagleBone Black","archived":false,"fork":false,"pushed_at":"2018-07-24T09:52:17.000Z","size":16783,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-24T03:25:12.077Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nylander.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-07T13:54:58.000Z","updated_at":"2018-07-24T09:52:18.000Z","dependencies_parsed_at":"2022-08-19T14:00:51.451Z","dependency_job_id":null,"html_url":"https://github.com/nylander/BBB","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylander%2FBBB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylander%2FBBB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylander%2FBBB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nylander%2FBBB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nylander","download_url":"https://codeload.github.com/nylander/BBB/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241966988,"owners_count":20050324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-05T04:38:48.175Z","updated_at":"2026-05-10T18:03:14.240Z","avatar_url":"https://github.com/nylander.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Portable Classroom Linux Server on the BeagleBone Black\n\nBy: Johan Nylander, BILS\n\nVersion: August 2015\n\n\n## Description\n\nThis document describes the installation of Ubuntu Linux ([ubuntu-armhf distribution](http://www.armhf.com/index.php/boards/beaglebone-black/)) on a [BeagleBone Black](http://beagleboard.org/Products/BeagleBone+Black), and the configuration of a portable classroom Linux server (named *Black*) that runs a private WiFi network. Parts of this documentation is compiled from other sources (see list at the end).\n\n\n## Some info\n\nDefault user/passwd on the ubuntu-armhf distro:\n\n    hostname: ubuntu-armhf\n    username: ubuntu\n    password: ubuntu\n\nAdmin user/passwd on the finished BeagleBone Black box:\n\n    Hostname: black\n    IP on private LAN: 10.0.0.1\n    Admin username: bbb\n    Password:\n    WiFi SSID/WPA passphrase: Mr.Black\n    URL: http://10.0.0.1\n\n\n## Install image on SD card\n\nRun these steps on your local computer having a card reader. Tested on 64bit Xubuntu 13.10.\n\n\n#### Become root\n\n    sudo su -\n    mkdir -p $HOME/tmp/bbb\n    cd $HOME/tmp/bbb\n\n\n#### Check device name\n\nCheck device name by looking at what appears before and after plugging in the sd card in your computer\n\n    ls -lah /dev/sd* /dev/mmcb*\n\nPlug in sd card\n\n    ls -lah /dev/sd* /dev/mmcb*\n     \nLook for your device, e.g., `/dev/mmcblk0`, not(!) the partition (e.g., `/dev/mmcblk0p1`)\n\n\n#### Get armhf image\n\nImage accessed March 2014. Revisit [http://www.armhf.com/index.php/download](http://www.armhf.com/index.php/download) to check for latest images.\n\n    wget http://s3.armhf.com/debian/saucy/bone/ubuntu-saucy-13.10-armhf-3.8.13-bone30.img.xz\n\n\n#### Unpack and write image\n\n    apt-get install xz-utils\n    xz -cd ubuntu-saucy-13.10-armhf-3.8.13-bone30.img.xz \u003e /dev/mmcblk0\n\n\n#### Partprobe\n\n    partprobe /dev/mmcblk0\n\n\n#### Check that we have two partitions\n\n    ls -la /dev/mmcblk0*\n\n\n#### Mount, sync, umount\n\n    mkdir /media/b1 /media/b2\n    mount /dev/mmcblk0p1 /media/b1\n    mount /dev/mmcblk0p2 /media/b2\n    sync\n    umount /dev/mmcblk0p1\n    umount /dev/mmcblk0p2\n    rmdir /media/b1 /media/b2\n\n\n#### Eject sd card\n\nYou now have, hopefully, a bootable Linux distro on your sd card.\n\n\n## Install image on BeagleBoneBlack.\n\nI connected a screen to the BBB via the HDMI, a USB-hub with external power source to the USB, and in the USB hub I connected a mouse, keyboard, and a USB WiFi adapter (Asus N53).\n\n\n### Boot your image\n\nInsert sd card in the BBB, and boot while pressing the boot button.\n\n**NOTE**: The BBB will try to boot the internal Angstrom image by default. To boot from microSD, you'll need to hold down the USER/BOOT button (located near the microSD end of the board) while powering-on the device.\n\n\n### Logon to ubuntu-armhf\n\nLogon to ubuntu-armhf as user `ubuntu` with password `ubuntu`\n\n\n### Change keyboard layout if necessary\n\n    sudo loadkeys se\n\n\n### Write to Internal eMMC\n\n**NOTE**: This step will *owerwrite* what you have on the internal drive on your BBB!\n\n\"The prebuilt image is sized to exactly 1832MB to allow it to fit into the BeagleBone Black's on-board 2GB NAND storage. This size also allows it to fit on a wide variety of external microSD cards. The image can be resized to take advantage of additional space available on larger microSD cards. To install the image to the internal eMMC, boot from the SD card. While booted from an external SD card, the internal eMMC will be available as `/dev/mmcblk1`.\"\n\nTo write the image to eMMC, execute:\n\n    wget http://s3.armhf.com/debian/saucy/bone/ubuntu-saucy-13.10-armhf-3.8.13-bone30.img.xz\n    sudo su -\n    cd /home/ubuntu\n    xz -cd ubuntu-saucy-13.10-armhf-3.8.13-bone30.img.xz \u003e /dev/mmcblk1\n\n\n### Boot from eMMC\n\nTry to boot from the new ubuntu-armhf on your eMMC\n\n    shutdown -h now\n\nWhen the BBB is powered down, remove the sd card and power it up again. If all worked well, you should be greeted by a login prompt saying `ubuntu-armhf login: _`\n\n\n## Configuration\n\n\n### Logon to ubuntu-armhf\n\nLogon to ubuntu-armhf as user `ubuntu` with a password `ubuntu`\n\n\n### Change keyboard layout if necessary\n\n    sudo loadkeys se\n\nIf you need to apply this change permanently, run\n\n    sudo setupcon --save\n\nOther ways to (permanently) change keyboard layout and TTY fonts etc are by using `sudo dpkg-reconfigure keyboard-configuration` and `sudo dpkg-reconfigure console-setup`.\n\n\n### Upgrade\n\n    sudo apt-get update\n    sudo apt-get upgrade\n\n\n### Install some software\n    \n    sudo apt-get install vim git dnsmasq iw hostapd curl psmisc\n\nAdd your own here\n\n    sudo apt-get install ncbi-blast+ muscle\n\nAnd add this file\n\n    git clone git://github.com/nylander/BBB.git\n    \n\n#### Change host name\n\nChange the host name `ubuntu-armhf` to `black`\n\n    sudo sed -i.bkp -e 's/ubuntu-armhf/black' /etc/hostname\n    sudo sed -i.bkp -e 's/ubuntu-armhf/black' /etc/hosts\n    sudo service hostname restart   # If not working, do reboot below\n    sudo shutdown -r now\n\n\n### Install and configure webserver\n\n\n#### Add some default files\n\n    sudo cp -r $HOME/BBB/www/* /var/www\n\n\n#### Install the [lighttpd](http://www.lighttpd.net) webserver\n\n    sudo apt-get install lighttpd\n\n\n#### Configure\n\nAdd these lines to your `/etc/lighttpd/lighttpd.conf` file\n\n    dir-listing.activate = \"enable\"\n    dir-listing.show-header = \"enable\"\n    dir-listing.encode-header = \"disable\"\n    dir-listing.hide-header-file = \"enable\"\n    dir-listing.set-footer = \"This is the BBB server.\"\n    # more options here\n\n\nEnable public user web directories (`http://10.0.0.1/~userNN`)\n\n    sudo lighttpd-enable-mod userdir\n\n\nRemove default index page\n\n    sudo rm /var/www/index.lighttpd.html\n\n\nRestart the webserver\n\n    sudo service lighttpd reload\n\n\n### WiFi-broadcasting\n\n**NOTE**: \"You will also want to do a survey of your area to find the channel that has the fewest other APs on it. When choosing which channel to use, it is important to remember that the channels overlap with any channels that are within 20MHz.\"\nSee also [wireless.kernel.org](http://wireless.kernel.org/en/users/Documentation/acs#Hostapd_setup).\n\nFor automated channel selection, try to add (in `hostapd.conf`): `CONFIG_ACS=y` and `channel=acs_survey`. (**NOTE**: didn't work 2014-Mar-14)\n\nWe will start by setting up an open network to prevent connection problems. Take necessary precautions (e.g., setting `wpa=3`) if using a bridged network.\n\n#### Create the file `/etc/hostapd/hostapd.conf` with the follow content:\n\n    interface=wlan0\n    driver=nl80211\n    ssid=Mr.Black\n    hw_mode=g\n    channel=6\n    macaddr_acl=0\n    auth_algs=1\n    ignore_broadcast_ssid=0\n    wpa=0\n    wpa_passphrase=Mr.Black\n    wpa_key_mgmt=WPA-PSK\n    wpa_pairwise=TKIP\n    rsn_pairwise=CCMP\n\n\n#### Edit `/etc/default/hostapd` to have the line:\n\n    DAEMON_CONF=/etc/hostapd/hostapd.conf\n\n\nSetup dnsmasq to handle DHCP and DNS on our wifi network, otherwise your clients won't be able to get an IP address:\n\n#### Edit the dnsmasq configuration file `/etc/dnsmasq.conf` to include this:\n\n    interface=wlan0\n    dhcp-range=10.0.0.2,10.0.0.50,12h\n    no-hosts\n    addn-hosts=/etc/hosts.dnsmasq\n\n\nWe set `no-hosts` to avoid including all the entries in your hosts file in the DNS server, and instead set a separate file that will configure the DNS mapping for the machine hosting the AP.\n\n#### Create the file `/etc/hosts.dnsmasq` with the name of your computer:\n\n    10.0.0.1 black\n\n\n#### Add these lines to your `/etc/network/interfaces` file, to give it a static IP address:\n        \n    auto wlan0\n    iface wlan0 inet static\n    address 10.0.0.1\n    netmask 255.255.255.0\n\nIf you have network-manager configured to use your wifi card, you should disable auto-connect for all the wireless connections. Otherwise, it may interfere with hostapd.\n\n**NOTE**: In order to have the BBB boot as a bare-bone machine (only power adapter and USB-WiFi dongle connected), I had to comment out the `auto eth0` and `iface eth0 inet dhcp` I had in my `/etc/network/interfaces` file, then reboot. If you want to connect to the BBB using an ethernet cable, those lines have to be enabled again.\n\n### Add files to `/etc/skel`\n\nAdd your own files (that all new users should have in their home folders) to `/etc/skel` before creating new users.\n\n    sudo cp -r $HOME/BBB/skel/* /etc/skel\n\n\n### Change user permissions and add users.\n\n\n#### Add new admin user\n\nAdd new admin user (in group sudo). **NOTE**: need to provide `password`\n\n    pass=$(perl -e 'print crypt(\"password\", \"salt\")')\n    sudo useradd -m -G sudo -p \"$pass\" -s /bin/bash bbb\n\n**NOTE**: please make sure this user (`bbb`) can login and perform `sudo` commands before proceeding.\n\n\n#### Add users\n\nAdd N users (`user00`, `user01`, ..., `userN`) with the same password `catboxyellow`. We'll start with N=20.\n\n    pass=$(perl -e 'print crypt(\"catboxyellow\", \"salt\")')\n    for u in $(seq -w 0 20); do sudo useradd -m -p \"$pass\" -s /bin/bash user${u}; done\n\nIf you need a random (component) to your password, look at the [create_users.sh](users/create_users.sh) script.\n\n\n#### Disable the default user\n\nDisable (lock) the default user `ubuntu`. To unlock, use `-u`.\n\n**NOTE**: After this you can no longer login with the user `ubuntu`.\n\n    sudo passwd -l ubuntu\n\n\n### TODO\n\n* WiFi alternatives for bridged settings (plug an ethernet cable in BBB, and let it share its' internet connection).\n\n* Utilize space on external microSD card.\n\n\n### Sources\n\nI took information and some text from these sources (March 2014):\n\n[http://analogdigitallab.org/blogs/beaglebone-black-webserver-running-ubuntu](http://analogdigitallab.org/blogs/beaglebone-black-webserver-running-ubuntu)\n\n[http://cberner.com/2013/02/03/using-hostapd-on-ubuntu-to-create-a-wifi-access-point](http://cberner.com/2013/02/03/using-hostapd-on-ubuntu-to-create-a-wifi-access-point)\n\n[http://dotnetdavid.wordpress.com/2013/09/13/beaglebone-black-installing-ubuntu-part-2](http://dotnetdavid.wordpress.com/2013/09/13/beaglebone-black-installing-ubuntu-part-2)\n\n[http://sirlagz.net/2012/08/10/how-to-use-the-raspberry-pi-as-a-wireless-access-pointrouter-part-2](http://sirlagz.net/2012/08/10/how-to-use-the-raspberry-pi-as-a-wireless-access-pointrouter-part-2)\n\n[http://wireless.kernel.org/en/users/Documentation/acs](http://wireless.kernel.org/en/users/Documentation/acs)\n\n[http://wireless.kernel.org/en/users/Documentation/hostapd](http://wireless.kernel.org/en/users/Documentation/hostapd)\n\n[http://www.armhf.com/index.php/boards/beaglebone-black](http://www.armhf.com/index.php/boards/beaglebone-black)\n\n[http://www.danbishop.org/2011/12/11/using-hostapd-to-add-wireless-access-point-capabilities-to-an-ubuntu-server](http://www.danbishop.org/2011/12/11/using-hostapd-to-add-wireless-access-point-capabilities-to-an-ubuntu-server)\n\n[https://help.ubuntu.com/community/WifiDocs/MasterMode](https://help.ubuntu.com/community/WifiDocs/MasterMode)\n\n[https://help.ubuntu.com/community/lighttpd](https://help.ubuntu.com/community/lighttpd)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnylander%2Fbbb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnylander%2Fbbb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnylander%2Fbbb/lists"}