Brad Hinson wrote:
Sterling James wrote:
(ex: mkinitrd /boot/initrd-2.2.5-15.img 2.2.5-15)
How do I get the new dasd added to this RedHat system?
Thanks to anyone who can help.
Check out http://kbase.redhat.com/faq/docs/DOC-2404, "How do I add a new
DASD to a Red Hat Enterprise Linux guest in z/VM (IBM's virtualization
manager)?"
Let me know if that helps
First, please excuse the lack of understanding but the url raised two
questions for me;
1) Is the "cp initrd-$(uname -r).img initrd-$(uname -r).img.orig",
just, a
backup? Or am I missing it's intent?
Yep, this is optional and purely for backup purposes.
2) The "mkinitrd -f initrd-$(uname -r).img $(uname -r)"; assuming "uname
-r" returns the current level of the running kernel, if you're doing
several things during a small maintenance window, e.g. - applying
patches,
adding dasd, and with this scenario existing;
You are correct. This command assumes you want to rebuild an initrd for
the currently running kernel. If you have multiple kernels installed,
or are building an initrd during a maintenance window where your running
kernel does not match your production kernel version, you'll have to
manually specify the kernel version instead of using $(uname -r).
It's a bad example, because it introduces a complication not all readers
understand. It should provide a proforma example, then expand it with
examples one of which might use $(uname -r), explaining it's for the
running kernel, and maybe another using rpm -q to show how to do it for
all installed kernels.
Since grubby is supposed to do this (and more), maybe it should show use
of grubby.
For a list of kernels on your system,
rpm -q kernel
To see what happens when kernels are installed/removed,. choose one from
the list above and do like this:
rpm -q --scripts kernel-2.6.18-128.4.1.el5.x86_64
Here's what I see on my desktop:
09:19 [sum...@bobtail ~]$ rpm -q kernel
kernel-2.6.18-128.1.6.el5.x86_64
kernel-2.6.18-128.1.10.el5.x86_64
kernel-2.6.18-128.1.14.el5.x86_64
kernel-2.6.18-128.4.1.el5.x86_64
09:22 [sum...@bobtail ~]$ rpm -q --scripts kernel-2.6.18-128.4.1.el5.x86_64
postinstall scriptlet (using /bin/sh):
if [ `uname -i` == "x86_64" -o `uname -i` == "i386" ]; then
if [ -f /etc/sysconfig/kernel ]; then
/bin/sed -i -e 's/^DEFAULTKERNEL=kernel-smp$/DEFAULTKERNEL=kernel/'
/etc/sysconfig/kernel || exit $?
fi
fi
/sbin/new-kernel-pkg --package kernel --mkinitrd --depmod --install
2.6.18-128.4.1.el5 || exit $?
if [ -x /sbin/weak-modules ]
then
/sbin/weak-modules --add-kernel 2.6.18-128.4.1.el5 || exit $?
fi
preuninstall scriptlet (using /bin/sh):
/sbin/new-kernel-pkg --rminitrd --rmmoddep --remove 2.6.18-128.4.1.el5
|| exit $?
if [ -x /sbin/weak-modules ]
then
/sbin/weak-modules --remove-kernel 2.6.18-128.4.1.el5 || exit $?
fi
09:22 [sum...@bobtail ~]$
--
Cheers
John
-- spambait
[email protected] [email protected]
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375
You cannot reply off-list:-)
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390