Thursday, 29 June 2017

Adding and deleting kernel boot parameters with 'isorespin.sh'


Sometimes additional kernel boot parameters are required for successful booting to change specific behaviours and to enable or disable certain features (see https://wiki.ubuntu.com/Kernel/KernelBootParameters).

So I've added new functionality to my 'isorespin.sh' script to either delete the default kernel boot parameters or add additional kernel boot parameters or both.

The updated command line invocation is now:

Usage: /usr/local/bin/isorespin.sh [ -h | -v ]
       /usr/local/bin/isorespin.sh -i <ISO> [ [ -u | -k <kernel> ] | -r "<repo> ... " | -p "<pkg> ... " | -l "<pkg.deb> ... " | -f "<file> | <directory> ... " | [ -s <size>MB | GB ] | [ -b GRUB | rEFInd ] ...
       /usr/local/bin/isorespin.sh ... -w <directory> | -d "<pkg> ... " | -e "<pkg> ... " | -c "<cmd> ... " | -o "<file> | <directory> ... " | -g "" | "<kernel boot parameter> ... " ]

Kernel boot parameters are controlled by a new option:
-g or --grub will add the specified kernel boot parameters both to the GRUB/rEFInd boot menu and to the default GRUB settings or if an empty ("") argument is specified then the the ISO's initial kernel boot parameters will be removed.
The option can be entered either using the command line or by using the GUI.

The following is an example showing both the removal of the default kernel boot parameters (quiet splash) and the inclusion of two new kernel boot parameters:

isorespin.sh -i ubuntu-17.04-desktop-amd64.iso -g "" -g "i915.fastboot=1 fbcon=rotate:1"

The default kernel boot parameters are first removed by selecting the delete option: 


and the new kernel boot parameters are then added:


as text strings:




Once the script is running it will update the kernel boot parameters:


with the exact details being recorded in the log file:


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

4 comments:

Unknown said...

isorespin won't recognize ubuntu-17.04-server-amd64.iso as an Ubuntu flavor!

Linuxium said...

Have a read of http://linuxiumcomau.blogspot.com.au/2017/06/customizing-ubuntu-isos-documentation.html as my script only works with official desktop 64-bit ISOs.

Unknown said...

Thanks a lot - your Ubuntu 17.04-2.13 ISO command-line revived my laptop.

Linuxium said...

Great - good to hear.

Post a Comment

All comments now moderated so that spam can be deleted.