Wednesday 21 June 2017

Customizing Ubuntu ISOs: Documentation and examples of how to use 'isorespin.sh'

Update: This work is superseded ... see 'Customizing Ubuntu ISOs: Documentation and examples of how to use 'isorespinner.sh'' under 'Featured post'.



Normally Linux distribution ISOs work perfectly when written to a USB for booting as a 'Live USB' allowing both usage and installation of the distro. Unfortunately with the introduction of Intel Atom based mini PCs and tablets the issue of requiring a 32-bit bootloader to boot a 64-bit OS arose. Further complications were caused by the initial lack of 'mainline' support for HDMI audio and wifi/bluetooth resulting in either the need for custom kernels or for one of the more recent 'mainline' kernels. However because Ubuntu is not a 'rolling release' it is not possible to try the latest kernel or a specific kernel with a 'Live USB'. Now with the introduction of Intel Apollo Lake based mini PCs a new issue has arisen where GRUB simply fails to boot unless the device is one of the few with a BIOS option to select Linux as the OS. Whilst some Linux distros can work OOTB regardless of architecture and bootloader I found that for Ubuntu it wasn't that simple.

To solve the limitations of using a standard ISO I developed a script that allows an ISO to be respun and customized ("remastered") to create a new ISO. Being a script which you run locally it means you can both see and control how your ISO is respun. The script offers the ability to:
  • Add a GRUB 32-bit bootloader to allow ISOs to boot on the many Intel Atom devices limited by their BIOS.
  • Add functionality to boot ISOs on any Intel Apollo device regardless of the BIOS settings.
  • Upgrade the kernel to the latest mainline version or to a specific version to benefit from recent patch functionality e.g. for audio and wifi/bluetooth or to use a rolling (HWE) kernel.
  • Add (or remove) repositories, software packages, scripts and files to allow the installation of firmware and favourite programs.
  • Preseed or perform set-up commands and scripts and also change system defaults and kernel boot parameters.
  • Add persistence so that the ISO can retain data, installed software packages and settings across reboots.
  • Create a server ISO that works on both 32-bit and 64-bit bootloaders found on various low cost Intel Atom mini PCs or one that works on the more recent Apollo and Gemini Lake mini PCs.
The script is called 'isorespin.sh' and works with all official desktop 64-bit Ubuntu (http://releases.ubuntu.com) and Ubuntu flavoured ISOs (https://www.ubuntu.com/download/ubuntu-flavours), Linux Mint ISOs (https://www.linuxmint.com/download.php), KDE neon ISOs (https://neon.kde.org/download), elementary OS ISOs (https://elementary.io), Peppermint OS (https://peppermintos.com/) and BackBox Linux (https://backbox.org/). And whilst Kali is not directly supported the Kali Metapackages (https://tools.kali.org/kali-metapackages) can be added when respinning an ISO.

It can be run using either the shell CLI (command line interface) in a the terminal or using its GUI (graphical user interface). Not only will it generate a new ISO but it will also produce a log file which includes the options used when respinning the ISO and serves to document the respun ISO.


Before you start

It is a given that most people only read the manual page or documentation for a command either when they can't work out how to use it or somethings goes wrong after using it. And it is also much easier to post a question than read the documentation or understand an error message. However try and get through the following quick start guide first as it is designed to help.


Quick start guide to using 'isorespin.sh'

1. Open a terminal session on a host device running Ubuntu (or similar) e.g. your main PC
2. Download my 'isorespin.sh' script (click on the link)
3. Make the script executable by entering:
        sudo mv isorespin.sh /usr/local/bin
        sudo chmod 755 /usr/local/bin/isorespin.sh
4. Install the packages required for running (some will already be installed):
        sudo apt -y install p7zip-full bc klibc-utils iproute2 genisoimage dosfstools  
        sudo apt -y install squashfs-tools rsync unzip wget findutils xorriso bsdutils
5. Download the ISO you want to respin (for example as 'ubuntu-16.04.3-desktop-amd64.iso')
6. Either run the script with GUI:
        isorespin.sh
    or run the script with options. Commonly used options include:
        Add a 32-bit bootloader
        isorespin.sh -i ubuntu-18.04.4-desktop-amd64.iso
        Respin the ISO suitable for booting on Intel Atom devices
        isorespin.sh -i ubuntu-18.04.4-desktop-amd64.iso --atom
        Respin the ISO suitable for booting on Intel Apollo Lake devices
        isorespin.sh -i ubuntu-18.04.4-desktop-amd64.iso --apollo
        Update the ISO with the latest mainline kernel
        isorespin.sh -i ubuntu-18.04.4-desktop-amd64.iso -u
        Update the ISO with a specific kernel version
        isorespin.sh -i ubuntu-18.04.4-desktop-amd64.iso -k v5.7-rc2
        Create a server ISO

        isorespin.sh -i ubuntu-18.04.4-desktop-amd64.iso --server
    A new ISO prefixed with 'linuxium' as a minimum will be created. For example the command
        isorespin.sh -i ubuntu-18.04.4-desktop-amd64.iso -k v5.7-rc2 --apollo
    creates the ISO:
        linuxium-apollo-v5.7-rc2-ubuntu-18.04.4-desktop-amd64.iso
    To get a list of all available options enter:
        isorespin.sh -h
    Note the script runs several commands as 'sudo' so you will be asked for your password
        [sudo] password for <username>:
7. Insert a USB and make a note of which device it is (use 'df', 'blkid' or 'lsblk' to confirm)
8. Unmount any files systems auto mounted from the USB
        sudo umount /dev/<USB device>*
9. Write the respun ISO to USB
        sudo dd if=<respun ISO> of=/dev/<USB device> bs=4M
        (e.g. sudo dd if=linuxium-apollo-v5.7-rc2-ubuntu-18.04.4-desktop-amd64.iso of=/dev/sdx bs=4M)
10. Boot the USB on your target device e.g. your mini PC

The following sections explain each of the steps in more detail together with an issues section, how to report errors and how to donate.


Dependencies

Although it is expected to run the script on a Linux machine typically running 64-bit Ubuntu or a 64-bit Ubuntu based OS it also works on a Linux virtual machine on Windows (see below for further details). You will need certain packages like 'squashfs-tools' and 'xorriso' installed (use 'sudo apt-get install -y squashfs-tools xorriso' to install them) plus 'zenity' if you want to use the GUI. As different Linux distros have different packages installed by default the script will first check and notify you if any other packages are required. You will also need at least 10 GB of free space but this can be on external storage (e.g. a USB) as it can be specified as a location different to where the script is run from. For some options (such as updating the kernel) you will need a working internet connection as the script needs to download software. Also the script needs to be executable which can be achieved using the 'chmod' command ('sudo chmod 755 isorespin.sh'). As the script runs some commands (e.g. mount/umount) which require root access using the 'sudo' command you will initially be prompted for your password and must already have 'sudo' privileges. Finally some restrictions: you cannot respin an ISO that is EOL (End Of Life); you cannot respin an ISO on an OS that doesn't support 'systemd' when using the '--apollo' or the '-b Linuxium' options; you also cannot respin an ISO if the ISO doesn't support 'systemd' when using the '--atom', '--apollo' or '-b Linuxium' options.


Invocation

Running the script is really quite simple even though there are quite a lot of features or options making it look rather complex.


Usage: /usr/local/bin/isorespin.sh [ -h | -v | --check | --rolling-list ]
       /usr/local/bin/isorespin.sh -i <ISO> [ [ -u | -k <kernel> ] | [ --dist-upgrade | --upgrade ] | ...
       /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 ] | ...
       /usr/local/bin/isorespin.sh ... -b [ GRUB | GRUB-32 | GRUB-64 | rEFInd | Linuxium ] | -g [ "" | "<kernel boot parameter> ... " ] | -s [ <size>MB | <size>GB ] | -w <directory> | ...
       /usr/local/bin/isorespin.sh ... --key "<repo> ... " | -r "<repo> ... " | -p "<pkg> ... " | -l "<pkg.deb> ... " | -e "<pkg> ... " | -d "<pkg> ... " | -f [ "<file> | <directory> ... " ] | ...
       /usr/local/bin/isorespin.sh ... -c "<cmd> ... " | -o [ "<file> | <directory> ... " ] | -t <template configuration file> | --apollo | --atom | --server | --interactive | --debug ]


Respinng an ISO is controlled by either running the script with flags and arguments (CLI) or selection options and values (GUI) and briefly these are as follows:
-h or --help will display the 'usage' message. 
-v or --version displays the version of the script. 
--check if the version of the script is the latest or can be upgraded.    
-i or --iso must be specified and is the name (including the full or relative path) of the ISO to be respun. 
-u or --update will update the kernel to the latest Ubuntu Kernel Team kernel builds located at http://kernel.ubuntu.com/~kernel-ppa/mainline
-k or --kernel replaces the kernel with the version specified by the argument or value which can be any of the Ubuntu Kernel Team kernel builds located at http://kernel.ubuntu.com/~kernel-ppa/mainline and is passed as the directory or folder name without the trailing '/' (e.g. '--kernel v4.11-rc7').
--rolling-list shows what new kernels are available for the kernel types of release, proposed, testing and unstable and which can be installed using the '--rolling-' option.
--rolling-release will update the kernel to the latest kernel for that specific release. 
--rolling-release-hwe updates the kernel to the latest HWE (Hardware Enablement) or LTS Enablement Stack kernel for an LTS release. 
--rolling-release-hwe-edge updates the kernel to the upcoming HWE Stack kernel if available. 
--rolling-proposed updates the kernel to the proposed next release kernel from the proposed repository if available. 
--rolling-proposed-hwe updates the kernel to the proposed next LTS HWE kernel from the proposed repository if available. 
--rolling-proposed-hwe-edge updates to the proposed next upcoming LTS HWE kernel from the proposed repository if available. 
--rolling-testing updates the kernel with the latest kernel from the pre-release and test kernel repository if available. 
--rolling-testing-hwe updates the kernel with the latest LTS HWE kernel from the pre-release and test kernel repository if available. 
--rolling-testing-hwe-edge updates the kernel with the latest upcoming LTS HWE kernel from the pre-release and test kernel repository if available. 
--rolling-unstable updates the kernel with the latest kernel from the unstable repository. 
--rolling-unstable-hwe updates the kernel with the latest LTS HWE kernel from the unstable repository if available. 
--rolling-unstable-hwe-edge updates the kernel with the latest upcoming LTS HWE kernel from the unstable repository if available. 
-r or --repository adds the specified repository to the respun ISO. 
-p or --package will install a single package or a set of packages (if enclosed in quotes) that are available to the ISO and would typically be installed using the 'apt-get install <package>' command. This option is very useful in preseeding your ISO with packages you always normally install immediately after booting and will help resolve the issue of the ISO running out of space as a result of multiple installations. For example I typically include "ssh openssh-server inxi" when respinning an ISO for personal use.
-l or --local allows local Debian binary packages to be installed within the respun ISO. Care must be taken in specifying the order of multiple packages to preserve any dependencies and of course all dependencies must be met for the packages to be successfully installed. 
-f or --file will copy either the specified files or directories to the respun ISO under '/usr/local/bin'. Although intended to allow local binaries or shell scripts to be saved on the respun ISO there is no limitation on the actual type of file that can be added. 
-s or --storage adds a specified amount of persistent storage to the respun ISO. A size must be specified although there is some flexibility on how much is allocated. The minimum size is 128MB which keeps the size of the ISO down but means that once a USB is created the persistence partition needs to be manually resized for normal usage. Alternatively a larger size can be specified to avoid the immediate need to resize as this can always be performed later. It is recommended to use a realistic amount somewhere between 1GB and 2GB to maintain the balance between a practical but usable ISO. When creating a respun ISO with persistence the rEFInd boot manager will automatically be selected for booting the ISO although it will also need to be selected through the '-b' option if requiring the ISO to also install rEFInd. When using the GUI the persistence partition size can be defined using the slider which limits the size between 128MB and 2048MB.
-b or --boot will add either the 32-bit GRUB boot loader (which is added by default) the rEFInd boot manager or a Linuxium bootscript which currently is required for booting on a lot of the current Intel Apollo Lake devices. To leave the default 64-bit GRUB boot loader unchanged the 'GRUB-64' parameter value should be specified.
-w or --work-directory is used to specify where the ISO will be respun. This is primarily for overcoming the lack of space associated with mini PCs and allows the respinning to be run on temporarily connected external storage media such as a drive or USB. Once the storage has been connected and mounted it can be passed as a parameter. Likewise if a directory is then created on the mounted storage this can be passed as the argument or value for this option to ensure there is sufficient space (i.e. at least 10 GB) for the script to run.
-d or --download will download Debian binary packages from the respun ISO using the 'apt-get download' command and save them under '/usr/src'. If combined with the '-o' option the Debian binary package will be accessible after respinning the ISO. 
-e or --erase will remove Debian binary packages from the respun ISO using the 'apt-get purge' command. 
-c or --command will execute the supplied argument as a 'bash' command. Care must be taken when embedding single or double quotes within the argument as they are subject to interpretation. For more complex commands it is often both advisable and easier to write a simple shell script and use the '-c' option to execute it as part of respinning. If the command includes an 'update-initramfs' then the ISO's boot kernel and/or initramfs will be updated to the latest currently installed versions on the ISO. This advanced functionality allows a kernel and/or initramfs to be both updated and then booted using commands rather than through kernel package installation requiring the use of '-u', '-k', '-p', '-l' or '--rolling' options. 
-o or --output will save either the specified files or directories to an output directory called 'isorespin'. This is very useful when wanting to extract files or packages that have been created or downloaded as part of respinning the ISO. 
-g or --grub will add the specified kernel boot parameters both to the GRUB/rEFInd boot menu and to the default GRUB settings or if an empty ("") argument is specified then the the ISO's initial kernel boot parameters will be removed.  
-t or --template will add the contents of the specified file as respinning options. 
--atom include the flags, packages, scripts and commands that I recommend when respinning an ISO for a device with an Intel Atom (Bay Trail or Cherry Trail) processor and mirrors the manual invocations of  '-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'.
--apollo include the flags, packages, scripts and commands that I recommend when respinning an ISO for a device with an Intel Apollo Lake processor and mirrors the manual invocations of '-b Linuxium -p binutils -f update-modules'.
--server creates a pseudo server ISO by removes the 'ubuntu-desktop' task and installing 'ubuntu-server' as well as creating 'ubuntu' as the default user without a password and downloading the latest version of 'linservin.sh' to '/usr/local/bin' for convenience when installing. The '--server' option is only supported with Ubuntu 18.04 and 20.04 desktop ISOs at the moment and as a CLI option. 
--key adds GPG keys to the APT keyring on the respun ISO. Only available as a CLI option.
--upgrade performs an 'apt-get upgrade' on the ISO's packages. Only available as a CLI option.
--dist-upgrade performs an 'apt-get dist-upgrade' on the ISO's packages. Only available as a CLI option.
--interactive allows you to manually enter commands to modify the ISO. Only available as a CLI option.
--debug redirects the output from executing the commands behind an option to the log file. Only available as a CLI option.
The script can either be run as a local script or it can be installed by copying the script to '/usr/local/bin' where it will be accessible for all users after the script has been made executable using the 'chmod' command ('sudo chmod 755 isorespin.sh'). Depending on the options and their complexity the respinning will take quite a few minutes and the script provides updates on its progress whilst running. The respun ISO is created with a new name derived from the original ISO name and includes indicators of the options used like 'persistence' or the kernel version for example with full details being written to the log file.

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

The examples below illustrate the various options through scenarios and provide a basic tutorial to using the script. They are based on the script being installed to '/usr/local/bin':


The script's help is displayed using the command:

isorespin.sh -h


The version of the script can either be displayed by entering:

isorespin.sh -v


or it can be seen from the top of the script's 'main' menu:


or 'advanced' menu:


The script can be run using the CLI by specifying options with arguments in any order. If the script is started without any parameters it first checks to see if it can run the GUI and if so starts with the main selection menu where all required options should be selected. As seen above the GUI uses two menus with the first being a main menu of most frequently used options and an optional additional menu of the more advance options. For each option selected, a sub-menu will appear to allow the choice or value to be entered.


Respinning an ISO

The simplest usage is to respin an ISO which will automatically add the GRUB 32-bit bootloader allowing the respun ISO to boot on Intel Atom devices e.g.:

isorespin.sh -i ubuntu-17.04-desktop-amd64.iso

or by invoking the GUI:





Upgrading the kernel

To respin the ISO with the latest kernel the command would be:

 isorespin.sh -i ubuntu-17.04-desktop-amd64.iso -u

or



If a specific kernel was required for example 'v4.11.6' then the '-k' option would be used:

isorespin.sh -i ubuntu-17.04-desktop-amd64.iso -k v4.11.6

or



Booting the ISO on Intel Atom or and Intel Apollo Lake devices

If you want to use the ISO on an Intel Atom or an Intel Apollo Lake device then simply add either the '--atom' or '--apollo' option respectively when respinning the ISO. This is further explained under the section 'Target processors' below and uses functionality explained in the next section. Finally once you have respun your ISO you need to write it to a USB which is explained under the section 'Creating a LiveUSB' with booting explained under 'Booting your respun ISO'.



Adding local packages and running scripts

A more complex scenario of respinning an ISO is when you want to add packages and run scripts to fix functionality like wifi/bt and audio.

Due to current limitations of the official ISOs I've previously created scripts to add wifi/bt firmware and also add the ALSA UCM audio files:

rtl8723bs_4.12.0_amd64.deb
rtl8723bt_4.12.0_amd64.deb
linuxium-install-broadcom-drivers.sh
linuxium-install-UCM-files.sh

These can be incorporated when respinning an ISO. For the scripts you first add the file using the '-f' option and then execute the script using the '-c' option.

When I wrote the above scripts I originally intended them to be run post installation rather than as part of respinning an ISO. As a result they produce warnings and also need to be executed in the correct directory. Rather than writing a complex '-c' parameter to run them correctly it is simpler to write a further script (which I call a 'wrapper') which controls how the script is run. These 'wrappers' can then be included as part of respinning an ISO:

wrapper-linuxium-install-broadcom-drivers.sh
wrapper-linuxium-install-UCM-files.sh

For example the following command will respin the Ubuntu 17.04 ISO and upgrade the kernel to the latest version (which includes the RTL8723BS driver) installs the required RTL8723BS wifi/bt firmware and both adds and runs a script to include the UCM files for audio:

isorespin.sh -i ubuntu-17.04-desktop-amd64.iso -u -l rtl8723bs_4.12.0_amd64.deb
-f linuxium-install-UCM-files.sh -f wrapper-linuxium-install-UCM-files.sh
-c wrapper-linuxium-install-UCM-files.sh


While the script is running progress updates are displayed:


until it finally completes:


producing a log file which shows how the script was run:



A similar example but respinning the daily snapshot Ubuntu 17.10 (Artful) ISO and using the GUI starts by selecting the required options:


and then entering the values starting with the ISO. When selecting the ISO a 'file manager' styled window will be presented but only files ending with a '.iso' suffix will be displayed:


For the kernel upgrade option the choice is to upgrade to the latest mainline version:


Local packages are selected using the 'file manager' which only displays '.deb' files. To allow multiple entries you will be asked after each selection is made whether a further addition is required:



Next the two scripts are added using the 'file manager':





And finally the 'advanced' menu is displayed and after selecting the option to add a command:


the command is entered as a text string:


Now that all the selected options have been entered a confirmation screen is be displayed which shows the full command as it would look if the script had been run manually:


Having selected 'yes' the script runs and displays its progress:





until it finishes:


Similarly a log file is produced that shows how the script was run:



For a more complex example of using the script see Compiling your own kernel using 'isorespin.sh'.


Server


To simplify the creation of a server ISO by respinning an Ubuntu desktop ISO you can use the option '--server'. This option is compatible with existing options so you can create a server ISO that works on both 32-bit and 64-bit bootloaders found on various low cost Intel Atom mini PCs or one that works on the more recent Apollo and Gemini Lake mini PCs.


Invocation is as simple as adding '--server' to your 'isorespin.sh' command. For example to create a 'vanilla' server ISO from an Ubuntu 18.04.4 desktop ISO enter:
isorespin.sh -i ubuntu/ubuntu-18.04.4-desktop-amd64.iso --server
The '--server' option is only supported with Ubuntu 18.04 and 20.04 desktop ISOs at the moment. This is because whilst removing the 'ubuntu-desktop' task essentially creates the base for a server ISO, it still leaves a small number of residual packages that need purging. This new option removes the bulk of these and those that are left are really insignificant.

The option creates 'ubuntu' as the default user without a password, similar to how the standard desktop ISO works. It also downloads the latest version of 'linservin.sh' to '/usr/local/bin' for convenience when installing.

My 'Linuxium server install' script 'linservin.sh' can be run with options:
linuxium@LINUXIUM:~$ linservin.sh -hUsage: /usr/local/bin/linservin.sh [ OPTIONS ]where OPTIONS include '-h' for 'help''-v' for 'version''-c' for 'check' (version)'-y' run automatically with best guessed values (dangerous)linuxium@LINUXIUM:~$
which are self explanatory.

The script determines the most appropriate values for the variables it will use for the installation which it presents as defaults allowing you to either accept or enter your own value as required:


Importantly the installer will detect whether the bootloader is 32-bit for 64-bit and install GRUB accordingly. Or if my 'Linuxium bootscript' or 'rEFInd' boot manager was selected when respining the server ISO then these will be installed as appropriate.

The installation progress is recorded in a logfile 'linservin.log' which is also copied to the installed filesystem and is available under '/var/log/installer'.


Persistence

Adding persistence to an ISO is useful as it means that you can retain your data, installed software packages and settings between reboots. Persistence can be added as part of any ISO respinning simply by adding the '-s' option and defining the size of the storage to be permanently allocated in the ISO. As previously mentioned there is a balance between making it small and therefore resulting in a small ISO that requires resizing once booted (see below) verses a larger size and a corresponding larger ISO.

The following example respins the standard Ubuntu 17.04 ISO with the latest kernel and create a 2 GB persistence partition:

isorespin.sh -i ubuntu-17.04-desktop-amd64.iso -u -s 2GB

Using the GUI it is created by:








As can be seen from looking at the size of the resulting ISO that it is large at around 3.8 GB but not too large to be totally impractical.


Kernel boot parameters

The following is an example showing both the removal of the default kernel boot parameters (quiet splash) and the inclusion of two new kernel boot parameters:

isorespin.sh -i ubuntu-17.04-desktop-amd64.iso -g "" -g "i915.fastboot=1 fbcon=rotate:1"

The default kernel boot parameters are first removed by selecting the delete option:


and the new kernel boot parameters are then added:


as text strings:



Once the script is running it will update the kernel boot parameters:


with the exact details being recorded in the log file:



Rolling kernels

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.


Target processors


Respinning an ISO for a target processor includes the flags, packages, scripts and commands that I recommend for the ISO to work on devices and mirrors 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 Linuxium -p binutils -f update-modules

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. The '--atom' option requires that you have the 'p7zip-full' package installed prior to running the respin script however the script will check and warn you if it is missing.

The options have been included in the GUI:






Templates

Templates are similar to how the processor options of 'atom' and 'apollo' work in that a template is a list of options to be included when respinning are useful when you find yourself using the same combination of options. Typically each combination is to include a specific type of functionality. An example might be for someone with a Broadcom wifi device always having to load and move the NVRAM file to its required location.

For example the ​required ​options ​​might be​:​

-f nvram.txt \
-c "mv /usr/local/bin/nvram.txt /lib/firmwaee/brcm/brcm4330-stdio.txt"


​which can be save​d​ in a text file, say 'wifi.tpl',​ with the extension '.tpl' being used just to serve as a descriptive reminder of the file's contents. This file can then be used with the new '-t' o​r​ '--template' option when respinning, fo​r​ example:
isorespin.sh -i ubuntu-18.04-desktop-amd64.iso​ --atom -t wifi.tpl
Templates can ​also ​be combined. Another example might be when a spec​i​f​i​c set of packages is required such as for 'ssh' so if the template fi​l​e 'ssh.t​​p​l​' contained '-p "ssh openssh.server"' ​then respinning with both ​'​wifi​'​ and 'ssh' is as s​imp​le as:
isorespin.sh -i ubuntu18.04.desktop.iso --atom -t wifi.tpl -t ssh.tpl
There actually is no reason why the '--atom' option cannot be included within a template however it ​would ​make sense to call the template​ ​something ​​meaningful e.g. 'atom-wifi.tpl'.

Templates are also extremely useful for complex respins. To respin an ​ISO for the ​GPD Pocket device the ​current command is​:​

isorespin.sh -i ​<​ISO​>​ \
​​-k v4.17-rc2 \
-e bcmwl-kernel-source \
-p "xfonts-terminus thermald tlp va-driver-all vainfo libva2 i965-va-driver gstreamer1.0-libav gstreamer1.0-vaapi vlc python-gi git python gir1.2-appindicator3-0.1" \
-f display/20-intel.conf \
-f display/30-monitor.conf \
-f display/35-screen.conf \
-f display/40-touch.conf \
-f display/40-trackpoint.conf \
-f display/console-setup \
-f display/monitors.xml \
-f display/adduser.local \
-f display/90-scale \
-f display/90-interface \
-f display/wrapper-display.sh \
-f audio/chtrt5645.conf \
-f audio/HiFi.conf \
-f audio/headphone-jack \
-f audio/headphone-jack.sh \
-f audio/wrapper-audio.sh \
-f fan/gpdfand \
-f fan/gpdfand.conf \
-f fan/gpdfand.py \
-f fan/gpdfand.service \
-f fan/wrapper-fan.sh \
-f network/99-local-bluetooth.rules \
-f network/brcmfmac4356-pcie.txt \
-f network/wrapper-network.sh \
-f power/wrapper-power.sh \
-c wrapper-audio.sh \
-c wrapper-display.sh \
-c wrapper-fan.sh \
-c wrapper-network.sh \
-c wrapper-power.sh \
-g "" \
-g "i915.fastboot=1 i915.semaphores=1 fbcon=rotate:1 gpd-pocket-fan.speed_on_ac=0"


Whilst this can be stored as a template ​to simplify things further template​s​ can in turn contain templates so a com​p​lex respin ca​n​ both be easier t​o build and understand.
For​ example we ​could build ​a ​template​ ​f​o​r​ 'display' as '​gpd-display.tpl' containing:

--file gpd-pocket-ubuntu-respin/display/20-intel.conf
--file gpd-pocket-ubuntu-respin/display/30-monitor.conf
--file gpd-pocket-ubuntu-respin/display/35-screen.conf
--file gpd-pocket-ubuntu-respin/display/40-touch.conf
--file gpd-pocket-ubuntu-respin/display/40-trackpoint.conf
--file gpd-pocket-ubuntu-respin/display/console-setup
--file gpd-pocket-ubuntu-respin/display/monitors.xml
--file gpd-pocket-ubuntu-respin/display/adduser.local
--file gpd-pocket-ubuntu-respin/display/90-scale
--file gpd-pocket-ubuntu-respin/display/90-interface
--file gpd-pocket-ubuntu-respin/display/wrapper-display.sh
--command wrapper-display.sh

​and then similar templates for 'gpd-audio.tpl', 'gpd-fan.tpl' etc. together with a 'gpd.tpl' template containing:

​--template gpd-kernel.tpl
--template gpd-packages.tpl
--template gpd-display.tpl
--template gpd-audio.tpl
--template gpd-fan.tpl
--template gpd-network.tpl
--template gpd-power.tpl
--template gpd-grub.tpl​

So respinning ​U​b​u​ntu ​B​ionic for ​the GPD Pocket becomes​:​
isorespin.sh -i ubuntu-18.04-desktop-amd64.iso​ -t gpd​.tpl​
Taken to an even further ​level the ISO can be specified as a template e.g. 'bionic​.tpl​' containing '-i ​ubuntu-18.04-desktop-amd64.iso'

So the ​final ​respin becomes​:
​isorespin.sh -t bionic.tpl -t gpd.tpl


To assist in building templates each time ​'​isorespin.sh​'​ is ​successfully run a template file 'isorespin.tpl' ​is ​created containing the options used in respinning excluding the ISO option.


Fot the ​GPD Pocket example above the 'isorespin.tpl' file after respinning contains​:​

--kernel v4.17-rc2
--erase bcmwl-kernel-source
--package "xfonts-terminus thermald tlp va-driver-all vainfo libva2 i965-va-driver gstreamer1.0-libav gstreamer1.0-vaapi vlc python-gi git python gir1.2-appindicator3-0.1"
--file /<path>/gpd-pocket-ubuntu-respin/display/20-intel.conf
--file /<path>/gpd-pocket-ubuntu-respin/display/30-monitor.conf
--file /<path>/gpd-pocket-ubuntu-respin/display/35-screen.conf
--file /<path>/gpd-pocket-ubuntu-respin/display/40-touch.conf
--file /<path>/gpd-pocket-ubuntu-respin/display/40-trackpoint.conf
--file /<path>/gpd-pocket-ubuntu-respin/display/console-setup
--file /<path>/gpd-pocket-ubuntu-respin/display/monitors.xml
--file /<path>/gpd-pocket-ubuntu-respin/display/adduser.local
--file /<path>/gpd-pocket-ubuntu-respin/display/90-scale
--file /<path>/gpd-pocket-ubuntu-respin/display/90-interface
--file /<path>/gpd-pocket-ubuntu-respin/display/wrapper-display.sh
--command wrapper-display.sh
--file /<path>/gpd-pocket-ubuntu-respin/audio/chtrt5645.conf
--file /<path>/gpd-pocket-ubuntu-respin/audio/HiFi.conf
--file /<path>/gpd-pocket-ubuntu-respin/audio/headphone-jack
--file /<path>/gpd-pocket-ubuntu-respin/audio/headphone-jack.sh
--file /<path>/gpd-pocket-ubuntu-respin/audio/wrapper-audio.sh
--command wrapper-audio.sh
--file /<path>/gpd-pocket-ubuntu-respin/fan/gpdfand
--file /<path>/gpd-pocket-ubuntu-respin/fan/gpdfand.conf
--file /<path>/gpd-pocket-ubuntu-respin/fan/gpdfand.py
--file /<path>/gpd-pocket-ubuntu-respin/fan/gpdfand.service
--file /<path>/gpd-pocket-ubuntu-respin/fan/wrapper-fan.sh
--command wrapper-fan.sh
--file /<path>/gpd-pocket-ubuntu-respin/network/99-local-bluetooth.rules
--file /<path>/gpd-pocket-ubuntu-respin/network/brcmfmac4356-pcie.txt
--file /<path>/gpd-pocket-ubuntu-respin/network/wrapper-network.sh
--command wrapper-network.sh
--file /<path>/gpd-pocket-ubuntu-respin/power/wrapper-power.sh
--command wrapper-power.sh
--grub ""
--grub "i915.fastboot=1 i915.semaphores=1 fbcon=rotate:1 gpd-pocket-fan.speed_on_ac=0"

where '/<path>/' is the full path to the specified file.



Besides using t​h​e template file as a base for ​further ​individual templates yo​u​ can also simply recreate the last respun ​ISO​ by rerunning with the last generated template:
isorespin.sh -i <ISO> -t isorespin.tpl




Interactively updating an ISO

Sometimes trying to respin an ISO using complex option combinations fails as typically the consequences of running certain commands or their effect on the ISO are not fully known or easily predictable. In these circumstances respinning interactively would be easier and hence the option '--interactive'. This option simply drops you into a 'root' shell where you can manually enter commands to modify the ISO:


Simply press 'control-D' when finished to return to respinning the ISO. This option uses the 'script' command to record the interactive session so that it can be included in the log file in full if the '--debug' option is used in conjunction or manipulated to just show a summary of the commands entered for inclusion into the default log file. This command summary is also included in the 'README.isorespin' file that is added to the respun ISO. As a result 'isorespin.sh' now depends on the package 'bsdutils' being installed which should already be the case in most situations. Because 'script' makes a typescript of everything displayed on the terminal it also includes temporary progress text together with cursor movement control codes and colour control codes which may become visible depending on how the log file is viewed. This may not be ideal in every circumstance however it is a compromise believed to be worthwhile considering the functionality gained.

For example respinning an ISO and first performing an ''apt update' and then installing the 'ethtool' package interactively:



the 'cat' command displays the log file created using the '--debug' option without distractions:


Because when performing the 'apt update' command various 'source' files are needed to be downloaded which result in progress text temporarily being displayed on the screen, when the command 'more' is used to display the log file it interprets the 'script' text in the log file differently and shows this colour-highlighted progress text:



Using the command 'view' to examine the log file shows all the text and all the control characters so consequently may not be the best way to view the log file:


For this particular example the summary of the '--interactive' commands that is also included in README.isorespin:


is similar to how this '--interactive' option is documented in the default log file without an additional '--debug' option:



Upgrading an ISO vs 'dist-upgrade'

The difference between '--upgrade' and '--dist-upgrade' options is best described by the 'man' entry for the commands used by the two options:

upgrade
upgrade is used to install the newest versions of all packages currently installed on the system from the sources enumerated in /etc/apt/sources.list. Packages currently installed with new versions available are retrieved and upgraded; under no circumstances are currently installed packages removed, or packages not already installed retrieved and installed. New versions of currently installed packages that cannot be upgraded without changing the install status of another package will be left at their current version. ...

dist-upgrade
dist-upgrade in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages; apt-get has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary. The dist-upgrade command may therefore remove some packages. The /etc/apt/sources.list file contains a list of locations from which to retrieve desired package files. ...
To illustrate the difference we can look at respinning an ISO (Ubuntu 18.04.3) first with the '--upgrade' option together with the '--debug' option which shows that the kernel meta packages are held back:


However using the '--dist-upgrade' option with the '--debug' options shows that new kernel packages will be installed as a result of upgrading the kernel meta packages:


This example again highlights the usefulness of the '--debug' option in understanding what happens as part of respinning an ISO.


Kali Metapackages

Kali offers Kali Metapackages which 'give you the flexibility to install specific subsets of tools based on your particular needs'. If the GPG key of 'ED444FF07D8D0BF6' is added (using the option '--key "adv --keyserver keyserver.ubuntu.com --recv-keys ED444FF07D8D0BF6") and the Kali repository is added (using the option '--repository "deb http://http.kali.org/kali kali-rolling main contrib non-free") these metapackages can be added as packages when respinning an Ubuntu ISO:


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'):



Debugging respinnning issues

Most of the options don't include their interaction with the ISO when being executed either on the screen or in the log file. For example when adding the package 'ethtool' the log merely includes a line stating that the package has been added:


The '--debug' option redirects the output from executing the commands behind an option to the log file. Using the same example the complete output from installing the package is now included in the log file:


While including the output from successful option execution may be interesting the key benefit of using '--debug' is when a command run as part of an option fails. Having the full output including the actual error messages in the log file is invaluable for debugging respinning issues.


Creating a LiveUSB

Once your respun ISO has been created you can write it to a USB using 'dd'. For example if your USB is '/dev/sdb' then enter:

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

Make sure you select the correct device for the USB and always check first using commands like 'df', 'blkid' or 'lsblk' to confirm. ISOs can also be written to a USB using 'Rufus' on Windows if preferred.


Booting your respun ISO


Having created the USB with your respun ISO the following information may be useful when booting and running.

To boot your device select the USB's UEFI partition from the device's boot menu:


Normally you will then see a standard GRUB menu:



If the 'rEFInd' boot manger was installed (either through selection or automatically due to persistence) the following screen will be displayed for 64-bit bootloader devices:



otherwise for 32-bit bootloader devices the normal the GRUB menu screen is displayed and after selection a black screen with the following message is briefly displayed:

error: no suitable video mode found.
Booting in blind mode

before the normal Ubuntu splash screen appears and the device fully boots. This 'error' can safely be ignored.

Wifi issues

If your device uses a Broadcom wifi chip and wifi isn't working even after adding the firmware using my script then it may be missing an SDIO file. By running the command 'dmesg' immediately after booting and looking at the output if you see messages showing that the wifi firmware 'txt' file is missing it is possible to use the copy from the Windows driver that is stored in NVRAM. The file should look something like '/sys/firmware/efi/efivars/nvram-74b00bd9-805a-4d61-b51f-43268123d113' and you actually copy it using 'cat /sys/firmware/efi/efivars/nvram-74b00bd9-805a-4d61-b51f-43268123d113 > /lib/firmware/brcm/brcmfmac43241b4-sdio.txt' substituting the actual NVRAM filename on your device and the correct *sdio.txt name for your driver.

Bluetooth issues

On booting if bluetooth fails to work automatically and the firmware was installed using one of my scripts then the service can be manually started with the command:

sudo systemctl start rtl8723bsbt.service

or

sudo systemctl start brcmbt.service

depending on device's chip. If bluetooth is always required then the command could be included in '/etc/rc.local' to avoid this step. Note that this uses 'systemd' so earlier ISO releases without 'systemd' cannot use my scripts to provide bluetooth.


Resizing the persistence partition

After respinning an ISO using the '-s' option when booting it for the first time you can use the 'gparted' command to resize the persistence partition. You will initially be prompted to fix the GPT to use all the available space so click 'Fix'


and then continue with the resizing:


NVRAM sync issues

Sometimes after installing your device only boots to a black screen.  Typically this happens when the NVRAM and ESP are out of sync. This can be easily fixed by performing the following:

1. Start with the device switched off.
2. Connect your LiveUSB.
3. Power on the device and press the relevant function key or key sequence to boot from the LiveUSB.
4. Open a terminal windows and enter:
type efibootmgr 
5. If the 'efibootmgr' is not installed enter:
sudo apt-get update && sudo apt-get install -y efibootmgr
6. Next remove any boot entries that may have been created through the earlier installs by entering:

      for BOOTENTRY in 0 1 2 3 4 5 6 7 8 9
      do
          sudo efibootmgr -b ${BOOTENTRY} -B
      done

7. Now create an Ubuntu boot entry by entering:
sudo efibootmgr -c -d /dev/mmcblk0 -p 1 -l \\EFI\\ubuntu\\grubx64.efi -L Ubuntu
8. Remove the LiveUSB and reboot from the newly created Ubuntu entry.

Note: If you have a dual boot installation then the ESP partition may be the second partition so modify the '-p 1' in the command above to '-p 2' or to whatever the ESP partition is. Likewise for some devices the eMMC is '/dev/mmcblk1' and not '/dev/mmcblk0' so again modify the command as appropriate. If your device uses a 32-bootloader then use 'bootia32.efi' rather than 'grubx64.efi' in the command. It also sometimes doesn't work first time and requires all the steps to be repeated which should then fix the issue.

Intel Apollo Lake devices not booting after installation

When installing respun Ubuntu or similar distros on Intel Apollo devices using the '--apollo'  option (or '-b Linuxium') 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 free. With the later Linux kernel releases the size and number of modules have increased and the generated bootable EFI file is now quite large (over 50MB) and if there is insufficient space for it the resultant installation will not boot. The solution is to increase the size of the EFI partition by following the instructions posted here.

Additional information regarding the script

Minimizing repeated downloads

The rEFInd boot manager (http://www.rodsbooks.com/refind) can be downloaded from https://sourceforge.net/projects/refind/files into the same directory as the script is run from to prevent unnecessary repeated downloads if this is a concern and will make processing quicker.

Avoiding new windows opening when respinning

To prevent the file manager opening a window each time the script mounts a temporary file system I have run the command 'gsettings set org.gnome.desktop.media-handling automount-open false' first on my system.

Lock file

The script creates a lock file '.isorespin.sh.lock' in the directory where it is run from in order to ensure exclusive access to the run-time environment. If the script or machine crashes this lock file may need to be removed in order to rerun the script and you will be prompted should this occur. However it is not recommended to run the script in parallel from multiple directories as it is both CPU and I/O intensive and severe performance degradation would occur.

Permissions

If when running the script you get the error:

bash: ./isorespin.sh: Permission denied

it means that the script needs to be made executable which can be achieved using the 'chmod' command ('sudo chmod 755 isorespin.sh').

Restrictions

You cannot respin an ISO on an OS that doesn't support 'systemd' if you want to use either the '--apollo' or the '-b Linuxium' options. Also you cannot respin an ISO if it doesn't support 'systemd' when using the '--atom', '--apollo' or '-b Linuxium' options:

linuxium@LINUXIUMONE:~$ isorespin.sh -i ubuntu-14.04.5-desktop-amd64.iso --atom
Extracting ISO ...
Parallel unsquashfs: Using 4 processors
166333 inodes (175651 blocks) to write

[===========================================================/] 175651/175651 100%

created 105294 files
created 16104 directories
created 60921 symlinks
created 82 devices
created 0 fifos
/usr/local/bin/isorespin.sh: The '--atom' option is only compatible with an ISO that uses 'systemd'.
linuxium@LINUXIUMONE:~$ 

You cannot respin an ISO that is EOL (End Of Life):

linuxium@LINUXIUMONE:~$ isorespin.sh -i ubuntu-17.04-desktop-amd64.iso --atom
Extracting ISO ...
/usr/local/bin/isorespin.sh: ISO is EOL.
linuxium@LINUXIUMONE:~$ 

You cannot run the script on a 32-bit OS:

linuxium@LINUXIUMONE:~$ isorespin.sh -i ubuntu-17.10.1-desktop-amd64.iso --apollo
/usr/local/bin/isorespin.sh: This script can only be run on a 64-bit (amd64 or x86_64) OS.
linuxium@LINUXIUMONE:~$

Running the script on Windows

First download and install Oracle's VirtualBox on Windows and then create a Linux VM from a standard Ubuntu 64-bit desktop ISO and install to a VDI of fixed size (minimum 20GB). Start the new Ubuntu VM and install 'Oracle VM VirtualBox Extension Pack'. You can then download my 'isorespin.sh' script to respin the Ubuntu-based ISO of choice. By installing the extension pack you will also be able to write the respun ISO to a USB using 'dd' from within the Ubuntu VM. Unfortunately 'Bash on Ubuntu on Windows' using 'Windows Subsystem for Linux' does not support 'loop' devices which are required by my script so an Ubuntu VM is the only working alternative at this time.

Running the script on Arch Linux

Running the script on Arch Linux requires a modified PATH. The simplest way is to run the script as follows:

PATH=/usr/sbin:/sbin:/bin:$PATH ./isorespin.sh

Additionally to install the required packages it may be necessary to run:

sudo pacman -S cdrkit bc libisoburn squashfs-tools dosfstools

or similar depending on which packages are missing from you environment.


Miscellaneous issues not directly related to the script

The Linux mainline kernel

It is worth noting that certain releases of the mainline kernel include specific core functionality:

v4.9 includes the eMMC v5.0 driver required for accessing the internal storage in many devices.
v4.11 includes the HDMI audio driver.
v4.12 includes the RTL8723BS driver although you will still need the wifi/bt firmware.

Kernel freezes

Well known and well documented without a permanent fix or so it seems. Kernels after v3.16 seem to include something that caused them to randomly freeze on Intel Atom devices and then the whole system hangs. Subsequently an accepted workaround was recommended to limit the processor (CPU) to a certain power state or 'C-state' and if freezes are encountered then to pass 'intel_idle.max_cstate=1' as a boot parameter. Later kernels have included patches and the current state seems to be reliable enough to ignore the workaround. If however freezes still occur the easiest way to implement the workaround on an installed system is to edit the file '/boot/grub/grub.cfg' and modify to look like:


GRUB_CMDLINE_LINUX_DEFAULT="intel_idle.max_cstate=1"

Alternatively the following command can be entered:
sudo sed -i 's/\(GRUB_CMDLINE_LINUX=\)""/\1"intel_idle.max_cstate=1"/' /etc/default/grub
followed by:
sudo update-grub
and then a reboot as the change only needs to be made once typically following installation.

Micro SD card issues

Whilst micro SD cards have worked on Intel Atom Bay Trail devices it is only since the v4.7.2 kernel that Intel Atom Cherry Trail devices have had any form of success.

The typical error encountered is:

        mmc1: error -110 whilst initialising SD card
        mmc1: card never left busy state

and although most Class 10 and below cards from any manufacturer except Sandisk work now without problem some UHS cards still fail. I've found Samsung UHS Speed Class 3 and UHS Speed Class 1 work whereas similar Sandisk cards fail crashing the device sometimes when inserting or removing the card.

No sound from headphones or internal speakers

It may be necessary to first use the speaker controls to select the audio output before sound works. For audio on Lubuntu this will also require installing the package 'pavucontrol':

sudo apt-get install -y pavucontrol

and then using it to select the audio output e.g. HDMI. Unfortunately some devices still require additional audio drivers or specific device quirks that have not been incorporated into the mainline kernel so sound may only work over HDMI and not through internal speakers or via the headphone jack even though the UCM files have been added. This is part of ongoing Linux development and future kernel releases hopefully will include the drivers required for currently non-working devices.

Installing without an internet connection on devices with a 32-bit boot loader

Unfortunately the standard Ubuntu ISO requires an internet connection when installing on devices with a 32-bit boot loader otherwise the following error is encountered:
The 'grub-efi-ia32' package failed to install into /target/. Without the GRUB boot loader, the installed system will not boot.
My script solves this for Ubuntu ISOs as it will now add the required GRUB packages allowing the installation to successfully complete. However other Ubuntu ISOs including the Ubuntu flavours and distros based on Ubuntu (such as Linux Mint) etc. their installation without the internet on 32-bit devices is with varying success. In part it depends on the original ISO installation capability on 64-bit devices without the internet. For example as Lubuntu 17.04 cannot be installed on 64-bit devices without internet as the ISO does not contain '/pool' with required packages so likewise after respinning its installation on 32-bit devices is not possible. However Lubuntu 16.04.2 can be installed on both 64-bit and 32-bit devices after respinning (see http://cdimage.ubuntu.com/lubuntu/releases/16.04.2/release/lubuntu-16.04.2-desktop-amd64.list and http://cdimage.ubuntu.com/lubuntu/releases/17.04/release/lubuntu-17.04-desktop-amd64.list for detailed package information). Also for non-Ubuntu ISOs it depends on the availability of archived package versions as some ISOs are created with earlier GRUB package versions to those currently available. For example with Elementary OS the earlier packages are not available and it is not known where (or if) an archive copy is maintained so installing without the internet on 32-bit devices is not possible.

Suspend/Hibernate/Sleep issues

Suspend in general has been problematic on Intel Atom devices and while new patches are continually being applied to the mainline kernel it is currently not working or incorrectly working on a number of devices.

Brightness issues

Unfortunately as I don't have a tablet I cannot advise on the various screen related issues some users experience using Ubuntu. The best command appears to be 'xrandr' although its use is device specific. Many people have commented in previous posts with their solutions and I've included some of these below.

Most brightness suggestions include:

xrandr --output [device_name] --brightness floating_pvalue (0 <= x <= 1.0)

where you can determine your device by entering:

xrandr -q | grep "connected"

with the primary one being your device.

For example:

xrandr --output DSI-1 --brightness .${BRIGHTNESS}

where the variable BRIGHTNESS can take a value between 3 and 9.

Rotation issues

Some examples that users have posted include:

xrandr --output DSI-1 --rotate right
xinput set-prop <Device Touchscreen> 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1

and

xrandr -o right
xinput set-prop 'Goodix Capacitive TouchScreen' 'Coordinate Transformation Matrix' 0 1 0 -1 0 1 0 0 1

Also others have reported that screen rotation during boot works with 'fbcon=rotate:1'.

Touchscreen issues

These seem to be related to rotation issues and another example of a solution includes:

xinput set-prop "Silead GSLx680 Touchscreen" "Coordinate Transformation Matrix" 1 0 0 0 -1 1 0 0 1

which can also be set when matching InputClass section in 'xorg.conf' with:

Option "TransformationMatrix" "1 0 0 0 -1 1 0 0 1"

Installation on Intel Apollo Lake Devices

On Intel Apollo Lake devices you will need to include either the '--apollo' or '-b Linuxium' or '-b rEFInd' option when respinning the ISO to enable booting having first ensured sufficient space is available in the EFI partitions (see Resize EFI partition). Note that the  '-b Linuxium' option requires that the package 'bintuils' is installed so if in doubt use the '--apollo' or include the package as another option (i.e. use '-b Linuxium -p binutils').


Reporting issues

Comments are welcome but when discussing an issue please include the name of your device and use 'pastebinit' or similar to post a URL to a copy of the output from 'dmesg' (which is basically a log of kernel messages).

To use the 'pastebinit' command (see https://help.ubuntu.com/community/Pastebinit) first install the command by entering 'sudo apt-get install -y pastebinit' and then to share the kernel messages log enter 'dmesg | pastebinit'. This will paste a copy of the output from 'dmesg' to Ubuntu's Pastebin and provide a URL to access it.

So when reporting an issue please include:
  • Outline of issue
  • Name of device
  • URL from pastebin (e.g. http://paste.ubuntu.com/23646692/)

Donate

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

617 comments:

1 – 200 of 617   Newer›   Newest»
Unknown said...

-script does not generate iso

-im using intel core i5 pc , 8 gb ram, 100gb hd free space, opensuse 13.2 x64.

https://pastebin.com/4vGyXxy6

Please help,
Thanks in advance.

Linuxium said...

openSUSE 13.2 is EOL and as you seem to be hitting a known 'sudo' bug I'd recommend upgrading before trying my 'isorespin.sh' script again.

Unknown said...

You state "If bluetooth is always required then the command could be included in '/etc/rc.local' to avoid this step."

I think the better solution is to simply use:

$ sudo systemctl enable ...

Ed Humble said...

Your Script worked perfectly using Ubuntu Unity 17.04 on a 4-64 LattePanda. Wireless works Fine. Even Bluetooth works! I tried it with my Sony Bluetooth speaker and the speaker worked perfectly. I incorporated the 4.12 rc6 Kernel as well.

Known issues: Ghosting Cursors in Firefox. Looks like an old PacMan game. No functional issues but you have to remember where the real cursor is as it will vanish. All the other ghosts are like mouse trails.

I tried the XUbuntu and never could get System Tray to display. (You get a blank screen.) Right click gives you your full menu but no applications dealing with the screen will launch. Firefox, Terminal, Updates, and File Manager all work normally.

Is there a bug affecting XFCE when run on atom processors? The processor is an Atom Processor is a z83XX unit. If this is of interest, let me know I can be more specific.

Ed Humble said...

I neglected to mention, I ran the Broadcom drivers Script post install.

I haven't tried Samba yet, but that install and configure will be this week.

Unknown said...

better downloaded your .iso https://goo.gl/hZ4L1x with kernel 4.12rc6 and it worked! on my HP Stream 7 tablet, wireless worked, sound, bluetooth not tested yet, brightness works using xrandr.

Thanks!

Linuxium said...

'enable' only links the service files and you need 'start' to actually start the service.

Linuxium said...

Do you get the same problem with XFCE using 16.04.2 vs 17.04 on the LattePanda device?

Linuxium said...

Great. Good to know.

Unknown said...

Does not work :(

isorespin.sh: '/home/brian/ubuntu-16.04.1-server-amd64.iso' must be an Ubuntu (or Ubuntu flavour), Linux Mint, elementary, or neon desktop ISO.

Really wish that ISO was still available!!

Unknown said...

Does not work on Desktop ISO files either:

isorespin.sh: '/home/brian/ubuntu-16.04.1-desktop-amd64.iso' must be an Ubuntu (or Ubuntu flavour), Linux Mint, elementary, or neon desktop ISO.

Linuxium said...

As per above the script works with all official desktop 64-bit Ubuntu ISOs.

Linuxium said...

It does works with 'ubuntu-16.04.1-desktop-amd64.iso' so can you check your ISO? An 'ls -l' should show a size of '1513308160' and a 'md5sum' should give '17643c29e3c4609818f26becf76d29a3'.

If they are different your ISO is likely to be corrupt and you should download it again.

Next check the 'isorespin.sh' script. An 'ls -l' should give '3937300' and an 'md5sum' give '5e5b86cdb69fdcdd7a1edf969286eb20'.

Finally what OS are you running the script on? What do you get if you run the command 'cat /etc/lsb-release' or from running 'lsb-release -a'?

Eric said...

Good morning,

I have attempted to use your script but it gives multiple errors, before giving a final error of "Cannot find mainline kernel." and quitting. (Yes, it is connected to the internet.)

Here is the environment: newly installed Ubuntu 16.04 on VMware (installed using express install as that is the default when you select a Ubuntu ISO). Network in bridged mode

Executed sudo apt-get update; sudo apt-get upgrade; sudo apt-get install -y squashfs-tools xorriso zenity;

Downloaded isorepin.sh (ver 7.1.2), as well as linuxium-isntall-UCM-files.sh and wrapper-linuxium-install-UCM-files.sh and rtl8723bs_4.12.0_amd64.deb - all in /iso as well as the same ISO I just built this VM from.

Running from /iso which has been chmod 777.

Running the following:
sudo ./isorespin.sh -i ubuntu-16.04.2-desktop-amd64.iso -u -l rtl8723bs_4.12.0_amd64.deb -f linuxium-install-UCM-files.sh -f wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-UCM-files.sh -s 2GB

Yields multiple errors:
Extracting ISO ...
rsync: read errors mapping "/iso/isorespin/mnt/EFI/BOOT/BOOTx64.EFI": Input/output error (5)
rsync: read errors mapping "/iso/isorespin/mnt/EFI/BOOT/grubx64.efi": Input/output error (5)
rsync: read errors mapping "/iso/isorespin/mnt/boot/grub/efi.img": Input/output error (5)
[MANY more of these rsync errors]

Followed by a bunch of these failed verification errors:
ERROR: boot/grub/efi.img failed verification -- update discarded.
ERROR: boot/grub/font.pf2 failed verification -- update discarded.
ERROR: boot/grub/grub.cfg failed verification -- update discarded.
[MANY more follow]

Those failed verification errors / update discarded are followed by:
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.1]
Read on filesystem failed because Input/output error
Read on filesystem failed because Input/output error
Can't find a SQUASHFS superblock on mnt/casper/filesystem.squashfs
mv: cannot stat 'squashfs-root': No such file or directory
Extracting isorespin files ...
Updating bootloader/bootmanager ...
mv: cannot stat 'iso-chroot/dev': No such file or directory
cp: cannot stat 'iso-chroot/dev.linuxium': No such file or directory
mv: cannot stat 'iso-chroot/run': No such file or directory
cp: cannot stat 'iso-chroot/run.linuxium': No such file or directory
mv: cannot stat 'iso-chroot/tmp': No such file or directory
cp: cannot stat 'iso-chroot/tmp.linuxium': No such file or directory
cp: cannot create regular file 'iso-chroot/etc/': No such file or directory
mv: cannot stat 'iso-chroot/etc/apt/sources.list': No such file or directory
sed: can't read iso-chroot/etc/apt/sources.list.linuxium: No such file or directory
tee: iso-chroot/etc/apt/sources.list: No such file or directory
chroot: cannot change root directory to 'iso-chroot': No such file or directory
[There's a few more cannot stat errors]

Finally:
Fetching mainline kernel packages ...
Installing mainline kernel packages ...
cp: target 'iso-chroot/usr/src/' is not a directory
cp: cannot create regular file 'iso-chroot/usr/src/': No such file or directory
mv: cannot stat 'iso-chroot/dev': No such file or directory
cp: cannot stat 'iso-chroot/dev.linuxium': No such file or directory
... (removed some to get below 4096 chars)
mount: mount point iso-chroot/dev does not exist
umount: iso-chroot/dev: mountpoint not found
mv: cannot stat 'iso-chroot/dev.linuxium': No such file or directory
mv: cannot stat 'iso-chroot/run.linuxium': No such file or directory
mv: cannot stat 'iso-chroot/tmp.linuxium': No such file or directory
./isorespin.sh: Cannot find mainline kernel.

While it runs, it does create (temporarily) an isorespin directory.

It looks to me like an initial error with the rsync call is causing the rest of the errors... but I'm not sure how to resolve the rsync error.

Any advice?

Thanks!
-Eric

Eric said...

In case you ask:

linux-user@ubuntu:/iso$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"

linux-user@ubuntu:/iso$ ls -l ubuntu-16.04.2-desktop-amd64.iso
-rw-rw-r-- 1 linux-user linux-user 1167360 Jun 30 02:31 ubuntu-16.04.2-desktop-amd64.iso

linux-user@ubuntu:/iso$ md5sum ubuntu-16.04.2-desktop-amd64.iso
c2db7847895289963539ce4cb9822f31 ubuntu-16.04.2-desktop-amd64.iso

linux-user@ubuntu:/iso$ ls -l isorespin.sh
-rwxrwxr-x 1 linux-user linux-user 430080 Jun 30 02:41 isorespin.sh

linux-user@ubuntu:/iso$ md5sum isorespin.sh
4354f50ced7c5429518e8ae57be52996 isorespin.sh


Eric said...

FYI, I'm trying to get Ubuntu working on a Cherry Trail device. Thanks again.

Linuxium said...

Can you download the script again and retry as I think you might have a package missing. I've just moved the package check to the start so the script will tell you immediately now.

Linuxium said...

This error was caused by a missing package. I've just moved the package check to the start so the script will tell you immediately now.

Unknown said...

/usr/local/bin/isorespin.sh: ISO '/home/chris/Documents/ubuntu-17.04-desktop-amd64.iso' is not a 64-bit (amd64 or x86_64) ISO.

Both GUI and CLI have the same output(of course).
Running on a fresh and updated install of Ubuntu 64bit (on VM).

On the CLI it also outputs "grep mnt/.disk./iso input/output error"
It has been run with sudo, in case it cannot mount.

What gives? :/

Linuxium said...

There was a small window yesterday when having modified the script to support the new '-g' option I uploaded a version which checked for required packages in the wrong place. So if you ran the script without the prerequisite packages it borked rather than stop with a message as it should do. Testing didn't pick this up as it worked if the packages where installed. I have corrected this by uploading a fixed version and now if you download and run the script it will work both correctly and as before. Now and as per the documentation 'You will need certain packages like 'squashfs-tools' and 'xorriso' installed (use 'sudo apt-get install -y squashfs-tools xorriso' to install them) plus 'zenity' if you want to use the GUI. As different Linux distros have different packages installed by default the script will first check and notify you if any other packages are required'.

Eric said...

So that didn't fix it... BUT, I think I've identified the issue... and I should have noticed it earlier. When I copied the ISO over from my host, VMware tools did NOT actually copy the entire ISO to the Ubuntu guest (and it actually didn't copy the entirety of your script either). Making sure the full copy of the ISO makes it to the guest and trying again.

Linuxium said...

The 'md5sum' for 'isorespin.sh' should be '8bbfd21b46c0ebbcc05973c7b462988a' if it helps.

Eric said...

md5 matches this time... and I'm about 15 minutes into the execution without errors... so far, so good. Thanks!

Unknown said...

Hello again and thank you for your reply.

I had already installed these two packages (zenity was already installed), I read the guide twice :D

I will try the updated script and I'll also try a physical Linux machine. I've encountered many strange issues with VMs in the past.

Thank you for your time :)

Unknown said...

Olla again any idea what i did wrong here

[code]
Script './isorespin.sh' called with '-i /home/hp/Downloads/kodibuntu-14-0rc-64-bit-multi-ubu.iso -k 4.12.0-041200rc6 -p "" -p "/home/hp/isos/respin/rtl8723bs_4.12.0_amd64.deb" -p "/home/hp/isos/respin/linuxium-install-UCM-files.sh" -p "/home/hp/isos/respin/linuxium-install-broadcom-drivers.sh" -p "/home/hp/isos/respin/wrapper-linuxium-install-UCM-files.sh" -p "/home/hp/isos/respin/wrapper-linuxium-install-broadcom-drivers.sh" -b rEFInd' ...
'/home/hp/Downloads/kodibuntu-14-0rc-64-bit-multi-ubu.iso' must be an Ubuntu (or Ubuntu flavour), Linux Mint, elementary, or neon desktop ISO.
[/code]

many thanx in advance was a old kodibuntu iso i use :)

Linuxium said...

Your ISO 'kodibuntu-14-0rc-64-bit-multi-ubu.iso' is not from http://releases.ubuntu.com, https://www.ubuntu.com/download/ubuntu-flavours, https://www.linuxmint.com/download.php, https://neon.kde.org/download or https://elementary.io i.e. it can only be an official desktop 64-bit Ubuntu, Ubuntu flavour, Linux Mint, KDE neon or elementary OS ISO.

Unknown said...

did same with this one to :


code]
Script './isorespin.sh' called with '-i /home/hp/isos/budgie-remix-16.10-amd64.iso -k 4.12.0-041200rc6 -p "/home/hp/isos/respin/rtl8723bs_4.12.0_amd64.deb" -p "/home/hp/isos/respin/linuxium-install-UCM-files.sh" -p "/home/hp/isos/respin/linuxium-install-broadcom-drivers.sh" -p "/home/hp/isos/respin/wrapper-linuxium-install-UCM-files.sh" -p "/home/hp/isos/respin/wrapper-linuxium-install-broadcom-drivers.sh" -l "/home/hp/isos/respin/rtl8723bs_4.12.0_amd64.deb" -b rEFInd' ...
'/home/hp/isos/budgie-remix-16.10-amd64.iso' must be an Ubuntu (or Ubuntu flavour), Linux Mint, elementary, or neon desktop ISO.

[/code]

Linuxium said...

Budgie Remix isn't an official Ubuntu flavour. If you want Ubuntu Budgie use the ISO from 'http://cdimages.ubuntu.com/ubuntu-budgie/releases/17.04/release/ubuntu-budgie-17.04-desktop-amd64.iso'.

Unknown said...

on a side note kodibuntu is a ubuntu flava to :)

Linuxium said...

However 'Kodibuntu' is not an official flavour (see https://www.ubuntu.com/download/ubuntu-flavours).

Unknown said...

thanx grabbing now :)

update this error :

[code]
Script './isorespin.sh' called with '-i /home/hp/Downloads/ubuntu-budgie-17.04-desktop-amd64.iso -k 4.12.0-041200rc6 -p "/home/hp/isos/respin/rtl8723bs_4.12.0_amd64.deb" -p "/home/hp/isos/respin/linuxium-install-UCM-files.sh" -p "/home/hp/isos/respin/linuxium-install-broadcom-drivers.sh" -p "/home/hp/isos/respin/wrapper-linuxium-install-UCM-files.sh" -p "/home/hp/isos/respin/wrapper-linuxium-install-broadcom-drivers.sh" -l "/home/hp/isos/respin/rtl8723bs_4.12.0_amd64.deb" -b rEFInd' ...
Work directory 'isorespin' used ...
Kernel '4.12.0-041200rc6' not found in 'http://kernel.ubuntu.com/~kernel-ppa/mainline'.

[/code]

am i better just choosing latest for a win10tab

Linuxium said...

If you look at 'http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=M;O=A' (see the documentation on '-k or --kernel' above) you will see that the kernel '4.12.0-041200rc6' you specified doesn't exist and you probably meant 'v4.12-rc6'. Also you have repeatedly used the '-p' option when you should have used '-l' or -f' depending on the file and you are also missing the '-c' options. So the command should be:

./isorespin.sh' -i /home/hp/Downloads/ubuntu-budgie-17.04-desktop-amd64.iso -k v4.12-rc6 -l /home/hp/isos/respin/rtl8723bs_4.12.0_amd64.deb -f /home/hp/isos/respin/linuxium-install-UCM-files.sh -f /home/hp/isos/respin/linuxium-install-broadcom-drivers.sh -f /home/hp/isos/respin/wrapper-linuxium-install-UCM-files.sh -f /home/hp/isos/respin/wrapper-linuxium-install-broadcom-drivers.sh -c wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-broadcom-drivers.sh -b rEFInd

Unknown said...

thanx for reply :)

sorry if im been dumb but where would i edit to copy and paste what your have given i norm use the gui to build iso via .sh in terminal , can i just edit a file in place into it the above you gave with correct -f & -c ?

Linuxium said...

Yes just open up a terminal like before and instead of entering './isorespin.sh' enter the full command './isorespin.sh -i /home/hp/Downloads/ubuntu-budgie-17.04-desktop-amd64.iso -k v4.12-rc6 -l /home/hp/isos/respin/rtl8723bs_4.12.0_amd64.deb -f /home/hp/isos/respin/linuxium-install-UCM-files.sh -f /home/hp/isos/respin/linuxium-install-broadcom-drivers.sh -f /home/hp/isos/respin/wrapper-linuxium-install-UCM-files.sh -f /home/hp/isos/respin/wrapper-linuxium-install-broadcom-drivers.sh -c wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-broadcom-drivers.sh -b rEFInd' obviously without the "'" quotes and you can use copy and paste to do this.

Unknown said...

mucho gratis sir think were good now and will report back once i install :)

teqq.at said...

First of all - thank you for your great work and the efforts you put into it. It is indeed impressive.

I am trying to install Linux Mint 18.1 on an ODYS Shape Pro whith the help of your scripts. The Kernel 4.12 (released a few days ago, no RC) has the MMC problem again with the RPMB partition on eMMCs, so the machine reacts FAR too sluggish to be useful. Kernel 4.11.8 on the other hand lacks support for the WLAN (RTL8723BS) including bluetooth, also the battery is not recognized, only if it is charging.

Do you know of a patch for 4.12 to get rid of the encrypted RPMB Partition problem that could help getting the machine into a usable state? SD-Card slot and audio not working can be bypassed with external hardware, WLAN would be nice, but the battery state is important, I think.

Thanks again for your great work!

Greetings from Vienna, Austria, EU, Earth.

Linuxium said...

If you want to build your own kernel (which you can do using 'isorespin.sh see http://linuxiumcomau.blogspot.com.au/2017/06/compiling-your-own-kernel-using.html) you can try adding this patch 'https://patchwork.kernel.org/patch/4710641/' although it may need porting to the kernel version you are compiling.

Unknown said...

Hi
Struggling a little getting an Invalid option

/usr/local/bin/isorespin.sh -i /home/retromint/linuxmint-18.2-mate-64bit.iso -u -l /home/retromint/rtl8723bs_4.12.0_amd64.deb -f /home/retromint/linuxium-install-UCM-files.sh -f /home/retromint/wrapper-linuxium-install-UCM-files.sh-c /home/retromint/wrapper-linuxium-install-UCM-files.sh
/usr/local/bin/isorespin.sh: Invalid option '-l /home/retromint/rtl8723bs_4.12.0_amd64.deb'.
Usage: /usr/local/bin/isorespin.sh [ -h | -v ]

Unknown said...

Hello there!

I am trying to set up a Beelink Z83 with a Cherry Tail Atom X8350 processor. WiFi and Sound via HDMI is cruicial for my application, sound via analogue jack would be a lovely addon.

I have downloaded from one of your recent blog posts this file: linuxium-v4.12-rc7-ubuntu-17.04-desktop-amd64.iso
md5: f1c5d906d6a335f2c51455d713048ad8

Ths 17.04 works like a charm. However, for my business case, i would like to use an ubuntu LTS version. So i downloaded 16.04 desktop, downloaded the 4 additional files and 2 wrapper scripts to the same folder with your iso tool, and ran the following command:

bash isorespin.sh -i ubuntu-16.04.1-desktop-amd64.iso -u -l rtl8723bs_4.12.0_amd64.deb -f linuxium-install-UCM-files.sh -f wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-UCM-files.sh

This ran through fine and i copied the resulting linuxium-v4.12-ubuntu-16.04.1-desktop-amd64.iso to my usb stick and booted from it.

However, the onboard wifi is not found now. I hoped I would receive a ubuntu 16.04 with same kernel and patches that you already put into your 17.04 image - but i failed.

Am i doing something wrong, or is it not possible to make a 16.04 work with a 4.12 kernel and wifi working?

Thanks for your time and efforts - highly appreciated.

Regards,
Lucas

Unknown said...

I found out that when i run the linuxium-install* scripts manually in the live system, wifi starts to work immediately.

Now i tried to install the linuxium i made on the device. However, it just randomly freezes totally (clock stops, everything stops). Any hints what I may still be missing?

Linuxium said...

Did you post the correct command and error message as if I use the command you posted I get the error 'Flag not specified for '/home/retromint/wrapper-linuxium-install-UCM-files.sh''. This is because you are missing the space in front of the '-c'. Can you also make sure you download and use the version of my script from 'https://goo.gl/ZnUd6H' just in case you are using an older version?

Linuxium said...

Try booting using the kernel boot parameter of 'intel_idle.max_cstate=1' as this may help with kernel freezes.

teqq.at said...

Thank you for the info, will try this next weekend.

Unknown said...

Hi, first, thanks much for this script...
(tried "dmesg | pastebinit", but apparently it doesn't run behind a proxy).

I'm working with an Azulle Access Plus (AAP) which uses a Cherry Trail. I bought the unit and overwrote W-10 with the .iso that AzulleTech provided. That unit runs my application fine (its Ubuntu16.04.2 LTS with a 4.5.7-archermind-standard+ kernel).
Then I bought two more, and was not able to get the iso, as their tech support pointed me to the standard Ubuntu16.04.2LTS image.

Using the off-the-shelf Ubuntu16.04.2LTS, the system boots, and as long as I don't run my application its happy. When I start my application (networked audio/video encode/decode using gstreamer) it runs for about 15 minutes just fine (good bi-directional audio and video), then the entire system freezes (recoverable only by power-cycle).

Then I read about the Cherry Trail issues with Ubuntu and fortunately found your script. I run your script with
-i isofile -k v4.11 -g "intel_idle.max_cstate=1" successfully, but after installing it on the AAP, it still freezes. Note that this application has been running on other linux systems for quite some time. Also note that the system does not freeze if my application is not run.
Any thoughts? I am trying to get Azulle to give me the original .iso, but I'd prefer to be up-to-date if possible. I can try 4.12, but I had thought 4.11 pulled all Cherry Trail stuff into mainline.
Thanks in advance,
Ed

Unknown said...

I was able to post dmesg output to pastebin.com...
https://pastebin.com/yfRpbFBU

Linuxium said...

The v4.12 kernel has additional Intel Atom patches and looking at your 'dmesg' you should probably add my 'linuxium-install-UCM-files.sh' (see above) to fix the 'ASoC: no backend DAIs' messages. Unfortunately freezes are not solved although the 'cstate' kernel boot parameter helps. Perhaps it is freezing due to thermal throttling? Take a look at http://linuxiumcomau.blogspot.com.au/2017/03/ubuntu-16042-and-ubuntu-1704-beta-1.html?showComment=1489005628439#c7389843581916420878 and see if this help.

Unknown said...

A bit more information, which rules out the hardware as a potential issue, and IMHO points clearly to the distribution or kernel...

I did a raw copy of the internal disk of the good system and transferred that image to the system that was freezing.

Seems to me, since both are running 16.04.2 LTS, that points to the kernel; but since I don't know where the kernel came from (it was part of the .iso I got from Azulle) I can't isolate anything further.

Any thoughts?

Unknown said...

Ok, I'll give all this a try and report back.
BTW...I was adding a bit more info (see above) as you were apparently replying. Thanks much.

Unknown said...

Here's the dmesg output of the system that works (now I have two of them)... https://pastebin.com/ZT6Ep11v

Unknown said...

BTW, I had tried 4.12 last night and that made no difference either.

Unknown said...

One small bit of "key" information I left out in the above reply was that after installing the new image on the system that was freezing, it froze no more.

Unknown said...

Sorry been away for a few days
Yes CRC32 for both scripts are showing as 948C4DD6

Full error
retromint@retro-VB ~ $ sudo /usr/local/bin/isorespin.sh -i /home/retromint/linuxmint-18.2-mate-64bit.iso -u -l /home/retromint/rtl8723bs_4.12.0_amd64.deb -f /home/retromint/linuxium-install-UCM-files.sh -f /home/retromint/wrapper-linuxium-install-UCM-files.sh -c /home/retromint/wrapper-linuxium-install-UCM-files.sh
/usr/local/bin/isorespin.sh: Invalid option '-l /home/retromint/rtl8723bs_4.12.0_amd64.deb'.
Usage: /usr/local/bin/isorespin.sh [ -h | -v ]
/usr/local/bin/isorespin.sh -i [ [ -u | -k ] | -r " ... " | -p " ... " | -l " ... " | -f " | ... " | [ -s MB | GB ] | [ -b GRUB | rEFInd ] ...
/usr/local/bin/isorespin.sh ... -w | -d " ... " | -e " ... " | -c " ... " | -o " | ... " | -g "" | " ... " ]

am running mint in a VM
I think I followed all the steps correctly ( I do not use linux a lot )

Unknown said...

Well, still no luck.. Same symptom... Freeze after about 5 minutes of running.

isorespin.log: https://pastebin.com/wkj0JJka
dmesg output: https://pastebin.com/Ryi6mQfY

I'd sure appreciate any thoughts or suggestions.

Unknown said...

Sorry I copy and pasted command into libraoffice, it looks like I also copied some formatting (shown as grey blocks) once I deleted these it ran with errors:-
created 168180 files
created 21261 directories
created 48197 symlinks
created 81 devices
created 0 fifos
Extracting isorespin files ...
Updating bootloader/bootmanager ...
chroot: failed to run command 'apt-cache': Exec format error
chroot: failed to run command 'apt-cache': Exec format error
mv: cannot stat 'iso-chroot/usr/src/grub-efi-ia32-bin*.deb': No such file or directory
mv: cannot stat 'iso-chroot/usr/src/grub-efi-ia32*.deb': No such file or directory
chroot: failed to run command 'apt-cache': Exec format error
chroot: failed to run command 'apt-cache': Exec format error
Fetching mainline kernel packages ...
Installing mainline kernel packages ...
/usr/local/bin/isorespin.sh: Cannot find mainline kernel.

Unknown said...

After posting the previous results I noticed that the "-g" option of the isorespin.sh doesn't appear to have inserted the kernel command line parameters. I manually added them through /etc/default/grub, but still no difference.

Unknown said...

Is it possible to get this working for a server iso instead of a desktop iso? I'd love to get Ubuntu Server 17 working. Thanks for your answer, even if the answer is no.

Linuxium said...

I ran 'isorespin.sh' with the '-g' option you used (as seen in the log you posted) and it did insert the kernel boot parameters correctly. However your 'dmesg' shows you running a kernel without them. Can you check that you are booting the correct kernel as another indication is that the ALSA UCM files are missing and you added them according to the log (by running 'wrapper-linuxium-install-UCM-files.sh')?

Linuxium said...

The 'crc32' for 'isorespin.sh' is '948c40d6' not '948C4DD6' ... was it a typo?

Also are you running natively on Linux and if so what distro or are you running in a VM?

Linuxium said...

No. But as a workaround you can first respin and install the desktop ISO and then purge the desktop packages and install the required server packages (see http://www.linuxium.com.au/how-tos/creatinganubuntuserveronaz3735fdevice for an example). You might even be able to do this through respinning!

Unknown said...

Thank you for reply
Host is Win7 - 64bit (i7 16GB ram)
Guest is Mint 18.1 - xfce 32-bit
Sorry typo D should be 0 (Zero)

concrete_d said...

Hi, I tried using your command to install UCM files using the -f and -c cmdline args, and the scripts are failing to run - isorespin.log is showing lots of 'sudo: unable to resolve host ' errors. Do you know what could cause this?

Linuxium said...

I've not tried running the script in a Linux Mint VM. It works with an Ubuntu VM using Oracle's VirtualBox on Windows so can you create a Linux VM from a standard Ubuntu 64-bit desktop ISO and install to a VDI of fixed size (minimum 20GB) then start the new Ubuntu VM and install 'Oracle VM VirtualBox Extension Pack' before installing the two required packages of 'squashfs-tools' and 'xorriso' and then running my 'isorespin.sh' script?

Linuxium said...

Are you connected to the internet before running the scripts?

concrete_d said...

Yes, I'm connected to internet and can ping google.com for example. The hostname referenced in 'sudo: unable to resolve host ' is the local hostname of the system where I'm running isorespin, which is a vanilla install of Ubuntu 16.04 64-bit - it's directly installed (not a VM), if that makes a difference.

concrete_d said...

Running sudo outside isorespin works fine, but any time sudo is run in a script invoked by -c it shows the 'unable to resolve host [local hostname]' error in the log.

Linuxium said...

Are you running the 'linuxium-install-UCM-files.sh' using the '-c' option as if so you should be running the 'wrapper-linuxium-install-UCM-files.sh' as that fixes the hostname issue. You still have to load the 'linuxium-install-UCM-files.sh' script so the respin command would be along the lines of 'isorespin.sh -i ...your various options... -f linuxium-install-UCM-files.sh -f wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-UCM-files.sh'.

Unknown said...

Ok, I am behind a proxy, so that was causing some problems. Seems like the different "sudo wget" and "sudo chroot iso_chroot /bin/bashrc" commands don't do well without some help there. I set up everything I could think of to get over this hump...
1. Set up /etc/apt/apt.conf to be proxy aware.
2. Set http_proxy and https_proxy in /etc/profile.
3. Set up .wgetrc in $HOME of invoking user.
4. Modify isorespin.sh (lemme know if you want a copy):
a. Add -E to "sudo" for wget.
b. Add -e use_proxy=yes -e http_proxy=PROXY to wget lines.

After all that, the UCM files properly installed, but still no kernel command line additions. So, again I added them manually, but my unit *still* hangs after 5-10 minutes of multimedia.

dmesg: https://pastebin.com/cMwR4gU5
isorespin.log: https://pastebin.com/5qxr72DT


It doesn't seem to be a heat problem either; the unit isn't very warm. Actually, the one unit I have that works with the older "source-unknown" kernel shows the cores at about 74C, where this kernel hangs with cores at around 67C.

Unknown said...

concrete_d, if you're behind a proxy, see my reply above...

Unknown said...

Thank you I think that worked ( looks good )
unsure what my Z3735G 1GB/16GB will be like but it has to better than Win10 that cannot update due to one USB for charge and data (needs a USB drive and power to update and powered OTG do not work)

ISO image produced: 921176 sectors
Written to medium : 921176 sectors at LBA 0
Writing to 'stdio:../../linuxium-v4.13-rc1-linuxmint-18.2-mate-64bit.iso' completed successfully.

/home/vm/isorespin.sh: Respun ISO created as 'linuxium-v4.13-rc1-linuxmint-18.2-mate-64bit.iso' ... see logfile 'isorespin.log' for details.
vm@vm-VirtualBox:~$

Linuxium said...

The 'dmesg' shows the kernel boot parameters so do you mean after installation the kernel boot parameters that were there for LiveUSB boot are not present in the installed system?

Linuxium said...

You will probably find that Lubuntu would be a better option for your device if it only has 1GB RAM.

Unknown said...

Thank you again for you work and help

Unknown said...

Right... if I boot from USB and just "try" ubuntu, the boot parameters from the isorespin.sh command line are there; but when I install the system (I just erase and write over everything that was previously on disk) the boot parameters specified on the isorespin.sh command line are not there. Here are the two dmesg outputs:
dmesg.usbboot: https://pastebin.com/TPra5MCY
dmesg.install: https://pastebin.com/CzuxJTWr

Again... thanks for your help.

Marcin Debowski said...

Thank you for your effort. Unfortunately anything I have tried ended up at different progress advancement with the message like this:

write_file: failed to create file squashfs-root/var/lib/dpkg/info/libfdisk1:amd64.triggers, because Invalid argument

Executed on Ubuntu 16.04.2 LTS (amd64)

What could be the reason?

Unknown said...

By the way, I'm able to reproduce the freeze by going to webglsamples.org/aquarium/aquarium.html and setting the "Number of Fish" to 500 or more (then just wait 10-15 minutes).

Linuxium said...

It is not an error I'm familiar with. Can you provide more details like: are you running natively or on a VM (and in which case what); what version and what is the md5sum of my 'isorespin.sh' script; what ISO are you trying to respin; what are the contents of 'isorespin.log' after encountering the error; what is the full error message?

Linuxium said...

When the ISO installs Ubuntu the GRUB installer creates a new '/etc/default/grub' file rather than copying the existing one which is why the kernel boot parameters are present on the LiveUSB and not when installed. I'm in two minds as to whether it is 'correct' to reflect the '-g' option kernel boot parameters once installed and on how to do it if determined 'appropriate'. Do you have any thoughts or comments?

Regarding the freeze issue perhaps you can post your feedback on Kernel.org Bugzilla against the existing bug report 'https://bugzilla.kernel.org/show_bug.cgi?id=109051'?

Unknown said...

Thanks, I'll post some feedback.
Regarding GRUB options...
My bootloader experience is on non-Intel systems, so keeping that in mind...
If the install actually preserved the current boot parameters then I'd say maybe you should leave it like that (so whatever was there is not lost); however, if the new grub just installs a standard /etc/default/grub file anyway, then it seems to be appropriate for the -g options of your script to be put in with the install.
Of course, that assumes there is some way of doing that!...
Maybe a script (-c) could copy the initial /etc/default/grub to grub.bak, and move a new one (with -g options) to that location.

Unknown said...

Ok, some new data (with a question)...
Based on some comments I saw at https://bugzilla.kernel.org/show_bug.cgi?id=109051, I went back to 4.12 (rather than 4.12.2), and instead of installing to internal disk, I just ran from USB. I ran the aquarium stuff for about 5 hours without a glitch. Then I took that image and installed to internal disk, (forced the same GRUB options) and ran the aquarium and it died in about 15 minutes.

Would you expect there to be any difference in runtime between the two scenarios?

Unknown said...

Tried Lubuntu but fails to install grub (does not ask for wifi during install)
Mint did work but was not great on a touchscreen (will need to try harder with it)

Unknown said...

I get no sound or bluetooth I also see errors
Command run ...
# wrapper-linuxium-install-broadcom-drivers.sh
bash: /usr/local/bin/wrapper-linuxium-install-broadcom-drivers.sh: Permission denied

Have tried with file in /usr/local/bin and home folder same error

Marcin Debowski said...

I executed your script on the NTFS partition with fixed attributes/ownership. Same machine, ext4 working dir and no problems.
Interestingly on another machine, also NTFS work dir, it executes without any such messages. Probably a bit different set of attributes.

Linuxium said...

I've fixed the GRUB issue and it will be included in the next release of my script.

For the random freeze it has been reported as random so 5 hours without freeze and 15 minutes with freeze isn't necessarily unusual in the same environment. What would be interesting was if the timing (and especially lack of freeze) can be uniformly repeated on the two scenarios as this would be a pointer of where to look next.

Linuxium said...

Lubuntu requires internet to successfully install (see notes in my documentation). For the 'Permission denied' error you need to set execute first on the script before respinning (enter 'sudo chmod 755 wrapper-linuxium-install-broadcom-drivers.sh').

Linuxium said...

Interesting. I'd only use EXT4 for the working directory though.

Unknown said...

yep... understood.

Unknown said...

Hello! Thank you for your work! I feel like i'm very close to getting this to work. Any help would be appreciated!

I'm trying to get this going on a first generation Intel Compute Stick (Bay Trail).

The things i've done:
1. Selected Ubuntu in the BIOS of the Compute Stick
2. Booted into my other ubuntu machine to run your script and make the bootable flash drive.
a) I downloaded the latest 17.04 from Ubuntu's website
b) I downloaded all the scripts from this page
c) Here is the script of yours i ran (got it from one of your examples)

./isorespin.sh -i ubuntu-17.04-desktop-amd64.iso -u -l rtl8723bs_4.12.0_amd64.deb
-f linuxium-install-UCM-files.sh -f wrapper-linuxium-install-UCM-files.sh
-c wrapper-linuxium-install-UCM-files.sh

And Everything worked great! no errors.
3. I then used Rufus to create the bootable USB - no issues with this
4. Plugged this into the compute Stick and booted to the USB without issues
5. First did the "Try" option - all looked goo
6. Next booted up again to the install Ubuntu option. - The install worked perfectly and prompted me to restart.

-- Here's where my problem comes in

After the install It won't boot into ubuntu. It just goes to a black screen that says "A bootable device has not been detected"

Do i need to run the script with any additional option/parameter? Or do you have any other idea how to Get past this?

Thanks in advance!

Linuxium said...

See and follow 'NVRAM sync issues' above.

Ron said...

Hi, I tried running the isorespin.sh on ubuntu-16.04.3-desktop-amd64.iso and ubuntu-17.04-desktop-amd64.iso.

16.04 got stuck on 21%, twice, with installation wheel turning but no progress. Same thing happened for 17.04 just at 24%.

I also tried on lubuntu-17.04-desktop-i386.iso but it said it was not supported.

Linuxium said...

See 'Kernel freezes' for a possible solution.

Anonymous said...

@Linixium

Thank you so very much for your ISO Respin script because without it, I would have a pretty useless Windows 8 ThinkPad 10 tablet. I managed to use your script to install Ubuntu Gnome 17.04 on my 2nd Gen ThinkPad 10 and it is working very well! Bluetooth and Wifi needed to be configured ofcourse, I had to manually install the bluez firmware from here: http://www.linuxfromscratch.org/blfs/view/svn/general/bluez.html

I am only having issues mainly with getting IIO related things to work such as the gyroscope etc, if you happen to know what I may be missing? That and the battery monitor does not work for me. I will be donating to you for this epic script, I would also like to offer you free hosting with a company that I work for: https://cloudserpent.com
Hop on there and we will make sure it's you and you are more than welcome to choose any hosting you like free of charge! Thank you very much!

Linuxium said...

Thanks. For specific issues relating to your tablet I'd recommend searching any product dedicated forms or forums about running Linux on your tablet as often these types of issues are product specific.

rkantos said...

Asus QM1 x5-z8300.. Getting the following with Ubuntu Mate 16.04.3 / GRUB

intel_ish_ipc 0000:00:0a.0: [ishtp-ish]: Timed out waiting for FW
intel_ish_ipc 0000:00:0a.0: [ishtp-ish]: ISH: hw start failed.
intel_ish_ipc 0000:00:0a.0: [ishtp-ish]: ISH: PCI driver initialization failed

And after Busybox initialization:
(initramfs) Unable to find a medium containing a live file system.

Thus the system doesn't boot to a live environment.

rkantos said...

With 17.04 I get everything but with added continuous row of
stdin: I/O error...

Linuxium said...

What command are you using to respin the ISO and what version of my script are you using and on what OS?

teqq.at said...

Excuse my question,

but is there a patch parameter that would allow patching a kernel before compiling that kernel and adding it to the isorespin image?

Linuxium said...

If you click on each of the images in the post 'http://linuxiumcomau.blogspot.com.au/2017/06/compiling-your-own-kernel-using.html' you can see how to patch the kernel and then compile it.

rkantos said...

The version that was availble during the weekend. I used the GUI with the Apollo Lake/Cherry Trail option. So only ISO and that option. I tried with 16.04.3 and also 17.04. I'm also booting via Microsd. Going to try with a USB-hub soon.

Linuxium said...

You will have issues trying to boot a 'Live MicroSD Card' as the device bootloader cannot see the card until after booting. Using a USB is different as this can be seen so booting can occur.

Raymond Day said...

Wow read though this to make a new install.

Made a new folder to put it all in put theses files.

isorespin.sh
linuxium-intall-UCM-files.sh
rtl8723bs_4.12.0_amd64.deb
ubuntu-17.04-desktop-amd64.iso
wrapper-linuxium-install-broadcom-drivers.sh
wrapper-linuxium-install-UCM-files.sh

Did chmod 755 on the .sh files.

Then in that folder did this long command:

./isorespin.sh -i ubuntu-17.04-desktop-amd64.iso -u -l rtl8723bs_4.12.0_amd64.deb -f linuxium-install-UCM-files.sh -f wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-UCM-files.sh
cd make-new-iso/

It took a wile but made a new ISO named:

linuxium-v4.13-rc7-ubuntu-17.04-desktop-amd64.iso

Copied it to a USB stick with this command:

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

Remember your of-/dev/sd my not be the same!

It did not take long and then I rebooted press F5 to boot from that USB drive and it installed it.

When it 1st came up can hear the sound thought the HDMI monitor. I never got that to work before.

It had:

223 packages can be updated.
137 updates are security updates.

So I did a apt update and apt upgrade.

Did a "nmtui" and wow it sees WiFi now! I never got it to to that. This is on a WinBook-TW801. It has a USB 3.0 port on it too.

Thank you Linuxium! Grate job to get this to work on things like this. I was ate it for days trying to get WiFi and sound out the HDMI and just could not get it working.

Linuxium said...

Great to hear everything was successful.

Raymond Day said...

Why can you just make a ISO download all ready made for each install? I guess there would be to many?

Raymond Day said...

One thing else. I installed Max2play and it don't see any sound device. But the sound works good on the HDMI screen. I can switch it to the speakers in the tablet and even the headphones or the HDMI speakers. But looks like no command line sound works. Like if I do this I get this error:

root@tw801:~# mpg123 /media/4TB/USBdisk1-3TB/MEDIA/Audeo/Amazon\ MP3/Various/Songs\ And\ Story_\ Tangled/*
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2, and 3.
Version 0.3.2-1 (2012/03/25). Written and copyrights by Joe Drew,
now maintained by Nanakos Chrysostomos and others.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
Title : When Will My Life Begin Artist : Mandy Moore
Album : Songs And Story: Tangled Year : 2011
Comment : Amazon.com Song ID: 225298165 Genre : Soundtracks

Directory: /media/4TB/USBdisk1-3TB/MEDIA/Audeo/Amazon MP3/Various/Songs And Story_ Tangled
Playing MPEG stream from 01 - When Will My Life Begin.mp3 ...
MPEG 1.0 layer III, 256 kbit/s, 44100 Hz joint-stereo
Error opening unknown libao pulse driver. (Is device in use?)
root@tw801:~#

Raymond Day said...

In Max2play it's "DEBUS Information" shows this:

#### SQUEEZELITE VERSION ####


#### SQUEEZELITE BUILDOPTIONS ####


#### AUDIOPLAYER CONFIG ####
### Configuration of Audioplayers
SQUEEZELITE_PARAMETER=-o plug:dmixer
SQUEEZESLAVE_PARAMETER=-n plugequal
SHAIRPORT_PARAMETER=-d plug:plugequal
USE_USB_DAC=0
USE_EQUALIZER=0


#### SQUEEZELITE -l ####


#### SHAIRPORT VERSION ####


#### OUTPUT SOUND DETAILS CARD 0 ####
closed


#### OUTPUT SOUND DETAILS CARD 1 ####
closed

I don't get why it don't show any sound card under "Mediaplayer Squeezelite & Airplay - Status, Start / Stop" It's just blank can't pick a sound card. It would be nice to get this working on the Winbook TW801 I have Ubuntu installed on now.

Raymond Day said...

max2play had so can install "This button set up the plugin and your ALSA-Soundconfiguration." So I clicked installed and it came back with all this:

Hardware is
Installation started
Hit:1 http://us.archive.ubuntu.com/ubuntu zesty InRelease
Ign:2 http://download.webmin.com/download/repository sarge InRelease
Get:3 http://us.archive.ubuntu.com/ubuntu zesty-updates InRelease [89.2 kB]
Get:4 http://security.ubuntu.com/ubuntu zesty-security InRelease [89.2 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu zesty-backports InRelease [89.2 kB]
Hit:6 http://download.webmin.com/download/repository sarge Release
Get:7 http://us.archive.ubuntu.com/ubuntu zesty/main Translation-en_GB [495 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu zesty/restricted Translation-en_GB [2,464 B]
Get:9 http://us.archive.ubuntu.com/ubuntu zesty/universe Translation-en_GB [4,116 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu zesty/multiverse Translation-en_GB [85.7 kB]
Fetched 4,966 kB in 2s (1,807 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed
bs2b-ladspa
0 to upgrade, 1 to newly install, 0 to remove and 0 not to upgrade.
Need to get 6,722 B of archives.
After this operation, 48.1 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu zesty/universe amd64 bs2b-ladspa amd64 0.9.1-3ubuntu1 [6,722 B]
Fetched 6,722 B in 0s (48.8 kB/s)
Selecting previously unselected package bs2b-ladspa.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 255769 files and directories currently installed.)
Preparing to unpack .../bs2b-ladspa_0.9.1-3ubuntu1_amd64.deb ...
Unpacking bs2b-ladspa (0.9.1-3ubuntu1) ...
Setting up bs2b-ladspa (0.9.1-3ubuntu1) ...
Unloading ALSA sound driver modules: snd-soc-sst-bytcr-rt5640 snd-soc-rt5670 snd-soc-rt5645 snd-intel-sst-acpi snd-soc-rt5640 snd-intel-sst-core snd-soc-rl6231 snd-soc-sst-atom-hifi2-platform snd-soc-sst-match snd-hdmi-lpe-audio snd-soc-core snd-compress snd-pcm-dmaengine snd-pcm snd-seq-midi snd-seq-midi-event snd-rawmidi snd-seq snd-seq-device snd-timer (failed: modules still loaded: snd-soc-sst-bytcr-rt5640 snd-intel-sst-acpi snd-soc-rt5640 snd-intel-sst-core snd-soc-rl6231 snd-soc-sst-atom-hifi2-platform snd-soc-sst-match snd-hdmi-lpe-audio snd-soc-core snd-compress snd-pcm-dmaengine snd-pcm snd-timer).
Loading ALSA sound driver modules: snd-soc-sst-bytcr-rt5640 snd-soc-rt5670 snd-soc-rt5645 snd-intel-sst-acpi snd-soc-rt5640 snd-intel-sst-core snd-soc-rl6231 snd-soc-sst-atom-hifi2-platform snd-soc-sst-match snd-hdmi-lpe-audio snd-soc-core snd-compress snd-pcm-dmaengine snd-pcm snd-seq-midi snd-seq-midi-event snd-rawmidi snd-seq snd-seq-device snd-timer.
Install Finished - Use advanced Squeezelite-Config with "-o headphones" to use headphone-output with Squeezelite

But still get "Status: Squeezelite not running"

Wow but I just did a "apt install squeezlite" then in max2play pressed "Start Squeezelite" and it worked. Now to test it if plays sound. It's still no listing any thing under "Soundcard"

Raymond Day said...

Can play music some what with Max2play after I do a:

root@tw801:~# /etc/init.d/squeezelite restart
[ ok ] Restarting squeezelite (via systemctl): squeezelite.service.
root@tw801:~#

Then my Logitech Media Server can see it but when I play it plays though the HDMI but the sound is going in and out. It's like it can't have the speed to play it right.

I know Max2play don't support on other players but did get this working on other things before. I don't get why Max2play will not show any sound devices. But this will:

root@tw801:~# squeezelite -l
Output devices:
null - Discard all samples (playback) or generate zero samples (capture)
pulse - PulseAudio Sound Server
headphonesplug
bs2b
headphones
default:CARD=Audio - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio - Default Audio Device
sysdefault:CARD=Audio - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio - Default Audio Device
front:CARD=Audio,DEV=0 - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio - Front speakers
hdmi:CARD=Audio,DEV=0 - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio - HDMI Audio Output
dmix:CARD=Audio,DEV=0 - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio - Direct sample mixing device
dmix:CARD=Audio,DEV=1 - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio - Direct sample mixing device
dsnoop:CARD=Audio,DEV=0 - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio - Direct sample snooping device
dsnoop:CARD=Audio,DEV=1 - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio - Direct sample snooping device
hw:CARD=Audio,DEV=0 - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio - Direct hardware device without any conversions
hw:CARD=Audio,DEV=1 - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio - Direct hardware device without any conversions
plughw:CARD=Audio,DEV=0 - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio - Hardware device with all software conversions
plughw:CARD=Audio,DEV=1 - Intel HDMI/DP LPE Audio, Intel HDMI/DP LPE Audio - Hardware device with all software conversions
default:CARD=bytcrrt5640 - bytcr-rt5640, - Default Audio Device
sysdefault:CARD=bytcrrt5640 - bytcr-rt5640, - Default Audio Device
dmix:CARD=bytcrrt5640,DEV=0 - bytcr-rt5640, - Direct sample mixing device
dmix:CARD=bytcrrt5640,DEV=1 - bytcr-rt5640, - Direct sample mixing device
dsnoop:CARD=bytcrrt5640,DEV=0 - bytcr-rt5640, - Direct sample snooping device
dsnoop:CARD=bytcrrt5640,DEV=1 - bytcr-rt5640, - Direct sample snooping device
hw:CARD=bytcrrt5640,DEV=0 - bytcr-rt5640, - Direct hardware device without any conversions
hw:CARD=bytcrrt5640,DEV=1 - bytcr-rt5640, - Direct hardware device without any conversions
plughw:CARD=bytcrrt5640,DEV=0 - bytcr-rt5640, - Hardware device with all software conversions
plughw:CARD=bytcrrt5640,DEV=1 - bytcr-rt5640, - Hardware device with all software conversions

root@tw801:~#

Raymond Day said...

Got it working good with the built in little speakers on the TW801 tablet. I edit the file at /etc/default/squeezelite with this line:

SL_SOUNDCARD="dmix:CARD=bytcrrt5640,DEV=1"

Then:

service squeezelite start

It works then. I did put a 0 or a 1 at the end and still comes out the built in speakers. I wanted it to come out the headphone plug but looks like I can't get it to. Tested all the devices from the list of names. None did it out the headphone jack.

Unknown said...

Thanks. Works perfectly on Intel Compute StickSTCK1A8LFC

-With .deb and and .sh files on local directory
-Lubuntu 16.04.3

./isorespin.sh -i lubuntu-16.04.3-desktop-amd64.iso -u -l rtl8723bs_4.12.0_amd64.deb \
-f linuxium-install-UCM-files.sh -f wrapper-linuxium-install-UCM-files.sh \
-c wrapper-linuxium-install-UCM-files.sh

Linuxium said...

Unforutnately there are too many ISOs and too many combinations plus the required bandwidth and storage requirements exceed what I can offer.

Linuxium said...

Unfortunately I've no experience of this application so can't help however hopefully others might be able to comment with suggestions?

Linuxium said...

Great. Don't forget you could use the '--atom' flag to simplify the command to './isorespin.sh -i lubuntu-16.04.3-desktop-amd64.iso -u --atom'.

Raymond Day said...

Wow I should of done that. The WinBook I have it on seems to work good but it does have a "Intel(R) Atom(TM) CPU Z3735D @ 1.33GHz, 4 cores" So if I reload this making a iso I guess put the -u -atom on the end too. Nice to know.

Linuxium said...

But note the syntax as it is single hyphen for the 'u' and double hyphen for 'atom' like '-u --atom'.

Raymond Day said...

Looks like I must of messed up so it can't do sound out the headphone jack any more it use to. So I want to reload it. After I mount the 500gb that I saved this too. /media/500gb/make-new-iso/ Then give it this one command:

./isorespin.sh -i ubuntu-17.04-desktop-amd64.iso -u --atom -l rtl8723bs_4.12.0_amd64.deb -f linuxium-install-UCM-files.sh -f wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-UCM-files.sh -p "ssh openssh-server inxi" "lamp-server^"

Do I have to have like the openssh-server code in the same folder /media500gb/make-new-iso ? or will it just download it with the WWW?

Does this one long line command look right? I have to did it yet.

-Raymond Day

Raymond Day said...

Looks like this command my work:

root@tw801:/media/500gb/make-new-iso# ./isorespin.sh -i ubuntu-17.04-desktop-amd64.iso -u --atom -l rtl8723bs_4.12.0_amd64.deb -f linuxium-install-UCM-files.sh -f wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-UCM-files.sh -p "ssh openssh-server inxi" "lamp-server^"
./isorespin.sh: Flag not specified for 'lamp-server^'.
root@tw801:/media/500gb/make-new-iso# ./isorespin.sh -i ubuntu-17.04-desktop-amd64.iso -u --atom -l rtl8723bs_4.12.0_amd64.deb -f linuxium-install-UCM-files.sh -f wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-UCM-files.sh -p "ssh openssh-server inxi lamp-server^"
Extracting ISO ...
Parallel unsquashfs: Using 4 processors
183918 inodes (199170 blocks) to write

[==========================================================================================================| ] 154247/199170 77%

So it's doing it now "Updating bootloader/bootmanager ..."

This will be neat if it works. Looks like it will.

-Raymond Day

Raymond Day said...

Looks like it did work. Doing the apt upgrade now. Has over 200 of them.

Is there a way to make the ISO with the updates all ready on it?

Thank you.

Going to see if that install works better.

When it did install I did not see it say its done. It did not have no left side panel on it. I pulled out the ISO USB stick and rebooted it and it came up as a new install good.

Apache in installed! So that part worked. SSH is too.

-Raymond Day

Linuxium said...

For making an ISO with all the updates use the '--upgrade' option.

Also if you use the '--atom' flag then you don't need to add '-l rtl8723bs_4.12.0_amd64.deb -f linuxium-install-UCM-files.sh -f wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-UCM-files.sh' as well.

So your command becomes './isorespin.sh -i ubuntu-17.04-desktop-amd64.iso -u --upgrade --atom -p "ssh openssh-server inxi lamp-server^"'

Raymond Day said...

Thank you I reloaded it and when I first log in it said:

0 packages can be updated.
0 updates are security updates.

Nice! I did do that one line command you said to do. It's a lot shorted. It made a file that was 1.80 GB ISO.

Thank you.

-Raymond Day

Raymond Day said...

What's neat about this new load is that on Webmin it shows the CPU temperatures!

I got Max2Play working on it good now too. Looks like I had to add a Odroid user. Because that's what I did to install the script to get it to at lest get the webpage up.

Playing music now with it. I got USB speakers plug in it. A Winbook tablet tw801. Cost less then $100 and has one USB 3.0 port.

Working good with this load.

Thank you Linuxium!

Raymond Day said...

Got Max2play working super good on this tablet. I got it showing on the hdmi screen. I had to turn off the LCD screen for it to work on the HDMI screen. Because I run this on solar power I removed the ribbon cable to the LCD long ago. Got this screenshot of it. https://photos.app.goo.gl/ys9XhNVwNRjOjdDm2

-Raymond Day

Linuxium said...

Great, glad to hear.

Unknown said...

Thank you for this wonderful work good sir.

I have tried to run your script, isorespin.sh, in hopes to end my days in frustration, however, I have run the script three times with the same output:

sudo ./isorespin.sh -i ubuntu-17.04-desktop-amd64.iso -u --atom
[sudo] password for aeuu:
Extracting ISO ...
Parallel unsquashfs: Using 4 processors
183918 inodes (199170 blocks) to write

[================================================================================================================================/] 199170/199170 100%

created 129699 files
created 17994 directories
created 54184 symlinks
created 7 devices
created 0 fifos
Extracting isorespin files ...
Updating bootloader/bootmanager ...
Fetching mainline kernel packages ...
Installing mainline kernel packages ...
Installing local packages ...
Reading package lists... Done
Building dependency tree
Failed to open the software package
The package might be corrupted or you are not allowed to open the file. Check the permissions of the file.
Reading state information... Done
./isorespin.sh: Local package 'rtl8723bs_4.12.0_amd64.deb' failed to install correctly.

I tried with both Ubuntu 17.04 and 16.04 but the same result.. The iso was located in my Windows' drive hence I thought it could be a permission related issue so I copied the iso to the drive I'm working on and issued the command with sudo but I still get the same result.. I can't tell which "package" it is referring from the above output so I don't know what to do anymore.

Here is the log from the log file:

Script './isorespin.sh' called with '-i ubuntu-17.04-desktop-amd64.iso -u --atom' ...
Work directory 'isorespin' used ...
ISO '/home/aeuu/Downloads/ubuntu-17.04-desktop-amd64.iso' respun ...
Bootloader 'GRUB' added ...
Kernel updated with mainline kernel version '4.13.0-041300-generic' ...
Local package 'rtl8723bs_4.12.0_amd64.deb' failed to install correctly.


Thank you

Unknown said...

I have run the script in Deepin OS (it is now Debian based). When I said "I tried with both Ubuntu 17.04 and 16.04..." I meant I tried using Ubuntu 17.04 and 16.04 isos supplied to the script, not the script run on an Ubuntu system.

Unknown said...

Oh.. I forgot to mention.. Both isos I used was successfully installed on this system I'm trying to fix, so I guess it's not corrupted right?

Linuxium said...

Can you try downloading this fix from 'https://goo.gl/mXd3vM'?

All you need to do is download the file and make it executable ('chmod 755 fix-isorespin-deepin.sh') and then run it only once ('./fix-isorespin-deepin.sh'). It will create a locally executable script ('deepin-isorespin.sh') based on my original script but with a file permission change. You then run the modified script just like the original (e.g. './deepin-isorespin.sh -i ubuntu-17.04-desktop-amd64.iso -u --atom'). Let me know if this fixes the permission problem running on Deepin OS.

Unknown said...

It's still the same:

./deepin-isorespin.sh -i ubuntu-17.04-desktop-amd64.iso -u --atom
Extracting ISO ...
Parallel unsquashfs: Using 4 processors
183918 inodes (199170 blocks) to write

[================================================================================================================================/] 199170/199170 100%

created 129699 files
created 17994 directories
created 54184 symlinks
created 7 devices
created 0 fifos
Extracting isorespin files ...
Updating bootloader/bootmanager ...
Fetching mainline kernel packages ...
Installing mainline kernel packages ...
Installing local packages ...
Reading package lists... Done
Building dependency tree
Failed to open the software package
The package might be corrupted or you are not allowed to open the file. Check the permissions of the file.
Reading state information... Done
./deepin-isorespin.sh: Local package 'rtl8723bs_4.12.0_amd64.deb' failed to install correctly.

Here are the file permissions:

ls -l
total 3129584
-rwxr-xr-x 1 aeuu aeuu 4005973 Sep 12 07:47 deepin-isorespin.sh
-rwxr-xr-x 1 aeuu aeuu 528 Sep 12 07:46 fix-isorespin-deepin.sh
-rw-r--r-- 1 aeuu aeuu 370 Sep 12 08:17 isorespin.log
-rwxr-xr-x 1 aeuu aeuu 4005934 Sep 12 00:08 isorespin.sh
-rwxrwxrwx 1 aeuu aeuu 1587609600 Sep 12 01:34 ubuntu-16.04.3-desktop-amd64.iso
-rwxrwxrwx 1 aeuu aeuu 1609039872 Sep 12 02:01 ubuntu-17.04-desktop-amd64.iso

Raymond Day said...

You did a ls and looks like there is no "rtl8723bs_4.12.0_amd64.deb" file there. I think that's what you have to do just do a find on this page and it's all here to download. Put it in that folder.

Linuxium said...

@Raymond: The file 'rtl8723bs_4.12.0_amd64.deb' doesn't need to be there as the '--atom' will download and install the latest version. The script doesn't work on Deepin OS as the version of 'curl' is returning its values differently to standard versions.

@Gelo Tress: It seems the version of 'curl' installed on Deepin OS returns the value of 'Location' as 'location' so the file fails to download correctly. As I am not sure what a fix will break elsewhere I do not want to modify my script so I suggest you re-download the 'fix-isorespin-deepin.sh' from the previous comment as this now includes a working fix (I've had to test this out on Deepin OS) and try again.

Unknown said...

@Linuxium: It seems that the script finished successfully! Thank you very much! I'll be unto booting it live now! I got few warnings from xorriso I suppose that is normal since the script finished anyway?

Here are the warnings:
xorriso : WARNING : -volid text problematic as automatic mount point name
xorriso : WARNING : -volid text does not comply to ISO 9660 / ECMA 119 rules


@Raymond: Yes I thought doing that may give a chance, I also had the option to change distro I'm running the script on, Linuxium gave the hint on that with his reply, however I thought he might also be interested on having this fixed for future purposes so I continued anyway, plus there is the use of curl and he did mentioned it (drivers, wrappers, etc) will be automatically downloaded if not found (under Target Processors section). But still though, thanks for at least trying to help.

Linuxium said...

@Gelo Tress: You can safely ignore those warnings. I'll leave the fix available as a download in case you or anyone else wants to use my script on Deepin OS again or in the future.

@Raymond: I should also add that your suggestion would have worked as an interim fix so thanks for your contribution.

Raymond Day said...

At lest I know what curl does it's like ipconfig that get's your LAN IP but curl can get your WWW IP address.

Maybe good to know to fix this. If you know how something works then can know how to fix it.

I got a "emailipaddr.sh" script that will e-mail me if my IP changes.

-Raymond Day

Unknown said...

I was able to boot live off a usb drive and here are the results:

Things that are working:
Wifi
Battery Indicator

Things that isn't working:
Bluetooth (no adapter found)
Micro SD Card Slot

Things I'm unsure of working:
Audio
HDMI audio

Regressions:
Video Playback (Won't play)


I have 2 things in output in sound settings;
HDMI / Display port
Analog Output

Although the Analog Output is an improvement from just being a "Dummy Output", it is still not working sadly.. Guess I'm one of the few unfortunate..

Upon updating kernel (with and without the use of isorespin.sh) media stuffs has gotten worse.. From having just no audio, now videos and audios won't play, may it be through YouTube, SoundCloud or local files.. I guess this is a kernel thing?...

I have been working on this device for about a week now, is it easier if I just ask the manufacturer for all the driver source I need and do the compile thing, provided that I can actually get it from them? I'm really hoping I can get Wifi + Video + Audio working as I need them, others I can wait, but I find it really difficult for this device @.@...

Raymond Day said...

I got this working on a Nuvision 8" table. I loaded live Ubuntu and dd backed up the Windows 10 and Android on it. Then installed it. All works but it don't find the WiFi. Will I have to remake a ISO with some command added to it? I did this command if is shows what WiFi is in it.

root@NuVision:~# lspci
00:00.0 Host bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series SoC Transaction Register (rev 22)
00:02.0 VGA compatible controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Configuration Registers (rev 22)
00:03.0 Multimedia controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Imaging Unit (rev 22)
00:0b.0 Signal processing controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Power Management Controller (rev 22)
00:14.0 USB controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series USB xHCI Controller (rev 22)
00:1a.0 Encryption controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Trusted Execution Engine (rev 22)
00:1f.0 ISA bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCU (rev 22)
root@NuVision:~#

-Raymond Day

Raymond Day said...

It's a model TM800W610l if that helps.

-Raymond Day

Raymond Day said...

It may be a 43430r0 wifi chip set in it. I get no blue-tooth ether.

-Raymond Day

Linuxium said...

If it has a Broadcom wifi then follow the instructions under 'Wifi issues' above. For bluetooth also look at
'Bluetooth issues' above using 'brcmbt.service'.

Linuxium said...

What device is it?

Unknown said...

Sparc Techbook S1.. I think it may be a Chinese rebrand though so I don't that will help.. So maybe I can just provide some hardware info? I can do that after a while though.. Currently trying to install Ubuntu Mate 16.04.

Linuxium said...

After booting post the 'dmesg' using 'pastebinit' or similar.

Unknown said...

Here it is:
https://pastebin.com/pjH7bF9h

Thank you

Linuxium said...

This shows a v4.10 kernel which means you won't get the benefit of all the recent patches that fix Intel Atom issues. Respin your ISO with the '-u' and '--atom' options and then test to see what doesn't work.

Unknown said...

Yes I did that, and the result was what I posted, 5 replies before this reply In this same reply thread.

Linuxium said...

There is no 'dmesg' for those issues though and updating the kernel and bringing in new issues makes diagnosis difficult. Start with the ISO that used '-u' and '--atom' and list the issues and provide the 'dmesg'.

Unknown said...

Oh okay sorry about that. Do I need to get the dmesg output from an installed respun iso or is it okay if I get it from a live USB?

Raymond Day said...

I guess I did it right copying files and rebooting. I did a dmesg right after booting. It is long but here are the things in red:

[ 9.136079] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50

[ 10.140147] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50

[ 10.687382] Bluetooth: hci0: BCM: failed to write clock (-56)

I now do get a Bluetooth icon and I click it on and it find nothing and I looked for bluetooth on my cell phone and it can't find it. So looks like bluetooth is not working. But at lest the icon comes up.

If I unplug the USB to Ethernet then a Wifi icon goes in it's place but it don't list any WiFi.

Maybe I can make a ssh login for you and can look at it?

-Raymond Day

Linuxium said...

Lets keep it simple and use a LiveUSB that has been created from a respun ISO with the '-u' and '--atom' options and then the 'dmesg' and a list of what doesn't work for the LiveUSB on the Sparc Techbook S1.

Linuxium said...

Just post URL to the 'dmesg' using 'pastebinit' or similar to start with.

Raymond Day said...

I mounted the dd backup of Windows 10 and in /Recovery/OEM/Backup/Drivers/WIFI_64HLK/ it has 13 files 3 are txt files. I open the one that is named "bcm943430wlselgs.txt" in that the top says this:

# NVRAM file for BCM943430WLSELG

Is there a WiFi driver for that?

-Raymond Day

Raymond Day said...

Wow that's neat. I did not know can do that it looks like this:

root@NuVision:~# dmesg | pastebinit
http://paste.ubuntu.com/25532836/
root@NuVision:~#

Thank you.

-Raymond Day

Unknown said...

Pastebin:
http://paste.ubuntu.com/25533732/

List of working and non-working:

Working:
Wifi
Power Indicator

Not Working:
Audio
Playing video / audio file local or internet
Bluetooth
SD card slot


Additional infos:
* Audio, output in settings is now Analog Output instead of "Dummy Output"
* Video files either locally or through internet doesn't play properly, either too fast (no audio) or doesn't play at all.
* Audio files doesn't play, multiple attempts via several ways resulted in the music player (Rhythmbox) to not launch anymore.
* Bluetooth settings reports no Bluetooth adapter found (Bluetooth works on Windows).
* SD card slot doesn't work but only once, it somehow worked when I was trying to test the opening / closing of lid to see if the laptop screen would respond, I may try this again.

Notes:
Sorry I took this long before I replied. I was having some troubles with the new distro's I'm testing in this device, had to revert to DeepinOS as it's working better with isorespin.sh and because I have tried it there already as well.

Linuxium said...

The 'dmesg' doesn't show the entries like 'brcmfmac' and 'Bluetooth' you mentioned earlier. Is this the same device with the same problem?

Raymond Day said...

Well what command would show what the WiFi and Bluetooth is?

-Raymond Day

Raymond Day said...

I think it my be a "BCM4356" I did a hwinfo > hardwere.txt and looked at the file.

If the "BCM4356" is right for WiFi how would I install it? If I have to make a new ISO I can.

O yes this is not the same device. The other one is a Winbook and it's working real good. I pulled the ribbon cable from the LCD display on that one so I wanted to see how it works on a NuVision tablet. Seems to work good just need WiFi and Bluetooth working.

It only has one USB port. It can't charge and use a OTG at the same time. At lest I have not found any way to do that.

-Raymond Day

Raymond Day said...

This my help if I do this command it looks like this:

root@NuVision:~# systemctl status rtl8723bsbt.service
● rtl8723bsbt.service - RTL8723BS Bluetooth daemon
Loaded: loaded (/lib/systemd/system/rtl8723bsbt.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2017-09-14 20:00:59 EDT; 2min 43s ago
Process: 6989 ExecStartPre=/bin/bash -c grep -qm 1 r8723bs /proc/modules (code=exited, status=1/FAILURE)
CPU: 12ms

Sep 14 20:00:59 NuVision systemd[1]: Starting RTL8723BS Bluetooth daemon...
Sep 14 20:00:59 NuVision systemd[1]: rtl8723bsbt.service: Control process exited, code=exited status=1
Sep 14 20:00:59 NuVision systemd[1]: Failed to start RTL8723BS Bluetooth daemon.
Sep 14 20:00:59 NuVision systemd[1]: rtl8723bsbt.service: Unit entered failed state.
Sep 14 20:00:59 NuVision systemd[1]: rtl8723bsbt.service: Failed with result 'exit-code'.
root@NuVision:~#

-Raymond Day

Unknown said...

Gelo, Linuxium, im in the same situation.
with xubuntu 17.04 and ubuntu 16.04 i get Working:
Wifi
Power Indicator

Not Working:
Audio
Playing video / audio file local or internet
Bluetooth
SD card slot

device: some chinese 'Ultrabook' rebranded similar to Jumper EzBook 2 with an atom z8300

any updates in this case?
PD: Linuxium AMAZING WORK!

Raymond Day said...

I made a new one with this command:

./isorespin.sh -i ubuntu-17.04-desktop-amd64.iso -u --upgrade --atom -f linuxium-install-broadcom-drivers.sh -c wrapper-linuxium-install-broadcom-drivers.sh -p "ssh openssh-server inxi lamp-server^"

But still no WiFi.

Guess got to load the live Ubuntu and DD copy back Windows backup and get the WiFi file out of it's RAM.

-Raymond Day

Unknown said...

desmg log

https://pastebin.com/ZKqrTEcd

there are a lot of
Audio Port: ASoC: no backend DAIs enabled for Audio Port

Raymond Day said...

I found the file here:

https://ubuntuforums.org/showthread.php?t=2329846&page=3&p=13516060#post13516060

Copied it and named it brcmfmac43241b4-sdio.txt and put it in /lib/firmware/brcm/ and rebooted but still no WiFi.

Did I do something wrong?

-Raymond Day

Raymond Day said...

Read this:

"Upgrade the kernel to the latest or to a specific version to benefit from recent patch functionality e.g. for audio and wifi/bluetooth."

How do I know if I have the latest kernel? Can I pick some other .iso to start with? Or how do you do it. I guess it my say. I am still reading.

Thank you.

-Raymond Day

Unknown said...

Carlos, I'm trying to get the drivers source file of mine from the company I got this notebook of mine. I don't know if it will help, but I'm trying anyways In case it is needed. You think you can get yours as well if ever you needed to? This device has an Intel Atom x5-Z8350 But maybe we have the same hardwares aside from the CPU.

Unknown said...

uname -r

For kernel version. Type it in the terminal. Note that it will give the current kernel of the distro you are using, the one where the terminal is run on, not of that of any iso file.

"-u or --update will update the kernel to the latest Ubuntu Kernel Team kernel builds located at http://kernel.ubuntu.com/~kernel-ppa/mainline."

Raymond Day said...

I seen there is Ubuntu 17.04 and then 17.10 so if I used the "-u" it should be the same as 17.10 then?

Unknown said...

That doesn't necessarily be true.. the -u flag only updates the kernel and nothing else. Other packages remain the same regardless.

Please reply on your own comment thread as it is harder to keep track on topic and makes the comment section convoluted.

Raymond Day said...

Started to make a new ISO with this command:

./isorespin.sh -i artful-desktop-amd64.iso -u --upgrade --atom -f linuxium-install-broadcom-drivers.sh -c wrapp
er-linuxium-install-broadcom-drivers.sh -p "ssh openssh-server inxi lamp-server^"

Will not have time to install it till later but hope it will make the WiFi work on this install.

-Raymond Day

Linuxium said...

I need a full 'dmesg' and 'isorespin.log' list from your next attempt plus, if possible, a link to the manufacturer's website for the device if wifi still fails.

Raymond Day said...

Here is the manufacturer's website:

http://www.nuvision.com/nuvision-tm800w610l-tablet/

The 'isorespin.log' is small so will paste it in here:

Script './isorespin.sh' called with '-i artful-desktop-amd64.iso -u --upgrade --atom -f linuxium-install-broadcom-drivers.sh -c wrapper-linuxium-install-broadcom-drivers.sh -p ssh openssh-server inxi lamp-server^' ...
Work directory 'isorespin' used ...
ISO '/media/500GB/make-new-iso/artful-desktop-amd64.iso' respun ...
Bootloader 'GRUB' added ...
Kernel updated with mainline kernel version '4.13.0-041300-generic' ...
Distro upgraded ...
Package 'ssh openssh-server inxi lamp-server^' added ...
Local package '/media/500GB/make-new-iso/isorespin/rtl8723bt_4.12.0_amd64.deb' added ...
File '/media/500GB/make-new-iso/linuxium-install-broadcom-drivers.sh' added ...
File '/media/500GB/make-new-iso/isorespin/linuxium-install-UCM-files.sh' added ...
File '/media/500GB/make-new-iso/isorespin/wrapper-linuxium-install-UCM-files.sh' added ...
File '/media/500GB/make-new-iso/isorespin/wrapper-linuxium-install-broadcom-drivers.sh' added ...
Command run ...
# wrapper-linuxium-install-broadcom-drivers.sh
/usr/local/bin/wrapper-linuxium-install-broadcom-drivers.sh: line 5: ./linuxium-install-broadcom-drivers.sh: Permission denied
# 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
Respun ISO created as 'linuxium-v4.13-artful-desktop-amd64.iso'.

That image I could not install it would blank the LCD screen but I could plug in the HDMI and get a screen on that but only a bank screen and could move the mouse around. I could left click and open a terminal on the HDMI screen not about nothing else. I guess it had the install on the other window that would be the tablet LCD. That was just blank.

So what would be a good ISO to make for this? I guess the 17.04 one? This one is like 17.10 that don't work on the desktop good on this system.

This person showed on YouTube got Ubuntu running on it and all the comments said they can't get WiFi or Blu-tooth to run on it.

https://www.youtube.com/watch?v=DdQztPuBqmk

-Raymond Day

Unknown said...

Linuxium, just to give info, I somehow got the bluetooth to work on Deepin using the firmware you provide, the rtl8723bs.deb. The WiFi also worked more properly. I even downloaded the rtl8723bt.deb thinking it was for the bluetooth, I did not installed it though. I paired it with a Bluetooth speaker and was so happy to hear the audio working (lol) through system sound effects (changing vol. etc..). I then tried to play YouTube videos, the videos played with sound, however it would go sluggish at some point and then return on playing fine). Sadly I still haven't got the sound card to work properly, not even the audio jack..

The WiFi signal is weirdly weak although I'm next to the router. The Bluetooth connection would also suddenly disconnect, I noticed after for a while when there is no video playing anymore. Checking dmesg is this message along the line that says Bluetooth: packet not in order 3 != 5.. Lastly I wanted to give note that I got the kernel from Ubuntu and that video and audio plays just too fast with video having no sound compared to Ubuntu that mostly doesn't play at all...

Unknown said...

Ohh and I meant to say comparing Deepin with latest kernel vs Ubuntu with latest kernel. The Bluetooth message also goes multiple not just one line, x != 5 with x being any number, so far just one digit I found.

Unknown said...

Linuxium, good news! Bluetooth and WiFi are now working properly in Ubuntu 17.04 with the latest kernel + the firmware you provide. Strange that it worked when I did everything manually and not when I used isorespin.sh to automate it? But all in all SD card slot and Audio are the only things left on my to fix / do list, excluding the strange system freeze when watching YouTube videos on full screen.. It only happens with Xubuntu, XFCE on Ubuntu (and Ubuntu purged of XFCE), Linux Mint Mate, Linux Mint Cinnamon and Ubuntu Gnome. I tried Elementary OS as well but it won't boot past the logo...

Unknown said...

Hi, and thumbs up for this work! :) Are you planning support for 32 bit ISO's ?

Unknown said...

Does this isorespin.sh replace (or work similar to) Refracta, which also creates an ISO of a modified installed system?

Linuxium said...

Wifi probably fails as your local script '/media/500GB/make-new-iso/linuxium-install-broadcom-drivers.sh' has the wrong permissions (needs to be executable). Also the '--atom' option includes these scripts automatically so your command really should only be './isorespin.sh -i artful-desktop-amd64.iso -u --upgrade --atom -p "ssh openssh-server inxi lamp-server^"'.

Linuxium said...

No. Because 32-bit ISOs are being phased out by distros and there is really no need as my 'isorespin.sh' script adds a 32-bit bootloader which will then boot a 64-bit ISO.

Linuxium said...

Not really. My 'isorespin.sh' script is different to 'Refracta' (or 'refractasnapshot') as it is about respinning (or customizing) an existing ISO with additional functionality and/or updates/upgrades and not about creating an ISO from an installed system.

Linuxium said...

Did you try restarting the services using 'systemctl' when booting from the ISO? Also try adding '-g intel_idle.max_cstate=1' when respinning to see if it helps.

Unknown said...

systemctl? No I didn't, for which is that command for? I tried the intel_idle_max_cstate=1 in the grub boot edit. Sadly it didn't help, I'll try your way though maybe it will.

I have found that I have bytcr_rt5651 for the sound card? I have also found that debian has a recent package, firmware-intel-sound, from their package page;


Package: firmware-intel-sound (20170823-1) [non-free]

Binary firmware for Intel sound DSPs

This package contains the binary firmware for Intel SST sound DSPs supported by the snd-soc-sst-acpi or snd-intel-sst-acpi driver.

Contents:

* Intel "Broadwell" SST DSP firmware, version 8.4.1.77
(intel/IntcSST2.bin)
* Intel "Broxton" SST DSP firmware, version 9.22.01.2219
(intel/dsp_fw_bxtn_v2219.bin, intel/dsp_fw_bxtn.bin)
* Intel "Geminilake" SST DSP firmware, version 9.92.01.1814
(intel/dsp_fw_glk_v1814.bin, intel/dsp_fw_glk.bin)
* Intel "Kabylake" SST DSP firmware, version 9.21.00.2630
(intel/dsp_fw_kbl_v2630.bin, intel/dsp_fw_kbl.bin)
* Intel "Skylake" SST DSP firmware, version 8.20.00.969
(intel/dsp_fw_release_v969.bin, intel/dsp_fw_release.bin)
* Intel "Bay Trail" SST DSP firmware
(intel/fw_sst_0f28.bin-48kHz_i2s_master)
* Intel "Bay Trail" SST DSP firmware, version 01.0C.00.01
(intel/fw_sst_0f28.bin)
* Intel "Cherry Trail"/"Braswell" SST DSP firmware, version
01.0B.02.02 (intel/fw_sst_22a8.bin)


On Windows I can see this for the sound card:
intel sst audio device (wdm)

I wonder if it's gonna help? I also found this:
https://github.com/torvalds/linux/blob/master/sound/soc/intel/boards/bytcr_rt5651.c

I hope these might help? Thank you again.

Unknown said...

I'm trying with an Acer Iconia W510 and I get : No suitable video mode found. Booting in blind mode. And it does's do anything from there.

Unknown said...

What distro, verion are you booting at? Ubuntu 16.04 didn't work for me but 17.04 did. Other distro might work as well. Surprisingly other Ubuntu 16.04 variant boots up for me but not the main Ubuntu 16.04, maybe you could also try other variant / distro?

Unknown said...

I used your "Adding local packages and running scripts" heading instructions to spin a new Ubuntu image, but after installation, I still cannot get any HDMI audio. Any suggestions? I'm running the old STCK1AWFC

Unknown said...

I using MATE 16.04 I will give 17.04 a try

Linuxium said...

The 'systemctl' command is 'sudo systemctl restart rtl8723bsbt.service' and this maybe required to get wifi working on RTL8723BS devices. For sound there is not much I can do as I don't have the device to be able to test on unfortunately.

Linuxium said...

You need to respin the Ubuntu ISO and upgrade the kernel to v4.12 or later to get audio working on the STCK1AWFC. If you also want wifi then you should add the '--atom' option as well.

Unknown said...

Ahh I see, it's fine. Sound and SD Card slot is the only thing that needs fixing, guess I'll either wait or try something else. Anyway thanks for the help so far, been a long one, wouldn't have done it without your help.

Linuxium said...

It may be worth trying the Ubuntu 17.10 Beta 2 ISO I've just uploaded (see 'http://linuxiumcomau.blogspot.com.au/2017/09/ubuntu-1710-beta-2-releases-for-intel.html') in case it helps.

Unknown said...

I'm spinning an ISO with the modifications to the error (no mode found, booting in blind mode) mentioned in this Wiki https://wiki.archlinux.org/index.php/GRUB#.22No_suitable_mode_found.22_error

Unknown said...

I added the options as per the wiki in the grub menu and the loader can't find vbe.mod

Unknown said...

Any ideas im complete noob, im trying this on a virtual box with ubunto installed.

Script '/usr/local/bin/isorespin.sh' called with '-i /home/ryan/lubuntu-17.04-desktop-amd64.iso --atom -u -l "/home/ryan/Desktop/rtl8723bs_4.12.0_amd64.deb" -l "/home/ryan/Desktop/rtl8723bt_4.12.0_amd64.deb" -f "/home/ryan/Desktop/linuxium-install-UCM-files.sh" -f "/home/ryan/Desktop/linuxium-install-broadcom-drivers.sh" -f "/home/ryan/Desktop/wrapper-linuxium-install-UCM-files.sh" -f "/home/ryan/Desktop/wrapper-linuxium-install-broadcom-drivers.sh" -s 2048MB -w /media/ryan/usb -c "wrapper-linuxium-install-UCM-files.sh"' ...
Work directory '/media/ryan/usb/isorespin' used ...
ISO '/home/ryan/lubuntu-17.04-desktop-amd64.iso' respun ...
Kernel boot parameters 'persistent' added ...
Bootmanager 'rEFInd' added ...
Cannot find mainline kernel.

Unknown said...

Ooh I may try that, thanks~

Augi said...

Hello,

After creating the iso and installing on the compute stick, will it be able to get kernel updates from Canonical with apt-get? Or should I recreate the iso in order to do that?

nex01 said...

I see the ISO isn't available anymore, so I tried making my own with this script.
I used Ubuntu 17.04 with the latest version of the script applied Atom patches and updated Kernel.
When booting it up the console gets spammed with
"stdin: I/O error"

I tried several USB 2.0 and 3.0 sticks, updated BIOS, boot live or installation.. nothing.
I even tried building an ISO without updated Kernel.. nothing.


My Stick is the STK1AW32SC btw.

any help would be appreciated!

nex01 said...

having the same issue with an Intel STK1AW32SC. But I'm booting from USB.

Augi said...

Hello,

Thanks for this work. I installed this on an 1st gen Intel compute stick with:

./isorespin.sh -i lubuntu-16.04.3-desktop-amd64.iso -u --atom

The built-in wifi card didn't manage to get a decent signal, so I bought an Edimax usb wifi which works fine.

However, I want to disable the built-in wifi of the Intel Stick from the bios (I don't need it any more). When I do this, the stick does not boot and throws me at a BusyBox shell with the following error message:
Gave up waiting for root device. Common problems:
-Boot args (cat /proc/cmdline)
-Check rootdelay=
-Check root=
-Missing modules (cat /proc/modules; ls dev)
ALERT ! /dev/mmcblk1p2 does not exist. Dropping to a shell!

Any ideas why this is happening? I have blacklisted the realtek kernel module for the built in wifi, but it didn't solve this.

Linuxium said...

It is easier just to ignore the 'no mode found, booting in blind mode' message as it doesn't matter.

Linuxium said...

Most likely because 'grub' isn't compiled with the 'vbe' module. It is easier just to ignore the 'no mode found, booting in blind mode' message as it doesn't matter.

Linuxium said...

Make sure you have downloaded the latest version of 'isorespin.sh' (v7.3.4) and then try a simplified command of 'isorespin.sh' called with '-i /home/ryan/lubuntu-17.04-desktop-amd64.iso --atom -u -s 2048MB -w /media/ryan/usb' as you seem to have confused how the options work.

Linuxium said...

My script doesn't alter how Ubuntu works so yes you will be able to get kernel updates from Canonical with apt-get but bear in mind any implication of the kernel version and release you are running as per standard Ubuntu operation.

Linuxium said...

Post the 'isorespin.log' you created and the command you used to write the ISO to your USB.

Linuxium said...

As 'pfsense' is based on FreeBSD there may be quite a lot of work required.

Linuxium said...

Just respin the ISO with '
./isorespin.sh -i lubuntu-16.04.3-desktop-amd64.iso -u' but note you'll also loose bluetooth as well.

Linuxium said...

When you see the 'Booting in blind mode' just ignore it and wait patiently as it should boot after a while.

«Oldest ‹Older   1 – 200 of 617   Newer› Newest»

Post a Comment