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

Bug#341383: lilo-installer fails to find LVM group

Package: lilo-installer
Version: 1.14
Severity: normal

(Architecture i386)


I have my own script to partition disc. It create a root LVM volume
/dev/lvmsys/root and mout it as

mount /dev/lvmsys/root /target

However, lilo-installer assumes that an LVM volume is mounted as

mount /dev/mapper/....

So, the function lvm_vg () in postinst does not recognise that root is
mounted on LVM (in my case). I've chenged lvm_vg() to

lvm_vg () {
  # Map from /dev/mapper/<vg>-<lv> to /dev/<vg>/<lv> for
  # Dup of code in partman.
  if [ "$vglv" != "$1" ]; then
    vglv=$(echo "$vglv" | sed -e 's/\([^-]\)-\([^-]\)/\1 \2/' | sed -e 's/--/-/g')
    vg=$(echo "$vglv" | cut -d" " -f1)
    lv=$(echo "$vglv" | cut -d" " -f2)
    lvdisplay -c "/dev/$vg/$lv" 2>/dev/null | cut -d: -f2
    lvdisplay -c "$1" 2>/dev/null | cut -d: -f2

and now it works OK for both cases.

        Ondra Medek

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-686
Locale: LANG=cs_CZ, LC_CTYPE=cs_CZ (charmap=ISO-8859-2)

Reply to: