lkml.org 
[lkml]   [2004]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Subject2.6.2-mm1, selinux, and initrd
    From
    Date
    On my laptop, I use an initrd to get things started (mostly SElinux
    and LVM). (I've attached the 'linuxrc' below).

    Under 2.6.2-rc3-mm1, I got the following while booting:

    Feb 5 09:40:34 turing-police kernel: RAMDISK: Compressed image found at block 0
    Feb 5 09:40:34 turing-police kernel: VFS: Mounted root (ext2 filesystem).
    Feb 5 09:40:34 turing-police kernel: Mounted devfs on /dev
    Feb 5 09:40:34 turing-police kernel: security: 3 users, 5 roles, 1039 types
    Feb 5 09:40:34 turing-police kernel: security: 30 classes, 128126 rules
    Feb 5 09:40:35 turing-police kernel: SELinux: Completing initialization.
    Feb 5 09:40:35 turing-police kernel: SELinux: Setting up existing superblocks.
    Feb 5 09:40:35 turing-police kernel: SELinux: initialized (dev , type selinuxfs), uses genfs_contexts
    Feb 5 09:40:35 turing-police kernel: SELinux: initialized (dev ram0, type ext2), uses xattr

    Booting 2.6.2-mm1, I get:

    RAMDISK: Compressed image found at block 0
    VFS: Mounted root (ext2 filesystem).
    Mounted devfs on /dev
    VFS: Cannot open root device

    and things come to a screeching halt. Absolutely nothing in the linuxrc
    seems to happen - and since the real root is on an LVM, we come to a
    screeching halt.

    The system boots OK (minus selinux functionality of course)if I pass
    'selinux=0' as a kernel parameter, so I'm suspecting these 3 patches:

    +selinux-01-context-mount-support.patch
    +selinux-02-nfs-context-mounts.patch
    +selinux-03-context-mounts-selinux.patch

    I'm suspecting that try_context_mount() is choking because we haven't
    loaded the policy or anything, so we hit this:

    rc = try_context_mount(sb, data);
    if (rc)
    goto out;

    and die a horrid death...

    Oh, and the linuxrc:

    #!/bin/nash

    echo Loading policy
    mount -t selinuxfs none /selinux
    /bin/load_policy /etc/security/selinux/policy.15
    umount /selinux

    echo Mounting /proc filesystem
    mount -t proc /proc /proc
    echo Creating block devices
    mkdevices /dev
    echo Scanning logical volumes
    lvm vgscan
    echo Activating logical volumes
    lvm vgchange -ay
    echo 0x0100 > /proc/sys/kernel/real-root-dev
    echo Mounting root filesystem
    mount -o noatime,nodev --ro -t ext3 /dev/rootvg/root /sysroot
    pivot_root /sysroot /sysroot/initrd
    umount /initrd/proc



    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2005-03-22 14:00    [W:0.032 / U:0.228 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site