LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Lilo not finding ramdisk with lvm+luks setup "image starting at 0" (http://www.linuxquestions.org/questions/slackware-14/lilo-not-finding-ramdisk-with-lvm-luks-setup-image-starting-at-0-a-899608/)

anonymous7777 08-26-2011 09:16 AM

Lilo not finding ramdisk with lvm+luks setup "image starting at 0"
 
Bought a new ssd drive thought I finally setup encryption on it. I followed the readme at http://slackware.osuosl.org/slackwar...ADME_CRYPT.TXT and everything seemed straight forward, except when finally booting the system. I keep getting RAMDISK: Couldn't find valid RAM disk image starting at 0. , which ofcourse leads to "Please append a correct 'root=' boot option" kernel panic.

My partition setup is as follows:

/dev/sda1 /boot partition 100mbs ext2fs
/dev/sda2 encrypted lvm partition with two lvs (root ext4/swap)

I did a complete install and followed through all the steps in the readme, I even made the initrd with alien bobs script, same result. Lilo is pointing to /boot/initrd.gz and I re ran lilo after running mkinitrd. Lilo is installed on mbr /dev/sda , aside from that I am stumped as to why this isnt working. A normal non encrypted setup on this drive works fine. As always thanks for the help!

ChrisAbela 08-26-2011 01:16 PM

I do not have your set-up so I cannot really help. Anyway:

Try this in /etc/lilo.conf

append "rootdelay=10 root=/dev/sda2"

Chris

anonymous7777 08-26-2011 04:27 PM

Quote:

Originally Posted by ChrisAbela (Post 4454287)
I do not have your set-up so I cannot really help. Anyway:

Try this in /etc/lilo.conf

append "rootdelay=10 root=/dev/sda2"

Chris


Nope didnt work , delaying root wouldnt help since its not finding a valid ramdisk image in the first place.

GazL 08-26-2011 04:43 PM

You didn't really provide much detail to help us identify the issue, but the error suggests that the initrd is at fault.
If you mount sda1 somewhere like /mnt you can check it with zcat /mnt/initrd.gz | cpio --list
If that looks ok (you should get a file listing displayed), then the error is possibly in your lilo.conf.


For reference, I use a similar setup to yours, though not on SSD: /boot on sda1 and an encrypted lvm pv on sda5.


I build my mkinitrd using the following little script:
Code:

#!/bin/sh
#
#    Build initrd
#

VERSION=${VERSION:-3.0.3-custom}
INITRD_NAME="initrd-${VERSION}.gz"

cd /boot

mkinitrd -c -u -k ${VERSION} \
        -m ext4:ehci-hcd:uhci-hcd:usbhid \
        -f ext4 -r /dev/rootvg/lvroot \
        -l uk -L -C /dev/sda5 \
        -o "$INITRD_NAME"

I use a script as it's a nice and easy way to keep things documented, and it's handy when it comes time to rebuild the initrd.

I've not tried Eric's mkinitrd generator, so I can't offer any advice on that. I prefer to built the initrd myself.

anonymous7777 08-26-2011 04:55 PM

File listing in initrd.gz looks fine. Here is my lilo setup:

boot=/dev/sda
compact
lba32
bitmap=/boot/slack.bmp
bmp-colors = 255,0,255,0,255,0
bmp-table = 60,6,1,16
bmp-timer = 65,27,0,255
append="raid=noautodetect vt.default_utf8=1"
prompt
timeout=300
vga = 791

image = /boot/vmlinuz
initrd = /boot/initrd.gz
root = /dev/cryptvg/root
label = Linux
read-only


Additional info:
Slackware 13.37 64 bit , using stock 2.6.37.6 huge kernel .

GazL 08-26-2011 05:05 PM

All looks reasonable there..

Were you building your initrd and running lilo from within a chroot environment?

One other thing that can catch people out is that they forget to have sda1 mounted on /boot in the chroot when they build the initrd and run lilo, and the initrd and lilo end up referring to a file that is on the encrypted partition rather than sda1, and as such not available at boot time.

anonymous7777 08-26-2011 05:14 PM

I doubt lilo would run if /boot was empty , since the kernel and additional files
are based in that partition. Not much left to say, is it some weird ssd and luks+lvm issue but I am sure someone else would have run into it by now.

GazL 08-26-2011 05:35 PM

Quote:

Originally Posted by anonymous7777 (Post 4454486)
I doubt lilo would run if /boot was empty , since the kernel and additional files
are based in that partition. Not much left to say, is it some weird ssd and luks+lvm issue but I am sure someone else would have run into it by now.

I was thinking that parhaps the /boot directory may have been populated by the installer, but yes, I'm just clutching at straws at this point, trying to think up scenarios that could explain why it wouldn't work.


I'm pretty much out of suggestions at this point. :(

GazL 08-26-2011 06:02 PM

Quote:

Originally Posted by anonymous7777 (Post 4454476)
Additional info:
Slackware 13.37 64 bit , using stock 2.6.37.6 huge kernel .

Just spotted this.

Might be worth trying the 'generic' kernel rather than 'huge', when you're using an initrd.

anonymous7777 08-26-2011 08:35 PM

That was it!, I assumed using the huge kernel was ok since the README uses smp and mentions lilo complaining about the initrd.gz size. Only thing now, I think I am missing my usb drivers for my keyboard as it freezes on password input but thanks for your help!

GazL 08-27-2011 05:52 AM

Adding "ehci-hcd:uhci-hcd:usbhid" to your list of modules on the mkinitrd should sort that out. I have to do that too.


Glad you got it sorted. :)


All times are GMT -5. The time now is 02:37 PM.