[EMAIL PROTECTED] schrieb:
> Hi to everybody,
> 
> I'm trying to create new kernel26.img specifying which /lib/modules/X
> dir to use in order to create a new entry for grub and to be able to
> choose which kernel to load at boot time (similar to what happens when
> you upgrade your kernel in other distros).
> 
> This is what I've done:
> cp -a /lib/modules/2.6.20-ARCH to /lib/modules/2.6.20.4-1
> depmod 2.6.20.4-1
> mkinitcpio -k 2.6.20.4-1 -g /boot/kernel26.img-2.6.20.4-1
> 
> edit menu.lst to add an entry for the new image.
> 
> All I obtain is a kernel panic as described in my forum topic:
> http://bbs.archlinux.org/viewtopic.php?id=31754

Your problem is a technical one: The kernel version is hardcoded in the
kernel (the string you obtain with uname -r). In your case, that is
2.6.20-ARCH. When you run mkinitcpio -k 2.6.20.4-1, the modules are put
in /lib/modules/2.6.20.4-1/ in the initramfs, but modprobe looks for the
modules in /lib/modules/2.6.20-ARCH/.

While you could work around that with symlinking, your method still has
a systematical error: Even if you can make the initramfs boot, once the
system has booted, the modules in /lib/modules/2.6.20-ARCH/ (in the real
system, not initramfs) will be used, so backing up the old modules
directory will not help you.

If you want a backup kernel that always works, you can proceed like this:
* Choose a kernel version that works for you
* Get the PKGBUILD and other required files from archlinux CVS for that
version.
* Edit the PKGBUILD and change the pkgname to something else, like
kernel26-backup. Change the installation path from vmlinuz26 to
vmlinuz26backup. Then edit the 'config' file and change the EXTRAVERSION
variable from '-ARCH' to '-backup' (adjust the md5sum in the PKGBUILD).
* Change the names for kernel26.preset, kernel26.kver and
kernel26-fallback.conf in the PKGBUILD to kernel26backup.preset etc.
Then change the preset file accordingly. (Adjust md5sums in the
PKGBUILD!). You may have to adjust the kernel26.install file to create
kernel26backup initramfs images.
* Build the package with makepkg and install it.

Now you have a separate kernel with modules in
/lib/modules/2.6.20-backup, and initramfs image in
/boot/kernel26backup.img and kernel in /boot/vmlinuz26backup. You can
always resort to that kernel when a new ARCH kernel fails for you. You
should rebuild that kernel every 6 months or so to avoid compatibility
issues with newer udev versions (or other important tools).

HTH
Thomas

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
arch mailing list
[email protected]
http://archlinux.org/mailman/listinfo/arch

Reply via email to