{"id":917,"date":"2013-01-28T11:31:28","date_gmt":"2013-01-28T03:31:28","guid":{"rendered":"http:\/\/www.dogeye.net\/?p=917"},"modified":"2013-01-28T11:31:28","modified_gmt":"2013-01-28T03:31:28","slug":"%e4%bd%bf%e7%94%a8gdb%e5%92%8c%e8%99%9a%e6%8b%9f%e6%9c%ba%e8%b0%83%e8%af%95%e5%86%85%e6%a0%b8","status":"publish","type":"post","link":"https:\/\/ykyi.net\/?p=917","title":{"rendered":"\u4f7f\u7528gdb\u548c\u865a\u62df\u673a\u8c03\u8bd5\u5185\u6838"},"content":{"rendered":"<p>\u8c03\u8bd5\u5185\u6838\u5f88\u9ebb\u70e6\uff0c\u5373\u4f7f\u662f\u6709\u4e86\u865a\u62df\u673a\u7684\u5e2e\u52a9\u3002\u5728\u8fd9\u91cc\u8bb0\u4e0b\u4e00\u4e9b\u5173\u952e\u7684\u4e1c\u897f\uff0c\u4ee5\u5907\u5fd8 \u3002<\/p>\n<p>\uff03 &nbsp;\u7f16\u8bd1\u5185\u6838\u540e\uff0c \u7528\u65b0\u5185\u6838\u542f\u52a8\u7cfb\u7edf\u5931\u8d25\uff0c\u62a5\u9519 &ldquo;unable to mount fs &#8230;.&rdquo; \u4e4b\u7c7b.<\/p>\n<p>\u9700\u8981\u7528 update-initramfs \u751f\u6210initram\u3002<\/p>\n<p>\uff03 \u5bf9\u4e8egrub2\uff0c\u6211\u589e\u52a0\u4e86\u4e00\u4e2a\u81ea\u5b9a\u4e49\u7684grub\u5f00\u673a\u542f\u52a8\u9879\u7528\u6765\u8c03\u8bd5\u5185\u6838\uff0c\u5982\u4e0b\uff1a<\/p>\n<p>#!\/bin\/sh<br \/>\n\texec tail -n +3 $0<br \/>\n\t# This file provides an easy way to add custom menu entries. &nbsp;Simply type the<br \/>\n\t# menu entries you want to add after this comment. &nbsp;Be careful not to change<br \/>\n\t# the &#39;exec tail&#39; line above.<br \/>\n\techo &quot;Add Debugging entry&quot;<br \/>\n\tcat &lt;&lt; EOF<br \/>\n\tmenuentry &quot;Debian debug 3.7.4&quot;{<br \/>\n\tset root=(hd0,1)<br \/>\n\tlinux \/boot\/vmlinuz-3.7.4 root=\/dev\/vda1 ro quiet kgdboc=ttyS0,115200 kgdbwait<br \/>\n\tinitrd \/boot\/initrd.img-3.7.4<br \/>\n\t}<br \/>\n\tEOF<\/p>\n<p>\/\/\/\/\/\/\/\/\/<\/p>\n<p>the above grub configuration file resides in \/etc\/grub.d\/<\/p>\n<p># client\u5728\u865a\u62df\u673a\u91cc\u542f\u52a8\u540e\u5728\u5185\u6838\u8c03\u8bd5\u65ad\u70b9\u5904\u505c\u4e0b\u3002\u8fd9\u65f6\u5728host\u673a\u7528gdb\u8c03\u8bd5.<\/p>\n<p># gdb vmlinux<\/p>\n<p>set remotebaud 115200<\/p>\n<p>target remote \/dev\/pts\/0<\/p>\n<p>\u6b64\u65f6gdb\u8f93\u5165continue\u547d\u4ee4\u8ba9\u5ba2\u6237\u673a\u7684\u7cfb\u7edf\u7ee7\u7eed\u8fd0\u884c\u3002\u5982\u679c\u60f3\u65ad\u4e0b\u6b63\u5728\u8fd0\u884c\u7684client\u5185\u6838\uff0c\u5728client\u673a\u4e2d\u4f7f\u7528magic SysR: &nbsp;echo &quot;g&quot; &gt; \/proc\/sysrq-trigger<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8c03\u8bd5\u5185\u6838\u5f88\u9ebb\u70e6\uff0c\u5373\u4f7f\u662f\u6709\u4e86\u865a\u62df\u673a\u7684\u5e2e\u52a9\u3002\u5728\u8fd9\u91cc\u8bb0\u4e0b\u4e00\u4e9b\u5173\u952e\u7684\u4e1c\u897f\uff0c\u4ee5\u5907\u5fd8 \u3002 \uff03 &nbsp;\u7f16\u8bd1\u5185\u6838\u540e\uff0c \u7528\u65b0\u5185\u6838\u542f\u52a8\u7cfb\u7edf\u5931\u8d25\uff0c\u62a5\u9519 &ldquo;unable to mount fs &#8230;.&rdquo; \u4e4b\u7c7b. \u9700\u8981\u7528 update-initramfs \u751f\u6210initram\u3002 \uff03 \u5bf9\u4e8egrub2\uff0c\u6211\u589e\u52a0\u4e86\u4e00\u4e2a\u81ea\u5b9a\u4e49\u7684grub\u5f00\u673a\u542f\u52a8\u9879\u7528\u6765\u8c03\u8bd5\u5185\u6838\uff0c\u5982\u4e0b\uff1a #!\/bin\/sh exec tail -n +3 $0 # This file provides an easy way to add custom menu entries. &nbsp;Simply type the # menu entries you want to add after this comment. &nbsp;Be careful not to change # the &#39;exec &hellip; <a href=\"https:\/\/ykyi.net\/?p=917\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;\u4f7f\u7528gdb\u548c\u865a\u62df\u673a\u8c03\u8bd5\u5185\u6838&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,7],"tags":[51,52],"class_list":["post-917","post","type-post","status-publish","format-standard","hentry","category-tech_articles","category-unix_linux","tag-linux-2","tag-linux-kernel"],"_links":{"self":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/posts\/917","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=917"}],"version-history":[{"count":0,"href":"https:\/\/ykyi.net\/index.php?rest_route=\/wp\/v2\/posts\/917\/revisions"}],"wp:attachment":[{"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ykyi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}