[arch-general] Change kernel version or module dir at bootprompt?
Hello, i've searched a while and found nothing. And AFAIK there isnt't an chance to do this. But maybe one of you know a trick, a magic... Is it possible to change either the kernel version (what uname -r says) or the location of the kernel modul dir at boottime? I think about an easy solution to backup an arch kernel with it's modules. But since the kernel version is fix and releated to the module dir one could not simply copy /lib/modules/foo.bar to ex. /lib/modules/foo.bar-backup. Anyone knows a trick? Thanks Gerhard -- Virus gefunden - Bundestrojaner_BT32/W Dieser Schaedling steht auf dem Boden der freiheitlich-demokratischen Grundordnung. Sie haben folgende Moeglichkeiten: Mit Nein die Abwehr abzuwenden oder mit jeder anderen Taste die Installation fortzusetzen.
Am Freitag, 30. November 2007 18:46:54 schrieb Gerhard Brauer:
Anyone knows a trick?
Afaik there were some suggestions at the bug tracker. Imho a solution that does not use pacman is not that great. If you really need a backup kernel you can package a working one and install it side by side to the one from [core]. Another nice feature might be packaging the kernel from the install cd. It contains a complete "rescue" system within the initrd. -- archlinux.de
On Sat, December 1, 2007 04:46, Gerhard Brauer wrote:
Hello,
i've searched a while and found nothing. And AFAIK there isnt't an chance to do this. But maybe one of you know a trick, a magic...
Is it possible to change either the kernel version (what uname -r says) or the location of the kernel modul dir at boottime?
I think about an easy solution to backup an arch kernel with it's modules. But since the kernel version is fix and releated to the module dir one could not simply copy /lib/modules/foo.bar to ex. /lib/modules/foo.bar-backup.
Anyone knows a trick?
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. For a 2.6.22 to 2.6.23 type change though, yes you could just backup the kernel and modules before upgrading, upgrade, rename the kernel vmlinuz and put them back again -- though they'd then be out of pacman's control. Why would you want to do something like this anyway?
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.
For a 2.6.22 to 2.6.23 type change though, yes you could just backup the kernel and modules before upgrading, upgrade, rename the kernel vmlinuz and put them back again -- though they'd then be out of pacman's control.
Why would you want to do something like this anyway?
For a faster and easier restoring in case 2.6.23 doesn't boot? I thought that always having two kernel entries, one of them known to work, was a good and safe practice. I'm not saying this is a critical problem to fix, because : 1) kernels don't break that often 2) booting with a livecd and fixing stuff there isn't that hard 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
Hey gang; I also wanted a backup/fallback to a previous version kernel without necessarily wanting to insert a disc. SO, apparently had someone else (wide-eye to be specific); It might well require some manual tweeking, (as I recall I HAD TO mess about a bit,) but try a "yaourt archrescue". I am using the .08-1 version here on my laptop to 'solve' this little picadillo. Very best regards; Bob Finch
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.
For a 2.6.22 to 2.6.23 type change though, yes you could just backup the kernel and modules before upgrading, upgrade, rename the kernel vmlinuz and put them back again -- though they'd then be out of pacman's control.
Why would you want to do something like this anyway?
For a faster and easier restoring in case 2.6.23 doesn't boot? I thought that always having two kernel entries, one of them known to work, was a good and safe practice. I'm not saying this is a critical problem to fix, because : 1) kernels don't break that often 2) booting with a livecd and fixing stuff there isn't that hard
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
Am Samstag, 1. Dezember 2007 schrieb w9ya@qrparci.net:
Hey gang;
I also wanted a backup/fallback to a previous version kernel without necessarily wanting to insert a disc. SO, apparently had someone else (wide-eye to be specific);
It might well require some manual tweeking, (as I recall I HAD TO mess about a bit,) but try a "yaourt archrescue". I am using the .08-1 version here on my laptop to 'solve' this little picadillo.
Very best regards;
Bob Finch
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.
For a 2.6.22 to 2.6.23 type change though, yes you could just backup the kernel and modules before upgrading, upgrade, rename the kernel vmlinuz and put them back again -- though they'd then be out of pacman's control.
Why would you want to do something like this anyway?
For a faster and easier restoring in case 2.6.23 doesn't boot? I thought that always having two kernel entries, one of them known to work, was a good and safe practice. I'm not saying this is a critical problem to fix, because : 1) kernels don't break that often 2) booting with a livecd and fixing stuff there isn't that hard
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
Why you jsut don't use the installation ISO kernel and initrd? you get everything to rescue from it and it includes everything. no hacks at all only enter it in your grub. you can also boot into your existing system with it. greetings tpowa -- Tobias Powalowski Archlinux Developer & Package Maintainer (tpowa) http://www.archlinux.org tpowa@archlinux.org
On Sun, Dec 02, 2007 at 10:20:09AM +0100, Tobias Powalowski wrote:
Why you jsut don't use the installation ISO kernel and initrd? you get everything to rescue from it and it includes everything. no hacks at all only enter it in your grub. you can also boot into your existing system with it.
I don't know, it just looks like having a second fallback kernel originally installed would allow a much faster and easier rescue. Same if new kernels were installed as new packages, like some other distribs do, instead of overwriting the old one. But maybe both solutions are too complex for Arch.
Gruesse! * Tobias Powalowski <t.powa@gmx.de> schrieb am [02.12.07 10:20]:
Why you jsut don't use the installation ISO kernel and initrd? you get everything to rescue from it and it includes everything. no hacks at all only enter it in your grub. you can also boot into your existing system with it.
Sometimes the machine isn't easy to reach. At home one could put the CD into drive, but i think also about machines where one must drive ~100 Km Or machines (Webserver, etc) managed by hosters...
greetings tpowa
Bye Gerhard -- Kernel panic: Could not determine whether bit was one, zero or sqrt(1/PI)... (J.K. in d-u-g)
Am Sonntag, 2. Dezember 2007 schrieb Gerhard Brauer:
Gruesse!
* Tobias Powalowski <t.powa@gmx.de> schrieb am [02.12.07 10:20]:
Why you jsut don't use the installation ISO kernel and initrd? you get everything to rescue from it and it includes everything. no hacks at all only enter it in your grub. you can also boot into your existing system with it.
Sometimes the machine isn't easy to reach. At home one could put the CD into drive, but i think also about machines where one must drive ~100 Km Or machines (Webserver, etc) managed by hosters...
greetings tpowa
Bye Gerhard
i meant that you install the kernel from the ISO in combination with the initrd. that it is available on the disk and not that you need to boot the cd itself. greetings tpowa -- Tobias Powalowski Archlinux Developer & Package Maintainer (tpowa) http://www.archlinux.org tpowa@archlinux.org
Gruesse! * Tobias Powalowski <t.powa@gmx.de> schrieb am [02.12.07 16:06]:
i meant that you install the kernel from the ISO in combination with the initrd. that it is available on the disk and not that you need to boot the cd itself.
At the risk that i misunderstand this, but: At the moment i could do this, Kernel on ISO is 2.6.22. But when 2.6.23 reaches the ISO, we have the same problem as now: a collision between uname -r/lib/modules from ISO to stock kernel. Or am i think completly stupid?
greetings tpowa
Bye Gerhard -- A: Weil es die Lesbarkeit des Textes verschlechtert. Q: Warum ist TOFU so schlimm? A: TOFU F: Was ist das groesste Aergerniss im Usenet?
Am Sonntag, 2. Dezember 2007 19:41:21 schrieb Gerhard Brauer:
At the moment i could do this, Kernel on ISO is 2.6.22. But when 2.6.23 reaches the ISO, we have the same problem as now: a collision between uname -r/lib/modules from ISO to stock kernel.
no, because all modules are within the initrd. -- archlinux.de
Gruesse! * Pierre Schmitz <pierre@archlinux.de> schrieb am [02.12.07 19:49]:
Am Sonntag, 2. Dezember 2007 19:41:21 schrieb Gerhard Brauer:
At the moment i could do this, Kernel on ISO is 2.6.22. But when 2.6.23 reaches the ISO, we have the same problem as now: a collision between uname -r/lib/modules from ISO to stock kernel.
no, because all modules are within the initrd.
Hello my Massa("Meister"), *that* sounds simple, *that* seems to be KISS... I think, we have a knew theme for wiki.archlinux.de ;-) Bye Gerhard -- Virus gefunden - Bundestrojaner_BT32/W Dieser Schaedling steht auf dem Boden der freiheitlich-demokratischen Grundordnung. Sie haben folgende Moeglichkeiten: Mit Nein die Abwehr abzuwenden oder mit jeder anderen Taste die Installation fortzusetzen.
Am Sonntag, 2. Dezember 2007 schrieb Gerhard Brauer:
Gruesse!
* Pierre Schmitz <pierre@archlinux.de> schrieb am [02.12.07 19:49]:
Am Sonntag, 2. Dezember 2007 19:41:21 schrieb Gerhard Brauer:
At the moment i could do this, Kernel on ISO is 2.6.22. But when 2.6.23 reaches the ISO, we have the same problem as now: a collision between uname -r/lib/modules from ISO to stock kernel.
no, because all modules are within the initrd.
Hello my Massa("Meister"),
*that* sounds simple, *that* seems to be KISS...
I think, we have a knew theme for wiki.archlinux.de ;-)
Bye Gerhard
exactly the initrd is the rescuesystem that contains all modules too. greetings tpowa -- Tobias Powalowski Archlinux Developer & Package Maintainer (tpowa) http://www.archlinux.org tpowa@archlinux.org
Am Sonntag, 2. Dezember 2007 20:00:03 schrieb Gerhard Brauer:
*that* sounds simple, *that* seems to be KISS...
Well, imho a rescue kernel is not that important as one would think. I could even remember the last time I had a non booting kernel. For local systems you should allways have an install CD or similar at hand. A backup kernel does not help if you filesystem is broken. And for servers: in addition to a serial console to access the server even before booting you should have the ability to boot from network. Pierre -- archlinux.de
Gruesse! * Xavier <shiningxc@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!
participants (6)
-
Gerhard Brauer
-
James Rayner
-
Pierre Schmitz
-
Tobias Powalowski
-
w9ya@qrparci.net
-
Xavier