Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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, 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?


  2. #2
    OK, so I managed to enable the debug messages(previously suppressed them) and the I'm trying the original image on a system that has a BIOS who allows either native SATA or IDE emulation.

    So the original image has the following properties:
    Linux kernel x86 boot executable RO-rootFS, root_dev 0x301, swap_dev 0x2, Normal VGA

    When booting up from it in IDE emulation mode, I'm able to get to the shell(busybox)

    However, when booting up in native SATA mode, I get kernel panic:
    kernel panic - not syncing:VFS:Unable to mount root fs on unknown-block(3,1)

    I'm using LILO, and booting up with the following lilo.conf(relevant portion)

    boot = /dev/hda
    delay = 10
    default = 2.4-shell
    vga = normal
    root = /dev/hda
    image = /boot/2.6/bzImage-
    label = 262219-hda1-sh
    root = /dev/hda1
    append = "init=/bin/sh"
    Any ideas on how to get it to work with native SATA?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts