Moving a kernel image from IDE to SATA
I have a 16MB image of a bare bones kernel installation that was previously created using a 2.4 kernel and runs off /dev/hda1. It works when I copy the image directly into a IDE device and boot off it. The boot loader is nuni, and I've also tried it with LILO.
I recently upgraded the kernel to 126.96.36.199, and it still works with IDE devices. However, I wish to also move to SATA drives. Without changing the root_dev of the image, I'm able to get the image working on SATA drives, provided the PC's BIOS is able to do IDE emulation with SATA devices.
However, not all PCs have this option. In fact most laptops will not be able to do this since their BIOS options are very limited. In this case I get a kernel panic when booting up.
Hence I wish to support SATA natively with the kernel/image. However, I haven't been successful in doing so. Here's how I'm doing it.
I try to boot up the SATA drive either in IDE emulation mode, or with bochs emulator in software(with the image file).
With LILO/nuni, I've tried passing root=/dev/sda1 as a kernel parameter by modifying lilo.conf/nuni.kcl, but LILO doesn't even allow me to write the MBR with that information because when I'm booted up with the device in IDE emulation mode, it's being recognized as /dev/hda, so LILO complains of no such device as /dev/sda. nuni allows me to write the MBR, but doesn't work after that.
I've also tried recompiling the kernel and manually making root_dev as /dev/sda(801), but this did not work either.
Does anyone know how I can solve my problem?