Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Alternate way to provide kernel updates
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Fri Feb 02, 2018 9:21 pm    Post subject: Alternate way to provide kernel updates Reply with quote

Suppose I want to provide kernel updates using genkernel. Would this work?
Code:

tar cvjf kernel-update.tar.bz2 /lib64/modules/(kernel-version)/ /boot/


This is after a genkernel run and grub-mkconfig.

User does:
Code:

su -
cd /
tar xvjpf kernel-update.tar.bz2


Can I expect any issues from doing this?
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9645
Location: almost Mile High in the USA

PostPosted: Fri Feb 02, 2018 10:43 pm    Post subject: Reply with quote

Just make sure the machines are compatible with each others' kernel (including boot loader information since you're tarring that too if it's there)...

Note that this should work on EFI machines but on MBR machines, copying over grub /boot files is not a good idea - I think some of those files are hardcoded.

Doesn't work on my machines as they're all different... I really should try to unify them somewhat, but not much can be done as they're mostly thrown together with miscellaneous parts...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Sat Feb 03, 2018 12:14 am    Post subject: Reply with quote

eccerr0r,

Thanks, I appreciate it. It's an idea I'm toying with for Gentoo Studio. Now I understand the boot stuff definitely can't be done, since I have no way of knowing whether the user has MBR or EFI. For the rest, now that I've thought about it more, this will probably cause breakage for users at some point.

Maybe instead of just downloading packaged modules and bootloader info, I should be writing an update script that downloads kernel modules and runs grub-mkconfig.

Thanks, this helped me think about it some more.
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Sat Feb 03, 2018 1:35 am    Post subject: Reply with quote

You might provide a script after sync that check for update, download and execute your stuff.
Code:
#/bin/sh
FNAME="my_update"
URL="https://forums.gentoo.org/viewtopic-t-1076420-highlight-.html"
MD5_OLD=$(md5sum "${FNAME}");

wget -q -c -O "${FNAME}" "${URL}"
MD5_NEW=$(md5sum "${FNAME}")
if [ "${MD5_OLD}" = "${MD5_NEW}" ]; then
    echo no update...
    else
    echo a new update has been download
    # mount /boot
    # ...
    fi


You put that in /etc/portage/repo.postsync.d and you have your update system.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9645
Location: almost Mile High in the USA

PostPosted: Sat Feb 03, 2018 1:56 am    Post subject: Reply with quote

A possibility is you have grub-mkconfig pick up a generic name and supply a kernel, that same generically named symlink to the kernel, and the modules in the tarball. Won't clean up the old kernels but it should be minimal damage to the system. The kernel still needs to be tailored to work between all machines...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Sat Feb 03, 2018 3:34 pm    Post subject: Reply with quote

Great ideas, thanks, guys.
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3104

PostPosted: Sat Feb 03, 2018 5:08 pm    Post subject: Reply with quote

Kernel supports INSTALL_PATH and INSTALL_MOD_PATH variables. You can use those to install kernel to a clean directory and make a tarball of that.
Also, it is possible to create an ebuild for binary kernel. This topic keeps coming back again and again. I have attempted this some time ago, got it to the point where it kinda worked, and then abandoned it for sake of something else that became more important at that time.
Still, I may (or may not) be able to help a bit with that.
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Sat Feb 03, 2018 9:11 pm    Post subject: Reply with quote

I do like the binary kernel ebuild idea if it can be done for rt-sources. I'm hoping to make things easier for users I'm supporting with stuff like this.
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
Juippisi
Developer
Developer


Joined: 30 Sep 2005
Posts: 722
Location: /home

PostPosted: Sun Feb 04, 2018 4:15 am    Post subject: Reply with quote

Funtoo has a working implementation for building binary kernels (at least for their debian-sources), you might want to look at their ebuilds and eclasses.
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Sun Feb 04, 2018 10:55 pm    Post subject: Reply with quote

Good idea, thanks!
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum