LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 08-26-2011, 10:16 AM   #1
anonymous7777
LQ Newbie
 
Registered: Aug 2011
Posts: 11

Rep: Reputation: Disabled
Unhappy 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!
 
Old 08-26-2011, 02:16 PM   #2
ChrisAbela
Member
 
Registered: Mar 2008
Location: Malta
Distribution: Slackware 14.1
Posts: 467

Rep: Reputation: 89
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
 
Old 08-26-2011, 05:27 PM   #3
anonymous7777
LQ Newbie
 
Registered: Aug 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ChrisAbela View Post
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.
 
Old 08-26-2011, 05:43 PM   #4
GazL
Senior Member
 
Registered: May 2008
Posts: 3,480

Rep: Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016
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.
 
Old 08-26-2011, 05:55 PM   #5
anonymous7777
LQ Newbie
 
Registered: Aug 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
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 .
 
Old 08-26-2011, 06:05 PM   #6
GazL
Senior Member
 
Registered: May 2008
Posts: 3,480

Rep: Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016
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.
 
Old 08-26-2011, 06:14 PM   #7
anonymous7777
LQ Newbie
 
Registered: Aug 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
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.
 
Old 08-26-2011, 06:35 PM   #8
GazL
Senior Member
 
Registered: May 2008
Posts: 3,480

Rep: Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016
Quote:
Originally Posted by anonymous7777 View Post
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.
 
Old 08-26-2011, 07:02 PM   #9
GazL
Senior Member
 
Registered: May 2008
Posts: 3,480

Rep: Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016
Quote:
Originally Posted by anonymous7777 View Post
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.
 
Old 08-26-2011, 09:35 PM   #10
anonymous7777
LQ Newbie
 
Registered: Aug 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
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!
 
Old 08-27-2011, 06:52 AM   #11
GazL
Senior Member
 
Registered: May 2008
Posts: 3,480

Rep: Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016Reputation: 1016
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can I "cat" or "grep" a file to ignore lines starting with "#" ??? callagga Linux - Newbie 7 08-16-2013 07:58 AM
RAMDISK: couldn't find valid ramdisk image starting at 0. iotc247 Slackware 10 12-10-2010 04:08 PM
[SOLVED] Combining LUKS and LVM... LILO fails to boot STDOUBT Slackware - Installation 4 06-10-2010 10:58 PM
Install locks up at "RAMDISK: Compressed image found at block 0 JackNimble Linux - Newbie 6 03-05-2009 03:19 PM
dual boot linux, need to setup "another" lilo during installation? sirpelidor Linux - Newbie 3 02-04-2004 11:10 PM


All times are GMT -5. The time now is 06:58 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration