[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: LILO Problem



On Thu, Jan 11, 2001 at 07:57:58PM -0800, Dale Morris wrote:
> Big learning curve here.

Actually, it's not as bad it seems. :-)

> I just checked and it is on the secondary controller. What now?

Good.  Moving the drive should be fairly straightforward.  Excuse me if it
is a bit longish.  Easier to give you detailed info now just in case you
run into a problem.

   1. You need to have working floppy boot/rescue disk.  Debian's
      CD or root/rescue floppy set are ideal.  Make sure they work
      as a rescue disk!  Pass root=<what_your_root_partition_is>
      at the lilo prompt.

   2. Backup /etc/fstab and /etc/lilo.conf

   3. Edit (carefully) /etc/fstab.  Change all references to hdcX (where X
      is the partition) to hdaX.  No need to change the partition number.
      It *is* a good idea to write down what mount point each partiton
      goes with "just in case".

   4. Edit (carefully) /etc/lilo.conf.  Change any references to hdc to hda.
      Same as above.  DON'T run lilo!

   5. Shutdown the machine, open it up and move the drive.

   6. Make sure your BIOS sees the drive as master on the primary controller
      and will boot from it.

   7. Boot with the Debian CD/rescue disk, passing it the root *Linux*
      partition.  If it was /dev/hdc1 before the move, it is /dev/hda1 now,
      e.g. root=/dev/hda1

   8. You should be back into your system.  You should be able to run lilo 
      and not have it complain.  If it complains, fix /etc/lilo.conf as needed
      Reboot the machine to be sure all is good.  That's it!

Suppose step 8 didn't work.  You could not get back into the machine.  Maybe
a typo in /etc/fstab.  Go to Plan B, starting after #6 above...

   9. Boot using the Debian CD/floppy set, choose new install. configure
      the keyboard.  When you get to main menu STOP.  (That's the one where
      you can partitiion/mount/format the hard drive, etc.)
      
  10. Be careful here!!!  You want to 'mount previously initialized partition'.
      Here's where the notes you made in #3 come in handy.  You should only
      need to mount the root Linux partition.

  11. Do an ALT-<F2> to get a shell.  Run 'mount'.  Debian install mounts
      the partitions under /target as I recall, but double-check.

  12. Do 'chroot /target' (or whatever mount point root is on).  Doing 'ls'
      should show the root Linux partition of your hard drive.  Use the 
      '/bin/ae' editor to modify /etc/fstab and/or /etc/lilo.conf as needed.

  13. Run '/sbin/lilo -v'.  Fix any complaints.

  14. Do an ALT-<F1> to get back to the Debian install and choose 'reboot
      system'.  The world should be happy again!

With more experience, you can get away with using only Plan B.  But play
it safe the first time.  Hopefully, you won't need Plan B. :-)
      
> thanks for your help
> you guys are great

Glad to help out.  Hey, and we didn't even ask for your credit card number
first or put you on hold forever. :-)  Good luck and let us know how you
make out.

             bob
-- 
bob billson          email: reb@theshed.dhs.org        ham: kc2wz
                            bob@goleader.com           Linux geek    /)
 "Níl aon tinteán mar do thinteán féin."               beekeeper  -8|||}
        --Dorothy                                                    \)
                   Athbhliain faoi Shéan agus faoi Shona Dhuit!



Reply to: