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

    Fixing MBR with lilo with a non-boot drive


    I'm trying to update the kernel on a hard drive with Linux installed on it. Let's call this HDD1. HDD1 doesn't allow me to boot up normally, so there's no way I can get a shell on it and apply lilo as a boot drive.

    I have another Linux installation which I boot from. Let's call this HDD2. I then connect HDD1 to the system that is booted up to HDD2. HDD2 is detected as /dev/sda and HDD1 is detected as /dev/sdb.

    I then mount HDD1 on some directory, say /fix, as follows:
    mount /dev/sdb1 /fix
    Then I go to /fix/etc and edit the lilo.conf to point to the new kernel in the "image = " section.

    How can I apply lilo and write to the boot sector of HDD1 instead of HDD2? Is it the following?

    chroot /fix/ /sbin/lilo -v -v
    Last edited by galapogos; 01-31-2011 at 04:54 AM.

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    The Keystone State
    It has been some time since I worked with lilo. Here is what I would try;

    download and burn either fedora or centos cd 1
    boot into rescue mode and let it mount the drive of the system
    run '/mnt/sbin/lilo -C /mnt/etc/lilo.conf' (I believe this is where it is mounted. Please check after boot)

    That should install lilo on the MBR of the drive you have configured in lilo.conf.


    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

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