4

My Laptop is configured as dual boot system with Ubuntu 14.04 (and windows 8.1). Lately I replaced the dedicated root and swap partitions with a lvm2 partition (VG (Volume Group) LinuxBereich) containing LVs (Logical Volume) LinuxSwap, LinuxRoot, and LinuxHome. There are copies of root, and home in thin pool LVs RootArea, and HomeArea named Linux_Root, and Linux_Boot.

  • 3.13.0-62-generic starts or resumes correctly, from non pool LV.
  • 3.13.0-63-generic doesn't find the root partition and drops to the busybox shell. After activating LVs LinuxSwap, LinuxRoot, and LinuxHome with lvm, startup proceeds without further problems.
  • Neither version (62/63) starts from LV in thin pool. Attempting:
    lvm lvchange -ay LinuxBereich/Linux_Root
    (or Linux_Home, RootArea, HomeArea)
    from the busybox shell, results in:
    /sbin/modprobe failed: 1
    Cannot read thin-pool target version.
    Can't process LV Linux_Root: thin-pool target support missing from kernel ?

It would be nice if the LVs would be activated automatically in 3.13.0-63-generic.
It would be even better if the system started from thin-pool.
Any ideas are welcome. Maybe I need some more patience.
Yours
Wolfgang

Solutions:

  • 3.13.0-63-generic (and 3.13.0-65-generic) starts from LV now without problem.
    Cause was a missing file in /boot/initrd.img-3.13.0-63-generic that is present in /boot/initrd.img-3.13.0-63-generic:
    -rw-r--r-- 1 root root 272 May 4 2012 lib/udev/rules.d/85-lvm2.rules
    Checking for such a file yielded:

ls -l /lib/udev/rules.d/85-lvm*
-rw-r--r-- 1 root root 272 May 4 2012 /lib/udev/rules.d/85-lvm2.rules.drblsave

so the file was present, but renamed.

cp -p /lib/udev/rules.d/85-lvm2.rules.drblsave /lib/udev/rules.d/85-lvm2.rules

and

update-initramfs -u

did the trick.

For obtaining a sorted table of content of the initrd.img:

for n in 62 63 65;do zcat /boot/initrd.img-3.13.0-$n-generic|cpio -itv|sort -k9>$n.lst;done

Without modification time and kernel version

for n in 62 63 65;do sed 's/3.13.0-6./3.13.0-6?/g' $n.lst|cut -c 1-42,56->$n.lsu;done

  • No start from thin pool LV, because of no kernel support. This is weird, because the running system is able to handle thin volumes.

    lsmod |grep -ie dm_thin_pool -e dm_persistent_data -e dm_bio_prison -e dm_bufio -e libcrc32c
    dm_thin_pool           46897  7 
    dm_persistent_data     61675  1 dm_thin_pool
    dm_bufio               27539  1 dm_persistent_data
    dm_bio_prison          15501  1 dm_thin_pool
    libcrc32c              12644  1 dm_persistent_data
    
    for n in  dm_thin_pool dm_persistent_data dm_bio_prison dm_bufio libcrc32c;do modinfo $n;done|grep filename:|sort -u
    filename:       /lib/modules/3.13.0-65-generic/kernel/drivers/md/dm-bio-prison.ko
    filename:       /lib/modules/3.13.0-65-generic/kernel/drivers/md/dm-bufio.ko
    filename:       /lib/modules/3.13.0-65-generic/kernel/drivers/md/dm-thin-pool.ko
    filename:       /lib/modules/3.13.0-65-generic/kernel/drivers/md/persistent-data/dm-persistent-data.ko
    filename:       /lib/modules/3.13.0-65-generic/kernel/lib/libcrc32c.ko
    

So a file /etc/initramfs-tools/hooks/lvm2thin was created:

    #!/bin/sh
    PREREQ=""
    prereqs()
    {
         echo "$PREREQ"
    }

    case $1 in
    prereqs)
         prereqs
         exit 0
         ;;
    esac

    . /usr/share/initramfs-tools/hook-functions
    # Begin real processing below this line
    copy_exec /lib/modules/${version}/kernel/drivers/md/dm-thin-pool.ko
    copy_exec /lib/modules/${version}/kernel/drivers/md/dm-bio-prison.ko
    copy_exec /lib/modules/${version}/kernel/drivers/md/dm-bufio.ko
    copy_exec /lib/modules/${version}/kernel/drivers/md/persistent-data/dm-persistent-data.ko

Set proper permissions.

    chmod 755 /etc/initramfs-tools/hooks/lvm2thin 
    ls -l /etc/initramfs-tools/hooks/lvm2thin 
    -rwxr-xr-x 1 root root 583 Okt  8 18:16 /etc/initramfs-tools/hooks/lvm2thin

and again

update-initramfs -u

done.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.