Comment 6 for bug 964957

Revision history for this message
dann frazier (dannf) wrote : Re: [Bug 964957] Re: Installer warns "Could not stat device /dev/mapper/hostname-root - No such file or directory", works after retry

On Thu, May 17, 2012 at 02:21:56PM -0000, Sgifford wrote:
> I tried testing out the final release of Precise Pangolin, and instead
> of this issue, I encountered another error with root on LVM, which I
> have reported as bug #1000770.
>
> I am not sure of a straightforward way to test out the fix in Debian's
> git tree. I am familiar with using git and compiling software, but am
> not familiar enough with the installation process to know how to get the
> dpkg into the installer. Maybe I could pause the installer before
> partitioning, download an updated dpkg I build, apt-get install it into
> the running image, then continue with the installation? Any tips are
> appreciated.

Thank you for working with us to verify this fix!

The easiest way to verify this might be using the method you used in
the video would be sufficient. But, instead of adding sleeps, you
could add the 'update-dev --settle' line as shown here:

  http://anonscm.debian.org/gitweb/?p=d-i/partman-auto-lvm.git;a=commitdiff;h=7d03d5e8fee63ff09716f9979ff5c9893d234396

Or, to avoid having to dropping to a shell, you could build a custom
udeb and insert it into your initrd.gz file with these commands:

$ originitrd="/path/to/initrd.gz"
$ newinitrd="/path/to/newinitrd.gz"
$ sudo apt-get build-dep partman-auto-lvm
$ bzr branch lp:~dannf/partman-auto-lvm/add-settle partman-auto-lvm
$ cd partman-auto-lvm
$ dpkg-buildpackage -rfakeroot -uc -us
$ cd -
  (gunzip < $originitrd && \
   echo partman-auto-lvm_42ubuntu2+dannf1_all.udeb | \
   cpio -H newc -o) | gzip > $newinitrd

And finally, add this to your preseed file, so that this custom udeb
gets deployed:

d-i preseed/early_command string udpkg -i /*.udeb

You can verify this worked by dropping to a shell and running:
 # grep update-dev /bin/perform_recipe_by_lvm