You are not logged in.

#1 2011-03-25 00:51:46

jwhendy
Member
Registered: 2010-04-01
Posts: 621

can you make & install "over" a kernel you're currently running?

I've always wondered this... Let's say I've compiled a custom kernel and it's components are like so:
,---
| /lib/modules/kernel-append-name
| /boot/vmlinuz-append-name
| /boot/System.map-append-name
| /boot/kernel26-append-name.img
`---

Then I'm running on it and find something I'm missing (like what just happened -- forgot to include tun/tap support). If I re-configure and make it, is there any harm in replacing those components in /boot while I'm running on that same kernel? I've never been sure, so my process was always:
,---
| - make clean
| - make menuconfig and change options
| - make && make modules
| - reboot into stock kernel
| - make modules_install
| - cp everything I need into /boot
| - mkinitcpio -k version -g /boot/img-name
`---

Perhaps everything in /boot is already in memory and thus there's no harm in overwriting it. But then again, perhaps it's not. Since I didn't know, I've always aimed on the cautious side, but perhaps I could have been saving a reboot all these years?

Last edited by jwhendy (2011-03-25 00:52:53)

Offline

#2 2011-03-25 11:42:49

RobertMe
Member
From: The Netherlands
Registered: 2010-07-04
Posts: 45

Re: can you make & install "over" a kernel you're currently running?

I think it should be possible. Because pacman (and probably also mkinitcpio) also just override the files in /boot/ of your running kernel. The files/kernel should be loaded into the memory, and thus the files aren't needed. But you probably can get problems while trying to modprobe a module (looking at the wrong location, incompatible with the running kernel et cetera)

Offline

#3 2011-03-25 18:19:24

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: can you make & install "over" a kernel you're currently running?

@RobertMe: good point re. that's what pacman does anyway. I would always install, then reboot anyway. It's more that this would save me a reboot step. Instead of:
,---
| - make
| - reboot to stock kernel
| - make modules_install
| - cp stuff to /boot
| - mkinitcipio
| - reboot to custom kernel
`---

I could just:
,---
| - make
| - make modules_install
| - cp stuff to /boot
| - mkinitcipio
| - reboot into custom kernel
`---

That would be a lot more streamlined. Thanks for the comment.

Offline

Board footer

Powered by FluxBB