{"id":93,"date":"2013-04-09T07:48:10","date_gmt":"2013-04-09T07:48:10","guid":{"rendered":"http:\/\/www.nicovs.be\/?p=93"},"modified":"2013-04-09T08:15:35","modified_gmt":"2013-04-09T08:15:35","slug":"kernel-update-errors-on-a-debian-squeeze-xen-vm","status":"publish","type":"post","link":"https:\/\/www.nicovs.be\/?p=93","title":{"rendered":"Kernel update errors on a  Debian Squeeze Xen Virtual Machine"},"content":{"rendered":"<p>When performing a apt-get upgrade on a Xen Debian Squeeze Virtual Machine, you might encounted errors like:<\/p>\n<pre class=\"lang:default decode:true crayon-selected\">Setting up linux-image-2.6.32-5-amd64 (2.6.32-45) ...\r\nRunning depmod.\r\nRunning update-initramfs.\r\nupdate-initramfs: Generating \/boot\/initrd.img-2.6.32-5-amd64\r\nExamining \/etc\/kernel\/postinst.d.\r\nrun-parts: executing \/etc\/kernel\/postinst.d\/initramfs-tools 2.6.32-5-amd64 \/boot\/vmlinuz-2.6.32-5-amd64\r\nrun-parts: executing \/etc\/kernel\/postinst.d\/zz-update-grub 2.6.32-5-amd64 \/boot\/vmlinuz-2.6.32-5-amd64\r\nSearching for GRUB installation directory ... found: \/boot\/grub\r\nSearching for default file ... Generating \/boot\/grub\/default file and setting the default boot entry to 0\r\nentry not specified.\r\nrun-parts: \/etc\/kernel\/postinst.d\/zz-update-grub exited with return code 1\r\nFailed to process \/etc\/kernel\/postinst.d at \/var\/lib\/dpkg\/info\/linux-image-2.6.32-5-amd64.postinst line 799.\r\ndpkg: error processing linux-image-2.6.32-5-amd64 (--configure):\r\n subprocess installed post-installation script returned error exit status 2\r\nSetting up linux-image-2.6.32-5-xen-amd64 (2.6.32-45) ...\r\nconfigured to not write apport reports\r\n                                      Running depmod.\r\nRunning update-initramfs.\r\nupdate-initramfs: Generating \/boot\/initrd.img-2.6.32-5-xen-amd64\r\nExamining \/etc\/kernel\/postinst.d.\r\nrun-parts: executing \/etc\/kernel\/postinst.d\/initramfs-tools 2.6.32-5-xen-amd64 \/boot\/vmlinuz-2.6.32-5-xen-amd64\r\nrun-parts: executing \/etc\/kernel\/postinst.d\/zz-update-grub 2.6.32-5-xen-amd64 \/boot\/vmlinuz-2.6.32-5-xen-amd64\r\nSearching for GRUB installation directory ... found: \/boot\/grub\r\nSearching for default file ... Generating \/boot\/grub\/default file and setting the default boot entry to 0\r\nentry not specified.\r\nrun-parts: \/etc\/kernel\/postinst.d\/zz-update-grub exited with return code 1\r\nFailed to process \/etc\/kernel\/postinst.d at \/var\/lib\/dpkg\/info\/linux-image-2.6.32-5-xen-amd64.postinst line 799.\r\ndpkg: error processing linux-image-2.6.32-5-xen-amd64 (--configure):\r\n subprocess installed post-installation script returned error exit status 2\r\nconfigured to not write apport reports\r\n                                      Errors were encountered while processing:\r\n linux-image-2.6.32-5-amd64\r\n linux-image-2.6.32-5-xen-amd64\r\nE: Sub-process \/usr\/bin\/dpkg returned an error code (1)<\/pre>\n<p>&nbsp;<\/p>\n<p>This happens\u00a0because grub cannot find the virtual disk in order to rewrite the server&#8217;s initrd image.<\/p>\n<p>Since Xen kernel management is transparent to your machine itself, you can safely remove grub by:<\/p>\n<pre>root@nicovs:~#apt-get remove grub-legacy grub-common<\/pre>\n<p>This is the output of the remove command:<\/p>\n<pre class=\"lang:default decode:true\">root@nicovs:~# apt-get remove grub-legacy grub-common\r\nReading package lists... Done\r\nBuilding dependency tree\r\nReading state information... Done\r\nThe following packages were automatically installed and are no longer required:\r\n  libtokyocabinet8 libpth20 mutt gettext-base os-prober libgpgme11\r\nUse 'apt-get autoremove' to remove them.\r\nThe following packages will be REMOVED:\r\n  grub-common grub-legacy\r\n0 upgraded, 0 newly installed, 2 to remove and 45 not upgraded.\r\n2 not fully installed or removed.\r\nAfter this operation, 5,931 kB disk space will be freed.\r\nDo you want to continue [Y\/n]? y\r\n(Reading database ... 38041 files and directories currently installed.)\r\nRemoving grub-legacy ...\r\nRemoving grub-common ...\r\nProcessing triggers for man-db ...\r\nProcessing triggers for install-info ...\r\nSetting up linux-image-2.6.32-5-amd64 (2.6.32-45) ...\r\nRunning depmod.\r\nRunning update-initramfs.\r\nupdate-initramfs: Generating \/boot\/initrd.img-2.6.32-5-amd64\r\nExamining \/etc\/kernel\/postinst.d.\r\nrun-parts: executing \/etc\/kernel\/postinst.d\/initramfs-tools 2.6.32-5-amd64 \/boot\/vmlinuz-2.6.32-5-amd64\r\nrun-parts: executing \/etc\/kernel\/postinst.d\/zz-update-grub 2.6.32-5-amd64 \/boot\/vmlinuz-2.6.32-5-amd64\r\nSetting up linux-image-2.6.32-5-xen-amd64 (2.6.32-45) ...\r\nRunning depmod.\r\nRunning update-initramfs.\r\nupdate-initramfs: Generating \/boot\/initrd.img-2.6.32-5-xen-amd64\r\nExamining \/etc\/kernel\/postinst.d.\r\nrun-parts: executing \/etc\/kernel\/postinst.d\/initramfs-tools 2.6.32-5-xen-amd64 \/boot\/vmlinuz-2.6.32-5-xen-amd64\r\nrun-parts: executing \/etc\/kernel\/postinst.d\/zz-update-grub 2.6.32-5-xen-amd64 \/boot\/vmlinuz-2.6.32-5-xen-amd64<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When performing a apt-get upgrade on a Xen Debian Squeeze Virtual Machine, you might encounted errors like: Setting up linux-image-2.6.32-5-amd64 (2.6.32-45) &#8230; Running depmod. Running update-initramfs. update-initramfs: Generating \/boot\/initrd.img-2.6.32-5-amd64 Examining \/etc\/kernel\/postinst.d. run-parts: executing \/etc\/kernel\/postinst.d\/initramfs-tools 2.6.32-5-amd64 \/boot\/vmlinuz-2.6.32-5-amd64 run-parts: executing \/etc\/kernel\/postinst.d\/zz-update-grub 2.6.32-5-amd64 \/boot\/vmlinuz-2.6.32-5-amd64 Searching for GRUB installation directory &#8230; found: \/boot\/grub Searching for default file &#8230; Generating [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[4,56,55],"tags":[62,61,59,60,58,57,82],"class_list":["post-93","post","type-post","status-publish","format-standard","hentry","category-debian","category-virtual-machines","category-xen","tag-apt-get-remove","tag-apt-get-upgrade","tag-kernel","tag-kernel-update","tag-virtual-machine","tag-vm","tag-xen"],"_links":{"self":[{"href":"https:\/\/www.nicovs.be\/index.php?rest_route=\/wp\/v2\/posts\/93","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nicovs.be\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nicovs.be\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nicovs.be\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nicovs.be\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=93"}],"version-history":[{"count":4,"href":"https:\/\/www.nicovs.be\/index.php?rest_route=\/wp\/v2\/posts\/93\/revisions"}],"predecessor-version":[{"id":196,"href":"https:\/\/www.nicovs.be\/index.php?rest_route=\/wp\/v2\/posts\/93\/revisions\/196"}],"wp:attachment":[{"href":"https:\/\/www.nicovs.be\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=93"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nicovs.be\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=93"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nicovs.be\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=93"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}