building RH 5.1 installation floppies

building RH 5.1 installation floppies

Post by I Lee Hetheringto » Tue, 27 Oct 1998 04:00:00



We have a new Dell Precision Workstation 610 that has two onboard SCSI
controllers, an Adaptec 7890 and 7880, with the disk hung off the 7890.
The trouble is that I need a 2.1.x kernel for 7890 support.

I've bootstrapped the system by* another disk off the 7880,
loading RH 5.1, and getting the system up and running.  With kernel
2.1.125, I can see the 7890 now.

Here is what I'd like to do: build a different set of RH 5.1 boot
floppies with my new 2.1.125 kernel instead of the normal 2.0.x kernel.
This way I should be able to install directly to the main disk on the
7890.  I'm hoping I can replace the kernel on the floppy, although I
might have to fuss around with the initial ramdisk, and I am unsure how
to do that.

Has anyone done anything like this before?

--Lee Hetherington

 
 
 

building RH 5.1 installation floppies

Post by Henrik Storn » Tue, 27 Oct 1998 04:00:00



Quote:>Here is what I'd like to do: build a different set of RH 5.1 boot
>floppies with my new 2.1.125 kernel instead of the normal 2.0.x kernel.
>This way I should be able to install directly to the main disk on the
>7890.  I'm hoping I can replace the kernel on the floppy

Yes, this is quite possible. The easiest way of doing it is to build your
kernel with all of the necessary drivers statically linked into the
kernel image (i.e., don't build them as modules). Make sure that you include
support for CD-ROM, the ext2 and msdos filesystems (used by the install
program), and your disk+network hardware. You should also include support
for the "loop" device (CONFIG_BLK_DEV_LOOP).

Then simply copy the new kernel image over the "vmlinuz" file that is on the
boot floppy - this floppy is an MS-DOS formatted disk, BTW.

Of course, this requires that your custom kernel is small enough that it
will fit on the floppy. If it is too big, the easiest thing is to copy
the kernel image, the initrd file (from the boot floppy) and the "loadlin.exe"
file to the harddisk, and then boot the install program with loadlin:
   loadlin vmlinuz initrd=initrd.img
A somewhat more difficult approach is to modify the initrd.img file - this
is in fact a compressed, virtual ext2 filesystem. So to modify it:
   zcat initrd.img >initrd
   mount -o loop -t ext2 initrd /mnt/loop
   <modify files below /mnt/loop>
   umount /mnt/loop
   gzip -c -9 <initrd >initrd.img

In any case, be aware that the installation program will dump the STANDARD
Red Hat 5.1 kernel onto the installed system, so you will need to boot
from the floppy again and then update the kernel to the one you built for
yourself. At the LILO: prompt, enter "vmlinuz root=/dev/sdaX" (change to
match the name of your root partition), and your system should boot with
your custom kernel, but otherwise normally. Install the custom kernel, modify
LILO settings, run /sbin/lilo and you're done.

(And yes, I really have been doing this too many times :-))

--
Henrik Storner
                              Praetra censeo, Microsoftem esse delendam!
                                               (Thanks to Erik Corry).