# [Solved] System fails to boot with every Kernel I build

## SigHunter

Hello,

I'm trying to compile Kernel 3.4.4 for my system (though this happens with any version).

After reboot the system always fails to boot. 

I have root as LVM volume in a LUKS partition. On booting it asks for LUKS passphrase, then LVM fails to mount root.

(see this picture: http://i49.tinypic.com/33jr5ly.jpg)

so i figured this is somehow a LVM problem. i tried compiling the kernel (i use genkernel) with different lvm versions (2.02.85, 88, 93, 95). 

it happens with everyone. 

i dont know if it has something to do with the problem:

when i got dropped to rescueshell i tried the lvm commands (vgchange), they were in PATH but running them gives a "not found". 

manually launching /bin/lvm vgchange worked so far but gives me an ioctl error (see this picture: http://i46.tinypic.com/2zj9rlu.jpg)

i'd really appreciate any help on this. if you need further information/logs let me know

regardsLast edited by SigHunter on Wed Jul 04, 2012 5:15 pm; edited 1 time in total

----------

## lyallp

You have enabled the filesystem format in your kernel?

For example, I use XFS in LVM2 on LUKS.

XFS is not supported by default, it must be turned on.

----------

## SigHunter

 *lyallp wrote:*   

> You have enabled the filesystem format in your kernel?
> 
> For example, I use XFS in LVM2 on LUKS.
> 
> XFS is not supported by default, it must be turned on.

 

root is ext4,

kernelconfig has 

```
CONFIG_EXT4_FS=y

CONFIG_EXT4_FS_XATTR=y

CONFIG_EXT4_FS_POSIX_ACL=y

CONFIG_EXT4_FS_SECURITY=y

# CONFIG_EXT4_DEBUG is not set
```

and

```
CONFIG_BLK_DEV_DM=y

CONFIG_DM_CRYPT=y
```

i still have a kernel that works, im trying to use the config from this one, because it should work already.

```
/dev/sda1: UUID="0bba2938-3f49-4470-9c4b-a93008d7ff36" TYPE="ext2" 

/dev/sda2: UUID="d494a193-aaeb-4348-9eb6-51c0bb49c4a4" TYPE="swap" 

/dev/sda3: UUID="379552c8-880e-44e1-b4a7-f1e3164f003a" TYPE="crypto_LUKS" 

/dev/mapper/root: UUID="YWKP8i-TqpV-Erp5-AY0X-6sHe-oo2Y-5CdeiR" TYPE="LVM2_member" 

/dev/mapper/vg-root: UUID="a721e2bf-f470-4354-b12e-8e925b5bc50c" TYPE="ext4" 
```

----------

## lyallp

Maybe you need to build a new initramfs?

(does the initramfs lvm match the on-disk lvm format?)

Make sure you keep your old one for use with the old kernel.

----------

## Hu

 *lyallp wrote:*   

> You have enabled the filesystem format in your kernel?

 According to the picture, he has not yet reached the point of being ready to mount the filesystem, so even if he lacked that support, it would not matter yet.

 *lyallp wrote:*   

> (does the initramfs lvm match the on-disk lvm format?)

 The LVM disk format changes very rarely.

OP: the "create ioctl failed" message looks to be the root of your problem.  Does the kernel print anything in dmesg that would explain why it failed?  What is the output of pvs;vgs;lvs?

----------

## SigHunter

 *Hu wrote:*   

>  *lyallp wrote:*   You have enabled the filesystem format in your kernel? According to the picture, he has not yet reached the point of being ready to mount the filesystem, so even if he lacked that support, it would not matter yet.
> 
>  *lyallp wrote:*   (does the initramfs lvm match the on-disk lvm format?) The LVM disk format changes very rarely.
> 
> OP: the "create ioctl failed" message looks to be the root of your problem.  Does the kernel print anything in dmesg that would explain why it failed?  What is the output of pvs;vgs;lvs?

 

my dmesg: http://paste.lugons.org/show/2669/

dont let the "git" kernel and gcc 4.7.0 bug you in dmesg, 

thats just something i tried, didnt work with the stables either 

no new dmesg messages happen when doing vgchange

lvs:

```
  LV   VG   Attr     LSize   Pool Origin Data%  Move Log Copy%  Convert

  root vg   -wi----- 107.39g                                           

```

pvs:

```
  PV                  VG   Fmt  Attr PSize   PFree

  /dev/mapper/vg-root vg   lvm2 ---  107.39g    0 
```

vgs:

```
  VG   #PV #LV #SN Attr   VSize   VFree

  vg     1   1   0 wz--n- 107.39g    0 

```

vgchange -a y

```
found volume group vg

activation/volume_list configuration setting not defined: Checking onlz host tags for vg/root

device-mapper: create ioctl on vg-root failed: Device or resource busy

activated 0 logical volumes in volume group vg

  0 logical volume(s) in volume group "vg" now active
```

----------

## SigHunter

could this be a problem with udev? or static or static-libs useflag of some for boot needed software?

----------

## Ryche

Not sure if  you are using genkernel or not, but I had the same issue until I downgraded to genkernel-3.4.35. At which point it started working again.

----------

## SigHunter

 *Ryche wrote:*   

> Not sure if  you are using genkernel or not, but I had the same issue until I downgraded to genkernel-3.4.35. At which point it started working again.

 

thanks! this helped!!

----------

## sligo

 *Ryche wrote:*   

> Not sure if  you are using genkernel or not, but I had the same issue until I downgraded to genkernel-3.4.35. At which point it started working again.

 

thanks allot, i've had the same problem! this solved it.

----------

