On Tue, 2006-05-16 at 18:26 +0200, Gianluca Cecchi wrote: > I have read instructions at > http://fedoranews.org/contributors/gene_czarcinski/update_distro/ > I have basically one question: how to update the vmlinuz and > initrd.img files to put under isolinux directory of CD/DVD, so that > the installation kernel is the 2111 one and not the default 2054? > Do I have to compile the kernel source rpm with any specific target? > I remember in rh el 3 I was able to use a specific config file for the > installation kernel... > but it seems it is not here in Fedora. > Is it the i586 one? And what about the initrd.img file generation? Dear Gianluca, These are all really good questions. I assume you'd like to do this with FC 5, since I think 2054 was the default for FC 5. We've had some discussion on anaconda-devel-list about how to build modified installation CD images. A guy named Dan Carpenter has posted some scripts that have helped, and I personally managed to use his scripts (well, a variant of them, for which I posted the URL to the list -- you can look at this month's archives) to build an FC 5 installation CD that had my own packages on it and my own version of Anaconda. This required rebuilding the initrd. However, I did not replace the kernel. (The motivation here was that FC 5's Anaconda has a bug in it that crashes when it tries to find the CD drive on an IBM Blade Center, if the Kickstart file is on CD. Although I fixed the bug and posted the URL for the patches, it would be a lot less work, in most cases, just to work around it by reading the Kickstart file off of a floppy disk.) However, even though the scripts rebuild the initrd, I was using the kernel that came with the initrd. I believe that the kernel builds for the initrd and installer CD are identical to the stock kernel that ships with FC 5 and is installed. So using the stock one from the RPM should be safe. If you want to recompile the kernel for some reason, then the .config file from that kernel is probably pretty safe too. I know that Hans K. Rosbach (at http://fedora.isphuset.no/ ) has rebuilt the Fedora Core 4 installation CD set, with updated RPM packages, including an updated installation kernel. He calls it "Unofficial FC 4.2". I'm certainly curious to know how he rebuilt the initrd for FC 4 with the updated installer kernel; I myself failed to do it. Here's the story, in case you find it helpful to know about a path that didn't work for me: I've been putting together an installation CD for us to use here at Mazu Networks to install on our Mazu Profiler security appliance (a hardware box that we sell). We want a single CD that has bundled on it the Kickstart file we use and all of the packages we want to install. After I got the FC 5 version working (by fixing Anaconda, as I mentioned above), we made a technical decision to base the current release of the product on FC 4. The problem here is that the distributed FC 4 installer comes with kernel version 2.6.11-1.1369_FC4. 2.6.11 has a bug in the keyboard driver which causes a kernel panic when booting on the IBM Blade Center. 2.6.16 doesn't have it. So, before I discovered Hans Rosbach's kernel, I attempted the following sequence: * Got the new kernel. Unpacked it with the help of rpm2cpio. * Copied the first CD over to hard drive (write-able media). Let's say to the directory CD/ . * unpack the initrd on the CD: mkdir initrd; cd initrd; gzip -d -c < ../initrd.img | cpio -d -i * Unpacked the modules.cgz file on the CD (same format as the initrd) * Replaced the modules in it with matching ones from the new kernel, including having an appropriately-named subdirectory containing the modules. (This doesn't work for the MPT SCSI driver, which now needs three different kernel mods to work together, where it used to have two, but that's probably not relevant for you. Anyway, what I'm talking about didn't work.) * Repacked modules.cgz. Put it in the same place as the old one in my initrd subdirectory. * Repacked initrd: cd initrd; find . -print | cpio -o -c | gzip -9 -c>../initrd-new.img * cp initrd-new.img CD/isolinux/initrd.img * cp new-kernel/boot/vmlinuz CD/isolinux/vmlinuz * Reburned the CD with: mkisofs \ -o $ISO_DEST -r \ -b isolinux/isolinux.bin -c isolinux/boot.cat \ -no-emul-boot -boot-load-size 4 -boot-info-table \ CD/ Anyway, doing this led to a kernel panic: VFS: Unable to mount root FS on unknown-block(9, 1) And the stack trace is: panic => mount_block_root => sys_mknod => initrd_load => prepare_namespace => sys_access => init So, I obviously got something wrong there, but have no idea what it was. Just wanted to save you some time by telling you what doesn't work. As someone else on the list has mentioned, there are scripts available in the Anaconda distribution in the "scripts" directory. They are undocumented and I think it would take a lot of trial-and-error and study to learn to use them, but you might have to. If you do, please write up your experience and post it. Good luck! -- Steven Augart Mazu Networks Cambridge, Massachusetts, USA -- fedora-devel-list mailing list fedora-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/fedora-devel-list