Thursday, 13 April 2017

Improved 'isorespin' with choice of kernels and Debian 'Live' ISO support

UpdateThis work is superseded by my 'isorespin.sh' script which can respin an official ISO suitable for use on Intel Atom devices.

Although Debian have released 'Live' ISOs for some time, I've always had problems getting them to boot on Intel Atom Bay Trail and Cherry Trail devices. But with the news of Canonical dropping Unity in favour of Gnome and with the rise in popularity of Linux Mint and their Cinnamon and Mate editions, I thought I'd revisit Debian and see whether my 'isorespin' script could be adapted to make a difference.



After modifying my script to successfully boot a Debian 'Live' ISO (see https://www.debian.org/CD/live for details and http://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid for downloadable images) I realised that as the kernel was version 3.16 the original Canonical Intel Atom DKMS packages could be applied to provide HDMI audio and RTL8723BS wifi.



Unfortunately it does mean that the same old problems are back in that HDMI audio only works with a device booting from a 64-bit bootloader (otherwise it is back to DSDT patching for 32-bit devices) and audio is flakey to the point of not being really usable on desktops like LXDE.



However it does mean that LMDE (Linux Mint Debian Edition) gains the critical functionality making it more useable.



At the same time I thought it would be interesting to be able to have a choice in what kernel an Ubuntu based ISO could be respun with. Not only does the Ubuntu Kernel Team release mainline builds but they also provide builds based on the 'drm' sub-tree and have recently (albeit again) included kernels built on 'drm-intel-nightly'. These are particularly useful is seeing what new functionality is further upstream than the mainline release candidate builds.



As well any Ubuntu mainline kernel build can be installed up to the latest release candidate.



I've included all this functionality into a new release of my 'isorespin' script. And as such I've had to change the invocation or syntax for running the script slightly.

Usage: ./isorespin.sh [-h|-v] | [-u | -k <kernel>] -i <ISO>

The (latest version of the) script can be downloaded from isorespin.sh and when executed as a command has new parameters that support both short and long form when defining options. Besides a '-h' or '--help' that shows the syntax and a '-v' or '--version' to display the version, the ISO that you want respun must now be specified by the '-i' or '--iso' flag. The ISO can either be an Ubuntu, Ubuntu flavour, Linux Mint or Debian ISO and can be modified by further options. The '-u' or '--update' flag will update an Ubuntu or Linux Mint ISO with the latest mainline kernel. But when used with a Debian or LMDE ISO it will update the kernel with the Canonical DKMS patches for HDMI audio and RTL8723BS wifi. The '-k' or '--kernel' option is only allowed for Ubuntu and Linux Mint ISOs and any of the Ubuntu Kernel Team kernel builds found at http://kernel.ubuntu.com/~kernel-ppa/mainline can be specified by using the directory/folder name without the trailing '/' (as in '--kernel v4.11-rc6'). Note that the earlier kernels will probably not work well if at all.

For anyone brave enough to try an installation of the non-Ubuntu ISOs you may encounter the usual issues with installing a bootloader. To help I've written an additonal script 'linuxium-install-bootloader.sh' that even if it doesn't work directly, the commands within the script should provide a good enough guide to allow you to install manually. Note that running the script requires an internet connection and the target Linux partition needs to be already mounted on '/target' with the target boot partition mounted on '/target/boot/efi'.

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

36 comments:

  1. This is really cool thanks so much! Am I missing something though because the video performance seems slow on my NEO Z83-4 is there some special accelerated video driver I need? I'm using Ubuntu Mate 16.04 with 4.11-rc6

    ReplyDelete
    Replies
    1. You can try Intel's GFX drivers which have been discussed in comments in earlier posts.

      Delete
  2. Thank you for good work! But I have problem with any debian ISO.
    For example:
    __$ ./isorespin.sh -u -i debian-live-8.7.1-amd64-xfce-desktop.iso

    ./isorespin.sh: 'debian-live-8.7.1-amd64-xfce-desktop.iso' must be Ubuntu (or Ubuntu flavour), Linux Mint or a Debian 'Live' ISO ... exiting.

    Any idea? Thank you )

    ReplyDelete
    Replies
    1. Check that your downloaded ISO is not corrupt or damaged in any way as I've tested this and can confirm it works with my latest version (see http://linuxiumcomau.blogspot.com.au/2017/04/creating-personalized-ubuntu-mint-and.html).

      Delete
  3. What about Script for WLAN RTL8723BS für Kernel RC6?

    Tested with my Jumper EZBook 2 und Linux Mint Cinnamon 64bit.

    Installation OK, but I need WLAN drivers.

    How can i update Kernel after installing? After updating Kernel manually last time, WLAN didn't work anymore.

    ReplyDelete
    Replies
    1. You should use the script 'linuxium-install-rtl8723bs.sh' as mentioned in earlier posts and compile the driver specifically for the kernel you are using.

      Delete
  4. I have STK1AW32SC, can I install latest ubuntu kernel from kernel mainline along with original kernel? I have non-respinned linuxium 16.04.2 installed that works well except for reading some external flash storage. Thank You for the awesome works.

    ReplyDelete
    Replies
    1. Yes just manually download and install it. Assuming you GRUB settings are correct you will be allowed to select which kernel to boot from the GRUB menu.

      Delete
    2. Hi Brian,
      As I'm new to the Ubuntu installations, is there any chance you still have the iso for installing the 16.04.02?
      I also have a STK1AW32SC with corrupt Windows which I'm trying to salvage...
      Thanks!
      Eli

      Delete
    3. @Unknown: You don't need a specific release to salvage Windows so you can just download the 17.04 ISO from http://linuxiumcomau.blogspot.com.au/2017/06/interim-ubuntu-1704-iso-with-mainline.html or later posts as they become available.

      Delete
  5. Hi, problems with your respin on a Chuwi LapBook, whe I tray to make it on a new kubuntu iso, it says that:

    ./isorespin.sh -u -i kubuntu-17.04-desktop-amd64.iso

    ./isorespin.sh: '/home/hugo/Documentos/Descargas/kubuntu-17.04-desktop-amd64.iso' must be Ubuntu (or Ubuntu flavour), Linux Mint or a Debian 'Live' ISO ... exiting.

    What can I do?
    Thanks a lot!

    ReplyDelete
    Replies
    1. Finally I've tried with an Ubuntu 17.04 iso.
      The respin works and make the linuxium iso, I make a bootable USB, boot my Chuwi LapBook with this USB and... no wifi and no sound... :(
      And the worst of all, I can't open any config or setup dialog, I don't know why is that, but it dosn't open...
      Any ideas?
      Thanks!!

      Delete
    2. Have you tried linuxium iso from this website? May be latest kernel doesn't support your hardware. Regards

      Delete
    3. Yes, I'm working under the ISO from the web, but I want to move on, and I want to test new things :D

      Thanks!

      Delete
    4. Please use my latest version of isorespin from http://linuxiumcomau.blogspot.com.au/2017/04/creating-personalized-ubuntu-mint-and.html as this has full Ubuntu flavour ISO support.

      Delete
    5. Thanks @linuxium!! I'll try and I'll tell if it works ;)

      Delete
  6. I use LMDE, so I am excited about the potential of this script -- but can it create an ISO with the latest Jessie *backport* kernel? Right now, for 64 bit, this is:

    4.9.0-0.bpo.2-amd64

    Also, I had a strange experience booting a respin on one of my modified Chromebooks: after booting, I got the typical option to set the wireless connection -- including the option to mouse click on the desired choice -- but no prompts for the wifi password was given. If I booted from the original ISO, this worked as expected.

    ReplyDelete
    Replies
    1. I modified the script to include my desired/newest Debian Jessie kernel -- which appeared to work fine -- but ran into an unrelated (?) unexpected problem during booting :(

      Delete
    2. I have a new version of the script which should provide what you want. Where are you downloading the Debian Jessie kernel from (as in the URL) so I can test to make sure?

      Delete
    3. I am getting it from a backport repository. This is my version of the code which replaces your own:

      rm -f /etc/apt/sources.list.d/jessie_backports.list
      echo "deb http://ftp.us.debian.org/debian/ jessie-backports main" >> /etc/apt/sources.list.d/jessie-backports.list
      echo "deb-src http://ftp.us.debian.org/debian/ jessie-backports main" >> /etc/apt/sources.list.d/jessie-backports.list
      apt update
      apt install -y -t jessie-backports linux-image-amd64

      This works, but the final ISO doesn't boot Linux successfully for a weird reason.

      Delete
    4. Ah ... I was looking at https://tracker.debian.org/pkg/linux and then https://packages.debian.org/jessie-backports/amd64/linux-image-amd64/download ... and wanted confirmation this was the same?

      Delete
    5. Or this https://packages.debian.org/jessie-backports/amd64/linux-image-4.9.0-0.bpo.2-amd64-unsigned/download for download?

      Delete
    6. Well, perhaps not *exactly* the same, but much better than the default 3.16 kernel. I think using 'apt' is superior, but since there is something else going on that I do not understand, I should be willing to try your alternative :)

      Delete
    7. I think that 2nd link (the one with the 'bpo' in the name) is the 'backport' one that I typically work with.

      Delete
    8. Do you find it just sits there after displaying "Loading, please wait..."?

      Delete
    9. On my own attempted backport respin, I get repeated messages of:

      cat: can't open '/sys/block/*removable': No such file or directory

      There are a few hits on Google with this that hint that it is a known Debian (?) bug, but this doesn't explain why I can successfully use this kernel in my own running Linux computers.

      Delete
    10. After letting these messages run for a while, I now also get:

      modprobe: can't change directory to '3.16.0-4-amd64': no such file or directory

      Why there are still references to that old kernel I have no idea.

      Delete
    11. I'll need more time to look at this going forward.

      Delete
  7. @linuxium Thanks for the wonderful work, I had created the re-spin ISO for Linux mint 18.1 mate 64 bit edition, I was able to live boot the desktop and all hardware are functional, but when I tried to install it starting the installer I get error message while selecting the disk to install

    ReplyDelete
    Replies
    1. Try the latest version posted on http://linuxiumcomau.blogspot.com.au/2017/04/creating-personalized-ubuntu-mint-and.html as this should fix any errors.

      Delete
  8. More reporting. This is a T100HA

    I thought I'd try Ubuntu-GNOME (UG) since that is going to be a thing now. I did have some problems:

    - isorespin didn't recognize the iso because the Volume-id of isoinfo is "Ubuntu-GNOME", not just "Ubuntu". I just changed the script to try it out.

    - I could Live boot a stock UG, and I could live boot a respun -u UG (4.10), but none of the -k respins seemed to work (I tried 4.11-rc6 and 4.11-rc7). I get a missing live-file system error. I'll try some others but I wonder if it is 4.11-x or the -k causing the problem.

    - One nice thing about UG, when I used the settings to rotate the display CCW it also rotated the touch screen with no added work. Very nice!

    - My problems with Bluetooth and wireless revolve around the need for the upstream Google Chrome stuff. Linuxium's broadcom-drivers script downloads those automatically *if* you are on a dongle for ethernet. The relevant files are the bcm4334B10 . This gets me wireless and BT, but BT is buggy and won't hold a connection for long.

    ReplyDelete
    Replies
    1. Please try my latest ISO version from http://linuxiumcomau.blogspot.com.au/2017/04/creating-personalized-ubuntu-mint-and.html as I've fixed (added) the Ubuntu flavour ISO support. Also you could add the required and pre-downloaded Broadcom files using the '-a' option so that when you boot from the respun ISO everything you need is available.

      Delete
  9. Hi,
    The script has sperged out at the end:
    ./isorespin.sh: Adding ISO file system partition ...
    cp: error writing 'mnt/./casper/filesystem.squashfs': No space left on device
    cp: cannot create directory 'mnt/./dists': No space left on device
    cp: cannot create directory 'mnt/./install': No space left on device
    cp: cannot create directory 'mnt/./isolinux': No space left on device
    cp: cannot create directory 'mnt/./pics': No space left on device
    cp: cannot create directory 'mnt/./pool': No space left on device
    cp: cannot create directory 'mnt/./preseed': No space left on device
    cp: error writing 'mnt/./README.diskdefines': No space left on device
    cp: error writing 'mnt/./md5sum.txt': No space left on device
    ./isorespin.sh: ISO created as 'linuxium-rEFInd-v4.11-ubuntu-17.04-desktop-amd64.iso'
    sh ./isorespin.sh -u -r -i 526.30s user 22.48s system 299% cpu 3:03.38 total

    ReplyDelete
    Replies
    1. It looks like you ran out of space while respinning. Please use my latest version of the script and ensure you have at least 10GB available before starting.

      Delete
    2. Same problem here. However, the error message only occured when I used the "-s xxxMB" option. If I don't use that, the iso is created.

      Delete
    3. @Hauke Walden: If you run exactly the same command that spawned error messages immediately afterwards do you get the same result? And if you run the same command after a reboot also generates errors?

      Delete