Menu

Problem in configuring & booting Lilo

Help
Azadeh
2007-06-19
2013-03-26
  • Azadeh

    Azadeh - 2007-06-19

    Hi All,
    I have a new compiled kernel-2.6.12.3 on the CENTOS 4.4 with kernel-2.6.9-42. the   lilo configuration is : /etc/lilo.conf :

    prompt
    timeout=20
    default=linux
    boot=/dev/hda
    map=/boot/map
    install=/boot/boot.b
    message=/boot/message
    linear

    image=/boot/vmlinuz-2.6.12.3-divert
         label=linux
         initrd=/boot/initrd-2.6.12.3-divert.img
         read-only
         root=/dev/VolGroup00/LogVol00
         append="rhgb quiet"

    image=/boot/vmlinuz-2.6.9-42.ELsmp
         label=oldlinux
         initrd=/boot/initrd-2.6.9-42.ELsmp.img
         read-only
         root=/dev/VolGroup00/LogVol00
         append="rhgb quiet"

    image=/boot/vmlinuz-2.6.9-42.EL
         label=linux-up
         initrd=/boot/initrd-2.6.9-42.EL.img
         read-only
         root=/dev/VolGroup00/LogVol00
         append="rhgb quiet"

    and then I run in /etc:    lilo -t
    the result was :

    Added linux *
    Added oldlinux
    Added linux-up
    The boot sector and the map file have *NOT*  been altered.

    and by runing "lilo -v" I got:

    LILO version 21.4-4, Copyright (C) 1992-1998 Werner Almesberger
    'lba32' extensions Copyright (C) 1999,2000 John Coffman

    Reading boot sector from /dev/hda
    Merging with /boot/boot.b
    Mapping message file /boot/message
    Boot image: /boot/vmlinuz-2.6.12.3-divert
    Mapping RAM disk /boot/initrd-2.6.12.3-divert.img
    Added linux *
    Boot image: /boot/vmlinuz-2.6.9-42.ELsmp
    Mapping RAM disk /boot/initrd-2.6.9-42.ELsmp.img
    Added oldlinux
    Boot image: /boot/vmlinuz-2.6.9-42.EL
    Mapping RAM disk /boot/initrd-2.6.9-42.EL.img
    Added linux-up
    /boot/boot.0300 exists - no backup copy made.
    Writing boot sector.

    but as I restarted and wanted to boot with new kernel (2.6.12.3-divert) I got this message:

    PCI:Can not allocate resorce region 4 of device 0000:00:07.1
    audit(1182733192.101:0):initialized
    Kernel panic-not syncing:VFS:Unable to mount root fs on unknown-block(253,0)

    and It will stop here!
    Any suggestions?any ideas is appreciated.tnx.

    Azadeh

     
    • Kunio

      Kunio - 2007-06-21

      Hi,

      This is not a divert specific problem.

      It looks like your kernel or initrd file is missing support functions to access your filesystem (/dev/Volgroup/ etc). You may need to carefully look at and modify .config with your working kernel and make the divert kernel again.

      Please not that
      I had a similar problem with SATA HDD on Dell PCs, which cannot be
      read without a correct initrd file.
      But I am not so sure in this case.

      1) .config is probably located as /lib/modules/kernel-version(2.6.2 etc.)/build/.config or in the top of the kernel source directly.

      Compare .config for divert kernel and .config of the original/working kernel. You may directly edit .config file, but standard
      way is to select the function (Multi device support RAID and LVM?) with
      "make menuconfig". If CONFIG_SOMETHING=y or m in the old(working) .config,
      choose the same in the new kernel.

      Kernel module names are probably included in /etc/modprobe.conf.
      In my case,
      alias scsi_hostadapter ata_piix

      2) If 1) is already OK. Then check the initrd file for the new kernel. If the kernel module for your filesystem is not included in the
      initrd file, the kernel cannot access the root file system.

      Is it automatically created? (The Linux distribution I use does not
      create initrd when a new kernel is installed.)

      If not, make initrd with

        /sbin/mkinitrd kernel-version OUTPUTFILENAME

      (Note kernel-version is the character string in
         /lib/modules/kernel-version/)

      To take a look at the contents of the initrd file (probably gzipped)
        gunzip -c initrd-version.img > initrd-test
        mkdir /mnt/loop (if not exist)
        mount initrd-test /mnt/loop -o loop
        (you may cd to /mnt/loop and take a look at the files)
        when you have done.
        cd / (exit from /mnt/loop
        umount /mnt/loop

      Kernel module names required are probably included
      in /etc/modprobe.conf.

      In my case,
      alias scsi_hostadapter ata_piix
      is required and it is included in initrd.img.

      Hope this helps,

      Kunio

       

Log in to post a comment.