Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

boot failure: lenny + raid1 linux + lvm2 + lilo

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
debfan
Posts: 3
Joined: 2009-06-02 21:03

boot failure: lenny + raid1 linux + lvm2 + lilo

#1 Post by debfan »

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

User avatar
edbarx
Posts: 5401
Joined: 2007-07-18 06:19
Location: 35° 50 N, 14 º 35 E
Been thanked: 2 times

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

#2 Post by edbarx »

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?
Debian == { > 30, 000 packages }; Debian != systemd
The worst infection of all, is a false sense of security!
It is hard to get away from CLI tools.

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

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

#3 Post by debfan »

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)

User avatar
edbarx
Posts: 5401
Joined: 2007-07-18 06:19
Location: 35° 50 N, 14 º 35 E
Been thanked: 2 times

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

#4 Post by edbarx »

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)
Debian == { > 30, 000 packages }; Debian != systemd
The worst infection of all, is a false sense of security!
It is hard to get away from CLI tools.

smallchange
Posts: 1740
Joined: 2009-05-04 15:56
Been thanked: 1 time

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

#5 Post by smallchange »

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/

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

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

#6 Post by debfan »

thanks smallchange. exactly what i need!

worked flawless!

great!

:D

Post Reply