{"id":34,"date":"2006-07-07T12:15:25","date_gmt":"2006-07-07T00:15:25","guid":{"rendered":"http:\/\/craig.dubculture.co.nz\/blog\/2006\/07\/07\/lvm2-pre-installation-script-returned-exit-status-10\/"},"modified":"2007-04-14T14:34:05","modified_gmt":"2007-04-14T02:34:05","slug":"lvm2-pre-installation-script-returned-exit-status-10","status":"publish","type":"post","link":"http:\/\/craig.dubculture.co.nz\/blog\/2006\/07\/07\/lvm2-pre-installation-script-returned-exit-status-10\/","title":{"rendered":"lvm2 pre-installation script returned exit status 10"},"content":{"rendered":"<p>Tracking down bugs in Debian and Ubuntu packages is fun for the whole family.  Found this one while upgrading from Hoary to Dapper on a test box:<\/p>\n<blockquote><p>root@unassigned-firewall:~ # apt-get install lvm2..<br \/>\nPreparing to replace lvm2 2.00.32-1 (using ...\/lvm2_2.02.02-1ubuntu1_i386.deb) ...<br \/>\ndpkg: error processing \/cdrom\/\/pool\/main\/l\/lvm2\/lvm2_2.02.02-1ubuntu1_i386.deb (--unpack): subprocess pre-installation script returned error exit status 10<br \/>\nErrors were encountered while processing:<br \/>\n\/cdrom\/\/pool\/main\/l\/lvm2\/lvm2_2.02.02-1ubuntu1_i386.deb<br \/>\nE: Sub-process \/usr\/bin\/dpkg returned an error code (1)<\/p><\/blockquote>\n<p>Straight to Google. Nothing for this package, but some other packages with a similar error are reported.  Eventually, I find a <a href=\"http:\/\/mdcc.cx\/\">similar example<\/a>, and work through the steps:<\/p>\n<blockquote><p>root@unassigned-firewall:~ # export DEBCONF_DEBUG=developer<br \/>\nroot@unassigned-firewall:~ # apt-get install lvm2<br \/>\n..<br \/>\nPreparing to replace lvm2 2.00.32-1 (using ...\/lvm2_2.02.02-1ubuntu1_i386.deb) ...<br \/>\ndebconf (developer): frontend started<br \/>\ndebconf (developer): frontend running, package name is lvm2<br \/>\ndebconf (developer): starting \/var\/lib\/dpkg\/tmp.ci\/preinst upgrade 2.00.32-1<br \/>\ndebconf (developer): &lt;-- VERSION 2.0<br \/>\ndebconf (developer): --&gt; 0 2.0<br \/>\ndebconf (developer): &lt;-- CAPB backup<br \/>\ndebconf (developer): --&gt; 0 multiselect escape backup<br \/>\ndebconf (developer): &lt;-- TITLE LVM2<br \/>\ndebconf (developer): --&gt; 0<br \/>\ndebconf (developer): &lt;-- FSET lvm2\/kernel seen false<br \/>\ndebconf (developer): --&gt; 10 lvm2\/kernel doesn't exist<br \/>\ndpkg: error processing \/cdrom\/\/pool\/main\/l\/lvm2\/lvm2_2.02.02-1ubuntu1_i386.deb (--unpack):<br \/>\nsubprocess pre-installation script returned error exit status 10<br \/>\ndebconf (developer): frontend started<br \/>\ndebconf (developer): frontend running, package name is lvm2<br \/>\ndebconf (developer): starting \/var\/lib\/dpkg\/info\/lvm2.postinst abort-upgrade 2.02.02-1ubuntu1<br \/>\nErrors were encountered while processing:<br \/>\n\/cdrom\/\/pool\/main\/l\/lvm2\/lvm2_2.02.02-1ubuntu1_i386.deb<br \/>\nE: Sub-process \/usr\/bin\/dpkg returned an error code (1)<\/p><\/blockquote>\n<p>Aha! Eventually, the problem presents itself, in the postinst - but of the new package, not the one that is in \/var\/lib\/dpkg\/info:<\/p>\n<blockquote><p>if ! dpkg --compare-versions $(uname -r) ge '2.6.12'; then<br \/>\ndb_fset lvm2\/kernel seen false<br \/>\ndb_input critical lvm2\/kernel || true<br \/>\ndb_go<br \/>\nexit 1<br \/>\nfi<\/p><\/blockquote>\n<p>Which neatly matches <a href=\"http:\/\/bugs.debian.org\/cgi-bin\/bugreport.cgi?bug=358373\">this Debian bug<\/a>. I built me a package without this block (you're going to be running a new kernel when the upgrade that includes this package is done - the new version wouldn't cleanly backport), and the upgrade continued.<\/p>\n<p>The moral of this story is I should have gone to Launchpad first, as the <a href=\"https:\/\/launchpad.net\/distros\/ubuntu\/+source\/lvm2\/+bug\/47972\/\">bug is recorded there<\/a>.  Google just didn't see it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tracking down bugs in Debian and Ubuntu packages is fun for the whole family. Found this one while upgrading from Hoary to Dapper on a test box: root@unassigned-firewall:~ # apt-get install lvm2.. Preparing to replace lvm2 2.00.32-1 (using ...\/lvm2_2.02.02-1ubuntu1_i386.deb) ... dpkg: error processing \/cdrom\/\/pool\/main\/l\/lvm2\/lvm2_2.02.02-1ubuntu1_i386.deb (--unpack): subprocess pre-installation script returned error exit status 10 Errors were [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[66,68],"tags":[8,27,19],"_links":{"self":[{"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/posts\/34"}],"collection":[{"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/comments?post=34"}],"version-history":[{"count":0,"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/posts\/34\/revisions"}],"wp:attachment":[{"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/media?parent=34"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/categories?post=34"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/craig.dubculture.co.nz\/blog\/wp-json\/wp\/v2\/tags?post=34"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}