[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#378332: initramfs-tools: Symlink /dev/volgroup/root not recognized as lvm



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Package: initramfs-tools
Version: 0.68b
Severity: normal

*** Please type your report below this line ***

My current setup: Root on LVM2, Kernel 2.6.12.  I remember I had to
arm-twist the initrd-generation to get it going, way back.

The root fs is on LVM2:

andreas@kauz:/tmp$ LANG=C df /
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/e2vg/root        15482320  10793140   3902748  74% /

The twist in this setup: This root block device is a symbolic link:

andreas@kauz:/tmp$ ssh root@localhost LANG=C ls -l /dev/e2vg/root
lrwxrwxrwx 1 root root 21 Jul 15 11:35 /dev/e2vg/root -> /dev/mapper/e2vg-root

Today, I was trying to upgrade to kernel 2.6.16. The update itself went
smoothly enought, but I could not boot into the new kernel with the ram
disk that had been produced automatically. Appearently, the ram disk
generation scripts did not find out that /dev/e2vg/root lives on LVM2.


Here is the long story:

Looking at the ramdisk contents with

   gunzip < /boot/initrd.img-2.6.16-2-k7 | cpio -ivt

I saw that not a whole lot of LVM things were included.

I tried this and that.  In the end, I hacked update-initramfs itself,
adding "-r /dev/mapper/e2vg-root" to the mkinitramfs - call:

kauz:/usr/sbin# diff -u update-initramfs-ori update-initramfs
- --- update-initramfs-ori        2006-07-15 11:54:55.000000000 +0200
+++ update-initramfs    2006-07-15 11:58:37.000000000 +0200
@@ -67,7 +67,7 @@
        if [ "${verbose}" = 1 ]; then
                OPTS="-v $OPTS"
        fi
- -       if mkinitramfs $OPTS "${initramfs}" "${version}"; then
+       if mkinitramfs -r /dev/mapper/e2vg-root $OPTS "${initramfs}"
"${version}"; then
                set_sha1
        else
                mkinitramfs_return="$?"

That produced a rd that did contain more of the LVM stuff.

I then changed the new kernel line in /boot/grub/menu.lst
from root=/dev/e2vg/root to root=/dev/mapper/e2vg-root

kernel /vmlinuz-2.6.16-2-k7 root=/dev/mapper/e2vg-root apm=off

Now, it all worked.

Regards, and thank you for providing fine software,

Andreas Krüger
- -- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-1-k7
Locale: LANG=de_DE.ISO-8859-15@euro, LC_CTYPE=de_DE.ISO-8859-15@euro
(charmap=ISO-8859-15)

Versions of packages initramfs-tools depends on:
ii  busybox                       1:1.01-4   Tiny utilities for small and embed
ii  cpio                          2.6-12     GNU cpio -- a program to manage ar
ii  klibc-utils                   1.3.35-1   small statically-linked utilities
ii  module-init-tools             3.2.2-3    tools for managing Linux kernel mo
ii  udev                          0.091-2    /dev/ and hotplug management daemo

initramfs-tools recommends no packages.

- -- no debconf information
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEuNa6nWrlKaIH40ARAqRbAJ48XXevdYuyshrsVjJpql6x/D7+bQCdHV+w
xHM8KQrb3Uc1pbZRO2tNOks=
=3nc1
-----END PGP SIGNATURE-----



Reply to: