Tuesday, 23 May 2017

First look at Ubuntu 17.10 or Artful


The daily build of Ubuntu 17.10 (which will be known as Artful Aardvark) can now be respun using my 'isorespin.sh' script with the Ubuntu build of mainline kernel v4.12-rc.

This means that for Intel Atom devices with the RTL8723BS WiFi chip such as the first versions of the Intel Compute Stick they will have both HDMI audio and wireless working OOTI (Out Of The Box ISO).

It is very early in the development/release cycle with Ubuntu 17.10 slated to be released on 19th October (https://wiki.ubuntu.com/ArtfulAardvark/ReleaseSchedule) using either the v4.12 or possibly the v4.13 kernel (http://phb-crystal-ball.org). However the dependency on customized kernels is clearly gone and although Ubuntu 17.10 will be a milestone for Intel Atom support it will somewhat ironically also be the last Ubuntu release with Unity.


Mainline kernel v4.12-rc2 now with RTL8723BS WiFi/BT driver

The newly released Ubuntu build of the latest and second release candidate of the mainline v4.12 kernel now includes the driver for the RTL8723BS chip.

As the current Ubuntu distro releases don't include the required WiFi firmware you will need to install it in order to get a working WiFi connection when using for the first time.

There are several ways including:

1. Installing the latest 'linux-firmware' package from Canonical
2. Installing the firmware from Bastien Nocera's 'rtl8723bs' GitHub (hadess)
3. Installing the package I've created for this purpose

And although the driver supports bluetooth similarly the required BT firmware and software needs to be installed from:

1. Compiling and installing from Larry Finger's 'rtl8723bs_bt' GitHub (lwfinger)
2. Installing the package I've created for this purpose

The package is useful as it can be included when respinning an ISO meaning WiFi/BT will be immediately available.


The package can be downloaded from 'rtl8723bs_4.12.0-041200rc2_amd64.deb'
and installed with 'sudo dpkg -i rtl8723bs_4.12.0-041200rc2_amd64.deb'



Monday, 15 May 2017

GUI 'isorespin.sh'


Although the earlier versions of my 'isorespin.sh' script provided flexibility in creating an ISO by allowing the addition of packages, if a package was only accessible from a specific repository then it could not be added when respinning an ISO. To provide this functionality I've re-written the script to include both adding repositories to the ISO and adding packages that are dependent on such repositories. Unfortunately the flags I had previously used to control the various options required changing to accommodate this functionality. Additionally an issue I've encountered several times is not having sufficient space to respin an ISO so using a temporary directory such as an external disk or USB for the temporary work files was needed. Therefore I've added a new flag '-w' to specify a 'work directory' which should resolve most instances when space becomes an issue.

With the new flags the invocation whilst providing flexibility can become somewhat complex. Coupled with this is some users are not comfortable using a command line interface so I decided to add a graphical user interface. It is rather simplistic but it takes you through the options and makes argument selections somewhat easier.

The examples below illustrate the various options through scenarios and provide a basic tutorial to the new version of the script.

The first scenario starts by respinning an Ubuntu 17.04 ISO and upgrades the kernel, add a repository, packages and files (scripts), downloads packages required by the scripts, and creates an ISO with persistence.The script was run on a mini PC which just had the required storage with only 11GB free on the root file system. All the local packages and files to be installed on the ISO had been previously downloaded and copied to the 'Downloads' directory. Also to prevent the file manager opening a window each time the script mounts a temporary file system I ran the command 'gsettings set org.gnome.desktop.media-handling automount-open false' first. Finally I had 'installed' the script by copying it to '/usr/local/bin' so that it was available regardless of the current directory.



When the script is started without any parameters it checks to see if it can run the GUI which then starts with the main selection menu where all required options are to be selected.


For each option (i.e. flag) selected, a sub-menu will appear to allow the choice (i.e. argument) to be entered. When selecting the ISO to be respun a file manager styled window will be presented but only files ending with a '.iso' suffix will be displayed.


When the kernel upgrade option is chosen the next choice is either to upgrade to the latest mainline version or a further window will open allowing a specific version to be typed in (which can be any of the Ubuntu Kernel Team kernel builds located at http://kernel.ubuntu.com/~kernel-ppa/mainline and is the name of the directory or folder name without the trailing '/' as in '--kernel v4.11-rc7' noting that earlier kernels will probably not work well if at all).


The new 'repo' option allows a repository to be added in either the form of a ppa or as a line to be added to '/etc/apt/sources.list'.


When any option requiring a text entry is added a further option is displayed to ask whether a further entry needs to be added.


Packages can be added as text entries either singularly or as multiples.


Local packages are added using the file manager which only displays '.deb' files.


Any packages that are specified for download will be placed in '/usr/src'. This can be a useful for example when later installing the ISO to a 32-bit bootloader device as by downloading the required GRUB packages they are readily available without the need for an internet connection during a manual installation.


There are no restrictions on the type of files added to the ISO and they will be stored under '/usr/local/bin'.


Selecting persistence will automatically pre-select the rEFInd bootmanager and the size of the persistence partition can be defined using the slider which with the GUI limits the size between 128MB and 2048MB.


Once all the options have been entered a confirmation screen will be displayed which shows the options as they would have been entered if the script had been manually run.



Then as the script runs its progress is displayed both in the terminal and on the screen.


When the script finishes a notification message is displayed.


A log file is produced while running the script which contains details of what was used in producing the ISO.


The script can still be run manually as before but note the renamed flags.



In the second scenario an attempt is made to run the script manually however there is insufficient space on the hard drive.


By specifying a work directory the script can run on external devices instead of locally.


In this example a USB is used.


Once an ISO has been respun it can be written to a USB using the 'dd' command.



Booting the ISO from the first scenario on an Intel Compute Stick shows how useful installing a local package can be. In this example the local package was 'rtl8723bs_4.11.0-041100_amd64.deb' which is a package I created to install an externally compiled wifi and bluetooth module together with firmware. Wifi automatically becomes available after booting (although in the example the device was also connected to the internet using an external USB adapter). The package 'inxi' was installed as part of the ISO respin and shows the kernel is now v4.11 and 'df' shows the persistence partition mounted as '/media/ubuntu/casper-rw'.


The package 'gnome-encfs-manager' which could only be installed once the repository 'ppa:gencfsm/ppa' had been added can now be run from the ISO as can be the additional files etc.


The new version of the script can be downloaded from 'isorespin.sh' (md5sum: 906c9662a4eae0a3a0bbbd91531af819) and it is designed to work on desktop 64-bit Ubuntu/Ubuntu flavoured ISO although Linux Mint, LDME, Debian 'Live install', KDE neon, elementary OS and Kali ISOs can also be used (with the limitation that Debian kernels cannot be upgraded with only v3.16 kernels updated with HDMI audio and wifi DKMS modules).

Any issues or improvement suggestions are welcome.

Please donate if you find the script useful using the following link http://goo.gl/nXWSGf as everything helps with development costs.

Interim RTL8723BS wifi packages for mainline kernel v4.11 and v4.12-rc1



While the RTL8723BS wifi module is now in the first v4.12 release candidate to get wifi working it is necessary to build it as an external module and load the firmware. As an interim I've build two packages 'rtl8723bs_4.11.0-041100_amd64.deb' and 'rtl8723bs_4.12.0-041200rc1_amd64.deb' from the v4.12 source (applying the necessary patches) which may be useful to anyone as an alternative to building for themselves until the v4.12 kernel matures. They can be downloaded and applied to the appropriate kernel using the 'dpkg -i' command.