kernel installer script

Submitted scripts and programs
Forum rules
Your own work only.
pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

kernel installer script

Unread post by pidsley » Mon Jan 20, 2014 10:14 pm

I wrote this a while ago, thinking it might stop some of the whining about bbq releases without rolling kernels by making installing new kernels slightly easier. The script attempts to build a list of all available kernels from your sources (and gives you the option of adding liquorix and siduction sources if you don't have them) and then presents that list in a dialog and allows you to choose one to install. At rhowaldt's suggestion, you can specify that you only want to see the rolling options, or you can see all available kernels. Joe tested it, and I just used it again this morning to install the 3.13 towo kernel. I hope someone finds it useful.

As always, there are probably better ways to do everything in this script. As Joe says "The complexity of the implementation is determined by the intended usage."

https://github.com/pidsley/codemangler/ ... get-kernel

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: kernel installer script

Unread post by rhowaldt » Mon Jan 20, 2014 10:49 pm

aaah nice, you released this now, good shit pidsley, and thanks for adding my suggestion to it :)
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: kernel installer script

Unread post by dkeg » Tue Jan 21, 2014 5:37 am

great one pids. should be included in future releases.

Work hard; Complain less

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: kernel installer script

Unread post by machinebacon » Tue Jan 21, 2014 5:40 am

thanks pids, will be included in the bbqmenu's system options :)
..gnutella..

User avatar
wuxmedia
Grasshopper
Posts: 6454
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: kernel installer script

Unread post by wuxmedia » Tue Jan 21, 2014 7:35 am

neato, proper scripting.
Thanks Pids.
"Seek, and Ye shall find"
"Github | Chooons | Site"

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5878
Joined: Tue Sep 03, 2013 7:05 am

Re: kernel installer script

Unread post by GekkoP » Tue Jan 21, 2014 12:19 pm

Cool one, thanks for this.

hinto
Forums Hottie
Posts: 298
Joined: Thu Dec 06, 2012 4:28 pm

Re: kernel installer script

Unread post by hinto » Wed Jan 22, 2014 2:10 am

Where's the Like button?
-H
"A human being should be able to... butcher a hog..." -Robert Heinlein

User avatar
MrPink
applies for custom title
Posts: 49
Joined: Tue Jan 22, 2013 10:38 pm

Re: kernel installer script

Unread post by MrPink » Wed Jan 22, 2014 3:46 pm

Looks very nice. smxi does this easily too, though.

hinto
Forums Hottie
Posts: 298
Joined: Thu Dec 06, 2012 4:28 pm

Re: kernel installer script

Unread post by hinto » Wed Jan 22, 2014 3:52 pm

There's always room to innovate. Remember Henry Ford didn't invent the car, nor the assembly line.
He just brought them together.
-Hinto
"A human being should be able to... butcher a hog..." -Robert Heinlein

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: kernel installer script

Unread post by machinebacon » Wed Jan 22, 2014 11:31 pm

MrPink wrote:Looks very nice. smxi does this easily too, though.
Heinz Hot Sauce vs. Dad's family recipe. I take the latter. ;) (Now guess which one pid's is)
..gnutella..

User avatar
DebianJoe
Frame Buffer
Posts: 1915
Joined: Mon Jul 01, 2013 5:41 am
Location: emacs.d

Re: kernel installer script

Unread post by DebianJoe » Thu Jan 23, 2014 12:09 am

When pulling new kernels, I now use this script. It does exactly what it says on the box.
|>>BBQ Roaster, Alpha Branch<< | >> clinky << | >> X11 must die << |
Thanks BASIC

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5878
Joined: Tue Sep 03, 2013 7:05 am

Re: kernel installer script

Unread post by GekkoP » Thu Jan 23, 2014 10:07 am

^ Same here.

User avatar
ChefIronBelly
Approved BBQer
Posts: 1044
Joined: Mon Jan 13, 2014 6:01 am
Location: Michigan

Re: kernel installer script

Unread post by ChefIronBelly » Thu Jan 23, 2014 2:42 pm

added to the tool kit +1
(1/1) Installing: LinuxBBQ...................................[69%]==============[/]

User avatar
xaos52
The Good Doctor
Posts: 190
Joined: Thu Aug 15, 2013 11:59 am
Location: Eernegem, Belgium

Re: kernel installer script

Unread post by xaos52 » Thu Jan 23, 2014 3:47 pm

Good script, pidsley.
Nice style too.
One remark: installing a new kernel automatically triggers a grub-update.
No need to run an extra one.

I will be using this too.
Thanks
Connected. Take this REPL, brother, and may it serve you well.

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: kernel installer script

Unread post by pidsley » Thu Jan 23, 2014 3:52 pm

xaos52 wrote:Good script, pidsley.
Nice style too.
One remark: installing a new kernel automatically triggers a grub-update.
No need to run an extra one.

I will be using this too.
Thanks
Thank you for the reminder about update-grub. I realized this a few days ago and have now removed the update-grub code in the latest release on github. I might make it optional just in case. :)

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: kernel installer script

Unread post by machinebacon » Thu Jan 23, 2014 4:21 pm

@xaos52: /etc/kernel/postinst.d/zz-update-grub
only if this (or a similar) script is existing the update-grub is triggered, so @pidsley: you can make a test if the file exists and let update-grub be called if the file does not exist.
..gnutella..

pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: kernel installer script

Unread post by pidsley » Thu Jan 23, 2014 4:34 pm

Thanks bacon. Is this file always present in bbq spins (unless the user has deleted or renamed it)?

User avatar
xaos52
The Good Doctor
Posts: 190
Joined: Thu Aug 15, 2013 11:59 am
Location: Eernegem, Belgium

Re: kernel installer script

Unread post by xaos52 » Thu Jan 23, 2014 6:25 pm

/etc/kernel/postinst.d/zz-update-grub is installed when you install grub- more precisely any of the existing grub packages.
If grub is installed on your system, any kernel install will trigger update-grub, so you don't have to re-run it.
if grub is not installed on your system and you do a kernel install, grub-install is not triggered, and should not be run manually either.

Conclusion: whether grub is installed or not, you should not run grub-install at the end of the script
Connected. Take this REPL, brother, and may it serve you well.

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: kernel installer script

Unread post by machinebacon » Fri Jan 24, 2014 1:03 am

^Why *should the user not* run it? I'd say: if, then it should also run ../initramfs-tools. And if you say "it should not", I can point you to a bunch of threads in this and other forums that not every kernel upgrade runs these scripts ;)
..gnutella..

User avatar
xaos52
The Good Doctor
Posts: 190
Joined: Thu Aug 15, 2013 11:59 am
Location: Eernegem, Belgium

Re: kernel installer script

Unread post by xaos52 » Fri Jan 24, 2014 11:07 am

OK.
But asking to run it after it has just finished is ... not looking good.

Suggestion:
test if /boot/grub/grub.cfg is newer than tmpfile. If it is, grub-update has been run by the script and there is no need to ask the question to run it again.

Just trying to make it better than it is already. :)
Connected. Take this REPL, brother, and may it serve you well.

Post Reply