[SLUG] Re: [Solved] Re: boot problem with new kernel

From: Ian Blenke (icblenke@nks.net)
Date: Thu Jul 15 2004 - 12:13:31 EDT


Tevfik Yücek wrote:

>On Wed, Jul 14, 2004 at 05:48:28PM -0400, Tevfik Yücek wrote:
>
>
>>Hi all,
>>
>>I screwed the stuff in the first step.
>>
>>I compiled the new kernel, copied the image to /boot/ directory and
>>updated lilo.cnf and run lilo. However, I commented out the part for
>>old kernel image. Now I have two options in the startup, my windoze
>>partition and new kernel. When I tried to boot with new kernel I get
>>the following error:
>>
>>Kernel panic: VFS: unable to mount root fs on hda1
>>
>>I just copied the part in lilo.conf and changed the image= part.
>>Anyway, is there a way to reboot my computer with old kernel and
>>change the lilo.conf so that I can try to fix the above error? I
>>have the installation disks for the linux.
>>
>>
>
>
>I booted the system with CD1 and mounted /dev/hda1 to /mnt/hda1.
>Then fixed lilo.conf and run "/mnt/hda1/sbin/lilo -C
>/mnt/hda1/etc/lilo.conf" and had to fix some lines in lilo.conf to
>point the directories/files *in* /mnt/hda1/xxx. Interestingly that
>worked.
>
>
That's really what lilo's -r flag is for. If you use the -r flag, your
paths can remain as they were.

    # mount /dev/hd1 /mnt/hda1
    # vi /mnt/hda1/etc/lilo.conf
    # lilo -r /mnt/hda1

Alternatively, you can chroot into that directory as well.

    # chroot /mnt/hda1 /bin/bash
    # lilo

Be forewarned: if you have a separate /boot partition, you should mount
that under that false root as well before running lilo.

For example, if you have a /boot as /dev/hda1 and a root as /dev/hda3,
you might use:

    # mount /dev/hda3 /mnt
    # mount /dev/hda1 /mnt/boot
    # lilo -r /mnt

or use chroot then lilo, either way.

- Ian

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:29:38 EDT