Bug 467839

Summary: mkinitrd doesn't know how to handle encrypted CCISS devices
Product: Red Hat Enterprise Linux 5 Reporter: Alexander Todorov <atodorov>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED ERRATA QA Contact: Alexander Todorov <atodorov>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.3CC: ddumas, dlehman, stephen-rhel, syeghiay
Target Milestone: rc   
Target Release: ---   
Hardware: ia64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-20 22:12:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
anaconda.log just in case we need it
none
handle luks on cciss none

Description Alexander Todorov 2008-10-21 07:51:43 UTC
Description of problem:
System panics when trying to boot. It has encrypted partitions.

Version-Release number of selected component (if applicable):
kernel-2.6.18-118.el5

How reproducible:
always

Steps to Reproduce:
1. Install latest RHEL5.3 build with the following disk layout:
Partition         Size  Mount point FS type Format
/dev/cciss/c0d0p1 250 M none        vfat    NO
/dev/cciss/c0d0p2 400 M none        vfat    NO
/dev/cciss/c0d0p3 100 M /boot/efi   vfat    YES
/dev/cciss/c0d0p4 132 G /           ext3    YES, Encrypted

Actual results:
Install completes and system panics on boot

Expected results:
System prompts for LUKS pass phrase and boots properly

Additional info:
Main difference between the system in question and another system that doesn't exhibit the issue is the use of hardware RAID controller (see disk names).

Comment 2 Alexander Todorov 2008-10-21 09:07:59 UTC
* kernel 2.6.18-118.el5, no disk encryption - boots to run level 3

* kernel 2.6.18-118.el5, use disk encryption:

sh-3.2# blkid /dev/cciss/c0d0p4 
/dev/cciss/c0d0p4: LABEL="/" UUID="df8568f1-bf9c-4556-b343-cf3425142d5c" SEC_TYPE="ext2" TYPE="ext3" 

^^ this is the encrypted device

sh-3.2# cat /boot/efi/efi/redhat/elilo.conf 
prompt
timeout=20
default=linux
relocatable

image=vmlinuz-2.6.18-118.el5
        label=linux
        initrd=initrd-2.6.18-118.el5.img
        read-only
        append="root=LABEL=/1"


^^ label seems incorrect

sh-3.2# cat /etc/crypttab 
luks-3017a657-fd05-4557-bc4f-6620015c08f0 UUID=3017a657-fd05-4557-bc4f-6620015c08f0 none


sh-3.2# cat /etc/fstab 
/dev/mapper/luks-3017a657-fd05-4557-bc4f-6620015c08f0 /                       ext3    defaults        1 1
/dev/cciss/c0d0p3       /boot/efi               vfat    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0


after boot I got:

Mounting root filesystem.
mount: could not find filesystem '/dev/root'
Setting up other filesystems.
Setting up new root fs
setuproot: moving /dev failed: No such file or directory
no fstab.sys, mounting internal defaults
setuproot: error mounting /proc:Kernel panic - not syncing: Attempted to kill init!
 No such file or  directory
setu



* try to tell kernel / is on LUKS device (panic again):
image=vmlinuz-2.6.18-118.el5
        label=linux-luks-label
        initrd=initrd-2.6.18-118.el5.img
        read-only
        append="root=/dev/mapper/luks-3017a657-fd05-4557-bc4f-6620015c08f0"


Loading dm-log.ko module
Loading dm-mirror.ko module
Loading dm-zero.ko module
Loading dm-snapshot.ko module
Waiting for driver initialization.
Kernel panic - not syncing: Attempted to kill init!
 Scanning and con

* Install kernel 2.6.18-120 from brew in rescue mode (elilo.conf entry is automatically generated) - panic again:

image=vmlinuz-2.6.18-120.el5
        label=2.6.18-120.el5
        initrd=initrd-2.6.18-120.el5.img
        read-only
        append="root=/dev/mapper/luks-3017a657-fd05-4557-bc4f-6620015c08f0"

Scanning and configuring dmraid supported devices
Creating root device.
Mounting root filesystem.
mount: could not find filesystem '/dev/root'Kernel panic - not syncing: Attempted to kill init!

Setting up oth er filesystems.

Comment 3 Alexander Todorov 2008-10-21 09:19:24 UTC
info from rescue mode:

blkid:
/dev/mapper/luks-3017a657-fd05-4557-bc4f-6620015c08f0: LABEL="/1" UUID="9af4863a-7599-4dcc-94f1-f0ed8a9e8a6c" TYPE="ext3" 
/dev/cciss/c0d0p1: LABEL="EFIPART" UUID="A476-2271" TYPE="vfat" 
/dev/cciss/c0d0p2: LABEL="HPPART" UUID="8479-1D43" TYPE="vfat" 
/dev/cciss/c0d0p3: SEC_TYPE="msdos" LABEL="/boot/efi" UUID="48FD-93AE" TYPE="vfat" 
/dev/cciss/c0d0p4: LABEL="/" UUID="df8568f1-bf9c-4556-b343-cf3425142d5c" SEC_TYPE="ext2" TYPE="ext3"

LUKS device has the label "/1" which was in elilo.conf right after install. Not sure why it has a different UUID than the ID in the name though. CC'ing dlehman to answer this.

Comment 4 Alexander Todorov 2008-10-21 09:20:55 UTC
Created attachment 320994 [details]
anaconda.log just in case we need it

Comment 5 Alexander Todorov 2008-10-21 09:22:28 UTC
To install use update image at http://dlehman.fedorapeople.org/updates-464769.img
because of bug #464769

Comment 6 Alexander Todorov 2008-10-21 13:31:08 UTC
Tried also append="root=LABEL=/1" with -120 kernel. Same result - panic

At this time I'm thinking it's anaconda issue which manifests in the kernel not finding the root file system upon boot.

Comment 7 Alexander Todorov 2008-10-21 14:21:44 UTC
FYI:
Haven't tested on other arches than ia64 exclusively but from what I know nobody from RTT has seen such behavior so far.

Comment 8 David Lehman 2008-10-21 14:44:03 UTC
What do you see on the console when the system panics? Surely there are some messages of some sort.

Comment 9 David Lehman 2008-10-21 20:13:46 UTC
The problem is mkinitrd doesn't know how to handle encrypted CCISS devices.

Comment 10 David Lehman 2008-10-21 20:15:23 UTC
Created attachment 321086 [details]
handle luks on cciss

Comment 11 Denise Dumas 2008-10-21 20:32:28 UTC
Requesting approval for Snapshot 1 since fix is available.

Comment 12 Alexander Todorov 2008-10-22 06:21:14 UTC
updated summary to reflect real cause of problem

Comment 14 David Lehman 2008-10-30 14:00:41 UTC
Fixed in mkinitrd-5.1.19.6-39.

Comment 15 David Lehman 2008-10-30 14:02:06 UTC
*** Bug 469131 has been marked as a duplicate of this bug. ***

Comment 21 errata-xmlrpc 2009-01-20 22:12:44 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0237.html