Saturday, 22 April 2017

Creating personalized Ubuntu, Mint and Debian ISOs for Intel Mini PCs


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



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 the issue of requiring a 32-bit bootloader to boot a 64-bit OS arose. Further complications were caused by the lack of mainline support for HDMI audio and wifi resulting in the use of custom kernels. And now even with mainline support soon to eventuate there is still a lead time required by distributions before they incorporate the latest kernels.


To solve the issue of using a standard ISO but with a different kernel I developed a script that allows the ISO to be respun with the latest kernel build. But because new kernel builds are released weekly I extended the script to allow the respinning with a specified kernel.


However I always end up installing the same set of packages immediately after installation so I thought it would be useful if packages could be included during the respin. Equally adding locally compiled packages became another requirement as it allowed the respinning of ISOs to include custom kernels or third party applications like Google Chrome. 


Another limitation was that after installation I found myself wanting to run scripts to fix or add functionality like audio and wifi. So being able to incorporate these as part of a personalized ISO would simplify both the installation process and provide a more functional Live USB.


​The last issue I encountered was trying to boot an ISO on a new Apollo Lake mini PC. As the GRUB bootloader failed to boot Ubuntu I switched to using the rEFInd boot manager to allow Linux to boot itself. In doing so I solved another want I've sometimes wished for when using a Live USB namely the lack of persistence or the ability to save files such as screenshots or error messages that could still be accessed after rebooting. So I rewrote my script to include all these features. 

The invocation although command line based is really quite simple:

Usage: ./isorespin.sh [-h|-v] | [[-u | -k <kernel>] | -p "package_1 ... package_n" | -l "package_1.deb ... package_n.deb" | -a "file_1 ... file_n" | -r [-s <size><MB|GB>]] -i <ISO>

Functionality is achieved by calling the command with flags and arguments or options with parameters and these are as follows:
-u or --update will update an Ubuntu based ISO (e.g. Ubuntu or one of its flavours or Linux Mint) to the latest Ubuntu Kernel Team released mainline build. For a Debian based ISO (e.g. Debian Live or LMDE) using this option will update the current v3.16 kernel with the Canonical DKMS patches for HDMI audio and RTL8723BS wifi.
-k or --kernel replaces an Ubuntu based ISO's kernel with the one specified by the argument or parameter which can be any of the Ubuntu Kernel Team kernel builds located at http://kernel.ubuntu.com/~kernel-ppa/mainline (just use the directory or folder name without the trailing '/' as in '--kernel v4.11-rc7' noting that earlier kernels will probably not work well if at all).
-p or --package will install a single package or a set of packages (if enclosed in quotes) that are available to the ISO (which can be either Ubuntu or Debian based) and would typically would be installed using 'apt install <package>' command.
-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.
-a or --add allows local binaries or shell scripts to be saved under '/usr/local/bin' on the respun ISO although there is no limitation on the actual type of file itself so any file can be added if required.
-r or --refind will add the rEFInd boot manager which can be selected using the device's boot manager at boot time.
-s or --storage adds persistence to the respun ISO. Although a size must be specified there is some flexibility on how much is allocated. The minimum size is 100MB which keeps the size of the ISO down but means that once the USB is created the persistence partition should be manually resized for typical usage. Alternatively a larger size can be specified thus avoiding 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. 
-i or --iso must be specified and is the location of the ISO to be respun.
Depending on the options and their complexity the respin will take a few minutes and the script provides updates 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 name or 'dkms' for example. It is recommended that at least 10GB of space is available for the script to function correctly (as the script requires a minimum of 10GB to run) and an internet connection is typically required for some options like kernel updates for example. The script runs on Debian/Ubuntu based distros and requires certain packages to be installed prior to running although it checks and notifies if anything is missing first before continuing. Also the rEFInd bootmanager (http://www.rodsbooks.com/refind) can be downloaded from https://sourceforge.net/projects/refind/files into the same directory as the script to prevent unnecessary repeated downloads if this is a concern and will make processing quicker.

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

To perform a manual resize when using a USB with persistence first use the device's boot menu to select the USB and when the rEFInd screen appears click on 'F2' twice. A text line will appear at the top of the screen so use the arrow keys to move the cursor and delete the word 'persistence' or 'persistent' depending on whether it is an Ubuntu or Debian based ISO. This step actually disables persistence and is only required so that the partition is not auto mounted thus preventing resizing. Now press the enter key to boot. 

\

Once booted use the 'gparted' command to resize the persistence partition. You will be prompted to fix the GPT to use all the available space so click 'Fix' and then continue with the resizing. 



An example invocation is as follows:

./isorespin.sh -i ubuntu-17.04-desktop-amd64.iso -k v4.11-rc5 -a "../scripts/wifi/linuxium-install-rtl8723bs-binaries-for-4.11.0-rc5.sh ../scripts/linuxium-install-UCM-files.sh" -p "ssh openssh-server inxi" -l google-chrome-stable_current_amd64.deb -r -s 2GB

This will respin the latest Ubuntu 'Zesty' ISO and make the boot kernel the fifth release candidate of the latest development mainline kernel. It will add my script for installing wifi for the RTL8723BS chip on this specific kernel version under '/usr/local/bin' along with adding another script to install the UCM files required for headphone audio on certain Intel Atom mini PCs. It will also install the 'ssh', 'openssh-server' and 'inxi' packages along with 'Chrome' so they are all available for immediate use on a 'Live USB' and will be included as part of a standard installation. It will also include a persistence partition of 2GB and the resultant ISO produced as: 

linuxium@LINUXIUMONE:~$ ls -l linuxium-persistence-rEFInd-v4.11-rc5-ubuntu-17.04-desktop-amd64.iso
-rw-r--r-- 1 linuxium linuxium 4215292928 Apr 22 12:43 linuxium-persistence-rEFInd-v4.11-rc5-ubuntu-17.04-desktop-amd64.iso
linuxium@LINUXIUMONE:~$ 

The script currently supports all recognized desktop 64-bit Ubuntu and Ubuntu flavoured ISOs (https://www.ubuntu.com/download/ubuntu-flavours), Linux Mint and LDME ISOs (https://www.linuxmint.com/download.php), Debian 'Live install' ISOs (https://www.debian.org/CD/live), KDE neon ISOs (https://neon.kde.org/download), elementary OS ISOs (https://elementary.io) and Kali ISOs (https://www.kali.org/downloads). Any issues or improvement suggestions are welcome. It can be downloaded from (latest version) isorespin.sh.

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

168 comments:

Unknown said...

Thank you, Linuxium !
But can you give example invocation for DEBIAN live distros ?
I get only "./isorespin.sh: Lock file exists ... wait for running instance of isorespin.sh to complete or remove '.isorespin.sh.lock' and restart." and thats all ((

Linuxium said...

The message means you have tried to run isorespin when a copy is already running. You can only respin one ISO at a time in the same directory and I'd recommend not trying to run multiple respins as part of the processing is quite CPU and disk intensive.

If you are sure that no instances of isorespin are currently running you can remove the file and start again.

Invocation for a Debian ISO is the similar to that for an Ubuntu ISO with the exception that the '-k' or '--kernel' flag is not allowed.

For a similar example to the above invocation respinning the Cinnamon desktop Debian ISO would be:

./isorespin.sh -i debian-live-8.7.1-amd64-cinnamon-desktop.iso -u -p "ssh openssh-server inxi" -l "google-chrome-stable_current_amd64.deb" -r -s 2GB

which would update the v3.16 kernel with HDMI audio and wifi for RTL8723BS, install 'ssh', 'openssh-server', 'inxi' and'Chrome' and provide a persistence partition of 2GB.

Unknown said...

Hmmm. Reboot and really FIRST run :

pi@raspberrypi:/media/pi/47c00884-9672-427f-b092-8dccf7533d99/L_wintel $ ./isorespin.sh -i debian-live-8.7.1-amd64-lxde-desktop.iso -u -p "ssh openssh-server inxi" -l "google-chrome-stable_current_amd64.deb" -r -s 2GB

./isorespin.sh: Lock file exists ... wait for running instance of isorespin.sh to complete or remove '.isorespin.sh.lock' and restart.

pi@raspberrypi:/media/pi/47c00884-9672-427f-b092-8dccf7533d99/L_wintel $

Linuxium said...

Maybe the file was left over from running an earlier version. Why not try removing it and re-running the script?

Unknown said...

No - script is the newest version (from your link here https://goo.gl/A1v2gL).
Try on the another PC - same ((
May be you can download on google-disk ready Debian distro ? (for example - debian lubuntu)

Linuxium said...

What OS are you running on? And is your Debian ISO downloaded from the link I provide above?

Unknown said...

I try on:
1) raspbian os, based on Debian 8
2) on your ISO - Lubuntu 16.04.2 (from your post at Wednesday, 1 March 2017)

Debian lubunti was downloaded from your link (http://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-8.7.1-amd64-lxde-desktop.iso)

Linuxium said...

Can you remove the lock file and re-run and post all the output to pastebinit (which you should install first). For example please see http://paste.ubuntu.com/24434114/

Edric.Yip said...

i tried respin ubuntu-gnome 17.04 64bit iso using the following command:
./isorespin.sh -i original.iso -u -a "rtl8723bs_rc5.sh UCM.sh broadcom.sh bootloader.sh"

the respinned iso was able to be written to USB using dd command and able to bootup on my ONDA v919 air dualboot tablet (from china). After booting into the system, the wifi, bluetooth, sound did not work, goodix touchscreen register the touch but it is all wrong position. (for comparison, the linuxium iso for 1704beta2 has wifi working. sound only works occasionally when headphone are plugged in, and no bluetooth at all. goodix touchscreen register touch but not pointing at the correct position on screen)

note: i was hoping respinning the iso and updating to latest kernel (now on rc7) would solve some of the problem with sound, bluetooth and especially the goodix touchscreen

anyway, when trying to install, i came to another problem, the files copied, but bootloader failed to install for unknown reason and threw an error at the end of the install... that leaves me with a tablet without os :(

kindly advice and let me know why the bootloader fail to install? and how can i get the wifi, sound, bluetooth and touchscreen working? thanks

Unknown said...

Very strangely.
I dont see any lock file, only your script and Debian ISO :
lubuntu@lubuntu:/media/lubuntu/47c00884-9672-427f-b092-8dccf7533d99/L_wintel$ ls
debian-live-8.7.1-amd64-lxde-desktop.iso isorespin.sh

Without pastebinit :
lubuntu@lubuntu:/media/lubuntu/47c00884-9672-427f-b092-8dccf7533d99/L_wintel$ ./isorespin.sh -i debian-live-8.7.1-amd64-lxde-desktop.iso -u -p "ssh openssh-server inxi" -l "google-chrome-stable_current_amd64.deb" -r -s 2GB
./isorespin.sh: Lock file exists ... wait for running instance of isorespin.sh to complete or remove '.isorespin.sh.lock' and restart.

With pastebinit:
lubuntu@lubuntu:/media/lubuntu/47c00884-9672-427f-b092-8dccf7533d99/L_wintel$ pastebinit -i ./isorespin.sh -i debian-live-8.7.1-amd64-lxde-desktop.iso -u -p "ssh openssh-server inxi" -l "google-chrome-stable_current_amd64.deb" -r -s 2GB
Unable to read from: ssh openssh-server inxi

Linuxium said...

Type in 'rm .isorespin.sh.lock' without the quotes.

Then type in './isorespin.sh -i debian-live-8.7.1-amd64-lxde-desktop.iso' again without the quotes.

Next copy everything from the screen and then type in 'pastebinit' without the quotes and paste in what you've just copied and then press control-d.

Finally post the URL you are given back here.

Linuxium said...

Does your tablet have a 32-bit bootloader? I'm assuming so because you said that wifi wasn't working and the installation gave errors installing the bootloader. You need to be connected to the internet to allow the installation to get the bootloader files.

What you can do to fix is to download the required files on another machine and then boot your tablet with the Live USB and use the script 'bootloader.sh' as a basis to manually install the missing bootloader packages etc on your tablet.

If that seems too hard, try reinstalling from the Live USB but have a working internet connection either using a supported external USB wifi dongle or an Ethernet USB dongle.

Wifi, sound, bluetooth and touchscreen have all got further patches coming into the next v4.12 kernel and they may help with your hardware.

Anonymous said...

Good day Linuxium!
I tried to install Kali Linux on my cherry trail tablet/notebook few times, nothing worked and was wondering if you have you ever tried installing it on any of these devices? Do you think it is possible to use your script on Kali?

Edric.Yip said...

thank you for your reply, i am now trying to intall again with a working internet.

yes, my tablet has a 32bit bootloader, which is not supported by ubuntu. so i think the 32bit efi deb is not available for ubuntu official repository. Does your script download it from elsewhere?

some website suggested that i must have a /boot/efi partition with size minimum 100MB as the boot partition and that installation of efi bootloader will fail if the partition is not there, can you verify that? (usually my ubuntu installation has only 3 partition, namely the root /, /swap and /home)

also from some troubleshoot forum, it say i can manually install grub onto the harddrive with the following command:
sudo mount /dev/sdXY /mnt
sudo mount --bind /dev /mnt/dev &&
sudo mount --bind /dev/pts /mnt/dev/pts &&
sudo mount --bind /proc /mnt/proc &&
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt
grub-install /dev/sdX
grub-install --recheck /dev/sdX
update-grub

is that actually correct?

Unknown said...

Then 'rm .isorespin.sh.lock' - I get message "no permission". After 'sudo rm .isorespin.sh.lock' - all ok.

Then type './isorespin.sh -i debian-live-8.7.1-amd64-lxde-desktop.iso' and script successfully make new ISO, but with old (3.16) kernel

Unknown said...

Hmmm. Next problem :

./isorespin.sh -i debian-live-8.7.1-amd64-lxde-desktop.iso -u -p "ssh openssh-server inxi" -l "google-chrome-stable_current_amd64.deb" -r -s 2GB

./isorespin.sh: '/media/pi/47c00884-9672-427f-b092-8dccf7533d99/L_wintel/debian-live-8.7.1-amd64-lxde-desktop.iso' must be Ubuntu (or Ubuntu flavour), Linux Mint or a Debian 'Live' ISO ... exiting.

Please, help me )

Linuxium said...

The debian-live-8.7.1-amd64-lxde-desktop.iso is based on the v3.16 kernel.

Linuxium said...

My script downloads it from the official Ubuntu repositories. Your Ubuntu installation may have only three partitions but there will be another partition for EFI. Look at how the disk is partitioned after installation to understand this further. You can look at my bootloader.sh to see what it does.

Linuxium said...

I've just added Kali support. Let me know what you think.

billP said...

Working on a T100HA

Tried the new isorespin.sh and it worked fine. I created an Ubuntu-GNOME (UG) iso with a v4.11-rc8 kernel (-k option) and stored (-a option) both the Linuxium broadcom and UCM files in the iso (/usr/local/bin). I also put the rEFInd boot manager on the iso (-r option) though I'm not sure why.

Installed the iso on a stick and did a live boot and it all worked. Yeah, super work.

My only question is. If I want to install this live image as an image on the machine, what do I need to do to get the 32 boot loader on the 64 bit image. I see the bootloader script but I have some questions:
- do I run the bootloader script on the live image on the iso stick? Will that persist?
- what does rEFInd get me? Anything? Can I skip the 32/64 crap?

Any help appreciated.

Again, great work.

Unknown said...

Linuxium please add:

[ ! $(command -v isoinfo) ] && echo "${0}: Please ensure package 'isoinfo' or equivalent for your distro is installed ... exiting." && CLEAN_EXIT

on CHECK_PACKAGE_DEPENDENCIES function

Claudio

Linuxium said...

Good catch ... the package is 'genisoimage' and I'll add it to the next version.

Linuxium said...

Yes you should run my 'linuxium-install-bootloader.sh' immediately after the installation but you must at that point have a working internet connection. So when the box comes up that says 'Installation has finished. You can continue testing Ubuntu now, but until you restart the computer ...' and gives two options 'Continue Testing' and 'Restart Now' click the 'Continue Testing' option. Then open up a terminal session and 'sudo' to root (enter 'sudo su -'). Next create the required directory with 'mkdir /target' (which may already exist as a result of the installation) and then mount the partition you installed the root file system to (e.g. 'mount /dev/mmcblk0p5 /target') and mount the boot partition on /target/boot/efi (e.g. 'mount /dev/mmcblk0p1 /target/boot/efi') as that mount point will exist after mounting the installed file system. Finally run my script with './linuxium-install-bootloader.sh' and this should install the required 32bit GRUB bootloader and create the NVRAM entry. You can then reboot hopefully to Ubuntu. Sometimes the latter (NVRAM entry) doesn't happen so when you boot you just get a blank screen. If this is the case then reboot from the LiveUSB and use 'efibootmgr' to fix the NVRAM entries (typically by deleting all the old and redundant entries and create a new entry for the installed Ubuntu).

The rEFInd option allows you to make a LiveUSB with persistence meaning whatever you do on your LiveUSB will remain after a reboot. I differentiate between a 'LiveUSB' without persistence to one with persistence by calling it a 'LivingUSB' to highlight the continuity of programs and data.

billP said...

While on the subject, I got an error the first time I ran the isorespin saying it needed "kpartx". I installed that package and (after removing the .iso lock) it ran fine.

None of the previous versions needed that (mostly I assume because of the persistence partition added).

Thanks.

Linuxium said...

I've uploaded new version of the script (same URL as before) that now checks for 'isoinfo' (which is provided by default in Ubuntu but might not be in other distros) and I've removed 'kpartx' as I'd rewritten the script to use 'losetup' (also now checked for) due to a bug where 'kpartx' didn't always delete the loop device when finished.

Unknown said...

Hi, Thanks for your support.
I recently got a LattePanda, I'm sure you heard about it. I just installed debian test with netinstall and it boots allright. The only two things that I matter and don't work are Wi-Fi and microSD card reader. I'm pretty linux-newbie. Would you tell me if I should (and how?) upgrade my kernel with the one that you propose, in order to fix this?
Thank you very much.

Unknown said...

Hi Linuxium,

I'd like to thank you for your tremendous effort.

Recently, I've been trying to install Ubuntu 16.04.2 on Intel Compute Stick (Atom Z3735F Linux version), and I did the following:

1. I downloaded 'ubuntu-16.04.2-desktop-amd64.iso' from www.ubuntu.com.

2. I respun the ISO using your isorespin.sh like this:

./isorespin.sh \
-i ubuntu-16.04.2-desktop-amd64.iso \
-k v4.11-rc5 \
-a "./linuxium-install-rtl8723bs-binaries-for-4.11.0-rc5.sh ./linuxium-install-UCM-files.sh" \
-l google-chrome-stable_current_amd64.deb

3. So, I got 'linuxium-v4.11-rc5-ubuntu-16.04.2-desktop-amd64.iso' without an error.

4. I made a Live USB memory with:

dd bs=4M if=linuxium-v4.11-rc5-ubuntu-16.04.2-desktop-amd64.iso of=/dev/sdc

4. Then, I booted Intel Compute Stick with the USB memory with 'Try Ubuntu without installing' selected, and all things came up as I expected.

However, here are two problems. (1) Network isn't working at all. Even an Ethernet USB dongle is not recognized. (2) The icon 'Install Ubuntu 16.04' does not exist, and I cannot install the respun Ubuntu onto the PC.

would you please help me out with these problems?

Thanks!

Linuxium said...

Which ISO did you install with?

Linuxium said...

So after you booted the USB and selected 'Try Ubuntu without installing' and had opened a terminal and ran the 'linuxium-install-rtl8723bs-binaries-for-4.11.0-rc5.sh' script what messages did you get?

alete said...

I used original debian test "stretch" netinstall. Thanks.

Linuxium said...

As per the final paragraph, only Debian 'Live install' ISOs (https://www.debian.org/CD/live) are supported.

alete said...

Oh, sorry. I thought that I could do some changes to an already installed OS. I'll follow the steps provided, thanks.

Unknown said...

Interestingly, I couldn't even find the script anywhere although I surely included it while respinning the ISO.

Did I do something wrong in the steps (1 through 3) of respinning the ISO?

Besides, how come the install icon 'Install Ubuntu 16.04' doesn't appear on the desktop?

So looking forward to your advice.
Thanks.

Linuxium said...

The '-a' flag will put the file(s) under '/usr/local/bin' on the ISO. Did you check in this directory?

The 'isorespin.sh' script doesn't directly modify desktop entries or any like that however as a result of installing packages including kernels dependencies and logic conditions may have changed so that as a consequence behaviour or appearance change in the resultant ISO.

There should still be an install icon on the left panel in Unity regardless of the desktop. Was that still there?

Unknown said...

Is there any way to respin from windows?

Linuxium said...

I have been meaning to try with 'Bash on Ubuntu on Windows' from the Windows Subsystem for Linux (WSL) but haven't had time. Would you like to try and post your results?

Unknown said...

Sure, just give me until weekend. :)

Unknown said...

As you said, I was expecting the scripts under /usr/local/bin but /usr/local/bin is completely empty.

The install icon is neither on the left panel in Unity nor on the desktop :(

I tried respinning several times and the results are all the same.

Linuxium said...

I think you may be running out of space and the resultant ISO is unpredictable. I've tested various conditions and with the correct free space the script works as expected. As a result I've uploaded a new version of the script which checks free space first. Please give this a try.

Unknown said...

on WSL:
I'll translate some strings in spanish.

alete@FX8370:/mnt/c/Users/alete/Downloads$ ./isorespin.sh
sudo: imposible resolver el anfitrión FX8370 => impossible to resolve host
[sudo] password for alete:
./isorespin.sh: Please ensure package 'klibc-utils' or equivalent for your distro is installed ... exiting.
sudo: imposible resolver el anfitrión FX8370
sudo: imposible resolver el anfitrión FX8370
alete@FX8370:/mnt/c/Users/alete/Downloads$ sudo apt-get install klibc-utils
sudo: imposible resolver el anfitrión FX8370
Leyendo lista de paquetes... Hecho => reading packet list... Done
Creando árbol de dependencias => creating dependency tree
Leyendo la información de estado... Hecho => reading state information... Done
klibc-utils ya está en su versión más reciente. => is already in it's most recent version
0 actualizados, 0 se instalarán, 0 para eliminar y 0 no actualizados. => 0 updated, 0 to install, 0 to delete, 0 no updated.

Linuxium said...

Interesting. My script suggests 'klibc-utils' as it cannot find the 'losetup' (so in other words entering 'command -v losetup' doesn't show anything). I'm not sure how it will work on WSL though however if you enter 'dpkg -S losetup' does it show the package to install to get 'losetup'?

Unknown said...

is this de output expected?

alete@FX8370:/mnt/c/Windows/System32$ dpkg -S losetup
klibc-utils: /usr/lib/klibc/bin/losetup
mount: /usr/share/man/man8/losetup.8.gz
mount: /sbin/losetup

Linuxium said...

Thanks. The output is as expected but confusing as it seems to suggest that something is not working the same way as Bash on Ubuntu on Ubuntu (as opposed to Bash on Ubuntu on Windows). I'll have to take a look otherwise I would be wasting your time asking you to run command after command. Let me see if I can try tomorrow.

Unknown said...

I don't mind to run a bunch of commands for you if you need them. Just let me know and I can copy-paste the outputs (in case you don't have acces to a WSL). Regrettably I'm pretty noob in linux, thats as much as I can do.

Linuxium said...

I've tested on WSL and my script can't run as WSL doesn't support loop devices.

However I have tested my script using VirtualBox on Windows and can confirm it works.

I created and ran an Ubuntu VM and with the 'Oracle VM VirtualBox Extension Pack' installed I was able to both respin an Ubuntu ISO and write it to a USB using 'dd'.

Him said...

Hi,

Many thanks for your efforts on this, I'm impressed by the depth of support you are able to give. I am trying to make this work with an Azulle Quantum compute stick. I have a rather odd situation where the re-spin appears to work but the kernel always reports as the standard one using `uname -a` (e.g. 4.8 on Xenial) - is there something I've missed to get Ubuntu to pick up the 4.11 kernel?

Thanks for your help!

Matt

Linuxium said...

Can you tell me what ISO you are respinning and what command you use so I can take a look?

Him said...

Wow, you are quick!

I tried to copy the one you posted as closely as possible (wanted to use the 16.04 LTS based distro)

sudo ./isorespin.sh -i ubuntu-16.04.2-desktop-amd64.iso -k v4.11-rc5 -a "linuxium-install-rtl8723bs-binaries-for-4.11.0-rc5.sh linuxium-install-UCM-files.sh" -p "ssh openssh-server inxi" -r -s 2GB

previously tried 14.04 LTS
./isorespin.sh -u -i ubuntu-14.04.5-desktop-amd64.iso

For 16.04, downloaded from here:
http://releases.ubuntu.com/16.04/ubuntu-16.04.2-desktop-amd64.iso

MD5 hashes:
1400884cec8e40a1a876b2678f81494b ubuntu-16.04.2-desktop-amd64.iso

23a5a38e302b11226224484cfd376db3 linuxium-persistence-rEFInd-v4.11-rc5-ubuntu-16.04.2-desktop-amd64.iso

Let me know if you need more info, happy to run debug commands as required

Thanks...

Matt

Him said...

should be the latest (downloaded yesterday... will need to swap os to check) - will post here in a few minutes

Linuxium said...

Which version of 'isorespin.sh' are you using (use the '-v' flag)? If it is not 'Version: 4.09.280417' can you download it from the link above and respin the ISO again?

Running the exact same command on that ISO results in a MD5 hash for 'linuxium-persistence-rEFInd-v4.11-rc5-ubuntu-16.04.2-desktop-amd64.iso' of '29d2f47fec1ea6dec50743eff2e9dfc1' and a 'ls -l' is '-rw-r--r-- 1 root root 4080026624 May 1 01:32 linuxium-persistence-rEFInd-v4.11-rc5-ubuntu-16.04.2-desktop-amd64.iso' for reference.

Him said...

./isorespin.sh: Version: 4.09.280417

Him said...

-rw-r--r-- 1 root root 3923788800 Apr 30 09:46 linuxium-persistence-rEFInd-v4.11-rc5-ubuntu-16.04.2-desktop-amd64.iso

Linuxium said...

When you boot are you booting from the USB or is it picking up the GRUB from the eMMC and therefore booting the kernel on the eMMC?

Him said...

so this looks like either some weird distro problem is some (more likely) finger trouble on my part. Is there any other debug I can provide to narrow it down? My distro is quite old:

Linux xxx 3.13.0-34-generic #60-Ubuntu SMP Wed Aug 13 15:49:09 UTC 2014 i686 i686 i686 GNU/Linux

Would an apt-get update / upgrade make a difference? - Will try anyway

Linuxium said...

Just to confirm you 'dd' the 'linuxium-persistence-rEFInd-v4.11-rc5-ubuntu-16.04.2-desktop-amd64.iso' ISO to a USB and then when you boot from the USB you start with the blue boot menu like the image in the post above and then after selecting 'UEFI: Partition 1' you get the rEFInd boot screen also like the one above with an Ubuntu logo and a message saying it will boot from LINUXIUM ISO?

Him said...

I select the boot from USB option directly from the bios screen, which then takes me into the option screen of "Try Ubuntu / Install Ubuntu etc.", so at that level I am sure that I am booting from the USB rather than eMMC. That plus I can see the disk activity on the USB stick. Is it possible to pick only the kernel from the eMMC via grub but boot the user space code from the USB?

Linuxium said...

Yes as this is how you boot from SD card on some devices as the device cannot see the SD card at boot so you have to boot the kernel from eMMC and then it boots the root file system from SD card etc.

Try the boot approach I mention in the previous comment and see how you go.

Him said...

Yes double checked that dd / boot method. Only differences were using rufus on windows to write the image (using the dd option) and then selecting the boot method directly in bios. I get through to the rEFInd screen and select boot from linuxium iso. Have taken a couple of pictures which I can send if needed. As a further test I selected the install option from the desktop and can see a message saying "configuring linux-image-4.8.0-49-generic (amd64)" so it looks like the iso is not correct (again happy that this is my fault not yours). When I get back to my linux box I will try again (having updated that distro) and DD directly from linux. Is there anything I can look for in the iso image that confirms the version of the kernel that is present there?

Unknown said...

Hi Linuxium,

Thankyou very much for your work! I'm trying to respin a Xubuntu ISO with your script, but i get the following error:

$ ./isorespin.sh -i xubuntu-16.04.2-desktop-amd64.iso
./isorespin.sh: linha 87: printf: 68.78764343261718750000: número inválido
./isorespin.sh: linha 88: printf: 68.78764343261718750000: número inválido
./isorespin.sh: Insufficient disk space ... there is only 0,0G free and not the required minimum of 10G

Of course, i'm sure i've enough free space on my disk (in fact, I have 73 GB of free space). So...what I'm doing wrong?

Thankyou very much, again. And best regards.

Kuba said...

Bitnos, try via Vmware.

Kuba said...

Hello, Kali version is incompatible 2017,2016

Him said...

Hi, quick update here - I updated my "standard" PC to 16.04 and then re-ran the commands above. The ISO matched the filesize of yours (although the hash was different). Back on my compute stick, I now have kernel version 4.11 on the the "live" disk with WiFi support. Am currently reinstalling, will let you know how it goes, but looks like it's working. Sorry for the hassle, as it seemed to be all my end. Thank you so much for your support

Unknown said...

Thanks, that's what I'm going to do. :)

Linuxium said...

Why do you say they are incompatible? I've tested the 64 bit downloads from https://www.kali.org/downloads/ which are all compatible and work fine.

Linuxium said...

What OS and version are you running on?

Unknown said...

As you suggested, I downloaded the updated isorespin.sh (version: 4.09.280417) and tried it as follows:

./isorespin.sh -i ubuntu-16.04.2-desktop-amd64.iso -k v4.11-rc5

This time I omitted other options to make things simple, and I got 'linuxium-v4.11-rc5-ubuntu-16.04.2-desktop-amd64.iso' without any errors or warning messages about memory deficiency.

Well, the result is the same: the 'Install Ubuntu 16.04' icon does not appear and Ethernet is not recognized. To see if my trials of respinning ISO is the problem, I simply downloaded your previous respun ISO which was posted on March 1st, 2017. The ISO also shows the same result!

By the way, I tried the original ubuntu-16.04.2-desktop-amd64.iso without respinning it. It shows the 'Install Ubuntu 16.04' icon on the desktop and Ethernet is recognized.

Linuxium said...

Can you provide me with some system information (by email if you prefer) so I can try and determine why it is not working for you? What OS and version are you respinning on? What is the size (ls -l) of the resultant ISO? What command do you use to create the USB with the ISO? What device are you then booting the respun ISO on? How do you boot and what options do you select to boot the USB?

Matthias K said...

Hi,
when respinning Ubuntu Mate 17.04 with -u -a broadcom.sh UCM.sh -p Chrome.deb -r -s 2Gb on Ubuntu 16.04 and Ubuntu Mate 17.04 I get the same strange error.

Hope this helps to sort the problem out.

Thanks a lot for your great work, Linuxium!

Linuxium said...

Can you tell me the OS and version of the system you are running the 'isorespin.sh' script on as it looks like there may be a portability issue with 'printf'?

Linuxium said...

Could you also tell me what 'echo $LC_NUMERIC' returns when entered into a terminal window?

Linuxium said...

And 'locale -a' as well as I think I've understood the issue.

Kuba said...

Work without rtl8723bs driver, mismatch kernel version.

Unknown said...

I really appreciate your help. Here are the answers to your questions:

1. System OS and its version in which the ISO is created

The information about the system that I am using to respin the ISO is the following, which I got with 'uname -a'.

Linux album-jazz 4.4.0-71-generic #92-Ubuntu SMP Fri Mar 24 12:59:01 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

That is, the system is a regular desktop PC which has Intel Core i7-4790 CPU @ 3.6 GHz x 8 with 16 GB RAM and more than 500 GB free space on HDD. And the OS is Ubunut 16.04 LTS 64-bit. So, I guess it cannot have a problem related to memory deficiency.


2. Size of the resultant ISO

As I mentioned previously, I respun the ISO with the following command:

./isorespin.sh -i ubuntu-16.04.2-desktop-amd64.iso -k v4.11-rc5

And the resultant ISO is like this (ls -l):

-rw-r--r-- 1 root root 1687879680 May 1 13:07 linuxium-v4.11-rc5-ubuntu-16.04.2-desktop-amd64.iso

So, the ISO size is about 1.6 GB.


3. Command to create a Live USB with the ISO

The command I used to create a Live USB is the following:

sudo dd if=linuxium-v4.11-rc5-ubuntu-16.04.2-desktop-amd64.iso of=/dev/sdc


4. Target device where the ISO is booted

The target device for which the ISO is created is Intel Compute Stick STCK1A8LFC (http://www.intel.com/buy/us/en/product/desktop/intel-boxstck1a8lfc-atom-z3735f-133ghz-linux-usb-black-stick-pc-463163). It originally has Ubuntu 14.04 LTS.


5. How and with what options the ISO is booted

When I boot up the system with the Live USB, I pressed F10 to select a boot medium.

UEFI : Ubuntu Recovery : Part 1 : OS Bootloader
UEFI : ubuntu : Part 0 : OS Bootloader
UEFI : USB : SanDisk : Part 0 : OS Bootloader

And the last one is the Live USB and I selected it. Then, it shows a screen giving me four options:

Try Ubuntu without installing
Install Ubuntu
OEM install (for manufacturers)
Check disk for defects

So, I selected the first one. Then, it brings up Ubuntu but there is no 'Install Ubuntu 16.04' icon on the desktop and the Unity panel at all. Also, if I type 'ifconfig' in a terminal, it shows only 'lo' although an Ethernet USB dongle is connected.

Unknown said...

Hi,

I'm using Linux Mint 18, with kernel version 4.4.0-62. Output of the commands you ask for are:

$echo $LC_NUMERIC
es_ES.UTF-8

$locale -a
C
C.UTF-8
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW.utf8
es_ES.utf8
POSIX
pt_BR.utf8
pt_PT.utf8

Thankyou very much!

Matthias K said...

Hi,
some additional reporting:

System: Host: T460 Kernel: 4.4.0-75-generic x86_64 (64 bit)
Desktop: Unity 7.4.0 Distro: Ubuntu 16.04 xenial
Machine: System: LENOVO (portable) product: 20FMS03600 v: ThinkPad T460

no output on $ echo $LC_NUMERIC

$ locale -a
C
C.UTF-8
de_AT.utf8
de_BE.utf8
de_CH.utf8
de_DE.utf8
de_LI.utf8
de_LU.utf8
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW.utf8
POSIX

Thank you!




Matthias K said...

for Mate 17.04 the commands returned:
System: Host: MultiMediaCulti Kernel: 4.10.0-20-generic x86_64 (64 bit)
Desktop: MATE 1.18.0 Distro: Ubuntu 17.04
Machine: Device: desktop System: Hewlett-Packard product: HP Compaq 8200 Elite SFF PC

no output on $ echo $LC_NUMERIC

locale -a
C
C.UTF-8
de_AT.utf8
de_BE.utf8
de_CH.utf8
de_DE.utf8
de_IT.utf8
de_LI.utf8
de_LU.utf8
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IL
en_IL.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW.utf8
POSIX


Thanks!

Linuxium said...

@Bitnos & @Matthias: Thank you for the requested information.

For anyone running 'isorespin.sh' and getting a "printf: n: invalid number" or similar message please run the following one-off command to fix the script (I will issue an updated version later):

sed -i 's/(printf/(LC_ALL=C printf/' isorespin.sh

and then respin your ISOs using the updated script.

Matthias K said...

Wow, you're pretty fast...

I just run the updated script:

https://pastebin.com/g3LcBAex (hope this works as it is my first try)

The ISO seems to be created, but I don't know what consequences may arise from the cp-errors (not enough space left???). I'm going to have a try on Asus T100HA and report back..

Thanks again :-)

Linuxium said...

I don't think that it will be successful.

Can you run this additional fix:

sed -i '/# isorespin/a LC_ALL=C' isorespin.sh

and then try respinning your ISOs again using the updated script.

Matthias K said...

Yeah, your script respun the Mate-ISO without errors.
I'm quite exited to give it a go!

Thank you for your fast and precise support!

Linuxium said...

I've respun 'ubuntu-16.04.2-desktop-amd64.iso' with the same command as you and got exactly the same respun ISO file (size 1687879680). However after 'dd' to USB and booting it works fine.

The only thing I can suggest is if you want to install it you first boot from the USB and wipe your eMMC with a command like 'sudo sgdisk -Z /dev/mmcblk1'. I'd also remove any NVRAM entries by using 'efibootmgr' ('sudo apt install -y efibootmgr') and delete the first nine possible entries ('for i in $(seq 0 9); do sudo efibootmgr -b $i -B; done') Then reboot from the USB and hopefully everything will be fine.

Linuxium said...

Kali uses a Debian kernel so if a distro doesn't use the v3.16 kernel that Debian 8.7 "jessie" uses you need to wait for HDMI audio and wifi to be incorporated into later Debian kernels.

Unknown said...

Fixed! I've raspin Xubuntu 16.04 without errors, after modify the scrip with your two commands.
Congratulations, Linuxium, and thankyou very much.

Unknown said...

As well as it is possible to install packages on the ISO with -p parameter....is there any way to add repositories?

Unknown said...

FINALLY IT WORKS! Thank you so much for your help :)

Linuxium said...

Do you mean like adding a PPA or do you want to add "Universe" and/or "Multiverse" as these two are added temporarily to allow the '-p' flag to work currently or do you mean a repository like "deb http://mirror3.ubuntulinux.nl/ hardy-seveas freenx" to '/etc/apt/sources.list'?

Unknown said...

That I would like is to add to my ISO packages like syncthing (so I have to add "deb https://apt.syncthing.net/ syncthing stable" to sources.list) or gnome-encfs-manager (wich repository I add with "add-apt-repository ppa:gencfsm/ppa").

Perhaps I could write a script and add it to the respun ISO with -a parameter...right?

Unknown said...

damn. Here is what I did:
I run debian live in my home PC and tried to respin from debian the .iso that i have in my HDD, I keep getting
"Please ensure package 'klibc-utils' or equivalent for your distro is installed ... exiting."
even after:
user@debian:~/Desktop$ sudo apt-get install klibc-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
klibc-utils is already the newest version.
klibc-utils set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Linuxium said...

I also encountered this error whilst running in Crouton and it is due to a user's PATH vs root's PATH whilst checking the package dependencies. I've fixed it in the latest version which can be downloaded from the links above.

Linuxium said...

Shame I used '-r' for rEFInd boot manager as now I've got to come up with a new flag name.

I was thinking of changing '-l' to '-d' (for deb), '-r' to '-b' (for boot manager with '-g' for GRUB as default), '-a' to '-f' (for file) which means I could use '-r' for repository.

What does everyone think?

Unknown said...

Does it help to generate an ISO for the Intel Compute Stick with Ubuntu Preinstalled and 8 GB memory, so that the device do not freeze?
If HDMI is not connected the device freezes within minutes, with HDMI Connected the stick was running a week fine.

Unknown said...

I respun an iso last night and upon trying to install it said it would not be bootable due to missing 32bit efi. Now upon trying again I'm seeing the following in the log... any suggestions on anything I may be missing?

created 127428 files
created 15865 directories
created 33940 symlinks
created 7 devices
created 0 fifos
./isorespin.sh: Extracting isorespin files ...
./isorespin.sh: Updating bootloader ...
cp: cannot stat 'grub_bootia32.efi': No such file or directory
cp: cannot stat 'efi_bootia32.efi': No such file or directory
./isorespin.sh: Installing additional files ...
./isorespin.sh: Fetching mainline debs ...
./isorespin.sh: Installing mainline kernel ...
waiting....
cp: missing destination file operand after 'iso-directory-structure/casper/vmlinuz.efi'
Try 'cp --help' for more information.
cp: missing destination file operand after 'iso-directory-structure/casper/initrd.lz'
Try 'cp --help' for more information.
./isorespin.sh: Spinning ISO ...

Linuxium said...

The above log isn't right so can you tell me the following:

1. Version of 'isorespin.sh' (using '-v' flag)
2. Size of 'isorespin.sh' (using ls -l')
3. Command entered (e.g. ./isorespin.sh -i ...)
4. URL for ISO (i.e. so I can download for testing)
5. OS and version of system (on which you run the command on)

Linuxium said...

The device freezes are thought to be due to a kernel issue which started post v3.16 and continued through to v4.10 to a lesser extent and hopefully is minimized in v4.11. If it is encountered then the recommended work around is to use the 'intel_idle.max_cstate' flag on booting.

If you are using the base model Intel Compute Stick with only 1GB RAM and 8GB eMMC then I'd also recommend using a lighter distro such as Lubuntu rather than Ubuntu and also consider using 'zram' and 'zswap'.

Unknown said...

Version: 5.01.020517

ls -l gives 17071187

command was ./isorespin.sh -i xubuntu-17.04-desktop-amd64.iso -k v4.11-rc7 -a "./linuxium-install-broadcom-drivers.sh"

http://torrent.ubuntu.com/xubuntu/releases/zesty/release/desktop/xubuntu-17.04-desktop-amd64.iso.torrent

And I'm running this on an Ubuntu 16.04.02 lts 64bit Xubuntu system. My system does have two physical drives and I was getting masses of errors when running in my home directory which is on the second drive. So I created a directory on the primary drive to run it from, the part of the log I pasted was from this attempt on the primary drive.

Linuxium said...

The script size is wrong as it should be '9080771'. Can you also check that the 'md5sum' is '4998077659253231b39d3e4e04902582' for the script?

Unknown said...

I re-downloaded the script and got the correct size and md5sum.
Tried running again and here follows the full output this time. I'm gonna have a go with the iso produced to make sure this issue still occurs when I try to install while booted in the livecd version of the OS.

./isorespin.sh -i xubuntu-17.04-desktop-amd64.iso -k v4.11-rc7 -a "./linuxium-install-broadcom-drivers.sh"
./isorespin.sh: Extracting ISO ...
Parallel unsquashfs: Using 8 processors
161408 inodes (170805 blocks) to write

[======================================================================================================\] 170805/170805 100%

created 127428 files
created 15865 directories
created 33940 symlinks
created 7 devices
created 0 fifos
./isorespin.sh: Extracting isorespin files ...
./isorespin.sh: Updating bootloader ...
./isorespin.sh: Installing additional files ...
./isorespin.sh: Fetching mainline debs ...
./isorespin.sh: Installing mainline kernel ...
cp: missing destination file operand after 'iso-directory-structure/casper/vmlinuz.efi'
Try 'cp --help' for more information.
cp: missing destination file operand after 'iso-directory-structure/casper/initrd.lz'
Try 'cp --help' for more information.
./isorespin.sh: Spinning ISO ...
Parallel mksquashfs: Using 8 processors
Creating 4.0 filesystem on iso-directory-structure/casper/filesystem.squashfs, block size 131072.
[======================================================================================================/] 137410/137410 100%

Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
compressed data, compressed metadata, compressed fragments, compressed xattrs
duplicates are removed
Filesystem size 1323211.09 Kbytes (1292.20 Mbytes)
40.76% of uncompressed filesystem size (3246171.44 Kbytes)
Inode table size 1722108 bytes (1681.75 Kbytes)
26.77% of uncompressed inode table size (6432696 bytes)
Directory table size 1782437 bytes (1740.66 Kbytes)
40.76% of uncompressed directory table size (4373197 bytes)
Number of duplicate files found 14169
Number of inodes 177244
Number of files 127432
Number of fragments 7766
Number of symbolic links 33940
Number of device nodes 7
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 15865
Number of ids (unique uids + gids) 25
Number of uids 9
root (0)
usbmux (119)
hplip (114)
avahi-autoipd (111)
lightdm (109)
man (6)
_apt (105)
rtkit (117)
syslog (104)
Number of gids 22
root (0)
dip (30)
shadow (42)
nopasswdlogin (116)
avahi-autoipd (119)
lpadmin (114)
audio (29)
utmp (43)
tty (5)
crontab (107)
lxd (111)
netdev (109)
staff (50)
avahi (120)
man (12)
bluetooth (121)
mlocate (117)
rtkit (126)
lp (7)
adm (4)
syslog (108)
mail (8)
xorriso 1.4.2 : RockRidge filesystem manipulator, libburnia project.

Drive current: -outdev 'stdio:../../linuxium-v4.11-rc7-xubuntu-17.04-desktop-amd64.iso'
Media current: stdio file, overwriteable
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, 126g free
xorriso : WARNING : -volid text problematic as automatic mount point name
xorriso : WARNING : -volid text does not comply to ISO 9660 / ECMA 119 rules
Added to ISO image: directory '/'='/isorespin/isorespin/iso-directory-structure'
xorriso : UPDATE : 654 files added in 1 seconds
xorriso : UPDATE : 654 files added in 1 seconds
xorriso : NOTE : Copying to System Area: 512 bytes from file '/isorespin/isorespin/isohdpfx.bin'
libisofs: NOTE : Automatically adjusted MBR geometry to 1013/85/32
libisofs: NOTE : Aligned image size to cylinder size by 438 blocks
xorriso : UPDATE : 9.73% done
xorriso : UPDATE : 52.46% done
ISO image produced: 688840 sectors
Written to medium : 688840 sectors at LBA 0
Writing to 'stdio:../../linuxium-v4.11-rc7-xubuntu-17.04-desktop-amd64.iso' completed successfully.

./isorespin.sh: ISO created as 'linuxium-v4.11-rc7-xubuntu-17.04-desktop-amd64.iso'

Linuxium said...

I ran exactly the same command but I didn't get the 'cp: missing destination file' errors so something is not quite right. An 'ls -l' of my ISO is '1336934400' with md5sum of 'bc9ac9556fb2b2cad85d0e41fc60b2e5' so is yours the same?

Linuxium said...

Running 'ls -l' of my resultant ISO 'linuxium-v4.11-rc7-xubuntu-17.04-desktop-amd64.iso' shows '1473511424'.

Unknown said...

Yeah I get the same numbers for the source iso, but the resulting iso has the size 1410744320. So there is something going wrong due to something on this laptop.
I'm gonna try installing an older image on the target laptop and then try creating the new one there.

Unknown said...

Well. No copy errors during the respin, but when installing it although the live image boots from my usb drive I get the error "The 'grub-efi-ia32' packagefailed to install in to /target/. Without the GRUB boot loader, the system will not boot".
Am I missing something from the isorespin command?

--------

Update... I've not got a working internet connection when installing. (I'm installing on asus x205ta based on the bay trail on a 32bit based boot load) so I'm going to try again with a usb wifi dongle and see if that improves my situation.

Unknown said...

resulting image size was 1473511424

Unknown said...

Okay, I've got it installed. Had to have an internet connection. Thank you so much for your help and the scripts.

Linuxium said...

Good to hear everything has finally worked okay.

Unknown said...

I'm sorry I keep coming back with dumb questions. I got this LattePanda board, and a lot of users in it's forum used your previous released ISO's to run ubuntu on it and everything worked well. I just respun a debian live iso just with -i . but wifi and sd card reader support seems missing. I think I'm missing something like putting another kernel, right?
In that case, What kernel should I get (and where from) in order to get this running? It seems that everything worked well with your ISO's.

Thanks, and sorry

Linuxium said...

Debian is different as there is no kernel archive I'm aware of like Canonical's Ubuntu one where you can download Debian compiled mainline kernels.

The best you can do because the current kernel is v3.16 based is apply the original Canonical DKMS patches for HDMI audio and wifi using the '-u' flag.

Unknown said...

Thank you very much. Do you have a bitcoin address for donation purposes?

Unknown said...

with -u I'm getting: Access to the internet is required for downloading files ... exiting. But I can wget normally

Linuxium said...

I haven't experimented with bitcoin and Paypal integration with bitcoin through Braintree is only available in the US at the moment.

For internet access does the command 'ip r' return a line with your default address in it and does 'ip route' make any difference? Finally if 'ip r' fails does 'sudo ip r' or 'sudo ip route' work?

Matthias K said...

In my opinion flags are like variables in the mathematical sense so as long as you define them everything is fine.

Regards

Matthias

Unknown said...

ip r and ip route have the same output:
user@debian:~/Downloads$ bash isorespin.sh -i debian-live-8.7.1-amd64-mate-desktop.iso -u
isorespin.sh: Access to the internet is required for downloading files ... exiting.
user@debian:~/Downloads$ ip r
default via 192.168.0.1 dev eth0 proto static metric 1024
169.254.0.0/16 dev eth0 scope link metric 1000
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.22
user@debian:~/Downloads$ ip route
default via 192.168.0.1 dev eth0 proto static metric 1024
169.254.0.0/16 dev eth0 scope link metric 1000
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.22
user@debian:~/Downloads$

Linuxium said...

The script checks for internet access by sending a 'ping' to the default gateway. So if you do a 'ping -c1 192.168.0.1' in theory based on your routing table then you should see '1 received' to indicate a working internet connection. It appears that you will get a '0 received' when you try it due to how your routes are configured. As a result the script thinks that there is no internet connection. If you don't want to change your default gateway then simply edit the script and add a line after 101 of 'DEFAULT_GATEWAY=nnn.nnn.nnn.nnn' substituting the correct address for the 'n's.

Linuxium said...

Thanks. Stay tuned for a shuffled flag version then!

Unknown said...

I see, I have port 80 directed to a a specific lolcal IP in my router config. Must be it. I'll check it out.

asdf said...

I created an iso file using isorespin.sh. After writing it to usb, it will boot up and the following error will appear.
'(initramfs) Unable to find a medium containing a live file system'

Linuxium said...

What was the original ISO, where did you download it from, and what command did you use to respin it?

asdf said...

I downloaded it from Ubuntu Gnome official website. Before creating iso, I checked the md5 checksum.
It was created with the command:
./isorespin.sh -i ubuntu-gnome-17.04-desktop-amd64.iso -k v4.11 -r -s 2GB

Linuxium said...

Check that you are using the latest version of 'isorespin.sh' which is Version: 5.01.020517

An 'ls -l' of 'linuxium-persistence-rEFInd-v4.11-ubuntu-gnome-17.04-desktop-amd64.iso' should be '3941614592'.

asdf said...

Ok. all the same.

Linuxium said...

Then re-write it to the USB again making sure you use 'dd' as the command and try it again.

asdf said...

I have tried it several times, but the problem is not solved yet. The same is true of other USBs.
Could it be a device issue? My device is ASUS T100TAF.

Unknown said...

./isorespin.sh: Extracting ISO ...
Parallel unsquashfs: Using 4 processors
187407 inodes (201522 blocks) to write

[=========================================================-] 201522/201522 100%

created 122927 files
created 17243 directories
created 64372 symlinks
created 80 devices
created 0 fifos
./isorespin.sh: Extracting isorespin files ...
./isorespin.sh: Updating bootloader ...
mount: special device iso-directory-structure/boot/grub/efi.img does not exist
cp: cannot stat 'mnt/efi': No such file or directory
umount: mnt: not mounted
cp: cannot stat 'efi': No such file or directory
cp: cannot create regular file 'mnt/efi/boot/bootia32.efi': No such file or directory
cp: cannot create regular file 'iso-directory-structure/EFI/BOOT/bootia32.efi': No such file or directory
./isorespin.sh: Fetching mainline debs ...
./isorespin.sh: Installing mainline kernel ...
cp: missing destination file operand after 'iso-directory-structure/casper/vmlinuz.efi'
Try 'cp --help' for more information.
./isorespin.sh: Spinning ISO ...
Parallel mksquashfs: Using 4 processors
Creating 4.0 filesystem on iso-directory-structure/casper/filesystem.squashfs, block size 131072.
[=========================================================-] 151942/151942 100%

Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
compressed data, compressed metadata, compressed fragments, compressed xattrs
duplicates are removed
Filesystem size 1536480.53 Kbytes (1500.47 Mbytes)
39.72% of uncompressed filesystem size (3868369.61 Kbytes)
Inode table size 2370670 bytes (2315.11 Kbytes)
24.06% of uncompressed inode table size (9852759 bytes)
Directory table size 2318768 bytes (2264.42 Kbytes)
42.32% of uncompressed directory table size (5479712 bytes)
Number of duplicate files found 25266
Number of inodes 222228
Number of files 137440
Number of fragments 7575
Number of symbolic links 64373
Number of device nodes 80
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 20335
Number of ids (unique uids + gids) 29
Number of uids 11
root (0)
man (6)
dnsmasq (112)
hplip (115)
speech-dispatcher (114)
avahi-autoipd (110)
colord (113)
_apt (105)
furkan (1000)
lightdm (108)
syslog (104)
Number of gids 26
root (0)
video (44)
audio (29)
tty (5)
kmem (15)
disk (6)
dip (30)
shadow (42)
ssl-cert (112)
nogroup (65534)
lightdm (114)
utmp (43)
crontab (107)
mlocate (117)
ssh (118)
messagebus (110)
mail (8)
staff (50)
lpadmin (113)
whoopsie (116)
furkan (1000)
avahi-autoipd (119)
colord (123)
syslog (108)
adm (4)
lp (7)
xorriso 1.4.2 : RockRidge filesystem manipulator, libburnia project.

Drive current: -outdev 'stdio:../../linuxium-v4.11-ubuntu-16.04.2-desktop-i386.iso'
Media current: stdio file, overwriteable
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, 8707m free
xorriso : WARNING : -volid text problematic as automatic mount point name
xorriso : WARNING : -volid text does not comply to ISO 9660 / ECMA 119 rules
Added to ISO image: directory '/'='/home/furkan/iso/isorespin/iso-directory-structure'
xorriso : UPDATE : 250 files added in 1 seconds
xorriso : UPDATE : 250 files added in 1 seconds
xorriso : NOTE : Copying to System Area: 512 bytes from file '/home/furkan/iso/isorespin/isohdpfx.bin'
libisofs: NOTE : Automatically adjusted MBR geometry to 1019/98/32
libisofs: NOTE : Aligned image size to cylinder size by 766 blocks
xorriso : UPDATE : 0.41% done
xorriso : UPDATE : 3.75% done
xorriso : UPDATE : 7.45% done
.....

Unknown said...

im execute this command furkan@ubuntu:~/iso$ sudo ./isorespin.sh --update -i ubuntu-16.04.2-desktop-i386.iso

Unknown said...

I'm sorry I keep doing noob question. I wasn't able to succesfully edit the file in any editor. pluma says there is a problem with the encoding, gedit corrupt it in some way, just opening it and then saving as give me a different md5, LibreOffice also says it cannot be saved in text mode. What do you use to edit?

Linuxium said...

I use 'vi' however maybe you could run this command to in a terminal windows to fix the script for your particular circumstances: 'sed -i 102,105d isorespin.sh'

Linuxium said...

Maybe the download of the script has corrupted it as there are errors that shouldn't occur. Check that the md5sum is '4998077659253231b39d3e4e04902582' for it.

Linuxium said...

Maybe something is preventing it booting properly in the BIOS. Can your device boot the original ISO if written to USB?

Unknown said...

Trye using the amd64 ISO not the i386 ISO so it have suport for EFI.

Unknown said...

Hi. I would like to ask 2 questions.

The first concerns the kernel related updates. In case I have already installed Ubuntu on my Compute stick using your ISO containing the 4.10.0-10.12 kernel patched and packed by you, am I supposed to use the mainline 4.11 kernel as update? Is any patch needed for the kernel (I am able to rebuild a Debian package from sources). What other packages should I update?

The second concerns those binary firmwares that are used by the i915 driver. I suspected the Windows graphic drivers contained some pieces of firmware which were pushed to the devices if necessary at load time. Having a Cherry Trail Compute Stick STK1AW32SC, I have downloaded the corresponding drivers and some firmwares from 01.org. Then I searched for some fingerprints in the firmwares then in the Windows drivers. I have found a SYS file containing what I believed to be a firmware. It is called igdkmd32.sys. Unfortunately, the firmwares are not embedded like Windows resources and more knowledge is required to dump them properly. Has anyone attempted this?

Linuxium said...

Good catch. I will amend the script to check for ISO architecture.

Linuxium said...

Yes the v4.11 kernel supersedes my patched 4.10.0-10.12 kernel for the Intel Compute Stick STK1AW32SC.

Regarding the i915 driver firmware given your device you should not need anything further and any messages from 'update-initramfs' or similar referring to 'Possible missing firmware' can be ignored as they are CPU/SOC specific.

Unknown said...

I wasn't able to open it with 'vi' it throw some error at line #xxxxxx. however I edited it in notepad++ on windows, but debian wasn't able to load after grub menu, kernel started to panic xD.
I don't know why, but I think I'm giving up with debian on LattePanda.
Thanks!

Linuxium said...

Try the sed command then.

asdf said...

I write the original iso file and insert the bootia32.efi file. As a result, booting is normal.
I'm satisfied with this. Thank you for your help.

Unknown said...

Can anymone help

I respin debian live lxde

At first boot i have this message:

Error:no suitable video mode found
Booting in blind mode

And nothing happens.

Unknown said...

Linuxium - I tried your isorespin.sh script with an ubuntu-17.04-server-amd64.iso and I got the following message:
must be Ubuntu (or Ubuntu flavour), Linux Mint, elementary, neon, Kali or a Debian 'Live' ISO ... exiting.
This was the command used:
/isorespin.sh -i ../iso/ubuntu-17.04-server-amd64.iso -k v4.11 -a "/home/myuser/isorespin.sh/linuxium-install-bootloader.sh"

Unknown said...

Asus T102HA tablet-cum-keyboard. dmesg available here : https://pastebin.com/gS6RDZuz

My previous attempts failed to give me a system that can suspend, which is a critical feature for the use I plan for this "pocket" machine.

I respun the Ubuntu-gnome ISO, while upgrading the kernel to the last Ubuntu available kernel as of May 10. and I used the resulting ISO key to install (I used persistence to be able to keep my settings between trial session and install the UDM-install script).Now, this machine *seems* to beable to suspend and resume (to be checked more thoroughly, with a *long* suspend period, to check what happens to battery life...), but many things don't work.

What works: WiFi, Bluetooth, USB Ethernet, keyboard and touchpad, tactile screen, stylus. Linux itself does not detect the correct orientation of the screen and displays the login screen rotated pi/2 clockwise, but Gnoe seems to figure the correct orientation (display, touchpad, tactile screen and stylus), function keys for intern/extern screen.

What does *not* work : screen brightness, function keys for screen brightness, suspend/resume, sound control.

What works *inconstantly : :
- sound (initially, no sound devices appear uin the system panel, but some devices (5645) appear sometimes, and then sound works. I do not see the HDMI sound device.
- battery indicator : sometimes disappear from the system menu.
- battery life seems short (about 5 hours on full charge. That may be bound to the lack of brightness control?
- When sound exists, it does not obey the controls of the system menu, but only the controls of the "sound" system panel.

I suppose that my hardware is incorrecly detected and that some spurious drivers prohibit the loading of the correct drivers, but I am unable to guess what I should blacklist or force-load...

Unknown said...

I'm having trouble with respinned OS
while respinning, i get error "failed to cp permissions blah blah cantremeber for ~30 files.
this makes respinned os work, but not really; /usr/bin/sudo has wrong permissions, and nothing that needs it, wont work. (like installing)

Im trying to fix this by applying permission manually to livefilesystem.

this occurred when I used linux mint 18 64 in live when i respinned lubuntu or mint 18.

Unknown said...

Hey,thanks for all the hard work you are doing for this images to run on ICS.

I'm having trouble with booting my installation.
I used the iso's you published last year and that worked fine, but with the respined iso i cant make it boot.

I first has troubles with the part were the grub is installed but by making the installation conected to internet i managed to get through the installation.

But when i restart the ICS i just get the message "A bootable device has not been detected"

I must say also that I erased the restore partition but didn't erased the efi partition.

I dont know what to do, i have tried with the ubuntu 14.04 lts image but i have the same problem.

Does any one have an idea of how to tackle this problem?

Thanks in advance

Unknown said...

My ICS is STCK1A8LFCL

billP said...

T100HA here so not exactly the same, but perhaps helpful

- suspend. It would appear that this is fundamentally not supported by ASUS "tablets". Link below is just one example of a question answered by ASUS to this effect:https://www.tapatalk.com/topic/22425-asus-forums/50100-asus-t100ha-problem-turning-on-hibernate

- brightness can be controlled with a CL script, as can rotation of the screen, see https://launchpad.net/asust100-ubuntu/scripts/hardware-scripts (some modification required to indicate the correct screen(

- the rotated screen seems to be the base condition of the system and therefore the responsibility of the driver to correct. For example, even if you bring up Windows but do it in Safe Mode without the drivers, the screen is again rotated.

Linuxium said...

This functionality has now been added to a new release ... see my latest post for details.

Unknown said...

I noticed the STCK1A8LFC is going for $50 nowadays, which makes it attractive if I can install Void linux. I didn't find any mention of such in their forum. Any chance you could give one of their images a try?

Dr G K Gyan said...

Dear Sir, thanks for your endless efforts.

I've iBall Compbook Excelance PC with 32gb emmc and Intel Atom z3735f.

I want to install Linux by completely removing Windows.

Because I'm not a developer so What will be best for me? I have tried to download your Ubuntu14.o4.o3 but didn't get the permission. I need a readymade iso.

Please help.
Thanks again with best regards.

Specs at:
https://www.iball.co.in/product/excelance/11187

Unknown said...

Bump

Unknown said...

The 32 bit (void-live-i686-20170220-lxqt.iso) is booting out of the box and so do the 64 bit (void-live-x86_64-20170220-lxqt.iso) if You is coppy the 32 bit loader from the 64 bit ISO too 32 bit grub_uefi: /EFI/boot/. One problem its the EFI partition is FAT12 and to small for having both so You must deleting the 32 bit first and then copy the 64 bit. Was trying making one larger grub_uefi but it did not working, deleting it and making one FAT32 looks OK but the ISO wos corupted and kernel was halting after trying loading the system. FAT12 = floppy format and EFI normaly is FAT32 and many early UEFI-mainboards (As My Gigabytte) having problem with FAT12 UEFI patitions.
The kernel on the ISO is 4.9.11 and its updating it to 4.9.26 if making a update on the live-ISO.
Then installed and making a compleet system update the kernel is 4.10.16 so no sund, no WiFi, No SD-card ...
Its working in live but have not trying instaling it on My stick only on my main PC an its working there, so if You like givita trye and see wats working OK or not.
By the way then Viod have kernel 4.12+ and working WiFi im 100% installing it on My stick then the XLQT is WERRY FAST !!!

Have a trye and much luck on the way !!!

Linuxium said...

On what device (manufacturer, make and model number)?

Linuxium said...

It needs to be a desktop 64-bit ISO and I have amended the post to include this point.

Linuxium said...

What OS are you running the script on and do you have at least 10GB space free?

Linuxium said...

I recommend deleting all entries from NVRAM by using a LiveUSB and then recreating an Ubuntu one using 'efibootmgr'.

Linuxium said...

Either respin a 16.04 LTS or 17.04 desktop 64-bit ISO and upgrade the kernel to the latest version and install my RTL8723BS wifi package as part of the respin.

Linuxium said...

I've posted a new version in my latest post.

Unknown said...

Hello, I have a mini PC pipo x7s with Intel Atom Z3637F 1.33Ghz and wondering what command should I run to get Ubuntu MATE 17.04 with working wifi and sound. Can anyone advise please?

Linuxium said...

Download the latest isorespin script (see later posts) then download my v4.12-rc2 wifi driver package, download my UCM script and download Ubuntu MATE 17.04 desktop amd64 ISO. Run the isorespin script and it will tell you of any missing dependencies which you should then install together with 'zenity' if you want a GUI. Rerun the script and respin the Ubuntu ISO and select upgrade to a specific kernel and enter 'v4.12-rc2' and select local packages and select my v4.12-rc2 wifi driver package you downloaded and select files and add my UCM script. Then use 'dd' to write the respun ISO to a USB, boot your PiPo from it and run the UCM script under '/usr/local/bin' to get headphone audio.

AH said...

Hi,

Thank you for your posts. I'm trying to install Linux on an Intel Compute Stick STK1A32SC. I follow all your respin instructions, but I end up with the same result no matter what I do.

I plug the USB stick with the image (created with Rufus) into the Compute Stick and turn it on. It boots and presents me with the boot menu. I select `Install Ubuntu` but then it just goes to a blank screen and does nothing after that. I've tried the following using your `isorespin.sh` script posted above, and both the 16.04.2 LTS and 16.04.1 LTS ISOs:

- `./isorespin-v5.01.sh -u -i ubuntu-16.04.2-desktop-amd64.iso`
- `./isorespin-v5.01.sh -u -r -i ubuntu-16.04.1-desktop-amd64.iso`
- `./isorespin-v5.01.sh -u -i ubuntu-16.04.1-desktop-amd64.iso`
- `./isorespin-v5.01.sh -k v4.4-wily -r -i ubuntu-16.04.1-desktop-amd64.iso`

All of them end up with the same result. Could you give some insight into what I'm doing wrong please?

Thanks
Alasdair

Linuxium said...

I think you might be hitting the regression bug in v4.12-rc3. Try spinning used '-k v4.12-rc2' or wait for rc4 to come out on Sunday/Monday. Also I wouldn't bother with v4.4-wily as you won't get audio with that kernel and I'm not sure it works with CHT devices either.

Unknown said...

where can i grab a baytree win10 tablet iso from you
all blogs say supperseeded and none download :(
soz if im been thick but where is the latest iso's ?

many thank in advance H

Linuxium said...

You take an official ISO (that is supported) and use my 'isorespin.sh' script to respin the ISO with any options you want to add and create an ISO that will work on your device. The default will respin the ISO and add support for booting with a 32-bit bootloader which is typically what you need if the standard ISO doesn't boot. Upgrading the kernel etc can get you an ISO that has working audio, wifi and bluetooth etc.

7coil said...

I just found out the hard way that this did not work while the ISO was stored on an NTFS formatted drive, and that it works when on put on an EXT4 partition.

When on an NTFS partition, this error appears:

./isorespin.sh: '/foo/bar/ubuntu-17.04-desktop-amd64.iso' must be an Ubuntu (or Ubuntu flavour), Linux Mint, elementary, neon, Kali or a Debian 'Live' desktop ISO ... exiting.

Linuxium said...

Are the two files (i.e. the ISOs) exactly the same? Does an 'ls -l' of each and a 'cmp' of them show them to be identical as perhaps the file (or ISO) on the NTFS partition was corrupt is some way?

Unknown said...

Buddy, you are awesome. Many thanks to you. Almost there (4.12)

Cheers!

Unknown said...

Hi I am completely dumbo as far as linux user, i would like to install elementary OS, to my new laptop (Jumper ezbook 3 pro - intel apollo lake), I tried using isorespin.sh on old laptopt with xubuntu, I used

: sh isorespin.sh -i elementaryos.iso –apollo

also tried

isorespin.sh -i elementaryos.iso

Did not work at all, I think it did not customized iso at all, as I already said, I am complete noob, so I don't know how to make it work at all (thx for any advice)

Unknown said...

Would this also apply to Android images for x86/x64 like PhoenixOS? I've been playing around with my Voyo VBook A1, an Apollo Lake 2-in-1, that has a very limited BIOS (no legacy boot options) so with the standard UEFI bootloader I get just the black screen with solid white cursor. I installed rEFInd in Windows, which gives me the new selectable boot manager, but still get a black screen with white cursor when selecting my install of PhoenixOS. I was able to boot to a LiveUSB version after using rufus to reformat the USB as UEFI bootable and formatted the drive from the PhoenixOS iso image, it gave me a new "kernel" selectable boot option in rEFInd, but had no persistent data.

Thanks, I know this isn't directly applicable as it isn't Linux, but my troubleshooting keeps leading me back to this script as a possible fix.

Linuxium said...

Enter './isorespin.sh -i elementaryos.iso –apollo' to run my script. Also post a link (pasteinit) to the log file 'isorespin.log' if you encounter any errors.

Linuxium said...

I've not tried any Android images on Apollo devices yet but if I do I'll post my findings.

Unknown said...

Worked like a charm with EOS Loki. Thanks!

Unknown said...

Hi error: isorespin.ch line 3304 [: too many argument. What this? Sorry for bad english..

Linuxium said...

Don't double post the same question on different posts as this was answered on "Customizing Ubuntu ISOs: Documentation and examples of how to use 'isorespin.sh'".

Post a Comment

All comments now moderated so that spam can be deleted.