Friday, 8 December 2017

Unity: I'm back and bionic

Ubuntu 18.04 daily ISO respun with unity

By now the future of Ubuntu without unity is a reality for anyone using the daily builds of Ubuntu 18.04 LTS otherwise know as Bionic Beaver. However as reported by OMG! UBUNTU! there is a growing Ubuntu community who would like to use the Unity 7 desktop by default. An initial proposal to create a new community Ubuntu flavour as Ubuntu Unity has been knocked back pending further clarification of development support not only for the unity packages but also for compiz, gtk, nux and all the other dependencies especially as some may be deprecated both now or maybe soon.

Whilst an Ubuntu Unity Remix may be the next step the project team have already built a PPA for the experimental packages for the Unity 7 desktop together with an updated ISO for testing. Currently this ISO is also available along with all the Bionic Beaver testing ISOs from the tester-wiki.

If you are interested in the project I recommend you look at their Ubuntu Community Hub.

Ubuntu 18.04 daily ISO with default GNOME

If you want to try but your hardware won't boot the testing ISO it is possible to use my 'isorespin.sh' script to respin it suitable for Intel Atom and Intel Apollo Lake devices.

Alternatively you can respin the current daily Bionic Beaver ISO and replace GNOME with Unity by adding their PPA. An example command is:

isorespin.sh -i bionic-desktop-amd64.iso -e gdm3 \
-r ppa:unity7maintainers/unity7-desktop -p ubuntu-unity-desktop

which creates the ISO 'linuxium-bionic-desktop-amd64.iso'. Likewise you can also add additional respin options for example '--apollo' to make a bootable ISO for Intel Apollo Lake devices. See my documentation for a complete explanation of the options and how they work.

Please donate if you find my ISO script useful using the following link http://goo.gl/nXWSGf.




Friday, 1 December 2017

Linux on MINIX NEO Z83-4 and Z83-4 Pro


The final piece of the jigsaw is now in place for running Linux on the MINIX NEO Z83-4 and Z83-4 Pro devices with the mainline kernel now patched to support wifi, audio and bluetooth.

It has been an interesting kernel journey with:

v4.9 including the eMMC v5.0 driver required for accessing the internal storage
v4.11 including the HDMI audio driver.
v4.12 recognizing the BCM43455 wifi driver but suffered a regression with the release of v4.13
v4.13.2/v4.14 including a fix for BCM43455 wifi driver
v4.14 including a fix for the headphone audio driver
v4.15-rc1 now includes a fix for the bluetooth driver

However to run fully working Ubuntu on either device still requires additional steps. The Canonical v4.15-rc1 mainline build was built using a patched config using default settings and does not include the changes required for including Intel ASoC Audio Drivers or the Serial Device Bus with serial drivers.

So first it is necessary to create a new config and compile the kernel.

Then it is just respinning the official Ubuntu ISO using my 'isorespin.sh' script to add the compiled packages providing the latest kernel, the required UCM files and missing wifi firmware.

Unfortunately the most recent UCM file for the headphone audio driver isn't compatible so I've had to modify it specifically to work with these devices.

Also the wifi firmware file first needs to be extracted from the Windows installation where it is located at 'C:\Windows\System32\drivers\4345r6nvram.txt'.

Once everything is prepared the following respin command was used to create the Ubuntu ISO as shown above: 

isorespin.sh -i ubuntu-17.04-desktop-amd64.iso -l "linux-headers-4.15.0-rc1-linuxium_4.15.0~rc1~linuxium_amd64.deb linux-image-4.15.0-rc1-linuxium_4.15.0~rc1~linuxium_amd64.deb" -f "linuxium-install-broadcom-drivers.sh wrapper-linuxium-install-broadcom-drivers.sh" -c wrapper-linuxium-install-broadcom-drivers.sh -f 4345r6nvram.txt -c "mv /usr/local/bin/4345r6nvram.txt /lib/firmware/brcm/brcmfmac43455-sdio.txt" -f HdmiLpeAudio.conf -c "mv /usr/local/bin/HdmiLpeAudio.conf /usr/share/alsa/cards" -f MINIX-Z83-4-chtrt5645.conf -c "mv /usr/local/bin/MINIX-Z83-4-chtrt5645.conf /usr/share/alsa/ucm/chtrt5645/chtrt5645.conf" -f MINIX-Z83-4-chtrt5645-HiFi.conf -c "mv /usr/local/bin/MINIX-Z83-4-chtrt5645-HiFi.conf /usr/share/alsa/ucm/chtrt5645/HiFi.conf"

At this stage it is still very early in the release cycle and there is still work to be undertaken to simplify the respinning of ISOs for these devices.

However the key point is that the mainline kernel now supports MINIX NEO Z83-4 and Z83-4 Pro devices. Meaning over time as various distros and OS migrate to the v4.15 kernel and later versions they should work flawlessly on them.

Please donate if you find my work useful using the following link http://goo.gl/nXWSGf.

Friday, 24 November 2017

Running and installing Ubuntu and Ubuntu flavours on Apollo Lake devices


Some Intel Apollo Lake devices have an option in the BIOS that allows the selection of a bootable OS. Unfortunately on a lot of mini PCs this option is either not present or doesn't include 'Linux' which is required to boot official Ubuntu and Ubuntu flavoured ISOs. Previously I addressed this through adding an option to my 'isorespin.sh' script allowing the ISO to be respun with the rEFInd boot manager to enabled booting.

Whilst investigating why GRUB fails to boot I've developed an alternative approach which I have incorporated into a new release of my 'isorespin.sh' script. Now when respinning with the '--apollo' option the respun ISO replaces the GRUB EFI files with a single EFI file that corresponds to the entry in NVRAM created by the GRUB installation. This EFI file boots the device directly to Linux similar to how Windows boots.


It uses a script I've written that hooks into the 'initramfs' tools to create a bootable EFI file every time 'update-initramfs' is executed. This means if a new kernel is installed the EFI file is automatically updated to boot the new kernel.

To respin an ISO suitable for Intel Apollo Lake devices first download my latest version of 'isorespin.sh' and then respin using the '--apollo' option.

If you have multiple kernels installed it is still possible to boot from a specific kernel simply by rebuilding the 'initramfs' file for that kernel. So for example if you are currently running the 4.10.0-40-generic kernel and want to revert to the 4.10.0-19-generic then just run 'update-initramfs -u -k 4.10.0-19-generic' and reboot.


One issue that might be encountered is where the EFI partition isn't large enough to store the bootable EFI file. Some Windows installations only create a 60MB partition which after installing the Windows EFI files leaves only around 30MB. With the later Linux kernel releases the size and number of modules have increased and if the 'linux-image-extra' package is installed then the corresponding 'initrd.img' is now quite large (over 200MB). Recent kernels only have the minimum set of kernel modules in the 'linux-image' package with the remaining ones in the 'linux-image-extra' package. Whilst in the past installing just the 'linux-image' package was sufficient when upgrading to a new kernel it is now recommended to install both 'linux-image' and 'linux-image-extra' packages.

As a result I've written an additional script that will shrink the size of '/lib/modules' by removing all unused modules from the combination of the 'linux-image' and 'linux-image-extra' packages for a specified kernel. Simply download the script 'update-modules' and pass the kernel version you want to shrink as the parameter.

For example if you want to shrink the overall size of '/lib/modules/4.10.0-19-generic' then run the command 'update-modules 4.10.0-19-generic'. The script will also automatically regenerates the 'initramfs' file and create the bootable EFI file. So if you are running with a small EFI partition and installing a new kernel fails to create the bootable EFI file then running 'update-modules' will fix this. Note that the script requires an internet connection to temporarily download and examine the modules in the 'linux-image-extra' package.


If having removed unused modules a new peripheral requires a missing driver (i.e. module) simply reinstall the 'linux-image-extra' package. For example connecting a USB Ethernet adaptor for the first time when running a previously reduced 4.10.0-19 kernel does not get recognised. Reinstalling all the drivers/modules using the command 'apt install --reinstall linux-image-extra-4.10.0-19-generic' and the adaptor can now connect. 


The remaining unused modules can then be removed by re-running the 'update-modules' script if space is a consideration.


It is also possible to respin a bootable ISO for Intel Apollo Lake devices by using the '-b Linuxium' option which is actually what the '--apollo' option now does. Adding the 'Linuxium' bootscript (as implied by the '--apollo' option) does not actually restrict the ISO to boot on a specific processor however it does depend on the boot loader used by the device. An ISO respun with the  '-b Linuxium' option will work on any Intel Atom and Apollo Lake devices if they are using a 64-bit boot loader which is the case for Apollo Lake devices. Also note that persistence cannot be added to respinning an ISO in conjunction with the '--apollo' or '-b Linuxium' option. This is because persistence adds the rEFInd boot manager which incidentally also boots on both Intel Atom and Apollo Lake devices using a 64-bit boot loader.

As an example I've respun the Ubuntu 17.04 ISO using the '--apollo' option and included the 'update-modules' script which is available under '/usr/local/bin' and created an ISO suitable for booting on Intel Apollo-based mini PCs.

The ISO can be downloaded from:

Apollo (-i ubuntu-17.04-desktop-amd64.iso --apollo -f update-modules)

Anyone wanting to spin their own can download an ISO and respin using my 'isorespin.sh' script with the above options or after consulting my documentation.

Please donate if you find the ISO or scripts useful using the following link http://goo.gl/nXWSGf.


Friday, 27 October 2017

Ubuntu Cinnamon


Besides Ubuntu there are also recognised Ubuntu flavours that include:
  • Kubuntu — Ubuntu with the K Desktop environment
  • Lubuntu — Ubuntu that uses LXDE
  • Mythbuntu — Designed for creating a home theatre PC with MythTV
  • Ubuntu Budgie — Simplicity and elegance – Budgie desktop powered by Ubuntu
  • Ubuntu GNOME — Ubuntu with the GNOME desktop environment
  • Ubuntu Kylin — Ubuntu localised for China
  • Ubuntu MATE — Ubuntu with the MATE desktop environment
  • Ubuntu Studio — Designed for multimedia editing and creation
  • Xubuntu — Ubuntu with the XFCE desktop environment
with the recent change that the final stable non-LTS release of Ubuntu GNOME is 17.04 as Ubuntu now uses the GNOME desktop.

But in addition to the flavour Ubuntu derivatives are customizations which consist of Ubuntu based distributions which are created and maintained by individuals and organizations outside of Canonical and have varying relationships in working with the Ubuntu community.

At least two of these customizations (Cubuntu and Mintuse the Cinnamon desktop which is a fork of the GNOME 3 desktop.

With Cinnamon now included in the 'universe' repository of community maintained software for Ubuntu three key packages are available:
  • cinnamon — Innovative and comfortable desktop (essentially the Cinnamon shell)
  • cinnamon-core — Cinnamon desktop environment - essential components
  • cinnamon-desktop-environment — Cinnamon desktop environment - full desktop with extra components
and these can be downloaded and installed to create an 'Ubuntu Cinnamon'. Note that the packages are inclusive so 'cinnamon-core' includes 'cinnamon' for example.

To demonstrate this I've respun the Ubuntu 17.10 ISO and installed the minimalist 'cinnamon' package and created ISOs suitable for booting on both Intel Atom-based and Intel Apollo-based mini PCs.

The ISOs can be downloaded from:

Atom (linuxium-atom-ubuntu-17.10-desktop-amd64.iso)
Apollo (linuxium-apollo-ubuntu-17.10-desktop-amd64.iso)

Whilst the ISOs target specific Intel architectures to ensure everything works they should also work on any Intel device.

Unfortunately respinning an Ubuntu ISO with Cinnamon normally fails because the required 'blueman' package installation tries to reload the system message bus configuration. However I've created a workaround which requires patching my 'isorespin.sh' script.

Anyone wanting to spin their own version can download the Ubuntu 17.10 ISO from http://releases.ubuntu.com/17.10 and respin using the following instructions in consultation with my documentation.

After downloading the ISO the next step is to download the basic patch 'cinnamon.isorespin.sh.patch' and decide which Cinnamon package from 'cinnamon', 'cinnamon-core' or 'cinnamon-desktop-environment' you want to use.

The basic patch assumes 'cinnamon' so for the others first update the patch with the package to be installed:

sed -i 's/"cinnamon"/"cinnamon-core"/' cinnamon.isorespin.sh.patch

or

sed -i 's/"cinnamon"/"cinnamon-desktop-environment"/' cinnamon.isorespin.sh.patch

Now patch my 'isorespin.sh' script. You must have the latest version so check using the command

isorespin.sh -v

or

./isorespin.sh -v

depending on whether you have installed the script to '/usr/local/bin' or run it locally. Make sure you have version '7.3.5' otherwise upgrade by downloading it from the link above. Then if you have installed the script to '/usr/local/bin' enter:

sudo patch -p0 -b -d / < cinnamon.isorespin.sh.patch

otherwise for a local script enter:

patch -p4 -b < cinnamon.isorespin.sh.patch

Now check that it has been updated by confirming the version again and making sure it is now '7.3.5.1'. The patching creates a new version of the script together with a backup of the original as 'isorespin.sh.orig' so you can easily revert as required.

Finally to update the wallpaper on the respun ISO two additional commands must be included as part of respinning:

-c "sed -i 's?/usr/share/themes/Adwaita/backgrounds/adwaita-timed.xml?/usr/share/backgrounds/warty-final-ubuntu.png?' /usr/share/glib-2.0/schemas/org.cinnamon.desktop.background.gschema.xml"
-c "glib-compile-schemas /usr/share/glib-2.0/schemas"

So the complete invocation for the 'Apollo' ISO above using the patched script was:

isorespin.sh -i ubuntu-17.10-desktop-amd64.iso --apollo -p cinnamon -c "sed -i 's?/usr/share/themes/Adwaita/backgrounds/adwaita-timed.xml?/usr/share/backgrounds/warty-final-ubuntu.png?' /usr/share/glib-2.0/schemas/org.cinnamon.desktop.background.gschema.xml" -c "glib-compile-schemas /usr/share/glib-2.0/schemas"




By respinning the ISO and just adding the 'cinnamon' package you will get a good indication of whether you like the interface. But be aware that the more Cinnamon you add the more desktop applications you will be duplicating with GNOME so a customized distro such as Linux Mint may be prefered.

Please donate if you find the ISOs or script useful using the following link http://goo.gl/nXWSGf.





Respinning ISOs with 'rEFInd'

Respining ISOs with 'rEFInd' version 0.11.1 (the current default) results in the error message 'invalid loader file!' when attempting to boot.

Version 0.11.0 works correctly and because my 'isorespin.sh' script first looks in the current directory for the 'rEFInd' boot manager files before downloading them from the internet if not found it means a specific version can first be downloaded and used automatically when the script is run.

I recommend downloading the file 'refind-bin-0.11.0.zip' from 'https://sourceforge.net/projects/refind/files/0.11.0' in the directory where you are running 'isorespin.sh':
wget https://sourceforge.net/projects/refind/files/0.11.0/refind-bin-0.11.0.zip/download -O refind-bin-0.11.0.zip
and unzip it:
unzip refind-bin-0.11.0.zip
Then remove the downloaded file afterwards:
rm refind-bin-0.11.0.zip
so that it does not create a conflict when running the script. Check that you just have a directory called 'refind-bin-0.11.0' containing the 'rEFInd' boot manager files. Then run the 'isorespin.sh' script:
./isorespin.sh
or
/usr/local/bin/isorespin.sh
with the required options to respin your ISO as required.

Note that subsequent versions of 'rEFInd' may fix the issue and unfortunately there is always the possibility that the error may also reappear in subsequent versions. It is recommended to always try the latest version and then use the most recent working version as a temporary workaround until a new version becomes available that fixes the issue.

Please donate if you find my 'isorespin.sh' script useful using the following link http://goo.gl/nXWSGf.

Friday, 20 October 2017

Lubuntu Next: Or Lubuntu LXQt the future for Lubuntu

The latest version of Ubuntu has now been released as 17.10 (Artful Aardvark) together with all its flavours with the exception of Ubuntu GNOME.  And whilst this may have everyone's attention and perhaps even searching for alternatives I have been trying out a new distro called Lubuntu Next which was requested in a comment.


Currently Lubuntu Next is a separate release to Lubuntu as it uses LXQt in place of LXDE and exists because no decision has been made on formally replace LXDE with LXQt in Lubuntu.

It is a bit rough around the edges however it is interesting to see what the future direction is. Full details on the release can be found in its wiki.

I've respun the latest daily ISO (saved as lubuntu-next-17.10-daily-141017-desktop-amd64.iso) and created ISOs suitable for booting on both Intel Atom-based and Intel Apollo-based mini PCs.

The ISOs can be downloaded from:

Atom (-i lubuntu-next-17.10-daily-141017-desktop-amd64.iso --atom)
Apollo (-i lubuntu-next-17.10-daily-141017-desktop-amd64.iso --apollo)

Whilst the ISOs target specific Intel architectures to ensure everything works they should also work on any Intel devices but read the wiki to see the limitations.

Anyone wanting to spin their own version can download the latest daily ISO from http://cdimage.ubuntu.com/lubuntu-next/daily-live/pending and respin using my 'isorespin.sh' script using the options above or after consulting my documentation.

Note:

Building ISOs with 'rEFInd' version 0.11.1 (the current default) results in the error message 'invalid loader file!' when attempting to boot.

Version 0.11.0 works correctly and because my 'isorespin.sh' script first looks in the current directory for the 'rEFInd' boot manager files before downloading them from the internet if not found it means a specific version can first be downloaded and used automatically when the script is run.

I recommend downloading the file 'refind-bin-0.11.0.zip' from 'https://sourceforge.net/projects/refind/files/0.11.0' in the directory where you are running 'isorespin.sh':
wget https://sourceforge.net/projects/refind/files/0.11.0/refind-bin-0.11.0.zip/download -O refind-bin-0.11.0.zip
and unzip it:
unzip refind-bin-0.11.0.zip
Then remove the downloaded file afterwards:
rm refind-bin-0.11.0.zip
so that it does not create a conflict when running the script. Check that you just have a directory called 'refind-bin-0.11.0' containing the 'rEFInd' boot manager files. Then run the 'isorespin.sh' script:
./isorespin.sh
or
/usr/local/bin/isorespin.sh
with the required options to respin your ISO as required.

Please donate if you find the ISOs or script useful using the following link http://goo.gl/nXWSGf.

Fixing broken HDMI audio

Recently I noticed that I had no HDMI audio when running kernels starting from v4.12.0 on an Intel Compute Stick model STK1AW32SC (Cherry Trail).

First I ran the command 'aplay -l' to see I had an HDMI LPE Audio device. In fact I had three:


I then tried playing an audio file on the default device with 'aplay /usr/share/sounds/alsa/Front_Left.wav' which didn't work:


So I listed the PCM devices with 'aplay -L':


and tested each PCM in turn:


which confirmed that audio worked on device 2. 

As the default sink device is 0:


it needs to be changed by editing '/etc/pulse/default.pa'. I can do this manually:


 or write and use a script:


The advantage of the script is that I can make use of it when respinning an ISO with 'isorespin.sh' (using the '-f' option) and automatically fix HDMI audio in the respun ISO for use on this device.

After running the script whilst using Ubuntu 'pulseaudio' needs to be restarted (using 'pulseaudio -k' is sufficient) for the changes to take effect:


Now playing an audio file on the default device with 'aplay /usr/share/sounds/alsa/Front_Left.wav' works together with sound in Chrome and other applications.

Please donate if you find this tip helpful using the following link http://goo.gl/nXWSGf.