[arch-general] Change kernel version or module dir at bootprompt?

Gerhard Brauer gerhard.brauer at web.de
Sat Dec 1 08:07:14 EST 2007


Gruesse!
* Xavier <shiningxc at gmail.com> schrieb am [01.12.07 11:11]:

Oh, i miss Jame's mail, so in answer you.

> On Sat, Dec 01, 2007 at 05:05:46PM +1100, James Rayner wrote:
> > the kernel version is also embedded into the individual modules, so you'd
> > have to modify the kernel and every module. You might be able to do some
> > ugly sed trickery, but I really discourage it -- you're asking for
> > trouble.. and it probably won't work.

Are you sure? Ay, yes is see: 2.6.23-ARCH SMP preempt mod_unload 686
Ok, this is a "neutral" entry, but changing KERN_VER is not possible, i
agree.

> > Why would you want to do something like this anyway?

As others say: for a quick backup before a kernel-update.
For myself i have a own "rescue" kernel on all important machines. But
the only way to have such is to build a whole kernel.
I thought about an less time expensive method.

First thougt myself was for ex. add a VAR to pacman.conf BackupKernel =
yes|no and then add something like pre-install/update to
kernel26.install file.

> But it's still a problem. There was a request for a fallback kernel, but it
> was apparently rejected :
> http://bugs.archlinux.org/task/7926

I must read this.

After James comment about the vermagic entries i mentioned about a
"hack" in initrd-hooks to bypass this problem.
Ex: we have /lib/modules/kernel26-ARCH which is real 2.6.23.8-1.
One woul like to test the new kernel from testing.
At the moment testing-kernel overwrites the stock arch kernel.

But if (maybe a script):
- Backup kernel and initrd-iamge
- copy /lib/modules/kernel26-ARCH to a backup in /lib/modules
- Have a bootloader entry for backup kernel with a parameter
useoldkernel=yes

Then a hook in initrd.img check useoldkernel and do:
- mv /lib/modules/kernel26-ARCH to something similar
- do a symlink or mv from backup module dir to
/lib/modules/kernel26-ARCH.

I don't know if this could be done in the initrd-image. But if, we have
AFAIK no problem with vermagic in the "new" module dir.

You see, i puzzle a little round that "problem" ;-)

Bye
	Gerhard

-- 
Don't drink and root!




More information about the arch-general mailing list