Kernel, Grub and Plymouth update after major release

Asked by András Varga on 2020-06-22

I made my custom oem installable system, but i have a question.
If ubuntu updates for a major release (20.04.01) my system will install new kernel, plymouth and grub propably.
Can i prevent this thing? I dont want to lose those customizations on the os, because im using it for my small company.

Question information

English Edit question
Cubic Edit question
No assignee Edit question
Last query:
Last reply:
Cubic PPA (cubic-wizard) said : #1


I think you have to "hold back" packages.

    echo "<package-name> hold" | dpkg --set-selections


A trick I use is to automatically execute a script after every package install.
The script resets something the way ~I~ want it.
This works for simple things, since the script it has to be very reliable.
(The script should also ~not~ make changes, if apt did not change or overwrite your initial settings).

Perhaps you can do something similar.
Here is an example to black list nouveau, if apt removed my grub changes...

Add an entry to `/etc/apt/apt.conf.d/80update`.
This entry should invoke a script that makes the updates/changes that you want.

For example, to the file:
    DPkg::Post-Invoke {"/opt/apt/grub-blacklist-nouveau";};

Then create the file:

With the contents:


# Blacklist the Nouveau display driver for is in Grub, if it is
# not already blacklisted.
# Usage: sudo grub-blacklist-nouveau

match=$(cat /etc/default/grub | grep 'modprobe.blacklist=nouveau')
if [[ ! $match ]]; then
    echo "Blacklist the Nouveau display driver for in Grub."
    sed --in-place "s|splash|splash modprobe.blacklist=nouveau|g" /etc/default/grub
    echo "The Nouveau display driver for is already blacklisted in Grub, so no changes are necessary."
grep GRUB_CMDLINE_LINUX_DEFAULT /etc/default/grub

Synema (kensei99) said : #2

how do i use the hold thing? just use it in cubics terminal and when i install the system, its gonna be ready?

Can you help with this problem?

Provide an answer of your own, or ask András Varga for more information if necessary.

To post a message you must log in.