{"id":28,"date":"2014-09-20T18:29:26","date_gmt":"2014-09-20T16:29:26","guid":{"rendered":"http:\/\/www.underealm.com\/tech\/?p=28"},"modified":"2014-09-23T18:37:48","modified_gmt":"2014-09-23T16:37:48","slug":"solution-to-xenserver-vm-landing-on-initramfs","status":"publish","type":"post","link":"http:\/\/www.underealm.com\/tech\/2014\/09\/solution-to-xenserver-vm-landing-on-initramfs\/","title":{"rendered":"Solution to XenServer VM landing on initramfs"},"content":{"rendered":"<p>In my journey through XenServer lands, I once experienced a change in the UUID of the root partition, which resulted in a failed boot and being dropped into initramfs. Although <a href=\"\/test\">this solution<\/a> should have worked just fine, I either didn\u2019t know of it at the time or it wouldn\u2019t work for some reason.<\/p>\n<p>While inside the VM initramfs I also had the pleasure of not having any text editor of sorts: no vi, no vim, no nano. Nothing at all. Even though I found the new UUID through the use of <strong>ls -al \/dev\/disk\/by-uuid\/<\/strong> (and some guesswork), I had no way to edit the grub configuration. So, after some trial and error, I came up with the following:<\/p>\n<pre class=\"nums:false\" lang=\"cmd\"><code>(initramfs) mount \/dev\/xvda1 \/mnt; cd \/mnt\r\n(initramfs) cp grub.cfg grub2.cfg\r\n(initramfs) cat grub2.cfg | sed s\/<OLD_UUID>\/<NEW_UUID>\/g > grub.cfg<\/code><\/pre>\n<p>After the proper root partition UUID was set in place, a reboot was all it took to set the machine back up and running.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my journey through XenServer lands, I once experienced a change in the UUID of the root partition, which resulted in a failed boot and being dropped into initramfs. Although this solution should have worked just fine, I either didn\u2019t know of it at the time or it wouldn\u2019t work for some reason. While inside [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[5,11,14,15,58,59],"class_list":["post-28","post","type-post","status-publish","format-standard","hentry","category-xenserver","tag-citrix","tag-grub","tag-grub2","tag-initramfs","tag-sysad","tag-xenserver"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/www.underealm.com\/tech\/wp-json\/wp\/v2\/posts\/28"}],"collection":[{"href":"http:\/\/www.underealm.com\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.underealm.com\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.underealm.com\/tech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.underealm.com\/tech\/wp-json\/wp\/v2\/comments?post=28"}],"version-history":[{"count":0,"href":"http:\/\/www.underealm.com\/tech\/wp-json\/wp\/v2\/posts\/28\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.underealm.com\/tech\/wp-json\/wp\/v2\/media?parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.underealm.com\/tech\/wp-json\/wp\/v2\/categories?post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.underealm.com\/tech\/wp-json\/wp\/v2\/tags?post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}