PDA

View Full Version : replace_initrd VS. killinitrd_s2_xx


nazareth
10-31-2003, 05:07 PM
I'm somewhat new to this level of hacking but have successfully hacked my HDVR2 to add monte/base/tivoweb. After reading thru many posts, I'm wondering if someone can clarify my understanding of this step.

For the "new" image, be it 3.1.1b or other, to use this as the chained image, we need to "remove" the initrd because this is what does the filesystem integrity checking. So far, I've seen two utilities that perform this step, killinitrd and replace_initrd. I've downloaded the source code, and notice that the killinitrd seems to have to patch kernel code locations (to prevent access of the initrd code), while the replace_initrd seems to look for a initrd signature, and replace the original data with new data. The killinitrd utility seems to be kernel version specific because of the locations it needs to patch. It seems that it would be better to use replace_initrd utility because it is kernel version agnostic.

However, to use the replace_initrd, you need to have a replacement image. I've done some searching, and it seems that if you have a romfs or cramfs (I'm not sure which) version of a filesystem with the linuxrc script in it, that should be sufficient to replace in any kernel. Is my understanding correct? Will the signature that replace_initrd look for always be the same? Does it matter if the fs is a romfs or a cramfs?

The early posts that used the replace_initrd approach seemed to before monte method was created. Now that more people can use the monte method, I was wondering if we should recommend to use the replace_initrd to reduce possible kernel patch problems.

Thanks,

Sean