[ale] Any way to patch a RedHat 4.2 boot.img file?

Marc A. Torres marct at lowbyte.com
Fri Jan 2 10:05:12 EST 1998


First, thanks for a very detailed post, it makes solving problems
so much easier.

On Fri, 2 Jan 1998, Susan Liebeskind wrote:
> Folks,
> 
> I'll bet I can't replace a module loaded by the 4.2 install boot.img, but I'll> ask anyway, in case someone has a clever hack. 

The short answer is yes it can be done, I have done it before.
It is a pain and before you go through it, just two quick questions:
  1) Why not do Redhat 5 and get it over since its out
  2) If your at gatech why not hook up to the lan, do a ftp 
     install from ftp.cc.gatech.edu 
     /pub/linux/distributions/redhat/redhat-5.0/i386/RedHat ?

> BACKGROUND:
> Subsequently, I figured out the magic to build a kernel that could
> recognize the CD player via the TMC950. Specifically I needed to compile the
> seagate.o module (that drives the TMC950) without the -DFAST32 define.
> Eureka. I had a working setup.  I could access CDs via Linux.  Life was good. 

  OK, there are two ways to do this.  1) compile the kernel with builtin
  support for the device you need (The way I did it) or 2) compile the
  module and try to get it into initrd.img on the boot disk.  #2 is a 
  much more involved process.

  1) Compile a new kernel with your usual selections, the changed 
     define, and in "Floppy, IDE, and other block devices" say Y to
     "RAM disk support" and "Initial RAM disk (initrd) support" or
     the new disk will not boot.  Also include filesystem support 
     for FAT, msdos, iso9660.  Do a "make zImage" the new kernel will
     be found at /usr/src/linux/arch/i386/boot/zImage

     Create the boot floppy, mount it and install your kernel:
      mount /dev/fd0 -t msdos /mnt
      cd /mnt
      rm vmlinuz
      cp /usr/src/linux/arch/i386/boot/zImage vmlinuz
      cd /
      umount /mnt

     Boot with the new kernel, follow through the menus.  Problems
     you may have:  Kernel to big to fit on floppy, use make bzImage.
     When you select scsi from the install menus you get an error or
     warning, ignore it.  Thats the 'bad module' not being able to get
     the major and minor device it wants because the builtin already
     has them registered.  

     If the normal install doesn't work you will have to use the 
     shell that Redhat has running on VT 4 or 5 and mknod the /dev/scd0
     file then mount the cdrom manualy.  Don't put it on /mnt because
     the installer uses that for the new root you will be creating or
     upgrading.  When you switch back to the installer in VT 1 just 
     tell it you are installing from local disk and give it the path
     you just mounted the cdrom to plus RedHat.  Eg "/cdrom/RedHat"

     Warning:  90% of this is from a nearly year old memory so YMMV.
     
> It's not simply a case of creating a new boot disk -- the boot.img file
> is special in that it immediately invokes the installation script, and
> I don't have a clue how that install script is invoked. 

  Not that special, ;-) see above.

  Check out the file /usr/src/linux/Documentation/initrd.txt it describes
  some of the smoke and mirrors the boot disks accomplish.

  I think that will work,
  Marc Torres
  marct at lowbyte.com






More information about the Ale mailing list