lilo error
Aleksandar Milivojevic
amilivojevic at pbl.ca
Mon Mar 28 16:25:25 UTC 2005
kisha at lissaganda.com wrote:
> hi i have two fedora core 3 installed in a single IDE disk, after the 2nd install of fcore 3
> grub didnt boot my 1st fcore partition which i labeled 'pkg', thats why i download the rpm of lilo,
> then installed it, after adding some entries i run 'lilo' as root then i get this error message below.
> i hope anyone can help me fixing this problem, thanks.
>
> Added linux *
> Fatal: First sector of /dev/hda2 doesnt have a valid boot signature
>
> from fdisk -l
>
> Disk /dev/hda: 10.0 GB, 10005037056 bytes
> 16 heads, 63 sectors/track, 19386 cylinders
> Units = cylinders of 1008 * 512 = 516096 bytes
>
> Device Boot Start End Blocks Id System
> /dev/hda1 1 163 82120+ 83 Linux
> /dev/hda2 164 6258 3071880 83 Linux
> /dev/hda3 6259 7298 524160 82 Linux swap
> /dev/hda4 7299 19386 6092352 5 Extended
> /dev/hda5 * 7299 7461 82120+ 83 Linux
> /dev/hda6 7462 19386 6010168+ 83 Linux
>
> my lilo.conf
>
> prompt
> timeout=20
> default=linux
> boot=/dev/hda6
> map=/boot/map
> install=/boot/boot.b
> lba32
>
> image=/boot/vmlinuz-2.6.9-1.667
> label=linux
> initrd=/boot/initrd-2.6.9-1.667.img
> read-only
> append="root=LABEL=/1"
>
>
> other = /dev/hda2
> label = PKG
>
You should definetely read lilo.conf man page.
For your second Fedora install, you don't need to use "other". Other is
ment for things LILO don't know how to boot (basically, it would attempt
to load another boot loader from partition referenced).
Now, there are two ways to get things rolling. One by having single
lilo.conf that controlls both Fedora installations. Another where each
Fedora installation has its own separate lilo.conf.
First version (single lilo.conf).
Change boot line to "boot=/dev/hda". This will install LILO into MBR.
Mount your second fedora installation somewhere. Let say you mounted it
on /mnt, and I'll assume kernel version in both of your fedora
installations. Than, remote the "other" section, and use something like
this in place of it:
image=/mnt/boot/vmlinuz-2.6.9-1.667
label=fc3
initrd=/mnt/boot/initrd-2.6.9-1.667.img
read-only
append="root=LABEL=/"
LILO will figure out where /mnt is, and write itself into MBR with
correct partition references.
Make sure to remove grub/lilo packages from one of your installations.
When you update the kernel, you don't want funny things happening if
postinstall script changes "wrong" lilo.conf. Edit lilo.conf by hand on
"correct" installation.
Now, the other way to do things is to have two LILOs installed. One to
handle one Fedora installation, and another to handle your second
installation.
For this approach, I'd also recommend having one (main) LILO installed
in MBR. Simply change boot option to point to /dev/hda. I will assume
your first Fedora installation is /dev/hda6, and your second is /dev/hda2.
The first thing to do would be to boot from rescue, and select *second*
Fedora installation (/dev/hda2). When you get shell prompt, chroot
/mnt/sysimage. Verify you are in correct Fedora installation.
For this LILO, configure it to install itself into /dev/hda2
(boot=/dev/hda2). Check the image=... section to be correct.
Run "lilo" to write LILO into /dev/hda2.
Than, reboot from CD into rescue mode again, and select your first
installation (/dev/hda6). When you get shell prompt "chroot
/mnt/sysimage" and verify you are really in your first installation.
Configure LILO to go into MBR (boot=/dev/hda). Now you would use other
to reference your second installation (as you originally did). This
time it will work, because you really do have boot boot loader installed
into /dev/hda2 (when you booted into rescue mode for first time).
When you boot, first LILO (from MBR) will load second LILO from
/dev/hda2, which will load your second Fedora installation. With this
setup, two installations are independent and kernel updates will update
and install LILO correctly.
--
Aleksandar Milivojevic <amilivojevic at pbl.ca> Pollard Banknote Limited
Systems Administrator 1499 Buffalo Place
Tel: (204) 474-2323 ext 276 Winnipeg, MB R3T 1L7
More information about the fedora-list
mailing list