{"id":15,"date":"2007-08-09T14:07:59","date_gmt":"2007-08-09T19:07:59","guid":{"rendered":"http:\/\/www.popmartian.com\/tipsntricks\/2007\/08\/09\/debian-based-machines-and-the-initramfs-prompt\/"},"modified":"2007-08-09T14:10:17","modified_gmt":"2007-08-09T19:10:18","slug":"debian-based-machines-and-the-initramfs-prompt","status":"publish","type":"post","link":"https:\/\/www.popmartian.com\/tipsntricks\/2007\/08\/09\/debian-based-machines-and-the-initramfs-prompt\/","title":{"rendered":"Debian-based machines and the (initramfs) prompt"},"content":{"rendered":"<p>There are a million pages devoted to initramfs so I won&#8217;t go in to what it is, but if you have a Dell 1655 or other machine with serial-attached-SCSI and use Debian or a Debian-derived Linux distribution such as Ubuntu or Kbuntu, you may have run in to an issue booting after installing a kernel update.<\/p>\n<p>Common errors are:<\/p>\n<p>Target filesystem doesn&#8217;t have sbin\/init<br \/>\nBusyBox v.1.1.3<br \/>\n\/bin\/sh: can&#8217;t access tty; job control turned off<br \/>\n(initramfs)<\/p>\n<p>or<\/p>\n<p>mount: Mounting \/root\/dev on \/dev\/.static\/dev failed: No such file or directory<br \/>\nDone.<br \/>\nTarget filesystem doesn&#8217;t have \/sbin\/init<\/p>\n<p>or<\/p>\n<p>Mounting root file system&#8230;<br \/>\nRunning \/scripts\/local-top&#8230;Done.<br \/>\nRunning \/scripts\/local-premount&#8230;Done.<br \/>\nkjournald starting. Commit interval 5 seconds.<br \/>\nRunning \/scripts\/log-bottom&#8230;Done.<br \/>\nRunning \/scripts\/init-bottom&#8230;<br \/>\nMounting \/root\/dev on \/dev\/.static\/dev failed: No such file or directory&#8230;Done.<br \/>\nMounting \/sys on \/root\/sys filed: No such file or directory<br \/>\nMounting \/proc on \/root\/proc filed: No such file or directory<br \/>\nTarget filesystem doesn&#8217;t have \/sbin\/init<\/p>\n<p>A common reason for this is simple.  Your GRUB menu is messed up and you swear you didn&#8217;t touch it!<\/p>\n<p>There is a bug somewhere in Debian that changes your filesystem from \/dev\/sd&lt;something&gt; to \/dev\/sd&lt;something else&gt;.  Of course changing that will make the system mount root from the wrong partition and BOOM!  No boot for you.<\/p>\n<p>In my case it constantly changes my boot partition from \/dev\/sda1 to \/dev\/sdb1 which is really annoying.  If I don&#8217;t update \/boot\/grub\/menu.lst before I reboot, my system will not come back.<\/p>\n<p>Lucky for you Debian has BusyBox and initramfs with the 2.6 kernel.<\/p>\n<p>You will have to be on the console for this, but here is how to get up and running:<\/p>\n<ul>\n<li>Boot up your broken system.<\/li>\n<li>(initramfs) is actually a prompt, so:\n<ul>\n<li><code>(initramfs) cd \/<\/code><\/li>\n<\/ul>\n<\/li>\n<li><code>(initramfs) mkdir \/mnt<\/code> Make a directory in the RAM filesystem.<\/li>\n<li><code>(initramfs) mount \/dev\/sda1 \/mnt<\/code> Mount your REAL root partition there.<\/li>\n<li><code>(initramfs) vi \/mnt\/boot\/grub\/menu.lst<\/code> Edit your menu.lst file to load the correct partition (toward the bottom)<\/li>\n<li><code>(initramfs) reboot<\/code><\/li>\n<\/ul>\n<p>In my most recent case, the line:<\/p>\n<p><code>kernel          \/boot\/vmlinuz-2.6.18-4-686 root=\/dev\/sda1 ro<\/code><\/p>\n<p>Was changed to <\/p>\n<p><code>kernel          \/boot\/vmlinuz-2.6.18-4-686 root=\/dev\/sdb1 ro<\/code><\/p>\n<p>If I change it back before I reboot, I don&#8217;t have an issue.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are a million pages devoted to initramfs so I won&#8217;t go in to what it is, but if you have a Dell 1655 or other machine with serial-attached-SCSI and use Debian or a Debian-derived Linux distribution such as Ubuntu &hellip; <a href=\"https:\/\/www.popmartian.com\/tipsntricks\/2007\/08\/09\/debian-based-machines-and-the-initramfs-prompt\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,40,3,27],"tags":[],"class_list":["post-15","post","type-post","status-publish","format-standard","hentry","category-debian","category-grub","category-how-to-do-stuff","category-linux"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/posts\/15","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/comments?post=15"}],"version-history":[{"count":1,"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/posts\/15\/revisions"}],"predecessor-version":[{"id":51,"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/posts\/15\/revisions\/51"}],"wp:attachment":[{"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/media?parent=15"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/categories?post=15"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.popmartian.com\/tipsntricks\/wp-json\/wp\/v2\/tags?post=15"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}