RedSleeve v7 live-USB for B3 released (Linux 4.5.0)

Discuss development on Bubba
Post Reply
sakaki
Posts: 172
Joined: 15 Aug 2014, 11:20

RedSleeve v7 live-USB for B3 released (Linux 4.5.0)

Post by sakaki » 10 Apr 2016, 09:54

Hello,

Eagle-eyed forum user Psynapse pm'd me about a month ago, asking if, since the RHEL-like ARM distro RedSleeve appeared to be armv5tel based, might it be possible to create a B3 image?

Well, I'm pleased to say the answer was 'yes', and that I've just released version 1.0.0 of the live-USB image of RedSleeve Linux (v7) for the B3 on GitHub (here). All included packages are up-to-date against the RedSleeve tree, as of 9 April 2016.

You can burn the supplied image to a USB key (>=4GB, Lexar and SanDisk keys seem the most reliable), then boot your B3 from it, without affecting any installed (Excito) system on your B3's hard drive. (The compressed image is 223MiB; writing takes between 5 and 15 minutes, depending on your system.) You can even boot a diskless B3 (without having to modify the image)! No soldering, compilation or U-Boot flashing is required.

The live-USB may then be used as a rescue disk, to play with RedSleeve Linux, or as the starting point to install RedSleeve on your B3's main hard drive. 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 RedSleeve 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.

RedSleeve, like Debian, is a binary distribution, so you can install new packages and update your B3 very quickly (using the package manager command "yum"; cheat-sheet here).

A few quick points about the image:
  • At the time of writing, the standard kernel version supplied by RedSleeve (3.10.14) does not have the B3 specific patches included (these hit the mainline in version 3.15), and so is unusable for booting. Accordingly, I have built a 4.5.0 Gentoo kernel + module set, and shipped this with the image (you can see the interstitial kernel (see next point) config here, and the 'real' kernel config here). It has all the necessary systemd options enabled (for auditing etc.). The 4.5.0 module set has not been stripped, but you can easily do this yourself if you like. The RedSleeve 3.10.14 kernel and module set have been left in place on the image also, for reference.
  • Two kernels are actually used during the boot process. The first, 'interstitial' kernel has an integral initramfs (an archive of which is available here), within which is a simple init script (which you can see here); this script attempts to mount the first partition of the USB key (by UUID, so it will work even on a diskless chassis) and then sources the file /boot/kexec.sh within it (which you can see here). This script in turn loads the 'real' kernel zImage from /boot, applies a small workaround patch, sets up the kernel command line, and then switches to this 'real' kernel (using kexec). You can easily modify the script fragment /boot/kexec.sh if you like, for example to change the kernel command line settings (without having to change U-Boot's flash environment), or to run a different kernel (e.g. should RedSleeve release a version >= 3.15 in future, and you wish to use that instead). The use of an interstitial kernel has no effect on system operation once booted.
  • You must use Ethernet to log in when using this image: RedSleeve does not include a build of hostapd at this time, so WiFi login isn't supported 'out of the box'. The necessary kernel WiFi support is present on the image, however, so once logged in you can build your own copy of hostapd using e.g. the instructions here.
  • As shipped, the image has the iptables firewall service disabled, and does not have forwarding set up between the lan and wan ports. As such, while you should be able to access the Internet when logged into your B3 over ssh (to install packages etc.), client PCs will not be able to e.g. browse the web via the lan interface out of the box. Setting up such a configuration is relatively straightfoward however.
  • Finally, as shipped, the B3's wan (eth0) interface is set up as a DHCP client, and the lan (eth1) interface is running a simple DHCP server (using dnsmasq). If your local network does not support DHCP, you should still be able to log in via eth1 and then modify the configuration for eth0 (the wan port) appropriately (the file you need to edit is /etc/sysconfig/network-scripts/ifcfg-eth0; alternatively, just use the supplied nmtui tool, as described here).
Full instructions are provided on the project's GitHub page (including how to install RedSleeve on your B3's internal hard drive too, in case you want to do that).

Once logged in, you can then play around with RedSleeve. For example, install the apache web server:

Code: Select all

[root@rsb3 ~]# yum install httpd
   (confirm if prompted, this is equivalent to apt-get-install on Debian)
Given the heritage of course, copious documentation for configuring and using your RedSleeve system may be found on the Red Hat site, and also on the CentOS wiki.

Finally, two points of order:
  • I am not a day-to-day user of RedSleeve (or RHEL) so it is quite possible that some of the configuration / settings on the image might not be "just so". If you do find any issues, please email me (sakaki@deciban.com) and I will try to address them in a subsequent release.
  • It is important to bear in mind that RedSleeve is not produced, maintained or supported by Red Hat. Most of the binaries on the image have been taken from the RedSleeve DreamPlug Kirkwood image (here). Accordingly, you should be comfortable with RedSleeve as an organization, before trying out the image. Please refer to their site for licensing details of included firmware files etc.
Have fun ^-^

best,
sakaki

Psynapse
Posts: 12
Joined: 05 Sep 2014, 06:24

Re: RedSleeve v7 live-USB for B3 released (Linux 4.5.0)

Post by Psynapse » 11 Apr 2016, 00:30

Sakaki, you are totally my hero.

When excito left us with an out-dated image, riddled with vulnerabilities, you have come to the rescue with Gentoo, Arch, and now RedSleeve, amplifying the Bubba3's usefulness immensely. As Fedora is my primary operating system and CentOS is running on my servers, having my Bubba running the same strain of Linux makes it double, if not triple, the value it was yesterday. This saves me time and frustrating experimentation and makes a huge difference.

I have got Mediawiki with Elasticsearch going quite nicely on RedSleeve so far. Next up is FirewallD, and after that I hope to get Samba Directory up... within a systemd-nspawn container if the Bubba is up for it! I suspect that SyncThing will be too memory-hungry, but if it runs, I might need to order a couple more Bubba3 units and leave them at my relatives' houses for remote backups.

This is more than I could have hoped for :-)

Psynapse
Posts: 12
Joined: 05 Sep 2014, 06:24

Re: RedSleeve v7 live-USB for B3 released (Linux 4.5.0)

Post by Psynapse » 11 Apr 2016, 01:33

If you wish to prevent yum from installing RedSleeve kernels during its update process, you can do this:

Code: Select all

$ sudo nano /etc/yum.conf
[main]
exclude = kernel*
If you would like yum to automatically keep the system up to date:

Code: Select all

$ sudo yum install yum-cron
$ sudo nano /etc/yum/yum-cron.conf
apply_updates = yes
$ sudo systemctl enable yum-cron
$ sudo systemctl start yum-cron

anat
Posts: 10
Joined: 22 Oct 2011, 15:11

Re: RedSleeve v7 live-USB for B3 released (Linux 4.5.0)

Post by anat » 14 Aug 2016, 13:37

What is the status of this? I'm mainly concerned of the kernel staying up to date...

Gordon
Posts: 1343
Joined: 10 Aug 2011, 03:18

Re: RedSleeve v7 live-USB for B3 released (Linux 4.5.0)

Post by Gordon » 15 Aug 2016, 05:34

Well now. Since the kernel in this release is in fact sourced from Gentoo, you might be interested in THIS page to learn whether keeping up with kernel development is really what you should want.

The kernel should really follow a few simple rules:
1. it must be stable
2. it must support your hardware
3. it needs to supply the right modules if your applications require them

From what I gather in the opening post the original Redsleeve distro runs on kernel 3.10.14 and of course our hardware dates back to the days of kernel 2.4, although a newer kernel may be required to access certain SSDs and USB devices. Unless the latter applies to you a newer kernel won't add anything to your box and if the current kernel has issues you will likely be better of by DOWNgrading it to stable version 4.1.15-r1 than moving to a newer "testing" version.

If the 4.5.0 kernel is not giving you any trouble it should be good for running Redsleeve for quite some time.

sakaki
Posts: 172
Joined: 15 Aug 2014, 11:20

Re: RedSleeve v7 live-USB for B3 released (Linux 4.5.0)

Post by sakaki » 15 Aug 2016, 18:04

Hi anat,

further to what Gordon has said, as RedSleeve is not a rolling distribution, it won't post kernel updates very frequently in any event. As I mentioned in the original post, the kernel version supplied with RedSleeve v7 is 3.10.14, which is too low to support booting on the B3 (the necessary B3 device tree patches were only merged in kernel 3.15). For that reason I have supplied a relatively modern 4.5.0 kernel with the live USB image, but it is a straightforward process to build and install your own kernel if you wish.

However with all that said, if, for some reason, you would like to be using a more cutting edge kernel that is updated frequently and has a reasonable user base, you might consider using instead my Arch Linux live USB for the B3 (details here). Arch is a rolling (binary) distribution and when you update your packages (using e.g. the command "pacman -Syu") the setup on the live USB is such that it will also automatically pick up and use any newly available kernel (and accompanying module set) from the Arch Linux upsteam (at the time of writing, they are using kernel 4.7.0).

Hope that helps,
sakaki

PS if your question was rather "what is the status of the RedSleeve upstream - is that still actively being developed or is it in stasis / decline?" I'm afraid I am the wrong person to ask ><

anat
Posts: 10
Joined: 22 Oct 2011, 15:11

Re: RedSleeve v7 live-USB for B3 released (Linux 4.5.0)

Post by anat » 23 Aug 2016, 15:07

Oh, I'm definetely not after cutting edge functionality, but how about security updates of the kernel?

Post Reply