[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Very different layout -- RE: How the Centos 5.0's kickstart initrd.img is build??



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?

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.


Last time I created an initrd for EL, I hacked on an existing one by ungzipping it, then unpacking with cpio.

To put it back together, I used cpio and didn't bother compressing it.

Worked fine, should work here. I forget what I was kickstarting, may well have been an EL5 beta.




--

Cheers
John

-- spambait
1aaaaaaa coco merseine nu  Z1aaaaaaa coco merseine nu

Please do not reply off-list


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]