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

Bug#730502: live-build does not support finding image on lvm

Package: live-build
Version: 3.0.5-1
Severity: minor

I use live-build to build my own custom images, a feature I love
having.  I have my system set up to boot one of my live images from my
hard drive, and this works well.  Recently I reinstalled my system and
put /boot on lvm since this works fine with grub2, but my live images
no longer work in this configuration.  I determined the problem to be
that the /lib/live/boot/* scripts on the initial ramdisk don't call
vgchange -a y anywhere prior to attempting to locate the root.

To be specific, lvm2 works fine in the live image including in the
initramfs if I run it manually.  What doesn't work is that the
initramfs code that mounts the root (in the initramfs context, so I
mean the image that contains the live file system) won't find that
image if that image is on a a file system in lvm.  The regular
initramfs code (/scripts/local-*) includes code to initialize lvm, and
in general booting from lvm works fine and has for some time.  It
seems to me that this is just an omission of initializing lvm in the
live boot code.  For example, if I have this stanza in grub.cfg:

menuentry "Q Debian Live 64" {
	search --no-floppy --label live-images --set=root
	linux /q-live-64/vmlinuz live-media-path=/q-live-64 hostname=qlive boot=live config
	initrd /q-live-64/initrd.img

it works correctly if the file system with label live-images is a
regular disk partition but if it's a logical volume, it doesn't work
because /dev/mapper/live0-images (or whatever it's called) doesn't
appear.  From the (initramfs) prompt, I can type vgchange -a y and
see/mount it fine, so all the modules are there.

I'm not attaching logs, etc. in this case.  For me just copying my
live images to a non-lvm partition works fine, and there's no question
of some kind of subtle config error on my part...there is simply no
code that tries to do this.  As a quick and dirty change, I tried
sticking the lvm vgchange command that is run from the "local" boot
(vs. the "live" boot) in 9990-main.sh prior to attempting to mount the
root, but that didn't work (I think it hung -- I remember a similar
problem in an earlier dracut), and I didn't pursue it further.
Basically I didn't put a lot of time into debugging it since just
moving the images to a non-lvm partition is okay and doing a lot of
debugging on the older version of live-build is probably a waste of

I tried running the current unstable version of live-build, but it
didn't run to completion and I don't have time to debug it right now.
Perhaps you've already fixed this going forward.  If not, this would
be a nice thing to be able to do.  But not a big deal.

-- Package-specific info:

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.11-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages live-build depends on:
ii  debootstrap  1.0.55

Versions of packages live-build recommends:
ii  cpio                            2.11+dfsg-1
ii  gnu-fdisk                       1.2.5-2
ii  live-boot-doc                   3.0.1-1
ii  live-config-doc                 3.0.23-1+deb8u1
ii  live-manual-html [live-manual]  1:3.0.2-1

Versions of packages live-build suggests:
ii  debian-keyring              2013.07.31
ii  dosfstools                  3.0.16-2
ii  fakeroot                    1.20-1
ii  git                         1:
ii  gpgv                        1.4.15-1.1
pn  loadlin                     <none>
pn  memtest86+ | memtest86      <none>
ii  mtools                      4.0.18-1
pn  parted                      <none>
pn  squashfs-tools | mtd-tools  <none>
ii  sudo                        1.8.8-2
ii  syslinux                    3:4.05+dfsg-6+deb8u1
ii  uuid-runtime                2.20.1-5.5
pn  win32-loader                <none>
pn  xorriso                     <none>

-- no debconf information

Reply to: