Friday, 1 September 2017

New version of ISO respin script released

Now that my script supports updates to rolling kernels and target processors I've improved the naming of the respun ISO to better reflect how it was created. The key change is to include the kernel version in the name of the respun ISO when respinning upgrades the original version together with the name of the target processor if respun using that option.

23 comments:

Hello.I've been using your ISO's for a while, and they are great (depending on the device BTW), but once installed I don't know the process to upgraade to a rolling kernel. I've tried a couple but always broke something (last goodix support in 4.13 rc6) and more related to your patches BT support (cherry trail tablet Chuwi Hi12)Thanks

Once you have installed the ISO you just upgrade using any of the standard processes which include using apt update/upgrade, adding the relevant repos and upgrading/installing a specific kernel or downloading a prebuilt kernel from Canonical.

Last version of respin.sh ('./isorespin.sh -i linuxmint-18.2-cinnamon-64bit.iso -u --atom' or './isorespin.sh -i linuxmint-18.2-cinnamon-64bit.iso -u --atom -b rEFInd') does not work for me. I have tried with Ubuntu 16.04.3, Ubuntu Mate 16.04.3, Linux Mint Cinnamon 18.2, with Grub or rEFInd as a bootloader, there after installation and then reboot depends on bootlogo of Linux Mint or Ubuntu (at GRUB), or the screen remains black after show of Bootlogo(rEFInd).With Ubuntu Mate 17.04 I could start after installation (with GRUB), but no sound and no WiFi (NVRAM copy with 'sudo cp -n brcmfmac43455-sdio.txt /lib/firmware/brcm' and restarted; the folder cat /sys/firmware/efi/efivars/nvram-74b00bd9-805a-4d61-b51f-43268123d113 not exist; brcmfmac43455-sdio.bin is in the folder). With Ubuntu Mate 17.10 Beta 1 I could not change the resolution from 4k to 1080p, therefore not further tested, there is no sound.

I see the script requires sudo. I do not want sudo on my machine and I only use su for privilege escalation. If you could, please check for working sudo (for example with $(sudo 'echo $UID')) and use "su -c" instead where root is absolutely required.

For instance, running wget as root seems to be a can of worms. External servers can (and should be assumed to be) evil, especially when doing stuff as root. It would be better to run wget as the script invoking user and then chown+mv the resulting file.

One way to do this is to first of all accept that the lock file can be removed by the user and protect it with "chmod 000" instead. Then make a best effort attempt to do everything that doesn't explicitly require root (like wget) before spawning a single subshell to the dangerous stuff.

That way you would only require sudo/su once and, with a bit of clever work, you could either bake this part into a different mode of the same script (like checking $UID at the top of the file, if 0 then do just the root things) or by progressively building a temporary script file to be executed at the end.

I do realize this is a major change and I'm not expecting this to be fixed overnight, but please keep it in mind for version 8. I'd be happy to help out if you want.

Another suggestion would be to use base64 encoding when concatenating the zip file at the end of the script (just pipe it through "base64 -d" between sed and tee when separating the archive). Some editors have major issues dealing with invalid characters.

I'm trying to install Linux Mint 18.2 on a Kaby Lake based machine (i7-7700HQ) however the Kaby Lake processors require Kernel 4.10. and 18.2 only has a 4.8 kernel. so the installation fails with a blank screen.

I'd like to make an 18.2 ISO CD but patch it with the 4.10. kernel. Can your script do this?

Yes. Just respin the Linux Mint 18.2 ISO with the '-k v4.10.16' option (the latest v4.10 kernel from 'http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=M;O=D'). Alternatively use the '-u' option to get the latest kernel (currently v4.13.4) if you prefer.