Sunday, 6 August 2017

Respinning security distros and upgrading packages

A while back I dropped Debian and Debian based ISO support from my 'isorespin.sh' script as the release of Debian 9 Stretch uses a v4.9 kernel rather than a v3.16 kernel meaning that the kernel cannot be upgraded with Canonical's HDMI and RTL8723BS DKMS support. I also dropped their support because I do not agree with using a kernel compiled for one distro's userland with a different distro's userland as for example in using an Ubuntu kernel to boot a Fedora ISO.

This meant no more respinning Kali ISOs but since I'm again receiving requests for its support it got me thinking about what Ubuntu-based security distros existed. So following some research I've added support for BackBox Linux a 'penetration testing and security assessment oriented Linux distribution providing a network and systems analysis toolkit'.


Respinning is simple using my latest version of 'isorespin.sh':

Script '/usr/local/bin/isorespin.sh' called with '-i backbox-5-amd64.iso --atom --update' ...
Work directory 'isorespin' used ...
ISO '/home/linuxium/backbox-5-amd64.iso' respun ...
Bootloader 'GRUB' added ...
Kernel updated with mainline kernel version '4.13.0-041300rc3-generic' ...
Local package '/home/linuxium/isorespin/rtl8723bs_4.12.0_amd64.deb' added ...
File '/home/linuxium/isorespin/linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/isorespin/wrapper-linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/isorespin/linuxium-install-broadcom-drivers.sh' added ...
File '/home/linuxium/isorespin/wrapper-linuxium-install-broadcom-drivers.sh' added ...
Command run ...
# wrapper-linuxium-install-UCM-files.sh
./linuxium-install-UCM-files.sh: Extracting UCM files ...
./linuxium-install-UCM-files.sh: Installing UCM files ...
./linuxium-install-UCM-files.sh: Reloading UCM driver ...
./linuxium-install-UCM-files.sh: Installation of UCM finished 
# wrapper-linuxium-install-broadcom-drivers.sh
./linuxium-install-broadcom-drivers.sh: Extracting Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Reloading Broadcom driver ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom bluetooth service ...
Created symlink /etc/systemd/system/multi-user.target.wants/brcmbt.service, pointing to /lib/systemd/system/brcmbt.service.
./linuxium-install-broadcom-drivers.sh: Starting Broadcom bluetooth service ...
Running in chroot, ignoring request.
./linuxium-install-broadcom-drivers.sh: Installation of Broadcom finished 
Respun ISO created as 'linuxium-v4.13-rc3-backbox-5-amd64.iso'.

I've also had another look at Kali as whilst their official ISOs use a Debian kernel they also offer Kali Metapackages which 'give you the flexibility to install specific subsets of tools based on your particular needs'. Following the documented instructions I looked at how I could update my script to allow the addition of these metapackages when respinning. As a result I've added a new option '--key' to add GPG keys to the APT keyring allowing packages to be downloaded from signed repositories. It is now possible to respin an Ubuntu ISO adding the packages:


There are some restrictions/limitations. Unity isn't supported and I've found adding a GPG key to a 17.04 or 17.10 release fails. Additionally adding the 'kali-linux-full' package results in dependency issues. However it is possible to respin the recently released Ubuntu GNOME 16.04.3 and add 'kali-linux' and 'kali-linux-top10':

Script '/usr/local/bin/isorespin.sh' called with '-i ubuntu-gnome-16.04.3-desktop-amd64.iso --atom -u --key adv --keyserver keyserver.ubuntu.com --recv-keys ED444FF07D8D0BF6 --repository deb http://http.kali.org/kali kali-rolling main contrib non-free -p kali-linux -p kali-linux-top10' ...
Work directory 'isorespin' used ...
ISO '/home/linuxium/ubuntu-gnome-16.04.3-desktop-amd64.iso' respun ...
Bootloader 'GRUB' added ...
Kernel updated with mainline kernel version '4.13.0-041300rc3-generic' ...
Key 'adv --keyserver keyserver.ubuntu.com --recv-keys ED444FF07D8D0BF6' added ...
Repository 'deb http://http.kali.org/kali kali-rolling main contrib non-free' added ...
Package 'kali-linux' added ...
Package 'kali-linux-top10' added ...
Local package '/home/linuxium/isorespin/rtl8723bs_4.12.0_amd64.deb' added ...
File '/home/linuxium/isorespin/linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/isorespin/wrapper-linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/isorespin/linuxium-install-broadcom-drivers.sh' added ...
File '/home/linuxium/isorespin/wrapper-linuxium-install-broadcom-drivers.sh' added ...
Command run ...
# wrapper-linuxium-install-UCM-files.sh
./linuxium-install-UCM-files.sh: Extracting UCM files ...
./linuxium-install-UCM-files.sh: Installing UCM files ...
./linuxium-install-UCM-files.sh: Reloading UCM driver ...
./linuxium-install-UCM-files.sh: Installation of UCM finished 
# wrapper-linuxium-install-broadcom-drivers.sh
./linuxium-install-broadcom-drivers.sh: Extracting Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Reloading Broadcom driver ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom bluetooth service ...
Created symlink /etc/systemd/system/multi-user.target.wants/brcmbt.service, pointing to /lib/systemd/system/brcmbt.service.
./linuxium-install-broadcom-drivers.sh: Starting Broadcom bluetooth service ...
Running in chroot, ignoring request.
./linuxium-install-broadcom-drivers.sh: Installation of Broadcom finished 
Respun ISO created as 'linuxium-v4.13-rc3-ubuntu-gnome-16.04.3-desktop-amd64.iso'.

Lubuntu is also supported:


and by adding 'kali-desktop-lxde' additional LXDE packages are included (note 'Other'):


Script '/usr/local/bin/isorespin.sh' called with '-i lubuntu-16.04.3-desktop-amd64.iso --atom -u --key adv --keyserver keyserver.ubuntu.com --recv-keys ED444FF07D8D0BF6 --repository deb http://http.kali.org/kali kali-rolling main contrib non-free -p kali-linux -p kali-desktop-lxde -p kali-linux-top10' ...
Work directory 'isorespin' used ...
ISO '/home/linuxium/lubuntu-16.04.3-desktop-amd64.iso' respun ...
Bootloader 'GRUB' added ...
Kernel updated with mainline kernel version '4.13.0-041300rc3-generic' ...
Key 'adv --keyserver keyserver.ubuntu.com --recv-keys ED444FF07D8D0BF6' added ...
Repository 'deb http://http.kali.org/kali kali-rolling main contrib non-free' added ...
Package 'kali-linux' added ...
Package 'kali-desktop-lxde' added ...
Package 'kali-linux-top10' added ...
Local package '/home/linuxium/isorespin/rtl8723bs_4.12.0_amd64.deb' added ...
File '/home/linuxium/isorespin/linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/isorespin/wrapper-linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/isorespin/linuxium-install-broadcom-drivers.sh' added ...
File '/home/linuxium/isorespin/wrapper-linuxium-install-broadcom-drivers.sh' added ...
Command run ...
# wrapper-linuxium-install-UCM-files.sh
./linuxium-install-UCM-files.sh: Extracting UCM files ...
./linuxium-install-UCM-files.sh: Installing UCM files ...
./linuxium-install-UCM-files.sh: Reloading UCM driver ...
./linuxium-install-UCM-files.sh: Installation of UCM finished 
# wrapper-linuxium-install-broadcom-drivers.sh
./linuxium-install-broadcom-drivers.sh: Extracting Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Reloading Broadcom driver ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom bluetooth service ...
Created symlink /etc/systemd/system/multi-user.target.wants/brcmbt.service, pointing to /lib/systemd/system/brcmbt.service.
./linuxium-install-broadcom-drivers.sh: Starting Broadcom bluetooth service ...
Running in chroot, ignoring request.
./linuxium-install-broadcom-drivers.sh: Installation of Broadcom finished 
Respun ISO created as 'linuxium-v4.13-rc3-lubuntu-16.04.3-desktop-amd64.iso'.

Finally I've added another option '--upgrade' which simply performs an 'apt-get upgrade' on the ISO's packages. So for example having downloaded an Artful daily ISO, I can respin it with the latest packages:


Script '/usr/local/bin/isorespin.sh' called with '-i 030817-artful-desktop-amd64.iso --upgrade --rolling-unstable --atom -s 200MB' ...
Work directory 'isorespin' used ...
ISO '/home/linuxium/030817-artful-desktop-amd64.iso' respun ...
Kernel boot parameters 'persistent' added ...
Bootmanager 'rEFInd' added ...
Distro upgraded ...
Package 'linux-headers-4.12.0-9 linux-headers-4.12.0-9-generic linux-image-4.12.0-9-generic linux-image-extra-4.12.0-9-generic' added ...
Local package '/home/linuxium/isorespin/rtl8723bt_4.12.0_amd64.deb' added ...
File '/home/linuxium/isorespin/linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/isorespin/wrapper-linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/isorespin/linuxium-install-broadcom-drivers.sh' added ...
File '/home/linuxium/isorespin/wrapper-linuxium-install-broadcom-drivers.sh' added ...
Command run ...
# wrapper-linuxium-install-UCM-files.sh
./linuxium-install-UCM-files.sh: Extracting UCM files ...
./linuxium-install-UCM-files.sh: Installing UCM files ...
./linuxium-install-UCM-files.sh: Reloading UCM driver ...
./linuxium-install-UCM-files.sh: Installation of UCM finished 
# wrapper-linuxium-install-broadcom-drivers.sh
./linuxium-install-broadcom-drivers.sh: Extracting Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Reloading Broadcom driver ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom bluetooth service ...
Created symlink /etc/systemd/system/multi-user.target.wants/brcmbt.service -> /lib/systemd/system/brcmbt.service.
./linuxium-install-broadcom-drivers.sh: Starting Broadcom bluetooth service ...
Running in chroot, ignoring request.
./linuxium-install-broadcom-drivers.sh: Installation of Broadcom finished 
Persistence partition of '200MB' added ...
Respun ISO created as 'linuxium-persistence-030817-artful-desktop-amd64.iso'.

The new flags are only available from a CLI invocation:


and the upgraded script can be downloaded from 'isorespin.sh'.

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

Saturday, 29 July 2017

Rolling kernels, target processors and Peppermint OS in latest 'isorespin.sh' update


I've updated my 'isorespin.sh' script to include the following concepts:

  • rolling kernels
  • target processors

and I've additionally included support for Peppermint OS (an Ubuntu kernel based distro).

The  need for rolling kernels  is primarily to address the shortfall that existing ISO kernels typically don't have the hardware support required for the latest devices. They ship with the 'kernel of the day' whereas the latest hardware tends to require, well, the latest kernel to fully work. Ubuntu have in part addressed this through their LTS Enablement Stacks. Another alternative to get 'newer' kernels is to enable the proposed repository however there is also a pre-release and test kernel repository together with the unstable repository where mainline kernels are migrated into Ubuntu as well as the upstream mainline kernels.


I've added an option '--rolling-list' to keeping track of what new kernels are available where with options to easily incorporate them when respinning an ISO. I've termed the kernel types as release, proposed, testing and unstable to reflect the repositories they are drawn from as described above. And if it is not abundantly obvious but any kernel other than the formally released ones are not encouraged for anyone needing a stable system or anyone who is not comfortable running into occasional or even frequent breakage.

The other concept I've introduced is respinning an ISO for a target processor. Whilst I've documented how to respin an ISO and what to include it does require reading. So now by including the option of '--atom' or '--apollo' you'll get an ISO that hopefully works on devices with the respective Intel SoCs. The options simply include the flags, packages, scripts and commands that I recommend and mirror the manual invocations of:

For '--atom': -l rtl8723bX_4.12.0_amd64.deb -f linuxium-install-UCM-files.sh -f wrapper-linuxium-install-UCM-files.sh -f linuxium-install-broadcom-drivers.sh -f wrapper-linuxium-install-broadcom-drivers.sh -c wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-broadcom-drivers.sh

For '--apollo': -b rEFInd

The files are automatically downloaded from the internet if they are not found as part of the command invocation and this should simplify respinning for those looking something quick and easy.

Both these new functionality require that you have the 'curl' package installed prior to running the respin script however the script will check and warn you if it is missing.

The new syntax for 'isorespin.sh' is:

Usage: /usr/local/bin/isorespin.sh [ -h | -v | --rolling-list ]
       /usr/local/bin/isorespin.sh -i <ISO> [ [ -u | -k <kernel> ] | -r "<repo> ... " | -p "<pkg> ... " | -l "<pkg.deb> ... " | -f "<file> | <directory> ... " | [ -s <size>MB | GB ] | [ -b GRUB | rEFInd ] | ...
       /usr/local/bin/isorespin.sh ... -w <directory> | -d "<pkg> ... " | -e "<pkg> ... " | -c "<cmd> ... " | -o "<file> | <directory> ... " | -g "" | "<kernel boot parameter> ... " | ...
       /usr/local/bin/isorespin.sh ... --apollo | --atom | ...
       /usr/local/bin/isorespin.sh ... --rolling-release | --rolling-release-hwe | --rolling-release-hwe-edge | --rolling-proposed | --rolling-proposed-hwe | --rolling-proposed-hwe-edge | ...
       /usr/local/bin/isorespin.sh ... --rolling-testing | --rolling-testing-hwe | --rolling-testing-hwe-edge | --rolling-unstable | --rolling-unstable-hwe | --rolling-unstable-hwe-edge ]

and the options have been included in the GUI:





I've also added Peppermint OS support. This OS uses an Ubuntu kernel and is particularly suitabale for low specification devices like the original Ubuntu Intel Compute Stick which only has 1GB RAM and 8GB storage.


I was able to watch a YouTube video at 1080p via wifi which is pretty impressive for that device.



Mainline kernel v4.13 is progressing with RC2 released this week.


As the opt-in Ubuntu flavours released their Artful 17.10 Alpha 2 ISOs yesterday I've respun the Lubuntu one with "--atom -u" which generated the log:

Script '/usr/local/bin/isorespin.sh' called with '-i lubuntu-17.10-alpha2-desktop-amd64.iso --atom -u' ...
Work directory 'isorespin' used ...
ISO '/home/linuxium/lubuntu-17.10-alpha2-desktop-amd64.iso' respun ...
Bootloader 'GRUB' added ...
Kernel updated with mainline kernel version '4.13.0-041300rc2-generic' ...
Local package '/home/linuxium/isorespin/rtl8723bt_4.12.0_amd64.deb' added ...
File '/home/linuxium/isorespin/linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/isorespin/wrapper-linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/isorespin/linuxium-install-broadcom-drivers.sh' added ...
File '/home/linuxium/isorespin/wrapper-linuxium-install-broadcom-drivers.sh' added ...
Command run ...
# wrapper-linuxium-install-UCM-files.sh
./linuxium-install-UCM-files.sh: Extracting UCM files ...
./linuxium-install-UCM-files.sh: Installing UCM files ...
./linuxium-install-UCM-files.sh: Reloading UCM driver ...
./linuxium-install-UCM-files.sh: Installation of UCM finished 
# wrapper-linuxium-install-broadcom-drivers.sh
./linuxium-install-broadcom-drivers.sh: Extracting Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Reloading Broadcom driver ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom bluetooth service ...
Created symlink /etc/systemd/system/multi-user.target.wants/brcmbt.service -> /lib/systemd/system/brcmbt.service.
./linuxium-install-broadcom-drivers.sh: Starting Broadcom bluetooth service ...
Running in chroot, ignoring request.
./linuxium-install-broadcom-drivers.sh: Installation of Broadcom finished 
Respun ISO created as 'linuxium-v4.13-rc2-lubuntu-17.10-alpha2-desktop-amd64.iso'.

and the respun ISO can be downloaded from here.


I've also respun the Ubuntu 17.04 ISO and added a 200MB persistent partition meaning the ISO which now supports Intel Atom devices with also boot on Intel Apollo devices:

Script '/usr/local/bin/isorespin.sh' called with '-i ubuntu-17.04-desktop-amd64.iso -u --atom -s 200MB' ...
Work directory 'isorespin' used ...
ISO '/home/linuxium/ubuntu-17.04-desktop-amd64.iso' respun ...
Kernel boot parameters 'persistent' added ...
Bootmanager 'rEFInd' added ...
Kernel updated with mainline kernel version '4.13.0-041300rc2-generic' ...
Local package '/home/linuxium/isorespin/rtl8723bs_4.12.0_amd64.deb' added ...
File '/home/linuxium/isorespin/linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/isorespin/wrapper-linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/isorespin/linuxium-install-broadcom-drivers.sh' added ...
File '/home/linuxium/isorespin/wrapper-linuxium-install-broadcom-drivers.sh' added ...
Command run ...
# wrapper-linuxium-install-UCM-files.sh
./linuxium-install-UCM-files.sh: Extracting UCM files ...
./linuxium-install-UCM-files.sh: Installing UCM files ...
./linuxium-install-UCM-files.sh: Reloading UCM driver ...
./linuxium-install-UCM-files.sh: Installation of UCM finished 
# wrapper-linuxium-install-broadcom-drivers.sh
./linuxium-install-broadcom-drivers.sh: Extracting Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Reloading Broadcom driver ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom bluetooth service ...
Created symlink /etc/systemd/system/multi-user.target.wants/brcmbt.service -> /lib/systemd/system/brcmbt.service.
./linuxium-install-broadcom-drivers.sh: Starting Broadcom bluetooth service ...
Running in chroot, ignoring request.
./linuxium-install-broadcom-drivers.sh: Installation of Broadcom finished 
Persistence partition of '200MB' added ...
Respun ISO created as 'linuxium-persistence-v4.13-rc2-ubuntu-17.04-desktop-amd64.iso'.

and the respun ISO can be downloaded from here.

Anyone interested in running an ISO shown in the opening image can just respin the latest daily Ubuntu release with '--rolling-unstable --atom' options. Simple!

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

Thursday, 20 July 2017

Sixth look at Ubuntu 17.10: 'julyshakedown'


This week Canonical have issued an 'Ubuntu Artful Desktop July Shakedown – call for testing' requesting:
We’re mid-way through the Ubuntu Artful development cycle, with the 17.10 release rapidly approaching on the horizon. Now is a great time to start exercising the new GNOME goodness that’s landed on our recent daily images! Please download the ISO, test it out on your own hardware, and file bugs where appropriate.
So if you'd like to help out but only have an Intel Atom (Bay Trail or Cherry Trail) or Apollo Lake device then you can either use my 'isorespin.sh' script to make a bootable ISO for testing or use the 'one I made earlier'. I've used my script to respin the daily Ubuntu 17.10 ISO from the 19th of July and updated it with the v4.13-rc1 kernel packages along with my usual wifi/bluetooth packages and scripts and I've added a small 200MB persistence partition which can be resized after booting.

The ISO respin log file contains:

Script '/usr/local/bin/isorespin.sh' called with '-i artful-desktop-amd64-190717.iso -u -l rtl8723bt_4.12.0_amd64.deb -f linuxium-install-UCM-files.sh -f wrapper-linuxium-install-UCM-files.sh -f linuxium-install-broadcom-drivers.sh -f wrapper-linuxium-install-broadcom-drivers.sh -c wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-broadcom-drivers.sh -s 200MB' ...
Work directory 'isorespin' used ...
ISO '/home/linuxium/artful-desktop-amd64-190717.iso' respun ...
Kernel boot parameters 'persistent' added ...
Bootmanager 'rEFInd' added ...
Kernel updated with mainline kernel version '4.13.0-041300rc1-generic' ...
Local package '/home/linuxium/rtl8723bt_4.12.0_amd64.deb' added ...
File '/home/linuxium/linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/wrapper-linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/linuxium-install-broadcom-drivers.sh' added ...
File '/home/linuxium/wrapper-linuxium-install-broadcom-drivers.sh' added ...
Command run ...
# wrapper-linuxium-install-UCM-files.sh
./linuxium-install-UCM-files.sh: Extracting UCM files ...
./linuxium-install-UCM-files.sh: Installing UCM files ...
./linuxium-install-UCM-files.sh: Reloading UCM driver ...
./linuxium-install-UCM-files.sh: Installation of UCM finished 
# wrapper-linuxium-install-broadcom-drivers.sh
./linuxium-install-broadcom-drivers.sh: Extracting Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Reloading Broadcom driver ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom bluetooth service ...
Created symlink /etc/systemd/system/multi-user.target.wants/brcmbt.service -> /lib/systemd/system/brcmbt.service.
./linuxium-install-broadcom-drivers.sh: Starting Broadcom bluetooth service ...
Running in chroot, ignoring request.
./linuxium-install-broadcom-drivers.sh: Installation of Broadcom finished 
Persistence partition of '200MB' added ...
Respun ISO created as 'linuxium-persistence-v4.13-rc1-artful-desktop-amd64-190717.iso'.

which shows the command used and the respun ISO can be downloaded from here.

Anyone interested in respining their own ISO can download my 'isorespin.sh' script from here together with full documentation with examples from here.

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





Thursday, 6 July 2017

Fifth look at Ubuntu 17.10: using an 'unstable' kernel


The v4.12 kernel has been released and is now available in Ubuntu's 'unstable' repository. Whilst the compiled kernel can be installed directly from the Ubuntu Kernel Team builds on any release it can also be added to an Ubuntu 17.10 ISO through a repository and installed as a package.

The v4.12 kernel is significant as it includes RTL8723BS wifi and the Ubuntu 17.10 userspace includes the required firmware although bluetooth isn't included.

And as another Unity based Ubuntu release nears EOL (Ubuntu 16.10) and the challenges from switching from Unity to GNOME Shell are recognised I've written a script to simplify the installation of the 'Dash to Dock' GNOME Shell Extension.

My new script 'linuxium-install-dash-to-dock.sh' requires the internet as it will download the latest release of the extension, enable it and configure it with some basic settings to fix the position of the extended dock with the application search icon at the top similar to Dash in Unity. Alternatively you can install the package 'gnome-shell-extension-dashtodock' although you will need to enable it.

I've used my 'isorespin.sh' script to respin the daily Ubuntu 17.10 ISO corresponding to the flavour Alpha 1 releases and updated it with the v4.12 kernel packages along with my usual wifi/bluetooth packages and scripts and I've additionally added my 'extension' script although I've left installation optional:


which if performed requires the GNOME Shell to be reloaded using 'Alt F2' and 'r':


The ISO respin log file contains:

Script '/usr/local/bin/isorespin.sh' called with '-i ubuntu-17.10-alpha1-desktop-amd64.iso -r ppa:canonical-kernel-team/unstable -p linux-headers-4.12.0-5 -p linux-headers-4.12.0-5-generic -p linux-image-4.12.0-5-generic -p linux-image-extra-4.12.0-5-generic -l rtl8723bt_4.12.0_amd64.deb -f linuxium-install-dash-to-dock.sh -f linuxium-install-UCM-files.sh -f wrapper-linuxium-install-UCM-files.sh -f linuxium-install-broadcom-drivers.sh -f wrapper-linuxium-install-broadcom-drivers.sh -c wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-broadcom-drivers.sh' ...
Work directory 'isorespin' used ...
ISO '/home/linuxium/17.10-alpha1/ubuntu-17.10-alpha1-desktop-amd64.iso' respun ...
Bootloader 'GRUB' added ...
Repository 'ppa:canonical-kernel-team/unstable' added ...
Package 'linux-headers-4.12.0-5' added ...
Package 'linux-headers-4.12.0-5-generic' added ...
Package 'linux-image-4.12.0-5-generic' added ...
Package 'linux-image-extra-4.12.0-5-generic' added ...
Local package '/home/linuxium/17.10-alpha1/rtl8723bt_4.12.0_amd64.deb' added ...
File '/home/linuxium/17.10-alpha1/linuxium-install-dash-to-dock.sh' added ...
File '/home/linuxium/17.10-alpha1/linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/17.10-alpha1/wrapper-linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/17.10-alpha1/linuxium-install-broadcom-drivers.sh' added ...
File '/home/linuxium/17.10-alpha1/wrapper-linuxium-install-broadcom-drivers.sh' added ...
Command run ...
# wrapper-linuxium-install-UCM-files.sh
./linuxium-install-UCM-files.sh: Extracting UCM files ...
./linuxium-install-UCM-files.sh: Installing UCM files ...
./linuxium-install-UCM-files.sh: Reloading UCM driver ...
./linuxium-install-UCM-files.sh: Installation of UCM finished 
# wrapper-linuxium-install-broadcom-drivers.sh
./linuxium-install-broadcom-drivers.sh: Extracting Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Reloading Broadcom driver ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom bluetooth service ...
Created symlink /etc/systemd/system/multi-user.target.wants/brcmbt.service -> /lib/systemd/system/brcmbt.service.
./linuxium-install-broadcom-drivers.sh: Starting Broadcom bluetooth service ...
Running in chroot, ignoring request.
./linuxium-install-broadcom-drivers.sh: Installation of Broadcom finished 
Respun ISO created as 'linuxium-ubuntu-17.10-alpha1-desktop-amd64.iso'.

which shows the command used and the respun ISO can be downloaded from here.

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


Saturday, 1 July 2017

Fourth look at Ubuntu 17.10: faking Unity


Now that the 17.10 Alpha 1 ISOs for the opt-in flavors of Lubuntu and Kubuntu have been released (see https://wiki.ubuntu.com/ArtfulAardvark/ReleaseSchedule) I thought I'd look at a pseudo Ubuntu Alpha 1 ISO by respinning the corresponding daily image with the latest kernel and wifi/bt drivers.

This time I've included the 'Dash to Dock' GNOME Shell Extension (https://micheleg.github.io/dash-to-dock) as part of the initial configuration.

For many users I think installing this extension will make the desktop so similar to Unity that they won't even notice the difference most of the time.

Using my 'isorespin.sh' script I created the respun ISO with the following command:

isorespin.sh -i ubuntu-17.10-alpha1-desktop-amd64.iso -u -l rtl8723bt_4.12.0_amd64.deb -f linuxium-install-UCM-files.sh -f wrapper-linuxium-install-UCM-files.sh -f linuxium-install-broadcom-drivers.sh -f wrapper-linuxium-install-broadcom-drivers.sh -f install-dash-to-dock.sh -c wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-broadcom-drivers.sh -c install-dash-to-dock.sh -s 200MB

The key features of the respun ISO are:
  • Based on the Ubuntu 17.10 (Artful Aardvark) Daily Build from 30th June
  • Upgraded with the latest Ubuntu mainline v4.12-rc7 kernel
  • Includes the RTL8723BS and Broadcom wifi/bt firmware
  • Includes the ALSA UCM files
  • Configured with Dash to Dock GNOME Shell Extension
  • Has a persistence partition of 200MB
  • Uses the rEFInd boot manager (with GRUB for 32-bit BIOS devices)
so it will work on Intel Atom Bay Trail/Cherry Trail and Intel Apollo Lake devices.

If you want to respin the ISO yourself you will need to create a script to install the extension. The script I wrote ('install-dash-to-dock.sh') is as follows:

#!/bin/bash

# Linuxium's script to install GNOME extension "Dash to Dock"

echo "127.0.1.1 LINUXIUMONE" > /etc/hosts
cd /usr/local/bin

echo "$0: Installation started ..."

echo "$0: Fetching extension ..."
mkdir -p /usr/local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com
wget https://extensions.gnome.org/review/download/6948.shell-extension.zip > /dev/null 2>&1

echo "$0: Unzipping extension ..."
unzip 6948.shell-extension.zip -d /usr/local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com > /dev/null 2>&1
chmod 644 /usr/local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/metadata.json

echo "$0: Enabling extension ..."
sed -i "/enabled-extensions/{n;s/\[\]/\['dash-to-dock@micxgx.gmail.com'\]/}" /usr/share/glib-2.0/schemas/org.gnome.shell.gschema.xml
glib-compile-schemas /usr/share/glib-2.0/schemas

echo "$0: Configuring extension ..."
sed -i "/dock-fixed/{n;s/false/true/}" /usr/local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/schemas/org.gnome.shell.extensions.dash-to-dock.gschema.xml
sed -i "/dash-max-icon-size/{n;s/48/32/}" /usr/local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/schemas/org.gnome.shell.extensions.dash-to-dock.gschema.xml
sed -i "/apply-custom-theme/{n;s/false/true/}" /usr/local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/schemas/org.gnome.shell.extensions.dash-to-dock.gschema.xml
sed -i "/show-apps-at-top/{n;s/false/true/}" /usr/local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/schemas/org.gnome.shell.extensions.dash-to-dock.gschema.xml
sed -i "/extend-height/{n;s/false/true/}" /usr/local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/schemas/org.gnome.shell.extensions.dash-to-dock.gschema.xml
glib-compile-schemas /usr/local/share/gnome-shell/extensions/dash-to-dock@micxgx.gmail.com/schemas

echo "$0: Installation complete."

sed -i '$d' /etc/hosts
rm -f 6948.shell-extension.zip install-dash-to-dock.sh

The initial screen starts with the dock overlapping the two desktop items but once a terminal is opened the screen immediately corrects itself.

The log file contains:

Script '/usr/local/bin/isorespin.sh' called with '-i ubuntu-17.10-alpha1-desktop-amd64.iso -u -l rtl8723bt_4.12.0_amd64.deb -f linuxium-install-UCM-files.sh -f wrapper-linuxium-install-UCM-files.sh -f linuxium-install-broadcom-drivers.sh -f wrapper-linuxium-install-broadcom-drivers.sh -f install-dash-to-dock.sh -c wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-broadcom-drivers.sh -c install-dash-to-dock.sh -s 200MB' ...
Work directory 'isorespin' used ...
ISO '/home/linuxium/17.10-alpha1/ubuntu-17.10-alpha1-desktop-amd64.iso' respun ...
Kernel boot parameters 'persistent' added ...
Bootmanager 'rEFInd' added ...
Kernel updated with mainline kernel version '4.12.0-041200rc7-generic' ...
Local package '/home/linuxium/17.10-alpha1/rtl8723bt_4.12.0_amd64.deb' added ...
File '/home/linuxium/17.10-alpha1/linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/17.10-alpha1/wrapper-linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/17.10-alpha1/linuxium-install-broadcom-drivers.sh' added ...
File '/home/linuxium/17.10-alpha1/wrapper-linuxium-install-broadcom-drivers.sh' added ...
File '/home/linuxium/17.10-alpha1/install-dash-to-dock.sh' added ...
Command run ...
# wrapper-linuxium-install-UCM-files.sh
./linuxium-install-UCM-files.sh: Extracting UCM files ...
./linuxium-install-UCM-files.sh: Installing UCM files ...
./linuxium-install-UCM-files.sh: Reloading UCM driver ...
./linuxium-install-UCM-files.sh: Installation of UCM finished 
# wrapper-linuxium-install-broadcom-drivers.sh
./linuxium-install-broadcom-drivers.sh: Extracting Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Reloading Broadcom driver ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom bluetooth service ...
Created symlink /etc/systemd/system/multi-user.target.wants/brcmbt.service -> /lib/systemd/system/brcmbt.service.
./linuxium-install-broadcom-drivers.sh: Starting Broadcom bluetooth service ...
Running in chroot, ignoring request.
./linuxium-install-broadcom-drivers.sh: Installation of Broadcom finished 
# install-dash-to-dock.sh
/usr/local/bin/install-dash-to-dock.sh: Installation started ...
/usr/local/bin/install-dash-to-dock.sh: Fetching extension ...
/usr/local/bin/install-dash-to-dock.sh: Unzipping extension ...
/usr/local/bin/install-dash-to-dock.sh: Enabling extension ...
/usr/local/bin/install-dash-to-dock.sh: Configuring extension ...
/usr/local/bin/install-dash-to-dock.sh: Installation complete.
Persistence partition of '200MB' added ...
Respun ISO created as 'linuxium-persistence-v4.12-rc7-ubuntu-17.10-alpha1-desktop-amd64.iso'.

and the respun ISO can be downloaded from here.

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


Thursday, 29 June 2017

Ubuntu on the GPD Pocket using 'isorespin.sh'


Although the GPD Pocket has already started to ship the support for running Ubuntu on the device is currently still in development. This means anyone trying to run Ubuntu is faced with the usual hurdles of booting, wifi, screen rotation and all the other frequently encountered issues.

Not surprisingly you can't just download an official Ubuntu ISO and be up running problem free. However I thought it would be interesting to see if the fixes required could be incorporated into an ISO through respinning using my 'isorespin.sh' script.

I've used the solutions that chrisawcom has posted on reddit (https://www.reddit.com/r/GPDPocket/comments/6idnia/linux_on_gpd_pocket) and created a script that basically updates an official ISO with the required fixes allowing it to be respun.

The command I use to respin the ISO is:

isorespin.sh -i ubuntu-17.04-desktop-amd64.iso -u -p thermald -p "libproc-daemon-perl libproc-pid-file-perl liblog-dispatch-perl" -f linuxium-install-UCM-files.sh -f gpd_pocket -f gpd_pocket.sh -c gpd_pocket.sh -g "" -g "i915.fastboot=1 fbcon=rotate:1"

and I'll briefly cover each of the options as follows:

-i  ubuntu-17.04-desktop-amd64.iso uses an official Ubuntu desktop 64-bit ISO as the base ISO.
-u updates the kernel to the latest Ubuntu Kernel Team kernel build located at http://kernel.ubuntu.com/~kernel-ppa/mainline (current is v4.12-rc7). This is important as the proposed v4.12 kernel includes critical patches that fix many of the issues found when running Linux on an Intel Atom SOC including audio and wifi.
-p installs specific software packages required for thermal management and fan controls.
-f adds the scripts that I've written to specifically customize the ISO with audio, wifi and screen support together with the required files.
-g both removes the default kernel boot parameters and adds additional kernel boot parameters required for successfully booting the device related to screen handling.

Looking at the main configuration script (gpd_pocket.sh) in more detail this basically configures:

  • the internet access for the script
  • the Broadcom wifi driver
  • screen rotation
  • screen brighness
  • touchscreen  
  • fan

by implementing the solutions identified on reddit.

The key benefit is including all the fixes within an ISO that can then be repeatedly used for testing. Respinning the ISO produces the log file:


Script '/usr/local/bin/isorespin.sh' called with '-i ubuntu-17.04-desktop-amd64.iso -u -p thermald -p libproc-daemon-perl libproc-pid-file-perl liblog-dispatch-perl -f linuxium-install-UCM-files.sh -f gpd_pocket -f gpd_pocket.sh -c gpd_pocket.sh -g  -g i915.fastboot=1 fbcon=rotate:1' ...
Work directory 'isorespin' used ...
ISO '/home/linuxium/Documents/ubuntu-17.04-desktop-amd64.iso' respun ...
Kernel boot parameters 'i915.fastboot=1 fbcon=rotate:1' added ...
Initial kernel boot parameters 'quiet splash' deleted ...
Bootloader 'GRUB' added ...
Kernel updated with mainline kernel version '4.12.0-041200rc7-generic' ...
Package 'thermald' added ...
Package 'libproc-daemon-perl libproc-pid-file-perl liblog-dispatch-perl' added ...
File '/home/linuxium/Documents/linuxium-install-UCM-files.sh' added ...
Directory '/home/linuxium/Documents/gpd_pocket' added ...
File '/home/linuxium/Documents/gpd_pocket.sh' added ...
Command run ...
# gpd_pocket.sh
/usr/local/bin/gpd_pocket.sh: Configuring GPD Pocket ...
./linuxium-install-UCM-files.sh: Extracting UCM files ...
./linuxium-install-UCM-files.sh: Installing UCM files ...
./linuxium-install-UCM-files.sh: Reloading UCM driver ...
./linuxium-install-UCM-files.sh: Installation of UCM finished 
/usr/local/bin/gpd_pocket.sh: Installing Broadcom files ...
/usr/local/bin/gpd_pocket.sh: Reloading Broadcom driver ...
/usr/local/bin/gpd_pocket.sh: Installing rotation files ...
/usr/local/bin/gpd_pocket.sh: Installing brightness files ...
/usr/local/bin/gpd_pocket.sh: Installing touchscreen files ...
/usr/local/bin/gpd_pocket.sh: Installing fan service ...
Created symlink /etc/systemd/system/multi-user.target.wants/gpdfand.service -> /lib/systemd/system/gpdfand.service.
/usr/local/bin/gpd_pocket.sh: Starting fan service ...
Running in chroot, ignoring request.
/usr/local/bin/gpd_pocket.sh: Configuration of GPD Pocket finished.
Respun ISO created as 'linuxium-v4.12-rc7-ubuntu-17.04-desktop-amd64.iso'.

and an ISO. Anyone interested can download my respun ISO 'linuxium-v4.12-rc7-ubuntu-17.04-desktop-amd64.iso' and write to a USB using the 'dd' command:

dd if=linuxium-v4.12-rc7-ubuntu-17.04-desktop-amd64.iso of=/dev/sdX bs=4M

where '/dev/sdX' is the correct device for your USB (but first check using commands like 'df', 'blkid' or 'lsblk' to confirm its correct name).

If you want to respin the ISO yourself then download and unzip the file 'gpd_pocket.zip' which contains the required script and files together with 'linuxium-install-UCM-files.sh' for the ALSA UCM files. For the ISO you need to download an Ubuntu 64-bit desktop ISO (e.g. Ubuntu 17.04 from http://releases.ubuntu.com/17.04/ubuntu-17.04-desktop-amd64.iso or Ubuntu 16.04 from http://releases.ubuntu.com/16.04.2/ubuntu-16.04.2-desktop-amd64.iso) together with my 'isorespin.sh' script and then run the command above.

One additional option you might consider adding is '-s 200MB' to add persistence to your ISO as it means that you can retain your data, settings and any changes you make between reboots which is particularly useful when trying to get things to work.

More details about my 'isorespin.sh' script can be found here including full documentation including examples.

If you find my script useful then please donate using the following link http://goo.gl/nXWSGf as everything helps with development costs.





Interim Ubuntu 17.04 ISO with mainline v4.12-rc7 kernel, RTL8723BS and Broadcom Wifi/BT firmware, UCM audio files and full 32-bit bootloader support

Latest 'linuxium-v4.12-rc7-ubuntu-17.04-desktop-amd64.iso' kernel respun using v7.1.2 of 'isorespin.sh' with log file of:

Script '/usr/local/bin/isorespin.sh' called with '-i ubuntu-17.04-desktop-amd64.iso -u -l rtl8723bs_4.12.0_amd64.deb -f linuxium-install-UCM-files.sh -f linuxium-install-broadcom-drivers.sh -f wrapper-linuxium-install-UCM-files.sh -f wrapper-linuxium-install-broadcom-drivers.sh -c wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-broadcom-drivers.sh' ...
Work directory 'isorespin' used ...
ISO '/home/linuxium/isorespin/ubuntu-17.04-desktop-amd64.iso' respun ...
Bootloader 'GRUB' added ...
Kernel updated with mainline kernel version '4.12.0-041200rc7-generic' ...
Local package '/home/linuxium/isorespin/rtl8723bs_4.12.0_amd64.deb' added ...
File '/home/linuxium/isorespin/linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/isorespin/linuxium-install-broadcom-drivers.sh' added ...
File '/home/linuxium/isorespin/wrapper-linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/isorespin/wrapper-linuxium-install-broadcom-drivers.sh' added ...
Command run ...
# wrapper-linuxium-install-UCM-files.sh
./linuxium-install-UCM-files.sh: Extracting UCM files ...
./linuxium-install-UCM-files.sh: Installing UCM files ...
./linuxium-install-UCM-files.sh: Reloading UCM driver ...
./linuxium-install-UCM-files.sh: Installation of UCM finished 
# wrapper-linuxium-install-broadcom-drivers.sh
./linuxium-install-broadcom-drivers.sh: Extracting Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Reloading Broadcom driver ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom bluetooth service ...
./linuxium-install-broadcom-drivers.sh: Starting Broadcom bluetooth service ...
Running in chroot, ignoring request.
./linuxium-install-broadcom-drivers.sh: Installation of Broadcom finished 
Respun ISO created as 'linuxium-v4.12-rc7-ubuntu-17.04-desktop-amd64.iso'.

I've used the Ubuntu 17.04 ISO 'ubuntu-17.04-desktop-amd64.iso' and I've updated the kernel with the 'v4.12-rc7 mainline build' and also added my wifi/bt firmware package 'rtl8723bs_4.12.0_amd64.deb', my Broadcom wifi/bt firmware script 'linuxium-install-broadcom-drivers.sh' installed by running 'wrapper-linuxium-install-broadcom-drivers.sh' and my ALSA UCM audio files script 'linuxium-install-UCM-files.sh' installed by running the 'wrapper-linuxium-install-UCM-files.sh'.

The respun ISO can be downloaded from 'linuxium-v4.12-rc7-ubuntu-17.04-desktop-amd64.iso' and written to a USB using 'dd'.

On booting if bluetooth fails to start automatically then it can be started manually with the command:

sudo systemctl start rtl8723bsbt.service

or

sudo systemctl start brcmbt.service

depending on wifi chip.

Full documentation about my 'isorespin.sh' script including examples is available from http://linuxiumcomau.blogspot.com.au/2017/06/customizing-ubuntu-isos-documentation.html.

If you find this useful then please donate using the following link http://goo.gl/nXWSGf as everything helps with development costs.