Help - Search - Members - Calendar
Full Version: Problems editing Lilo..now installing Gru
MandrivaUsers.org > General Help > Installing Mandriva
lawsonrc
I did the following suggested by a friend after I edited my lilo.conf (I wanted to have mdk9.2- at the beginning of each label).


"You have to type lilo at a root prompt to run lilo so
it will read the /etc/lilo.conf file and update the MBR."

I edited the lilo.conf file, rebooted, then I opened a terminal and su'ed to root. I typed lilo and here are my results:

Added mdk9.2-linux
Added mdk92-lin-nonfb
Added mdk9.2-failsafe
Added mdk9.2-2422-21
Fatal: Default image doesn't exist.

I don't understand what the Fatal line means. When I shutdown and rebooted again, the changes aren't there.

I appreciate any and all help.

Richard L.
pmpatrick
Post your lilo.conf file. The message means that lilo cannot find the initrd.img file for that kernel, problably because the path was not properly specified in lilo.conf.
lawsonrc
Thanks pmpatrick.

Here is my lilo.conf

boot=/dev/hda
map=/boot/map
default="linux"
#keytable=/boot/us.klt
prompt
nowarn
timeout=100
#message=/boot/message
menu-scheme=wb:bw:wb:bw
image=/boot/vmlinuz
label="mdk9.2-linux"
root=/dev/hda5
initrd=/boot/initrd.img
append="devfs=mount hdc=ide-scsi acpi=on resume=/dev/hda2 splash=silent"
vga=788
read-only
image=/boot/vmlinuz
label="mdk92-lin-nonfb"
root=/dev/hda5
initrd=/boot/initrd.img
append="devfs=mount hdc=ide-scsi acpi=on resume=/dev/hda2"
read-only
image=/boot/vmlinuz
label="mdk9.2-failsafe"
root=/dev/hda5
initrd=/boot/initrd.img
append="devfs=nomount hdc=ide-scsi acpi=on resume=/dev/hda2 failsafe"
read-only

image=/boot/vmlinuz-2.4.22-21mdk
label=mdk9.2-2422-21
root=/dev/hda5
read-only
optional
vga=788
append=" devfs=mount hdc=ide-scsi acpi=on resume=/dev/hda2 splash=silent"
initrd=/boot/initrd-2.4.22-21mdk.img
bvc
change
default="linux"
to
default="mdk9.2-linux"

run lilo -v and reboot
lawsonrc
Thank you bvc and pmpatrick,

By changing the default to "mdk9.2-linux", and in a terminal su'ed to root, typed lilo -v, then I rebooted and HALLELUJAH! Lilo has been edited to my satisfaction.

I'm glad that pmpatrick suggested for me to post my entire lilo.conf and that bvc read it and came up with the solution.


Thanks again to you both!

Richard L.
bvc
here
QUOTE (lawsonrc)
BTW, I chose GRUB during the installation, but when I rebooted, Lilo still came up. Then I used MCC and changed to GRUB there. When I rebooted, I got the dreaded black screen with L88 and the 88's repeated about 25 times. (I think it was 88, it was a number in the 80's.)

Since I didn't know how to fix this, I took thirty minutes to re-install (no big deal) and just stayed with Lilo since MDK's Lilo doesn't play nice with the GRUB switch.

Was I supposed to reboot in command mode and type my username and password? Would that have switched me to GRUB?

also here
QUOTE (aRTee)
Richard,

don't know, if you don't mind, stick with lilo. I used lilo, then grub at some point, then back to lilo since it worked well (for some time, only grub could jump to partitions beyond 8GB on the harddisk) and grub users had some problems.

Don't know why one would prefer one over the other if the one you have just works.

If it doesn't, open a new topic and I'm sure there will be people with the right solution.


also here
QUOTE (bvc)
lawsonrc,

buggy installer I guess. I've always had probs getting the installer to install grub so I either tell it not to install a bootloader or let it install lilo and install grub myself.
QUOTE (lawsonrc)

Was I supposed to reboot in command mode and type my username and password? Would that have switched me to GRUB?

no it wouldn't have. You basically just boot normal to gui if you like, open a terminal, su to root, and do

lilo -u
urpmi grub
grub-install '(hd0)'
or
grub-install /dev/hda

to put grub on the mbr.

also here
QUOTE (lawsonrc)
Okay, bvc, this is what I did (and didn't do):

I was too afraid to do the "lilo -u" command because I feared that if I uninstalled lilo and then got some kind of error messages when trying to install grub, I would then not be able to boot at all into Mandrake9.2 again. Thus I'd have to do a re-install again and lose all the work I've done for acpi and other things.

Here is what I did as root in a terminal (I added the double quotes in this message for easier reading):

urpmi grub
"Everything already installed"
grub-install 'hdo'
"The file /boot/grub/stage 1 not read correctly"
grub-install /dev/hda
"/dev/hda does not have any corresponging BIOS drive.

Since you are familiar with my laptop, you know that it is a Legacy Free Bios laptop. I've been able to use grub before with MDK9.1 on this machine.

What next?

In advance, thanks! [I guess we should have started another thread for this in another forum, eh?]

Richard L.
bvc
QUOTE
grub-install 'hdo'
is not correct
grub-install '(hd0)'
is.
that's a zero, and you forgot ()

BUT!!! you have a /boot partition don't you? See below
grub-install --root-directory=/boot /dev/hda

info grub>Installation>using grub-install
CODE
Installing GRUB using grub-install
==================================

  *Caution:* This procedure is definitely deprecated, because there
are several posibilities that your computer can be unbootable. For
example, most operating systems don't tell GRUB how to map BIOS drives
to OS devices correctly, GRUB merely "guesses" the mapping. This will
succeed in most cases, but not always. So GRUB provides you with a
user-defined map file called "device map", which you must fix, if it is
wrong. *Note Device map::, for more details.

  Unfortunately, if you do want to install GRUB under a UNIX-like OS
(such as GNU), invoke the program `grub-install' (*note Invoking
grub-install::) as the superuser ("root").

  The usage is basically very easy. You only need to specify one
argument to the program, namely, where to install GRUB. The argument
can be either of a device file or a GRUB's drive/partition. So, this
will install GRUB into the MBR of the first IDE disk under Linux:

    # grub-install /dev/hda

  Likewise, under GNU/Hurd, this has the same effect:

    # grub-install /dev/hd0

  If it is the first BIOS drive, this is the same as well:

    # grub-install '(hd0)'

  But all the above examples assume that you use GRUB images under the
root directory. If you want GRUB to use images under a directory other
than the root directory, you need to specify the option
`--root-directory'. The typical usage is that you create a GRUB boot
floppy with a filesystem. Here is an example:

    # mke2fs /dev/fd0
    # mount -t ext2 /dev/fd0 /mnt
    # grub-install --root-directory=/mnt '(fd0)'
    # umount /mnt

  Another example is in case that you have a separate boot partition
which is mounted at `/boot'. Since GRUB is a boot loader, it doesn't
know anything about mountpoints at all. Thus, you need to run
`grub-install' like this:

    # grub-install --root-directory=/boot /dev/hda

  By the way, as noted above, it is quite difficult to guess BIOS
drives correctly under a UNIX-like OS. Thus, `grub-install' will prompt
you to check if it could really guess the correct mappings, after the
installation. The format is defined in *Note Device map::. Please be
careful enough. If the output is wrong, it is unlikely that your
computer can boot with no problem.

  Note that `grub-install' is actually just a shell script and the
real task is done by the grub shell `grub' (*note Invoking the grub
shell::). Therefore, you may run `grub' directly to install GRUB,
without using `grub-install'. Don't do that, however, unless you are
very familiar with the internals of GRUB. Installing a boot loader on a
running OS may be extremely dangerous.

QUOTE
I was too afraid to do the "lilo -u" command because I feared that if I uninstalled lilo and then got some kind of error messages when trying to install grub, I would then not be able to boot at all into Mandrake9.2 again. Thus I'd have to do a re-install again and lose all the work I've done for acpi and other things.
ohmy.gif you know better than that! That's what cd1>rescue>Install the bootloader is for cheeky.gif which I'm pretty sure you've done b4, BTW. When you do
lilo -v
you are half installing lilo. Same as mentioned above. When you do grub-install, you are only sorta installing. Doing grub is REALLY installing to the mbr. From cd1 rescue mode, you are REALLY installing lilo wink.gif




and for those that are curious, here's how to put grub on a floppy (also from info grub>Installation)

CODE
Creating a GRUB boot floppy
===========================

  To create a GRUB boot floppy, you need to take the files `stage1'
and `stage2' from the image directory, and write them to the first and
the second block of the floppy disk, respectively.

  *Caution:* This procedure will destroy any data currently stored on
the floppy.

  On a UNIX-like operating system, that is done with the following
commands:

    # cd /usr/share/grub/i386-pc
    # dd if=stage1 of=/dev/fd0 bs=512 count=1
    1+0 records in
    1+0 records out
    # dd if=stage2 of=/dev/fd0 bs=512 seek=1
    153+1 records in
    153+1 records out
    #

  The device file name may be different. Consult the manual for your
OS.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.