[arch-general] Reboot - Versioned Kernel Installs

C Anthony Risinger anthony at xtfx.me
Thu Jun 9 21:25:23 EDT 2011


On Jun 9, 2011 5:50 PM, "Heiko Baums" <lists at baums-on-web.de> wrote:
> Am Thu, 9 Jun 2011 17:36:21 -0500
> schrieb C Anthony Risinger <anthony at xtfx.me>:
>
>> does this sound genius or completely insane? some insanely genius guy
>> once said they are only separated by a fine line ...
>
> Sounds completely insane.

ooooook ... and ... why?

) initramfs is not very big (fallback on my sys is only 13MB + 2MB kern)
) keeps the whole thing in mkinitcpio
) does not affect any current images and is even backward compat
) small chance of absolute failure (i think :-)
) only small changes to mkinitcpio, if any at all
) ...
) ... KISS BABY!
) oh yeah and ... PROFIT!

im pretty sure it could be implemented as a hook (possibly 2) to the
current system ... this might even be the best way.  `install` hook
would unpack the current image to a known location (prob
`/lib/initcpio` somewhere), copy the kernel to the same place, and
then add the directory to the image (after removing the old-old image
if existed :-).  the real `hook` would then check for one of two
flags:

) kexec.flag ... kexec the old kernel with the boot.flag
) boot.flag ... chroot to "previous", run old hooks/mods/etc, exit
chroot, switch_root like normal

i thought it was pretty succinct ... elegant even :-)  ... with some
sprinkles of insanity that give it the funny but mildly enjoyable
aftertaste.  i don't have any free time for a couple days, but i'm
*pretty* sure this could be done as a hook to the current mkinitcpio
in a couple hours -- might take a whack at it this weekend, would be
useful, as i've personally mucked my boot more than once, and though i
can recover easily enough, i'm liking this more and more ...

... though i could very well be missing something obvious, certainly
wouldn't be the first time ... surely someone out there reads this and
thinks "why not?"

C Anthony


More information about the arch-general mailing list