Hi,
Any one know how the Centos 5 kickstart initrd.img was built? I'll be very appreciated if any light can be shed on this topic. The basic problem to be solved here is: how to build a custom vmlinuz+initrd.img for Centos 5 kickstart with my own custom built kernel?
I am not sure mkinitrd is the right tool for this purpose? If do, which are the modules I should include with '-preload' options? And if there are any extra files/steps I should include/follow for the initrd.img file? Not sure how the stage2.img is loaded by kernel after initrd.img is loaded and run. Please help.
--Guolin
Hi,
I've tried run mkinitrd to create an initrd.img file for Centos 5 Kickstart, but it turns out that the default initrd.img is quite different from the initrd.img file created with mkinitrd. Any one know how to create a Kickstart initrd.img with custom kernel? Or the hacking steps on a existing Centos 5 kickstart initrd.img?
root@Centos5TestBox aaa]# ls -alF original mkinitrd/
mkinitrd/:
total 40
drwxr-xr-x 9 root root 4096 May 30 17:22 ./
drwxr-xr-x 4 root root 4096 May 30 17:29 ../
drwx------ 2 root root 4096 May 30 17:22 bin/
drwx------ 3 root root 4096 May 30 17:22 dev/
drwx------ 2 root root 4096 May 30 17:22 etc/
-rwx------ 1 root root 1833 May 30 17:22 init*
drwx------ 2 root root 4096 May 30 17:22 lib/
drwx------ 2 root root 4096 May 30 17:22 proc/
lrwxrwxrwx 1 root root 3 May 30 17:22 sbin -> bin/
drwx------ 2 root root 4096 May 30 17:22 sys/
drwx------ 2 root root 4096 May 30 17:22 sysroot/
original:
total 52
drwxr-xr-x 11 root root 4096 May 30 17:21 ./
drwxr-xr-x 4 root root 4096 May 30 17:29 ../
-rw-r--r-- 1 root root 62 May 30 17:21 .buildstamp
-rw-r--r-- 1 root root 123 May 30 17:21 .profile
lrwxrwxrwx 1 root root 4 May 30 17:21 bin -> sbin/
drwxr-xr-x 2 root root 4096 May 30 17:21 dev/
drwxr-xr-x 3 root root 4096 May 30 17:21 etc/
lrwxrwxrwx 1 root root 10 May 30 17:21 init -> /sbin/init*
drwxr-xr-x 2 root root 4096 May 30 17:21 modules/
drwxr-xr-x 2 root root 4096 May 30 17:21 proc/
drwxr-xr-x 2 root root 4096 May 30 17:21 sbin/
drwxr-xr-x 2 root root 4096 May 30 17:21 selinux/
drwxr-xr-x 2 root root 4096 May 30 17:21 sys/
drwxr-xr-x 2 root root 4096 May 30 17:21 tmp/
drwxr-xr-x 6 root root 4096 May 30 17:21 var/
root@hello11 aaa]#
--Guolin
________________________________
From: kickstart-list-bounces@redhat.com [mailto:kickstart-list-bounces@redhat.com] On Behalf Of Guolin Cheng Sent: Wednesday, May 30, 2007 4:45 PM To: centos@centos.org; Discussion list about Kickstart Subject: How the Centos 5.0's kickstart initrd.img is build??
Hi,
Any one know how the Centos 5 kickstart initrd.img was built? I'll be very appreciated if any light can be shed on this topic. The basic problem to be solved here is: how to build a custom vmlinuz+initrd.img for Centos 5 kickstart with my own custom built kernel?
I am not sure mkinitrd is the right tool for this purpose? If do, which are the modules I should include with '-preload' options? And if there are any extra files/steps I should include/follow for the initrd.img file? Not sure how the stage2.img is loaded by kernel after initrd.img is loaded and run. Please help.
--Guolin
On Wed, May 30, 2007 at 05:33:24PM -0700, Guolin Cheng wrote:
Hi,
I've tried run mkinitrd to create an initrd.img file for Centos 5 Kickstart, but it turns out that the default initrd.img is quite different from the initrd.img file created with mkinitrd. Any one know how to create a Kickstart initrd.img with custom kernel? Or the hacking steps on a existing Centos 5 kickstart initrd.img?
The initrd used with anaconda doesn't support module pre-loading or module ordering. It's a simple loader.
You can hard code the modules in the source, I guess: 1. get anaconda's source rpm; 2. rpm -i anaconda.src.rpm 3. rpmbuild -bc .../SPECS/anaconda.spec 4. cd .../BUILD/anaconda* 5. change the sources as needed 6. make 7. rebuild the image with /usr/lib/anaconda-runtime/buildinstall
But do you really need to force a specific order for network interfaces? You can specify that anaconda should use the nic with link for installation and even (in new anacondas - centos 5) the nic that you booted from with pxe.
Afterwards, it's a simple matter of changing the HWADDR in /etc/sysconfing/network-scripts/ifcfg-eth* for the order you want.
Also, Dell has a utility that, on some hardware, changes the interfaces name to correspond to the written in the chassis.
As for storage, when kickstarting an installation you can specify modules that you want disabled while installing, to force using the one you want. Afterwards, use lvm or mount by label/uuid.