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.

43 comments:

Kim Neil said...

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

Unknown said...

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 )

Hylli said...

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.

Brian said...

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.

hurior said...

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!

hurior said...

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!!

Unknown said...

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.

Raj said...

@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

Brian said...

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

hurior said...

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!

billP said...

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.

Unknown said...

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 :(

Linuxium said...

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?

Unknown said...

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.

Linuxium said...

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?

Linuxium said...

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

Unknown said...

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

Unknown said...

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

Linuxium said...

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

Unknown said...

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.

Unknown said...

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.

Linuxium said...

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).

Linuxium said...

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.

Linuxium said...

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

Linuxium said...

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

Linuxium said...

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.

Linuxium said...

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.

Linuxium said...

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.

hurior said...

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

Linuxium said...

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.

Unknown said...

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

Linuxium said...

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.

Unknown said...

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

Linuxium said...

@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.

Hauke Walden said...

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.

Linuxium said...

@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?

marco said...

I tried with all the available distributions for isorespin (latest version from your site) and followed the guide, but without success. WiFi, audio, and bt are recognized but do not work at all. I have an ezbook 2 cherry tail. Can you tell me exactly what I should do with isorespin and what to put in it? The strange thing is that in the live version of the distro ip wifi works (except the rest) and stops functioning then along with all the other network devices (USB hotspot, USB lan). My wifi card is rtl8723bs, audio is realtek l2s called by windows acpi / 10ec5651, battery is acpi / int33fe, bt is acpi / rtk8723

Linuxium said...

Try respinning an ISO with the '--atom' option.

marco said...

along with what I have already done, or I just have to do this?

Linuxium said...

Can you post a link (pasteinit) to your 'dmesg' immediately after booting from the respun ISO?

marco said...

Here's the output of some respun live versions I've tried. I also described the behavior of them when tested and installed. Without your tool, none of the four major peripherals are recognized, even in live. My ultrabook is Jumper Ezbook 2 Ultrabook INTEL CHERRY TRAIL X5 Z8350 bought on Gearbest


Ubuntu Cinnamon - posted in this blog on Friday, 27 October 2017. This is the better version except for audio and some wifi issues
LIVE
Wifi work (not work with auth PAP and WPA-EAP, similar to the ones written below), Battery work, Audio no detected, BT work
INSTALLED
Wifi work (not work with auth PAP and WPA-EAP, similar to the ones written below), Battery work, Audio no detected, BT work
https://pastebin.com/madvazKj


Ubuntu Mate without --atom
LIVE
Wifi work, Battery work, Audio not detected, BT work
INSTALLED
Wifi detected not work, Battery work, Audio no detected, BT detected not work, other network device (eg LAN usb) not work
https://pastebin.com/9kXaHtLF



Linux Mint without --atom
LIVE
Wifi work, Battery work, Audio not detected, BT work
INSTALLED
Wifi detected not work, Battery work, Audio no detected, BT detected not work, other network device (eg LAN usb) not work, the operating system crashes after a few minutes
https://pastebin.com/ddkNuTFd

Pippermint with --atom.
LIVE
Wifi detected some issues,Battery work, Audio detected no sound and icon popup, BT work
INSTALLED
Wifi detected not work, Battery work, Audio detected no sound and icon popup, BT detected not work, other network device (eg LAN usb) not work
https://pastebin.com/g2RRjvRH


Pippermint without --atom.
LIVE
Wifi work, Battery work, Audio detected no sound and icon popup, BT work
INSTALLED
Wifi detected not work, Battery work, Audio detected no sound and icon popup, BT detected not work, other network device (eg LAN usb) not work
https://pastebin.com/SeUAbD6v

marco said...

I also add that for the ubuntu cinnamon version I have problems connecting to the wifi of smartphones using the hotspot. For my ezbook 2 the best operating system would be this but with working audio and maybe without these little problems I have with some wifi connections

Linuxium said...

There have been quite a few updates to audio going into what will become v4.15-rc1 to be released in a couple of days time. I'd recommend trying respinning with that new kernel (and '--atom') when it comes out and see if it fixes audio on your device.

Post a Comment