B3 Gentoo Live USB 1.7.0 Special Edition - sakaki-/gentoo-on-b3 GitHub Wiki

B3 Gentoo Live-USB 1.7.0 Special Edition (SE)

Bootable live-USB of Gentoo Linux for the Excito B3 miniserver, with Linux 4.1.6,plus a turnkey version of Gordon's port of the original Excito UI (beta) and LMS.

Description

You can use it as a rescue disk, to play with Gordon's UI port, or as the starting point to install Gentoo Linux on your B3's main hard drive. It can even use it on a diskless B3. No soldering, compilation, or U-Boot flashing is required! You can run it without harming your B3's existing software; however, any changes you make while running the system will be saved to the USB (i.e., there is persistence).

The kernel used in the image is 4.1.6 from gentoo-sources, with the necessary code to temporarily switch off the L2 cache in early boot (per this link) prepended, and the kirkwood-b3 device tree blob appended. The .config used for the kernel may be found here in the git archive.

Please note that since the image has the Logitech Media Server (LMS) installed, you should read the relevant license terms before using.

The image may be downloaded from the link below (or via wget, per the following instructions). (Incidentally, the image is now 'universal', and should work, without modification, whether your B3 has an internal hard drive fitted or not.)

Variant Version Image Digital Signature
B3 with or without Internal Drive 1.7.0 genb3SEimg.xz genb3SEimg.xz.asc

The older images are still available (together with a short changelog) here.

Please read the instructions below before proceeding. Also please note that all images are provided 'as is' and without warranty.

Prerequisites

To try this out, you will need:

  • A USB key of at least 8GB capacity (the compressed (.xz) image is 510MiB, the uncompressed image is 14,813,184 (512 byte) sectors = 7,584,350,208 bytes). Unfortunately, not all USB keys work with the version of U-Boot on the B3 (2010.06 on my device). Most SanDisk and Lexar USB keys appear to work reliably, but others (e.g., Verbatim keys) will not boot properly. (You may find the list of known-good USB keys in this post useful.)
  • An Excito B3 (obviously!). As of version 1.3.0, the same image will work both for the case where you have an internal hard drive in your B3 (the normal situation), and for the case where you are running a diskless B3 chassis.
  • A PC to decompress the image and write it to the USB key (of course, you can also use your B3 for this, assuming it is currently running the standard Excito / Debian Squeeze system). This is most easily done on a Linux machine of some sort, but tools are also available for Windows (see here and here, for example). In the instructions below I'm going to assume you're using Linux.

Incidentally, I also have an Arch Linux live USB for the B3, available here, and a Gentoo Linux live USB for the B2, available here. However, only this 'special edition' currently has Gordon's UI available in pre-installed, pre-configured form.

Downloading and Writing the Image

On your Linux box, issue:

# wget -c https://github.com/sakaki-/gentoo-on-b3/releases/download/1.7.0/genb3SEimg.xz
# wget -c https://github.com/sakaki-/gentoo-on-b3/releases/download/1.7.0/genb3SEimg.xz.asc

to fetch the compressed disk image file (510MiB) and its signature.

Next, if you like, verify the image using gpg (this step is optional):

# gpg --keyserver pool.sks-keyservers.net --recv-key DDE76CEA
# gpg --verify genb3SEimg.xz.asc genb3SEimg.xz

Assuming that reports 'Good signature', you can proceed.

Next, insert (into your Linux box) the USB key on which you want to install the image, and determine its device path (this will be something like /dev/sdb, /dev/sdc etc.; the actual path will depend on your system, you can use the lsblk tool to help you). Unmount any existing partitions of the USB key that may have automounted (using umount). Then issue:

Warning - this will destroy all existing data on the target drive, so please double-check that you have the path correct!

# xzcat genb3SEimg.xz > /dev/sdX && sync

Substitute the actual USB key device path, for example /dev/sdc, for /dev/sdX in the above command. Make sure to reference the device, not a partition within it (so e.g., /dev/sdc and not /dev/sdc1; /dev/sdd and not /dev/sdd1 etc.)

The above xzcat to the USB key will take some time, due to the decompression (it takes between 8 and 20 minutes on my machine, depending on the USB key used). It should exit cleanly when done - if you get a message saying 'No space left on device', then your USB key is too small for the image, and you should try again with a larger capacity one.

Booting!

Begin with your B3 powered off and the power cable removed. Insert the USB key into either of the USB slots on the back of the B3, and make sure the other USB slot is unoccupied. Connect your B3 into your local network (or directly to your ADSL router, cable modem etc., if you wish) using the wan Ethernet port. Then, while holding down the button on the back of the B3, apply power (insert the power cable). After two seconds or so, release the button. If all is well, the B3 should boot the kernel off of the USB key (rather than the internal drive), and then proceed to mount the root partition (also from the USB key) and start Gentoo. This will all take about 40 seconds or so. The LED on the front of the B3 should:

  1. first, turn green, for a few seconds, as the kernel loads; then,
  2. turn purple for about 20 seconds during early init; and finally,
  3. turn green again as Gentoo comes up (enters runlevel 3).

The image uses a solid green LED as its 'normal' state, so that you can easily tell at a glance whether your B3 is running an Excito/Debian system (blue LED) or a Gentoo one (green LED).

About 20 seconds after the LED turns green in step 3, above, you should be able to log in, via the web UI or ssh, per the following instructions.

Connecting to the B3

Because the image is setup to run Gordon's port of the Excito web UI on boot, you can access this immediately your B3 comes up.

As shipped, this SE version has the wan interface configured as a DHCP client, and the lan interface as a DHCP server. The address of the B3 itself (on the lan side) is 192.168.10.1).

To do so, connect your client (PC, Mac, iPad etc.) to your B3, as follows:

  • Either connect your client to the lan port of your B3, using an Ethernet cable (a regular cable is fine, you don't need to use a crossover);
  • Or, if you have a wireless-enabled B3 (and client), connect your client to the "b3" WiFi network (the passphrase is changeme).

Then, fire up a web browser on your client, and navigate to http://b3/admin/. You should now be able to see the familiar B3 front page:

You can log in to the web interface as user admin, password admin (remember to enable JavaScript).

If you have trouble connecting using http://b3/admin/ address (which may happen if you are running e.g. ABE under NoScript), try using http://192.168.10.1/admin/ instead.

After that, feel free to explore! Most of the functions of the web UI should work, for example, you can turn services on and off:

Feel free also to configure the network as you require:

Please bear in mind that this is a beta release, and not all functions are working yet. Please read Gordon's rolling release notes on the Excito forum here for further details.

Of course, if you prefer, you can also log into the B3 using ssh root@b3 (the password is gentoob3).

Again, if you have trouble connecting using b3 address, you can try using ssh [email protected] instead.

Note that you should be able to browse the web etc. from your client (assuming that you connected the B3's wan port to your network prior to boot, and the WAN settings are correct - the system ships with a DHCP client running on the WAN interface, which should work for most situations).

One situation where you may experience problems with external web browsing (etc.) from connected clients, is where your wan network is also using the 192.168.10.xxx subnet. In such a case, simply connect to your b3 (via lan or WiFi, as just described) and change the subnet settings for the lan side to a non-conflicting value, then save and restart. This issue will not affect most users, however.

Using Gentoo

Of course, since this is a fully-featured Gentoo live-USB, you can install new packages etc. should you wish to do so. Any packages you install, or other changes you make, while running the live-USB are saved on the USB key, but do not affect your existing Excito system, so you can run Gentoo for a while, then reboot back into your Excito system and continue to use it as normal, then boot back into the USB at a later date - any changes you made will still be there when you do.

Please see the main gentoo-on-b3 page for details (it also contains instructions for the installation of your running live-USB system - including the bubba UI and any changes you have made - to the B3's HDD, should you wish to do so).

NB - should you wish to install to HDD, please run the following command on your B3 first (it will ensure you have the correct version of the install scripts):

b3 ~ # emaint sync --repo gentoo-b3 && emerge -v sys-apps/b3-init-scripts 

Feedback Welcome!

If you have any problems, questions or comments regarding this project, feel free to drop me a line! ([email protected])

Comments on the Excito port should be directed to Gordon, either via the Excito development forum or his GitHub page.