Friday, 24 November 2017

Running and installing Ubuntu and Ubuntu flavours on Apollo Lake devices


Some Intel Apollo Lake devices have an option in the BIOS that allows the selection of a bootable OS. Unfortunately on a lot of mini PCs this option is either not present or doesn't include 'Linux' which is required to boot official Ubuntu and Ubuntu flavoured ISOs. Previously I addressed this through adding an option to my 'isorespin.sh' script allowing the ISO to be respun with the rEFInd boot manager to enabled booting.

Whilst investigating why GRUB fails to boot I've developed an alternative approach which I have incorporated into a new release of my 'isorespin.sh' script. Now when respinning with the '--apollo' option the respun ISO replaces the GRUB EFI files with a single EFI file that corresponds to the entry in NVRAM created by the GRUB installation. This EFI file boots the device directly to Linux similar to how Windows boots.


It uses a script I've written that hooks into the 'initramfs' tools to create a bootable EFI file every time 'update-initramfs' is executed. This means if a new kernel is installed the EFI file is automatically updated to boot the new kernel.

To respin an ISO suitable for Intel Apollo Lake devices first download my latest version of 'isorespin.sh' and then respin using the '--apollo' option.

If you have multiple kernels installed it is still possible to boot from a specific kernel simply by rebuilding the 'initramfs' file for that kernel. So for example if you are currently running the 4.10.0-40-generic kernel and want to revert to the 4.10.0-19-generic then just run 'update-initramfs -u -k 4.10.0-19-generic' and reboot.


One issue that might be encountered is where the EFI partition isn't large enough to store the bootable EFI file. Some Windows installations only create a 60MB partition which after installing the Windows EFI files leaves only around 30MB. With the later Linux kernel releases the size and number of modules have increased and if the 'linux-image-extra' package is installed then the corresponding 'initrd.img' is now quite large (over 200MB). Recent kernels only have the minimum set of kernel modules in the 'linux-image' package with the remaining ones in the 'linux-image-extra' package. Whilst in the past installing just the 'linux-image' package was sufficient when upgrading to a new kernel it is now recommended to install both 'linux-image' and 'linux-image-extra' packages. If there is insufficient space the resultant installation will not boot so the solution is to increase the size of the EFI partition by following the instructions posted here.

As a result I've written an additional script that will shrink the size of '/lib/modules' by removing all unused modules from the combination of the 'linux-image' and 'linux-image-extra' packages for a specified kernel. Simply download the script 'update-modules' and pass the kernel version you want to shrink as the parameter.

For example if you want to shrink the overall size of '/lib/modules/4.10.0-19-generic' then run the command 'update-modules 4.10.0-19-generic'. The script will also automatically regenerates the 'initramfs' file and create the bootable EFI file. So if you are running with a small EFI partition and installing a new kernel fails to create the bootable EFI file then running 'update-modules' will fix this. Note that the script requires an internet connection to temporarily download and examine the modules in the 'linux-image-extra' package.


If having removed unused modules a new peripheral requires a missing driver (i.e. module) simply reinstall the 'linux-image-extra' package. For example connecting a USB Ethernet adaptor for the first time when running a previously reduced 4.10.0-19 kernel does not get recognised. Reinstalling all the drivers/modules using the command 'apt install --reinstall linux-image-extra-4.10.0-19-generic' and the adaptor can now connect.


The remaining unused modules can then be removed by re-running the 'update-modules' script if space is a consideration.


It is also possible to respin a bootable ISO for Intel Apollo Lake devices by using the '-b Linuxium' option which is actually what the '--apollo' option now does. Adding the 'Linuxium' bootscript (as implied by the '--apollo' option) does not actually restrict the ISO to boot on a specific processor however it does depend on the boot loader used by the device. An ISO respun with the  '-b Linuxium' option will work on any Intel Atom and Apollo Lake devices if they are using a 64-bit boot loader which is the case for Apollo Lake devices. Also note that persistence cannot be added to respinning an ISO in conjunction with the '--apollo' or '-b Linuxium' option. This is because persistence adds the rEFInd boot manager which incidentally also boots on both Intel Atom and Apollo Lake devices using a 64-bit boot loader.

As an example I've respun the Ubuntu 17.04 ISO using the '--apollo' option and included the 'update-modules' script which is available under '/usr/local/bin' and created an ISO suitable for booting on Intel Apollo-based mini PCs.

The ISO can be downloaded from:
  • Apollo (-i ubuntu-17.04-desktop-amd64.iso --apollo -f update-modules)
(ISO removed due to Lenovo BIOS issues)
Anyone wanting to spin their own can download an ISO and respin using my 'isorespin.sh' script with the above options or after consulting my documentation.

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


119 comments:

Unknown said...

Hi, I tried to respin the iso, with new isorespin.sh but got this instead
https://imgur.com/MwoLtrp
any suggestions?

Linuxium said...

Thanks for reporting this issue. I've fixed this by correcting the support for Ubuntu flavours and released version 8.0.1 of my script 'isorespin.sh'. The download links are the same so all you need to do is download the script again and respinning using the same command.

Unknown said...

Thank you, you are amazing, it worked, I did respin iso ok, but when I boot elementary os to my laptop (jumper ez book 3 pro) and I want to install it, it don't let me, I am stuck in try version of elementary, I will probably give up soon, but still trying to find solution for this

Linuxium said...

Can you provide more details about the error you encounter during installation? Is it an 'elementary OS' issue or specifically related to the respun ISO?

Unknown said...

I would like to give you more info, but there seems no errors, just installation will not start automatically, also think that is related to respun of elementary or the type of laptop, I tried that usb stick (same respuned iso) on my old laptop Dell Inspiron, and it worked completely fine, dunno how to get you more info, if there is some script I can run in terminal or something like that I am open to do it, but as far as linu goes I am pretty beginner guy so far

Linuxium said...

What is the download URL for the elementary ISO and what options did you use when respinning it and I'll have a look.

Unknown said...

downloaded from https://elementary.io (https://fra1.dl.elementary.io/download/MTUxMTcwNTk0Mg==/elementaryos-0.4.1-stable.20170814.iso)
and i used:
./isorespin -i < elementary.iso > -u --apollo -f update-modules

Linuxium said...

Okay I'll run the same command and also try an installation.

Unknown said...

Also I tried to respun ubuntu gnome, respuning went fine, but on booting phase from usb stick I got this
https://imgur.com/jKfHFHW
maybe it will give you more info

Linuxium said...

Regarding the installation of elementary os you are probably running out of space on your EFI partition. Run the following commands from the terminal on the elementary os LiveUSB before starting the installation:

sudo mount $(blkid | grep mmcblk | grep vfat | sed 's/:.*//') /mnt
sudo rm -f /mnt/EFI/ubuntu/*
sudo umount /mnt

as this will clear out old EFI files ready for the installation.

Regarding the respin Ubuntu GNOME I ran 'isorespin.sh -i ubuntu-gnome-16.04.3-desktop-amd64.iso --apollo -k v4.14' which worked fine (note: using '-u' option will now install the 'v4.15-rc1' kernel so I used the '-k' option to hopefully replicate what you did). I suggest you first try rebooting using your USB to see if the problem still exists otherwise try respinning and recreating your USB again as it should work.

Unknown said...

I keep replying to you on the 'customing' section, but the replies never appear. So I'm trying again here.

I've done this, as you advised, but the resultant USB won't boot. Neither will another stick which worked previously. Is this an EFI space thing do you think?

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

billP said...

This is off-topic to apollo, but I thought I'd ask here anyway. We are probably about two months from release of V4.15, as the rc1 came out yesterday. I was wondering what the means for respinning. Does anyone have any insight as to what will still be required as extra packages, what has been integrated into the kernel, etc?

billP said...

To be more specific, if I was to respin a v4.15-rc1 image, should I change any linuxium packages that are typically included in the respin?

SRyoung said...

Thank you for all your work! I have a obook 11 plus and the bluetooth wifi don't work even with the nvram file also the acpi volume buttons don't work do you have any insight to this? also with the silead touch driver and the es8316 also i cannot seem to get the bosch sensor to work
paste bin http://paste.ubuntu.com/26067113/

SRyoung said...

Also can you add bodhi to the supported distro

Linuxium said...

You need to click on 'Load more...' at the bottom of the page (several times on some pages) to display all the comments.

I've just uploaded a revised version of my script that should fix you boot issue. You will need to download my 'isorespin.sh' script again (see top of page for download link) and respin your ISO.

Linuxium said...

The Canonical pre-compiled kernel packages (header and image) are not ready for respinning yet as there were several config changes and they haven't been reflected in the built images (the config is based on v4.14).

Linuxium said...

Can you try respinning again as I've updated the UCM files to include those for the ES8316 codec and this hopefully will fix your audio.

Most likely the bluetooth device ID will need adding to the kernel before it works so you can either compile your own or hope/wait for the relevant patch to come along.

As the sensor is device specific have you asked on forums dedicated to your device?

Linuxium said...

The Bodhi ISO is structured differently meaning my script requires changes. Only if there was sufficient interest would I add support for Bodhi.

billP said...

Thanks for the heads-up. I'll stick with 4.14 for now.

Unknown said...

Thanks, Linuxium. I always click on 'Load More'. Doesn't help.
I'll try downloading your new script.
Thanks again.

Unknown said...

Still will not boot.
BIOS/EFI screen appears; select boot from usb; boots existing installed system. Same as before.

Linuxium said...

Can you boot and post the 'dmesg' using pasteinit or similar?

Unknown said...

Thanks. It's at https://pastebin.com/zCqHJ7xn

Linuxium said...

Can you post the 'dmesg' after booting from the respun ISO?

Unknown said...

As I said, it won't boot. The existing system that that dmesg is from was installed from a respun ISO. I cannot boot the new one. The new one was generated from your latest version . . .

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

Linuxium said...

When you said "select boot from usb; boots existing installed system" can you provide the 'dmesg' from that type of boot so I can compare with the previous 'dmesg'?

Unknown said...

That IS the dmesg. Maybe I wasn't clear . . .

I turned the machine on and pressed F2 to enter the BIOS.
Selected the Boot Device as the USB stick (which was in place).
It booted from the SSD.

That's what I've done with every other respun ISO I've used, but they've always booted before.

You're very patient. Thanks again.

Unknown said...

Hello. I use isorespin with --apoll and kde neon iso. it was established normally. But during the load system system not start, only (initramfs).

Linuxium said...

Fixed. neon created it's own NVRAM entry. You will have to download my script 'isorespin.sh' again and respin your ISO.

bnz said...

Is there any way to easily adapt the script for Ubuntu Server or Debian? I want to replace my Raspberry PI3 with a Beelink Mini PC with an SSD and I don't want all the UI stuff of Ubuntu Desktop. Unfortunately, the script doesn't work on the Ubuntu Server/Debian ISOs it seems.

Unknown said...

did not help. again (initramfs).

Martin said...

Hello Mr. Linuxium. Thanks for your great work!

I have trouble with isorespin v. 8.0.2 using "./isorespin.sh --apollo --iso lubuntu-17.10-desktop-amd64.iso --kernel v4.14" for a Beelink AP34. Respinning works well and I can burn it to a USB flash drive. I can also boot from the USB flash drive and the system seems to work well.

However, if I try to install the Ubuntu, it does not boot. I have also tried with rEFInd, which did not work. If I install Ubuntu using the installer, does it also install your custom bootloader? Or do I need to take a different approach?

btw. why don't you support Ubuntu Server and Debian ISOs? At least Ubuntu Server would make sense for me and should not be an effort!

Thanks!

Linuxium said...

When you select the USB to boot do you see a GRUB menu next? If not what specific options do you get for 'Boot Device' after you have entered the BIOS by pressing F2?

Linuxium said...

My 'isorespin.sh' script is designed specifically around desktop ISOs. You can always remove the desktop once installed if you want to create a server environment.

Linuxium said...

If you can provide more information like device details and a 'dmesg' I can take a look at it as currently it works on my test devices.

Linuxium said...

You probably don't have enough space on your UEFI partition. Try mounting it from a LiveUSB and cleaning out all the unwanted bootloader/bootmanager files so that you have around 52GB free.

The build for server ISOs is different and the demand for them isn't there. Debian ISOs need a Debian kernel not an Ubuntu one so again more work when there isn't the demand.

Blas said...

Hi team,
I'm a newbie in apollo devices. (in that case ACEPC AK1)
Let me to explain easily what i do

1) I can download your image from https://goo.gl/CH2YKr , installed in a USB (by "dd" directly in other linux), and booted it selecting the USB in the EFI "bios"
2) i can see the installer and install linux into the SSD new device
3) i CAN'T BOOT linux, in any way. Always starts in Windows

What I did?

FIRST ATTEMPT: adding manually "ubuntu" to the windows boot loader, with no success, windows boot loader ignores it.

SECOND ATTEMPT: Installing refind . Let it to do the magic and re-boot. Now, i can see the new boot manager with TWO options, "Windows" and "ubuntu". Windows boots ok, but ubuntu get in black screen.

THIRD ATTEMPT: Booting the live rescue ubuntu and using the boot-repair tool (https://help.ubuntu.com/community/Boot-Repair). This tool says that "boot/efi is not mounted". That's ok , i mounted the internal EFI from /dev/mmcblk1p1 to /boot/efi , and next boot-repair do the magic.

boot-efi says "ok", and tell me to reboot again. And next, i can see REFIND with a new device "linux". Booting this option says

"Starting grubx64.efi
Using load options ''"

And it gets in this screen all time

I don't know how many times i ran refind and boot-repair. I can see many entries in the boot loader, but with no success.

Any idea?

Blas

Blas said...

i forgot to say that the installed system was correct, i can do chroot to the root partition with success.

This only is something in the boot loader and my no knowledge of uefi system :(

Linuxium said...

Using a LiveUSB and mounting '/dev/mmcblk1p1' as '/boot/efi' how much free space do you have left on the partition? If you delete everything under '/boot/efi/EFI' except 'boot' and 'Microsoft' (i.e. delete the directory 'ubuntu' and its contents) how much space is then available?

Blas said...

Hi linuxium!!
If i mount /dev-mmcblk1p1 as is , not there are used 68 mb, free 29 mb
The disk has 100 mb

I'm going to delete all the contents except boot and microsoft..

Blas said...

I've just deleted all contents below /boot/efi/EFI , booted from a liveUSB, and leaving only "Boot" and "Microsoft" on the directory.
Now the space is:

FIlesystem size used Avail Use% Mounted on
/dev/mmcblk1p1 96M 44M 53M 45% /mnt

Despite the "mnt" mountpoint..you know

Linuxium said...

With 53MB free you should just have enough free space. If you reinstall Ubuntu from the LiveUSB it should now work.

Blas said...

I tried several times..with no success.
I'm now going to test with MINT using 'isorespin'.
Stick around...

Blas said...

Ei guys,
it works with isorespin and mint. No extra configuration, only following the default procedure .
I use as a referer this guide, https://gist.github.com/pjobson/e0b0c99f5d9affb28c1a2f33503c27c7 .. but i really didn't need it.

But, it works at the first attempt.

Why do I using your pre-made iso , doesn't work? Hmmm.. do you have a idea?

Sorry, I'm in CET timezone, see you tomorrow early ;-)

Linuxium said...

I'd prefer if you refer to my guide 'http://linuxiumcomau.blogspot.com.au/2017/06/customizing-ubuntu-isos-documentation.html' rather than one I'm not responsible for.

The above ISO was initially created with an earlier version of the script and I've just replaced it with an ISO from the latest version. So the 'pre-made' ISO should also work.

Blas said...

Yes, i know. i'm going to repeat it following exactly every step you write instead of using the live iso. Keep in touch

Blas said...

hmmm, hey linuxium.
Some extrange things around. After a few tests, this is a surprise:

1) Using --apollo -u (gets the 4.15.rc3), it works perfectly. But "one small thing". This appears to be a buggy kernel, because the installer hangs in live session in different moments...and with i achieve the installation, and the system comes online booting perfect.. it gets hangs randomly. Completely freeze!.

isorespin system ran in USB, and the live in SSD..so the unique thing that have in common is..kernel? I don't know , but it happens

2) Using --apollo with no parameters works perfect, but it doesn't install its entry in UEFI. I don't get the option to boot (it looks the same as UBUNTU above). The same problem. The only difference here is that the file created in /boot/efi/EFI/linuxmint is around 50mb, so they put the partition at 99%

Rescue system works perfect ..but i'm not able to boot with refind neither boot rescue.

So, using a kernel get the system online and getting other doesn't
This is extrange, but possible

Now (i spend so many hours doing here), i'm trying to download specific kernel version in order to check if the kernel affects on the UEFI configuration.

Sorry for this, i'm going absolutely crazu

Blas said...

Hmmm
More problems.
I can't do respin with latest kernel because the EFI partition (/dev/mmcblk1p1) gone full (100%) and installer cannot continue.
The file inside /boot/efi/EFI/linuxmint/ is around 56 Mb and gets the partition full.

There are no other useless information and files inside /boot/efi , and cannot make it greater.

How can i solve it?

Blas said...


Got it!!!
THe solution was in front of me. So i looked in the wrong direction.
But, there are a problem with isorespin if it create .efi files more than the size available in "efi" partition.

First problem: Check if file created below /boot/efi/EFI/LINUXVERSION/ is size enough to fit into the partition

Next, i saw what in the efi partition were two directories. A directory called "linuxmint" and another called "ubuntu". WTF ? I cleaned every fresh install and, anyway, this file comes again.

But, the problem with this is that the efi file (\EFI\UBUNTU\shimx64.efi" is small to boot, or damaged, or i don't know.

Second problem: Remove the innapropiate or unnecesary /boot/efi/EFI/ directories.

So, after many "isorespin.sh" attempts none of the recent kernels (4.13 to the latest 4.15.rc3) makes a "shimx64.efi" file enough to fit into the 56 free Megabytes that the first EFI partition lets. So, the only kernel that did it is 4.10 (i will test again in the next hours..). This kernel let the "efi partition" up to 99%, but usable and with no errors in installation.

And now, if you install it .. all looks good, but the booting still the same. Black screen and

""Starting grubx64.efi
Using load options ''"
"
BUT... here is the trick:
(next post)

Blas said...

There are the steps:

1) Check your efibootmgr -v
acepc efi # efibootmgr -v
BootCurrent: 0009
Timeout: 3 seconds
BootOrder: 0009,0003,000A,000B,0002,0000
Boot0000* rEFInd Boot Manager VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0002 UEFI: Built-in EFI Shell VenMedia(5023b95c-db26-429b-a648-bd47664c8012)..BO
Boot0003* Windows Boot Manager HD(1,GPT,751e6cbf-2b71-41a9-a6d5-2e8afb3f7816,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)..BO
Boot0009* Linux MINT3 HD(1,GPT,751e6cbf-2b71-41a9-a6d5-2e8afb3f7816,0x800,0x32000)/File(\EFI\UBUNTU\SHIMX64.EFI)
Boot000B* ubuntu HD(1,GPT,751e6cbf-2b71-41a9-a6d5-2e8afb3f7816,0x800,0x32000)/File(\EFI\UBUNTU\SHIMX64.EFI)..BO

WTF?? Check the "EFI" path to SHIMX64.EFI file. It's wrong!!. I ran "boot rescue" and "refind" several times, and all of them makes a mistake with the path? I don't know why, but this is not the correct path. This file exists, but if i try to boot "ubuntu" or "linux mint3"... i got the same black screen.

But, if you change it in filepath (cd /boot/efi/EFI; mv linuxmint/shimx64 ubuntu/shimx64), it works.
Or even better , create a new entry by hand:

$sudo efibootmgr -c -d /dev/mmcblk1 -p 1 -L "Linux MINT" -l "\EFI\LINUXMINT\SHIMX64.EFI"

And... voila! The new entry is on the Loader, and boot loader gets the file, and starts.

So, to summarize. All make sense now :-)

1) Check if "isorespin" makes a non-big grub installation EFI file. You can check it by mounting the ISO file and checking the /boot/grub/efi.img and check if it fit into your EFI partition (in my case ACEPC AK1 , 100 Mb with around 58 Mb free when it's clean

2) If partition is enought, do the install, and CHECK if the "linux/ubuntu/mint/etc..) entry has the correct size

You can check it if the installation shows no error, and manually by doing "ls" to the EFI partition. In my case

$ mkdir /tmp/efi; sudo mount /dev/mmcblk1p1 /tmp/efi ;
$ ls -la /tmp/efi/shimx64.efi
$ df -kh |egrep "efi"

With these parameters you should check if "shimx64.efi" has a good size (around 50-60 mb) and the size of the partition is less than 100%

3) If the file is correct and the partition isn't full, check if the path to the "shimx64.efi" file is correct doing:

$ efibootmgr -v

If you see something like this:

Boot000A* ubuntu HD(1,GPT,37a202a0-3a4f-49ee-84a1-852a63e64592,0x800,0x8e800)/File(\EFI\Ubuntu\shimx64.efi)..BO

In my case, this "shimx64.efi" file is less than 1.2 Mb.

In that case, add a new entry to the good efi file. In my case:

$sudo efibootmgr -c -d /dev/mmcblk1 -p 1 -L "Linux MINT" -l "\EFI\LINUXMINT\SHIMX64.EFI"

And that its. It's worked. Tested twice .

Sorry for the long explanation, but i think is better if someone like me landed here by googling for a solution. I could make a script to check all of them, but first i need to test more.

Regards and thank you all from Madrid



Linuxium said...

When I fixed the script for respinning 'neon' ISOs it looks like I introduced an error in respinning 'Mint' ISOs. If you are interested in helping to test a new version of 'isorespin.sh' you can access it here 'https://goo.gl/3MtdhX'. Once I've confirmed it works with Ubuntu, Mint, neon and others I'll upload it for everyone to use as a new release.

Unknown said...

No GRUB menu.
Boot option #1 [ubuntu]
Boot option #2 [UEFI generic flash]

Linuxium said...

As option #1 will boot your installed Ubuntu does option #2 boot your USB?

Unknown said...

No. That's exactly the problem. It boots the installed Ubuntu no matter which one I pick and save. I've tried many times.
If only I could get the sound working, this would be an ideal netbook. (Mostly for Skype & YouTube.)

Unknown said...

Just checking -- is VERSION="8.0.2" the latest one?

Blas said...

Ei linuxium!
It looks well, but i'm unable to install due to the space restrictions. Using "isorespin.sh -i linuxmint-18.13-mate-64bit.iso --apollo -k v4.14.6" works well and generate a iso, but when i tried to install the efi is around 60 Mb that cannot fit into the space in EFI partition (around 54 Mb).

I'm trying with 4.10 again, that its look like the only kernel that the EFI image generated is below 55 Mb. (probably 4.11 and 4.12, but 4.13 in advance exceeds 56 mb)

nooblinux said...

I have Ezbook3 pro V4, and had same issue and i wanted to share a quick hint on how to solve it.
After i used isorespin with --apollo tag on linux mint 18.3 i was able to boot from live usb, and install linux on on m.2 ssd 128Gb.
But then i tried to boot from that ssd, it freeze on startup.
The i booted from windows10, and used guide on how to install rEFInd from under Windows from its official website.
Now i just chose rEFInd as 1-st option in BIOS boot order. It successfully launches from /EFI partion on eMMC 64gb, and after that, i can chose to boot my linux Mint from SSD. And it works. Cheers!

Linuxium said...

@Unknown: That isn't the solution to having a EFI partition that is too small but an alternative to using my Linuxium bootscript. If you want to use the rEFInd boot manager then you should respin using the '-b rEFInd' option instead of the '--apollo' option (which mirrors the manual invocations of '-b Linuxium' - see 'http://linuxiumcomau.blogspot.com.au/2017/06/customizing-ubuntu-isos-documentation.html').

Linuxium said...

No becuase '8.0.4' is the latest version.

Linuxium said...

I'm assuming your device isn't one affected by the BIOS issue (see http://linuxiumcomau.blogspot.com.au/2017/12/lenovo-bios-issues.html). For now I'd recommend to make sure you are running no later than an Ubuntu 4.10 kernel on your running Ubuntu (so as to avoid this issue) and then boot to that 'safe' kernel and clean out all your NVRAM entries for Ubuntu (see 'NVRAM sync issues' in http://linuxiumcomau.blogspot.com.au/2017/06/customizing-ubuntu-isos-documentation.html). I'd then try booting from your respun ISO again and if it works perform a clean installation.

Unknown said...

Thanks, Linuxium. Those links don't work for me (just churn forever), but I'll get the 8.0.4 version and try your other advice. (It's an ASUS netbook, not Lenovo, so I guess that bit's not a problem.)

Linuxium said...

Which links don't work?

Unknown said...

http://linuxiumcomau.blogspot.com.au/2017/06/customizing-ubuntu-isos-documentation.html

and

http://linuxiumcomau.blogspot.com.au/2017/12/lenovo-bios-issues.html

Linuxium said...

They both work for me and they both look okay so I'm not sure why they don't work for you.

Unknown said...

They just churn and Chrome says "Waiting for linuxiumcomau.blogspot.com.au" alternating with the same '.co.uk' for some reason.

Linuxium said...

But you can see the comments on this page. What is the difference between the URLs then?

Unknown said...

This one is "https://linuxiumcomau.blogspot.com/2017/11/running-and-installing-ubuntu-and.html?showComment=1514032486434#c901670057369741355"
That's all I know.

Unknown said...

Oho -- they work when I change the 'http' to 'hpps'.

Unknown said...

When you say "make sure you are running no later than an Ubuntu 4.10 kernel", do you mean a version not greater than 4.10?
The running level is 4.14.

Linuxium said...

@Blas: I now have a solution for when the EFI partition is too small ... see 'http://linuxiumcomau.blogspot.com/2017/12/resize-efi-partition.html'.

Linuxium said...

I now have a solution for increasing the size of the EFI partition ... see 'http://linuxiumcomau.blogspot.com/2017/12/resize-efi-partition.html'.

Linuxium said...

I'm hesitant to recommend using the 4.14 kernel unless you use the 'fixed' kernel of Ubuntu-4.13.0-21.24 or greater due to the known BIOS issue. It may not affect you directly but as principle I don't want to endorse using a known affected kernel.

Unknown said...

That's clear. Thank you.

ludovicc said...

Hello,

The isorespin script (version 8.0.4) fails badly for me. I'm running it from Debian 9. It looks like chroot'd instructions escaped and left the host system in a terrible state. I have to hard reboot after that...

./isorespin.sh -i ubuntu-17.10-desktop-amd64.iso --apollo -u
Parallel unsquashfs: Using 8 processors
141725 inodes (155112 blocks) to write

[=================================================================================================-] 155112/155112 100%

created 112609 files
created 16838 directories
created 29083 symlinks
created 7 devices
created 0 fifos
umount: /home/ludo/tmp/respin/isorespin/iso-chroot/dev: target is busy
(In some cases useful info about processes that
use the device is found by lsof(8) or fuser(1).)
rm: cannot remove 'iso-chroot/dev/hugepages': Device or resource busy
rm: cannot remove 'iso-chroot/dev/mqueue': Device or resource busy
rm: cannot remove 'iso-chroot/dev/shm': Device or resource busy
rm: cannot remove 'iso-chroot/dev/pts': Device or resource busy
./isorespin.sh: line 2335: /dev/null: Permission denied
./isorespin.sh: line 2337: /dev/null: Permission denied
./isorespin.sh: line 88: /dev/null: Permission denied
./isorespin.sh: line 92: /dev/null: Permission denied
./isorespin.sh: line 100: /dev/null: Permission denied
./isorespin.sh: line 103: /dev/null: Permission denied
rm: cannot remove '/home/ludo/tmp/respin/isorespin/iso-chroot/dev/hugepages': Device or resource busy
rm: cannot remove '/home/ludo/tmp/respin/isorespin/iso-chroot/dev/mqueue': Device or resource busy
rm: cannot remove '/home/ludo/tmp/respin/isorespin/iso-chroot/dev/shm': Device or resource busy
rm: cannot remove '/home/ludo/tmp/respin/isorespin/iso-chroot/dev/pts': Device or resource busy
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied

ls
isorespin/ isorespin.log isorespin.sh isorespin.sh.old ubuntu-17.10-desktop-amd64.iso
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied

Linuxium said...

My guess is another process somehow interfered. Try only running the respin without doing anything else and see if then completes.

Unknown said...

I tried this:
isorespin.sh -i /home/weyland/1-downloads/isorespin-wy/linuxmint-18.2-mate-64bit.iso -k v4.10.17 --atom

Didn't work. But this did:
isorespin.sh -i /home/weyland/1-downloads/isorespin-wy/ubuntu-mate-17.04-desktop-amd64.iso -k v4.10.17 --atom

And the wifi worked with no further tweaks. But the sound is completely dead. Doesn't even recognise the hardware this time.

Any ideas?

Unknown said...

In 'Sound Preferences / Output' it says 'Dummy output'.
In 'Sound Preferences / Hardware' the device configuration box is empty.
Tomorrow I'll Google for answers. Too tired now.

Unknown said...

Didn't find anything that worked. Ubuntu seems to have a longstanding big problem with sound.
I've had no problems on the tower with Mint 18.2 Mate so far, but have had intermittently with previous versions and with vanilla Ubuntu distros as well.

Linuxium said...

You have used a kernel that is too old (i.e. less than v4.11). Try '-k v4.14.12 --atom'.

Unknown said...

Thanks. I'll do that.
But you previously said "For now I'd recommend to make sure you are running no later than an Ubuntu 4.10 kernel", so I'm a bit confused.

Linuxium said...

I forgot you needed a kernel with HDMI LPE Audio as I was too busy trying to make sure you didn't 'brick' your BIOS by using a later kernel.

What with the BIOS issue, Meltdown/Spectre vulnerabilities, mini PC depending on specific kernels for patches for different functionality and not necessarily being able to solve everything just by using the latest kernel has made it all a rather complex and confusing!

Anyway try '-k v4.14.12 --atom' as this should work for you.

Unknown said...

Done that. This one won't boot. Just boots the existing system.

isorespin.sh -i /home/weyland/1-downloads/isorespin-wy/ubuntu-mate-17.04-desktop-amd64.iso -k v4.14.12 --atom

Unknown said...

Hello,
I've tried to respin ubuntu 17 but at the end of the process I get always the next message:

/usr/bin/objcopy: '/usr/lib/systemd/boot/efi/linuxx64.efi.stub': No such file
/usr/bin/objcopy: --change-section-vma .initrd=0x0000000003000000 never used
/usr/bin/objcopy: --change-section-vma .linux=0x0000000000040000 never used
/usr/bin/objcopy: --change-section-vma .cmdline=0x0000000000030000 never used
/usr/bin/objcopy: --change-section-vma .osrel=0x0000000000020000 never used
du: cannot access 'iso-directory-structure/EFI/BOOT/bootx64.efi': No such file or directory
./isorespin.sh: line 3589: +(*1/100): syntax error: operand expected (error token is "*1/100)")

I have in the same folder extracted refind, do you know what I'm missing?

Unknown said...

trying with --apollo parameter

Linuxium said...

So a USB written with

isorespin.sh -i /home/weyland/1-downloads/isorespin-wy/linuxmint-18.2-mate-64bit.iso -k v4.10.17 --atom

will boot but a USB written with

isorespin.sh -i /home/weyland/1-downloads/isorespin-wy/ubuntu-mate-17.04-desktop-amd64.iso -k v4.14.12 --atom

won't boot?

Will a USB written with

isorespin.sh -i /home/weyland/1-downloads/isorespin-wy/linuxmint-18.2-mate-64bit.iso -k v4.14.12 --atom

work and if not can you post the 'isorespin.log' files for each respin?

Linuxium said...

Are you running the script on an earlier release of your OS without 'systemd'? If so what OS and version are you using?

Unknown said...

I'm running ubuntu 16.04, inside my systemd I don't have any boot directory, by the way I've get this file from a friend and I could generate my respined iso. I don't know why I don't have this file... but it's not a script issue

Linuxium said...

The file '/usr/lib/systemd/boot/efi/linuxx64.efi.stub' comes from the 'systemd' package (see 'dpkg -S systemd | grep linuxx64.efi.stub'). If it is missing I'd personally look at performing a fresh installation of 16.04.4 when it comes out mid Feb (see 'https://wiki.ubuntu.com/XenialXerus/ReleaseSchedule') and hope I can limp along till then!

Unknown said...

I will do that, Linuxium, but I'm a bit busy so it might take a few days.

Unknown said...

Is it possible to respin Deepin distro for apollo lake?

Linuxium said...

I'm not planning on incorporating Deepin as it is more a direct Debian derivative rather than Ubuntu one.

金子みゝず said...

Hello, I've tried to install Ubuntu17.10.1 into my Yepo 737a(https://www.gearbest.com/laptops/pp_649606.html) but I can't boot it.

I tried it again and again but , a message "Not init found. Try passing init=bootarg" always appeared on the display.

What I have done:
1.I installed rEFInd manually on target PC's windows 10.(It works very well)

2.I respun iso with --apolo option in Xubuntu16.04 on vertual box and it seemed to finish without any errors.
The log says
"Script './isorespin.sh' called with '-i xubuntu-17.10.1-desktop-amd64.iso --apollo' ...
Work directory 'isorespin' used ...
ISO '/home/kanamura/respin/xubuntu-17.10.1-desktop-amd64.iso' respun ...
Bootscript 'Linuxium' added ...
Package 'binutils' added ...
File '/home/kanamura/respin/isorespin/update-modules' added ...
Respun ISO created as 'linuxium-apollo-xubuntu-17.10.1-desktop-amd64.iso'."

3.I moved respun iso windows10 and burned bootable USB with rufus.

4.I inserted the usb to target PC and restarted it.

5.I chose bootable USB in rEFInd menu.

What should I do to install ubuntu to my PC?

Linuxium said...

When you respun your ISO with '--apollo' did you see 'Intel Apollo Lake devices not booting after installation' in my documentation ('https://linuxiumcomau.blogspot.com.au/2017/06/customizing-ubuntu-isos-documentation.html')?

金子みゝず said...

I read it. However, I cannot boot even from an USB stick.
It always stops in this screen (http://imepic.jp/20180303/012540) whenever I try to boot it.

Jed said...

I am now use Apollo Lake ,with Xubatu, how can make it work with I2S ?
Should I install with platform driver or modify by kernel ?

Linuxium said...

Try booting the USB from the BIOS boot options and not using rEFInd as the '--apollo' option does not use/need rEFInd.

Linuxium said...

I don't understand from your question what you are trying to do. Can you explain in more detail what you want my 'isorespin.sh' script to do differently?

金子みゝず said...

I could boot it from BIOS and install it finally!!
I really appreciate your support.

Linuxium said...

Great. Good to know.

Robert said...

How about installing non-ubuntu distros in apollo devices? does anyone tried? I'm planning to install linux on a "Minix Neo N42C-4" and it doesn't need to be Ubuntu or any debian-based distro. Could be easier for example to install CentOS/Fedora? or my best option is to use this guide and install Ubuntu? (Great job and guide by the way!).

Linuxium said...

You might have issues getting some distros to boot on the 'Minix Neo N42C-4' and extra steps may be necessary. My script simplifies this for Ubuntu-based distros however it is not meant to then restrict you to only Ubuntu but rather assist you should you want to use Ubuntu. For other distros it is probably best to look on their support sites as well as the Minix site for specific distro support.

Robert said...

Thank you! I went with Ubuntu using your 16.04 iso. I succesfully installed the OS in the eMMC without any kind of trouble, after that I updated the system and almost everything is working perfectly, except one thing: I plan to disable the desktop and use it 24/7 with web/ssh/samba etc. I already ran: “systemctl disable lightdm” and then I rebooted but it appears that something is triggering a poweroff to the machine after aproximately 3 hours, even with ssh open connections and some commands executing in background. I dont found any relevant entries at that time in /var/log/kern.log or syslog. Do you have any idea of what could be happening? Should I try to install a server iso instead of a desktop one?

Linuxium said...

I use a 'Minix Neo N42C-4' as one of my test machines and it runs Ubuntu 24/7. I don't get any unexplained 'poweroffs' (I've just checked and the current uptime is 5 days). Some time ago I wrote the following guide 'http://www.linuxium.com.au/how-tos/creatinganubuntuserveronaz3735fdevice' which may be of interest to you.

lead4good said...

There is bug in your update-initramfs code. If there are older kernels which are subject to be removed and the 'apt-get autoremove' command is run, an efi file will be generated with the kernel which is getting removed. This resulted for me in an unbootable system crashing to initramfs. I had to mount and chroot the filesystem via usb rescues system and run the update-initramfs command with the current installed kernel to fix this.

Linuxium said...

There appears to be a long-standing typo in the script which is the likely cause. I'll fix and reissue asap.

Linuxium said...

I've fixed the typo and reissued the script so this should not happen in future.

Robert said...

I encountered with that problem too. After doing the "apt-get autoremove" my system became unbootable (I got some "mdadm" errors when I tried to boot and then it entered on busybox). I tried the liveusb-chroot fix but I couldn't make it work. Anyway my apollo lake device (minix n42c-4) was defective (random shutdowns, as I said on a previus comment) so I sended it back and got a new one.
Now I'm planning to install Ubuntu 18.04 LTS in the new one when it is available for download, ¿will the isorespin script still work on that version? (Maybe it's impossible to know, but, theoretically)

Linuxium said...

Yes. And even if the current version doesn't I'll fix it so it does!

JohnyD said...

+1 for Bodhi Linux support in ISOrespin

Robert said...

Having again this "update-initramfs" problem after updating the "linux-firmware" package, but this time I didn't run the "apt-get autoremove", and luckly my system is booting (with the oldest kernel I have, this is "4.13.0-36-generic"). I think i'm using this ISO you made from an older post: "https://linuxiumcomau.blogspot.com.es/2018/03/ubuntu-16044-for-intel-atom-and-apollo.html"
¿How can I boot again with the most recent kernel I have? ("4.13.0-41-generic")
And, ¿Could you help me in fixing the update-initramfs problem without reinstall the entire OS?
Thanks in advance!

Linuxium said...

What is the output from 'ls -l /etc/initramfs/post-update.d/' when booting with your '4.13.0-36-generic' kernel?

Robert said...

Output is:
root@minix:~# ls -l /etc/initramfs/post-update.d/

total 4

-rwxr-xr-x 1 root root 3301 mar 2 07:48 linuxium-bootscript


root@minix:~# uname -a

Linux minix 4.13.0-36-generic #40~16.04.1-Ubuntu SMP Fri Feb 16 23:25:58 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Thanks for your response!

Linuxium said...

First make sure you have the latest 'isorespin.sh'.
Assuming you have saved it under '/usr/local/bin' copy&paste the following command:

sed '1,/^exit 0$/d' /usr/local/bin/isorespin.sh | base64 -d | zcat 2>/dev/null | sudo tee /etc/initramfs/post-update.d/linuxium-bootscript >/dev/null 2>&1

and then post 'ls -l /etc/initramfs/post-update.d/' again.

Robert said...

Done:

root@minix:/# ls -l /etc/initramfs/post-update.d/
total 4
-rwxr-xr-x 1 root root 3300 may 17 12:05 linuxium-bootscript

Linuxium said...

Good. That has updated the software to the latest version and now the 'update-initramfs' will work.

To update to your latest kernel enter 'sudo update-initramfs -u -k 4.13.0-41-generic' followed by 'sudo update-grub' and then reboot.

Robert said...

It worked, thanks a lot!

root@minix:~# uname -a
Linux minix 4.13.0-41-generic #46~16.04.1-Ubuntu SMP Thu May 3 10:06:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Now I'm not afraid anymore when updating the kernel or running apt-get autoremove.

Thanks!

Linuxium said...

Excellent. Good to hear.

Unknown said...

Yes bodhi support would be great

Post a Comment

All comments now moderated so that spam can be deleted.