boot failure: lenny + raid1 linux + lvm2 + lilo

If none of the more specific forums is the right place to ask

boot failure: lenny + raid1 linux + lvm2 + lilo

Postby debfan » 2009-06-03 10:13

Hi all,

i need to restore my system (based on debian 5 with 2 sata mirrored disk via raid1 linux and lvm2 partitions and lilo as bootloader) because like an idiot i upgraded my system kernel and rebooted withouth launching "lilo" command before.. :evil:

both kernel (Linux and LinuxOLD) are unusable (i think because apt updated both).

note: Linux is a bigmem kernel and LinuxOLD is normal

So I:

1) booted with the distro "systemrescuecd"
2) reloaded the mirror (mdadm --examine --scan /dev/sda1 /dev/sdb1 >> /etc/mdadm.conf ; mdadm -A -s ; checked /proc/mdstat for device md0 and is present)
3) reloaded the lvm (vgchange lvm0 -a y)
4) mounted the root partition (mount /dev/lvm0/root /mnt/mydisk)

as here, all data is present and readable.

so i tried to chroot into the system to launch lilo:

chroot /mnt/mydisk /bin/bash

but lilo said me that cannot find "/dev/md0", so i cannot update mbr to the new kernel.
(no "md0" or "lvm0" device is present on /dev/)

here some output:

Code: Select all
# lvscan

ACTIVE /dev/lvm0/swap [952.00 MB] inherit
ACTIVE /dev/lvm0/root [145.14 GB] inherit


Code: Select all
# cat /etc/lilo.conf

large-memory
boot=/dev/md0
root=/dev/mapper/lvm0-root
raid-extra-boot=mbr-only
map=/boot/map
delay=20
default=Linux

image=/vmlinuz
label=Linux
read-only
append="quiet"
initrd=/initrd.img

image=/vmlinuz.old
label=LinuxOLD
read-only
optional
append="quiet"
initrd=/initrd.img.old


Code: Select all
# ls /boot

boot.0800
boot.0810
coffee.bmp
config-2.6.26-2-686
config-2.6.26-2-686-bigmem
debian.bmp
debianlilo.bmp
initrd.img-2.6.26-2-686
initrd.img-2.6.26-2-686.bak
initrd.img-2.6.26-2-686-bigmem
map
sarge.bmp
sid.bmp
System.map-2.6.26-2-686
System.map-2.6.26-2-686-bigmem
vmlinuz-2.6.26-2-686
vmlinuz-2.6.26-2-686-bigmem




i appreciate any suggest,

thanks
debfan
 
Posts: 3
Joined: 2009-06-02 21:03

Re: boot failure: lenny + raid1 linux + lvm2 + lilo

Postby edbarx » 2009-06-03 10:52

vmlinuz.old, initrd.img.old, vmlinuz, initrd.img.

These files are not listed in /boot. I think, a link to the real kernels and initrd image files can solve your problem.

By the way, why don't you use GRUB?
Learning how to learn from the mistakes of others is far more efficient. It's also less painful. (dasein)
Debian = {freedom, reliability, stability, configurability, flexibility, security}
It's hard to get away from apt and the CLI tools!
User avatar
edbarx
 
Posts: 4469
Joined: 2007-07-18 06:19
Location: 35° 50 N, 14 º 35 E

Re: boot failure: lenny + raid1 linux + lvm2 + lilo

Postby debfan » 2009-06-03 11:07

sorry, i forgot to mention these links on root :

initrd.img -> boot/initrd.img-2.6.26-2-bigmem
initrd.img.old -> boot/initrd.img-2.6.26-2-686
vmlinuz -> boot/vmlinuz-2.6.26-2-686-bigmem
vmlinuz.old -> boot/vmlinuz-2.6.26-2-686

path are correct, kernels are loaded but go to crash.

my only need is to force lilo to write on mbr of the mirror.


GRUB is not usable: seems grub didn't support lvm or have some trouble with this configuration(debian install said me to use lilo)
debfan
 
Posts: 3
Joined: 2009-06-02 21:03

Re: boot failure: lenny + raid1 linux + lvm2 + lilo

Postby edbarx » 2009-06-03 12:13

Can you describe the error message when the kernel crashes? Is it a kernel panic?

One task of the kernel during its initialisation is to mount the "/" file system, if it doesn't find one, it panics (panic = the unix jargon for kernel crash)
Learning how to learn from the mistakes of others is far more efficient. It's also less painful. (dasein)
Debian = {freedom, reliability, stability, configurability, flexibility, security}
It's hard to get away from apt and the CLI tools!
User avatar
edbarx
 
Posts: 4469
Joined: 2007-07-18 06:19
Location: 35° 50 N, 14 º 35 E

Re: boot failure: lenny + raid1 linux + lvm2 + lilo

Postby smallchange » 2009-06-03 12:25

To allow lilo to see the devices in chroot you need to mount /proc and /dev in the chroot environment before you enter it. Try, as root,
Code: Select all
mount -t none -o bind /dev /mnt/mydisk/dev
mount -t proc -o bind /proc /mnt/mydisk/proc
chroot /mnt/mydisk/
smallchange
 
Posts: 1740
Joined: 2009-05-04 15:56

Re: boot failure: lenny + raid1 linux + lvm2 + lilo

Postby debfan » 2009-06-03 21:03

thanks smallchange. exactly what i need!

worked flawless!

great!

:D
debfan
 
Posts: 3
Joined: 2009-06-02 21:03


Return to General Questions

Who is online

Users browsing this forum: No registered users and 12 guests

fashionable