Run script after apt-get updates grub











up vote
0
down vote

favorite












I use Debian 9 on an EFI system with a custom grub image and configuration file in order to make Secure Boot work. However, whenever apt-get updates Grub my customizations get overriden.



What is the best solution for this? I do not want to prevent grub from updating, as there might be security updates. I have a script that creates my customizations. Is there a way to run that every time apt-get updates grub?



Unfortunately, I cannot find much information on this, as the Google results are just cluttered with people running into grub update error messages.










share|improve this question









New contributor




Raymond Garver is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Can you clarify exactly what is custom and how you create it?
    – fixer1234
    Nov 14 at 11:56










  • The grub image (grubx64.efi) is custom, I created it with grub-mkstandalone.
    – Raymond Garver
    Nov 15 at 4:09















up vote
0
down vote

favorite












I use Debian 9 on an EFI system with a custom grub image and configuration file in order to make Secure Boot work. However, whenever apt-get updates Grub my customizations get overriden.



What is the best solution for this? I do not want to prevent grub from updating, as there might be security updates. I have a script that creates my customizations. Is there a way to run that every time apt-get updates grub?



Unfortunately, I cannot find much information on this, as the Google results are just cluttered with people running into grub update error messages.










share|improve this question









New contributor




Raymond Garver is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Can you clarify exactly what is custom and how you create it?
    – fixer1234
    Nov 14 at 11:56










  • The grub image (grubx64.efi) is custom, I created it with grub-mkstandalone.
    – Raymond Garver
    Nov 15 at 4:09













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I use Debian 9 on an EFI system with a custom grub image and configuration file in order to make Secure Boot work. However, whenever apt-get updates Grub my customizations get overriden.



What is the best solution for this? I do not want to prevent grub from updating, as there might be security updates. I have a script that creates my customizations. Is there a way to run that every time apt-get updates grub?



Unfortunately, I cannot find much information on this, as the Google results are just cluttered with people running into grub update error messages.










share|improve this question









New contributor




Raymond Garver is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I use Debian 9 on an EFI system with a custom grub image and configuration file in order to make Secure Boot work. However, whenever apt-get updates Grub my customizations get overriden.



What is the best solution for this? I do not want to prevent grub from updating, as there might be security updates. I have a script that creates my customizations. Is there a way to run that every time apt-get updates grub?



Unfortunately, I cannot find much information on this, as the Google results are just cluttered with people running into grub update error messages.







debian grub uefi bootloader secure-boot






share|improve this question









New contributor




Raymond Garver is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Raymond Garver is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Nov 15 at 4:27





















New contributor




Raymond Garver is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Nov 14 at 11:33









Raymond Garver

11




11




New contributor




Raymond Garver is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Raymond Garver is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Raymond Garver is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Can you clarify exactly what is custom and how you create it?
    – fixer1234
    Nov 14 at 11:56










  • The grub image (grubx64.efi) is custom, I created it with grub-mkstandalone.
    – Raymond Garver
    Nov 15 at 4:09


















  • Can you clarify exactly what is custom and how you create it?
    – fixer1234
    Nov 14 at 11:56










  • The grub image (grubx64.efi) is custom, I created it with grub-mkstandalone.
    – Raymond Garver
    Nov 15 at 4:09
















Can you clarify exactly what is custom and how you create it?
– fixer1234
Nov 14 at 11:56




Can you clarify exactly what is custom and how you create it?
– fixer1234
Nov 14 at 11:56












The grub image (grubx64.efi) is custom, I created it with grub-mkstandalone.
– Raymond Garver
Nov 15 at 4:09




The grub image (grubx64.efi) is custom, I created it with grub-mkstandalone.
– Raymond Garver
Nov 15 at 4:09










1 Answer
1






active

oldest

votes

















up vote
0
down vote













Make a custom trigger file at /var/lib/dpkg/triggers



More info: https://wiki.debian.org/DpkgTriggers






share|improve this answer





















  • Thanks for the suggestion, but I don't understand how this would help. If I create a custom trigger it wouldn't be called by the grub package when it is installed, because it doesn't know about my trigger.
    – Raymond Garver
    Nov 15 at 4:16











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Raymond Garver is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1375287%2frun-script-after-apt-get-updates-grub%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













Make a custom trigger file at /var/lib/dpkg/triggers



More info: https://wiki.debian.org/DpkgTriggers






share|improve this answer





















  • Thanks for the suggestion, but I don't understand how this would help. If I create a custom trigger it wouldn't be called by the grub package when it is installed, because it doesn't know about my trigger.
    – Raymond Garver
    Nov 15 at 4:16















up vote
0
down vote













Make a custom trigger file at /var/lib/dpkg/triggers



More info: https://wiki.debian.org/DpkgTriggers






share|improve this answer





















  • Thanks for the suggestion, but I don't understand how this would help. If I create a custom trigger it wouldn't be called by the grub package when it is installed, because it doesn't know about my trigger.
    – Raymond Garver
    Nov 15 at 4:16













up vote
0
down vote










up vote
0
down vote









Make a custom trigger file at /var/lib/dpkg/triggers



More info: https://wiki.debian.org/DpkgTriggers






share|improve this answer












Make a custom trigger file at /var/lib/dpkg/triggers



More info: https://wiki.debian.org/DpkgTriggers







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 14 at 11:45









Ipor Sircer

3,41711014




3,41711014












  • Thanks for the suggestion, but I don't understand how this would help. If I create a custom trigger it wouldn't be called by the grub package when it is installed, because it doesn't know about my trigger.
    – Raymond Garver
    Nov 15 at 4:16


















  • Thanks for the suggestion, but I don't understand how this would help. If I create a custom trigger it wouldn't be called by the grub package when it is installed, because it doesn't know about my trigger.
    – Raymond Garver
    Nov 15 at 4:16
















Thanks for the suggestion, but I don't understand how this would help. If I create a custom trigger it wouldn't be called by the grub package when it is installed, because it doesn't know about my trigger.
– Raymond Garver
Nov 15 at 4:16




Thanks for the suggestion, but I don't understand how this would help. If I create a custom trigger it wouldn't be called by the grub package when it is installed, because it doesn't know about my trigger.
– Raymond Garver
Nov 15 at 4:16










Raymond Garver is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















Raymond Garver is a new contributor. Be nice, and check out our Code of Conduct.













Raymond Garver is a new contributor. Be nice, and check out our Code of Conduct.












Raymond Garver is a new contributor. Be nice, and check out our Code of Conduct.















 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1375287%2frun-script-after-apt-get-updates-grub%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Plaza Victoria

In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...