Debian, lilo and LVM won't boot

Tony Baechler tony at baechler.net
Sun Oct 12 05:38:44 EDT 2008


Hi,

First, here is my current setup on the machine which I'm having problems 
with:

/dev/hda and /dev/hdb are both IDE 650.1 GB drives.  Currently hdb is a 
backup of the former hda and uses ReiserFS 3.6.

/dev/hda1: 256 MB, strictly a boot partition
/dev/hda2: 512 MB swap, machine has 2 GB of physical memory
/dev/hda3: the rest of the drive, intended for use with LVM

/dev/hdb1: 20 GB, root device with /boot and all but /home
/dev/hdb2: 1 GB swap
/dev/hdb3: the rest of the drive for /home

My problem is that my system won't boot no matter what I do.  I've tried 
everything I can think of.  I think I got lilo to work with the System 
Rescue CD, but Greg says that using it to fix lilo won't work on Debian 
so I'm not sure.  Basically what I want to do is have a volume group 
called main, eventually consisting of /dev/hda3 and all of /dev/hdb once 
I get the machine booting again.  For now, I set up 
/dev/mapper/main-root to use 8 GB, compared to the 19 GB it was using.  
I set up main-home to use 450 GB.  How do I get Debian to boot and use 
main-root as my root device?

In the rescue CD, I got lilo to work.  It will successfully add the 
Linux kernel with the initrd image.  The machine is Linux only.  I am 
running kernel 2.6.25-2-686 on Lenny.  When I try to boot, it seems to 
have no problem getting past lilo.  I verified that with sighted help 
and eventually by adding the Speakup module to my initrd.  The problem 
is that it can't find the root device (/dev/mapper/main-root) and dumps 
me in ash and the initramfs prompt.  If I manually do this from the 
initramfs shell, it works fine, so I don't get why it doesn't work by 
itself.  I can manually mount the filesystem like so:

mount -t xfs /dev/mapper/main-root /root

I can even manually chroot to /root and run /sbin/init, but I get errors 
and it still doesn't boot.  In lilo, I have the root device set to 
/dev/mapper/main-root, as well as /etc/fstab.  As I said before, I have 
a dedicated /boot partition since I understand LVM doesn't work on the 
boot device.  What am I doing wrong here?  I forgot to mention before, 
but one thing I wanted to do besides switch to LVM for boot is use the 
XFS filesystem instead of Reiser.  I've found Reiser to be much slower 
by comparison.

At one point out of desperation, I tried installing grub.  I had a 
/boot/grub but it was empty.  I ran the Debian update-grub script and it 
told me that my /usr was broken and that was that.  If I boot the rescue 
CD with root=auto, it boots /dev/sdb just fine but complains about 
modules missing because the kernel on the CD is not the one on the root 
device.  If I must switch to grub, fine but what am I missing?  I really 
don't think this is a lilo problem because it gets to initramfs just 
fine.  I've tried installing lilo to the MBR and the /dev/sda1 partition 
and it makes no difference.  I could really use help here.  If I left 
out some important information, let me know but I have no way to copy 
files from the machine because it doesn't seem to find the network now.  
Should I just forget LVM and use a normal static partition for my root 
device?  Do I need a different rescue CD?  I have grml if that would be 
better.  Again, any help would be appreciated.



More information about the Speakup mailing list