[H-GEN] lilo down, I'm bummed

Tony Nugent tony at linuxworks.com.au
Fri Apr 5 04:56:31 EST 2002


[ Humbug *General* list - semi-serious discussions about Humbug and  ]
[ Unix-related topics.  Please observe the list's charter.           ]
[ Worthwhile understanding: http://www.humbug.org.au/netiquette.html ]

On Thu Apr 04 2002 at 16:55, Jimmy Freese wrote:

> Thanks guys.
> 
> did a lilo -r /etc/mnt and got:
> Warning: root at /mnt/etc has no /dev directory
> /etc/lilo.conf: No such file or directory
>
> do I have to do something with my lilo.conf file?

Do it like this:

lilo -r /mnt

That will make lilo do a "chroot" to /mnt, and act as if that was
the root filesystem.  That is, it will read /mnt/etc/lilo.conf and
use any references to the /boot directory in it as being /mnt/boot/

  (Assuming that /boot is on a small separate partition at the
  beginning of /dev/hda, make sure that you have your normal root
  partition mounted on /mnt and your normal /boot partition mounted
  on /mnt/boot/ -- the kernel boot images need to be "visible" to
  lilo in expected places when you are creating a new boot sector).

> Trying to be real careful cause I don't fully know what I am doing.

What you are attempting to do is to write a boot sector (that is
what /sbin/lilo does) that will use your normal /etc/lilo.conf so
that it is referencing the real kernel (and perhaps initrd) boot
images that normally live in your /boot partition (or directory).

One hint... it is sometimes an advantage to have the system bootable
from a boot floppy.  If the boot sector is put onto a floppy disk
rather than (or as well as) the boot sector on /dev/hda, then you
have an alternative way to boot your system without worrying about
what windoze has done to your hard drive's boot sector.

And because only one or two sectors (the boot sector) is read from
the floppy before booting the kernel from the hard drive, it is
quick.

In lilo.conf, change the line that tells lilo where to write its boot
sector:

boot=/dev/hda

to this:

# boot=/dev/hda
boot=/dev/fd0

Put a floppy into the drive and run lilo.  Only the boot sector will
be written to it (so it can be dos or ext2 formatted, doesn't
matter).  Next time you boot your system from this floppy, it will
quickly read the boot sector from it, present you with its usual
boot prompt, and boot from the kernel(s) on your hard drive.

> On Fri, 5 Apr 2002, Robert Brockway wrote:

> > On Fri, 5 Apr 2002, Johann Kwiatkowski wrote:

> > > Hi Jimmy,
> > >                 you need to run lilo as
> > >
> > > lilo -R /mnt
> >
> > Hi guys.  It's actually lilo -r /mnt to do the chroot.  -R sets the
> > default command line for the next time the boot loader executed.
> > Cheers,
> > 	-Rob

Redhat 7.2 comes with grub by default (lilo is now an option), and
it is a good change, I like it.

Cheers
Tony
---*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=---
  Tony Nugent <Tony at linuxworks.com.au>
  LinuxWorks - Gold Coast Qld Australia

--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.



More information about the General mailing list