{"id":890,"date":"2008-10-07T21:58:00","date_gmt":"2008-10-07T13:58:00","guid":{"rendered":"http:\/\/note.systw.net\/note\/?p=890"},"modified":"2023-11-07T22:13:33","modified_gmt":"2023-11-07T14:13:33","slug":"ios-boot-sequence","status":"publish","type":"post","link":"https:\/\/systw.net\/note\/archives\/890","title":{"rendered":"IOS Boot Sequence"},"content":{"rendered":"\n<p><br><strong>ios\u555f\u52d5\u9806\u5e8f<\/strong><br>1<br><strong>\u57f7\u884cpost<\/strong><br>\u3000\u96fb\u6e90\u958b\u555f\u5f8c\u57f7\u884cpost(power-on self-test,\u958b\u6a5f\u81ea\u6211\u6e2c\u8a66)<br>\u3000\u5c0d\u6240\u6709\u786c\u9ad4\u6a21\u7d44\u9032\u884c\u8a3a\u65b7,\u78ba\u8a8d\u57fa\u672c\u904b\u4f5c<br>2<br><strong>\u555f\u52d5bootstrap loader<\/strong><br>\u3000\u5728rom\u4e2d\u57f7\u884cbootstrap loader(\u555f\u52d5\u8f09\u5165\u7a0b\u5f0f)<br>\u3000bootstrap loader\u53ea\u542b\u4e00\u4e9b\u9810\u7f6e\u7684\u8f09\u5165\u6307\u4ee4,\u7528\u4f86\u4f9d\u5e8f\u5c07\u5176\u4ed6\u7a0b\u5f0f\u8f09\u5165\u8a18\u61b6\u9ad4\u4e2d\u6216\u4f7f\u5176\u9032\u5165\u5176\u4ed6\u7d44\u614b\u6a21\u5f0f<br>\u3000\u6703\u6aa2\u67e5configuration register\u4ee5\u6c7a\u5b9a\u5f8c\u7e8c\u52d5\u4f5c<br>3<br><strong>\u8f09\u5165cisco ios\u6620\u50cf\u6a94<\/strong><br>\u3000\u9810\u8a2d\u4f86\u6e90\u8f09\u5165\u9806\u5e8f\u70ba:flash,tftp,rom\u4e2d\u7684\u6620\u50cf\u6a94,rom monitor<br>\u3000ps:\u82e5\u5728nvram\u4e2d\u6709boot system\u547d\u4ee4,\u5247\u4ee5\u6b64\u6c7a\u5b9a\u8f09\u5165\u6620\u50cf\u6a94\u9806\u5e8f<br>\u3000\u8f09\u5165\u6620\u50cf\u6a94\u4e26\u958b\u59cb\u904b\u4f5c\u5f8c\u6703\u627e\u51fa\u8edf\u786c\u9ad4\u5143\u4ef6\u5217\u51fa\u7d50\u679c<br>\u3000ps:\u82e5\u5728\u958b\u6a5f\u9806\u5e8f\u88ab\u4e2d\u65b7\u5247\u56de\u5fa9\u5230rom monitor\u6a21\u5f0f<br>4<br><strong>\u7d44\u614b\u6a94\u8f09\u5165\u4e3b\u8a18\u61b6\u9ad4\u4e2d<\/strong><br>\u3000\u9810\u8a2d\u4f86\u6e90\u8f09\u5165\u9806\u5e8f\u70ba:nvram,tftp,\u4e3b\u63a7\u53f0<br>\u3000\u82e5\u5728nvram\u627e\u4e0d\u5230\u5247\u6703\u641c\u5c0btftp,\u82e5\u7121\u5247\u5728\u4e3b\u63a7\u53f0\u81ea\u52d5\u9032\u5165setup mode\u7528\u4e92\u52d5\u7522\u751f\u65b0\u7684\u7d44\u614b\u6a94<br>\u3000ps:\u65b0\u7684\u8a2d\u5099\u4e00\u958b\u6a5f\u90fd\u6703\u9032\u5230setup mode<br>\u3000\u8f09\u5165\u7d44\u614b\u6a94\u5f8c\u6703\u4f9d\u5e8f\u4e00\u5217\u4e00\u5217\u7684\u57f7\u884c,\u8a2d\u5b9a\u5404\u7d44\u614b<br>\u3000nvram\u4e2d\u7684startup-config(\u555f\u52d5\u7d44\u614b)\u8907\u88fd\u5230ram\u4e2d\u7684running-config(\u57f7\u884c\u4e2d\u7d44\u614b)<br>ps:cisco rom\u4e2d\u5132\u5b58post,rom monitor,\u8ff7\u4f60ios,bootstrap loader<\/p>\n\n\n\n<p>\u91cd\u8f09\u8a2d\u5099<br><strong>#reload<\/strong><br>\u53ef\u5c07ios\u91cd\u65b0\u555f\u52d5,\u4e26\u958b\u59cb\u91cd\u65b0\u8a2d\u5b9a<\/p>\n\n\n\n<p>&#8230;&#8230;<\/p>\n\n\n\n<p><strong>ios\u4e0d\u6b63\u5e38\u555f\u52d5\u7684\u53ef\u80fd\u60c5\u6cc1<\/strong><br>\u5e38\u898b\u6709\u4ee5\u4e0b:<br>\u60c5\u6cc11<br><strong>\u7d44\u614b\u6a94\u6848\u4e2d\u6709\u907a\u6f0f\u6216\u932f\u8aa4\u7684\u7cfb\u7d71\u555f\u52d5\u6558\u8ff0<\/strong><br>\u60c5\u6cc12<br><strong>\u932f\u8aa4\u7684configuration register<\/strong><br>\u3000\u6703\u4f7fios\u7121\u6cd5\u5f9eflash memory\u4e2d\u8f09\u5165,\u6216\u8df3\u904e\u7d44\u614b\u6a94<br>\u3000\u767b\u9304\u503c\u6b63\u78ba\u7684\u6578\u503c\u5728\u4e0d\u540c\u786c\u9ad4\u5e73\u53f0\u4e0a\u6703\u4e0d\u540c<br>\u3000\u89e3\u6c7a\u65b9\u5f0f:\u5f97\u5230\u6b63\u78ba\u7684\u767b\u9304\u503c\u4e26\u66f4\u6539\u7d44\u614b\u767b\u9304\u5668,\u5132\u5b58\u5f8c\u4f5c\u70ba\u555f\u52d5\u7684\u8a2d\u5b9a\u7d44\u614b<br>\u60c5\u6cc13<br><strong>\u6bc0\u640d\u7684\u5feb\u9583\u6620\u50cf\u6a94<\/strong><br>\u3000\u555f\u52d5ios\u932f\u8aa4\u8a0a\u606f\u53ef\u80fd\u5982\u4e0b<br>\u3000open: read error &#8230; requested 0x4 btes, got 0x0 trouble reading device magic number<br>\u3000boot:: cannot open &#8220;flash&#8221;<br>\u3000boot: canot determine first file name on device &#8220;flash:&#8221;<br>\u3000\u89e3\u6c7a\u65b9\u5f0f:\u5c07\u65b0\u7684cisco ios\u8edf\u9ad4\u6620\u50cf\u6a94\u4e0a\u50b3\u81f3\u8def\u5167\u5668\u5167<br>\u60c5\u6cc14<br><strong>\u786c\u9ad4\u6545\u969c<\/strong><br>\u3000\u975e\u5e38\u5c11\u898b<br>\u3000\u89e3\u6c7a\u65b9\u5f0f:\u9023\u7d61TAC(cisco technical assistance center)<\/p>\n\n\n\n<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.<\/p>\n\n\n\n<p><strong>configuration register\u7684\u610f\u7fa9<\/strong><br>0000 \u9032\u5165rom monitor<br>0001 rom\u4e2d\u7684\u6620\u50cf\u6a94,\u8868\u793aboot\u5f9erom,\u9019\u4e5f\u7a31\u70ba\u8ff7\u4f60ios,\u6216rxboot\u6a21\u5f0f<br>0002-000f \u8a2d\u5b9a\u9810\u8a2d\u7684\u958b\u6a5f\u6a94\u6848\u540d\u7a31,0002\u8868\u793aboot\u5f9envram<br>0040 \u5ffd\u7565nvram\u7684\u5167\u5bb9,\u4e5f\u5c31\u662f\u8df3\u904estartup-config\u7684\u8a2d\u5b9a<br>0080 \u6253\u958boem\u4f4d\u5143<br>0100&nbsp;\u95dc\u9589\u4e2d\u65b7\u529f\u80fd<br>0400 \u542b\u5168\u90e8\u70ba0\u7684ip\u5ee3\u64ad<br>0800-1000 \u63a7\u5236\u53f0\u7dda\u8def\u901f\u5ea6<br>2000&nbsp;\u82e5\u7db2\u8def\u958b\u6a5f\u5931\u6557\uff0c\u4ee5\u9810\u8a2drom\u8edf\u9ad4\u958b\u6a5f<br>4000 ip\u5ee3\u64ad\u6c92\u6709\u7db2\u8def\u865f\u78bc<br>8000 \u555f\u52d5\u8a3a\u65b7\u8a0a\u606f\uff0c\u4e26\u5ffd\u7565nvram\u5167\u5bb9<br>ex:0x2102\u53ef\u8996\u70ba2000\uff0c0100\uff0c0002<br>ps:0x101=0x0101<br>\u9810\u8a2d\u7d44\u614b\u503c\u70ba0x2102<\/p>\n\n\n\n<p>\u8b8a\u66f4\u7d44\u614b\u503c<br><strong>(config)#config-register &lt; register&gt;<\/strong><br>\u8a2d\u5b9a\u5f8c\u8981\u7b49\u5230\u4e0b\u6b21\u958b\u6a5f\u624d\u6703\u751f\u6548<br>\u82e5\u8981\u5230rom mintor\u53ef\u8a2d\u70ba2100\uff0c\u9032\u5165\u5f8c\u63d0\u793a\u7b26\u865f\u70barommon&gt;<br>\u82e5\u8981\u7528rom\u7684\u6620\u50cf\u958b\u6a5f\u53ef\u8a2d\u70ba2101 \uff0c\u9032\u5165\u5f8c\u63d0\u793a\u7b26\u865f\u70barouter(boot)<br>\u82e5\u8981\u8df3\u904estartup-config,\u5e38\u8a2d\u62102142<br>\u82e5\u8981\u7528nvram\u4e2d\u6307\u5b9a\u7684\u958b\u6a5f\u53ef\u8a2d2102-210f<br>ex:\u5c07\u7d44\u614b\u503c\u8a2d\u62100x2102<br>(config)#config-register 0x2102<\/p>\n\n\n\n<p><strong>\u8b8a\u66f4\u7d44\u614b\u503c\u7684\u539f\u56e0<\/strong>:<br>\u5f37\u5236\u7cfb\u7d71\u9032\u5165ROM\u76e3\u63a7\u6a21\u5f0f<br>\u9078\u64c7\u555f\u52d5\u4f86\u6e90\u548c\u9810\u8a2d\u7684\u555f\u52d5\u6a94\u6848\u540d<br>\u555f\u7528\u6216\u7981\u7528Break(\u4e2d\u65b7)\u529f\u80fd<br>\u63a7\u5236\u5ee3\u64ad\u4f4d\u5740<br>\u8a2d\u7f6e\u63a7\u5236\u81fa\u4e2d\u65b7\u4e32\u5217\u50b3\u8f38\u901f\u7387<br>\u5f9eROM\u8f09\u5165\u64cd\u4f5c\u8edf\u9ad4<br>\u555f\u7528\u5f9eTFTP\u555f\u52d5\u4f3a\u670d\u5668<\/p>\n\n\n\n<p>&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;<\/p>\n\n\n\n<p>\u8f09\u5165ios\u6620\u50cf\u6a94\u512a\u5148\u4f86\u6e90<br><strong>(config)#boot system &lt; source&gt; &lt; iosname [tftp address]&gt;<\/strong><br>#copy running-config startup-config &lt; source&gt;\u503c\u6709rom,flash,tftp<br>ps:boot system\u7684\u8cc7\u8a0a\u53ef\u5728startup-config\u4e2d\u770b\u5230<br>ps:\u53ef\u4f7f\u7528\u591a\u500bboot system,\u4ee5\u7d44\u614b\u6a94\u51fa\u73fe\u6b21\u5e8f\u6c7a\u5b9a\u512a\u5148\u9806\u5e8f<br>ex:<br>\u6307\u5b9a\u512a\u5148\u5f9eflash\u8f09\u5165ios\u6620\u50cf\u6a94c2691-a3js-mz.123-3.bin<br>(config)#boot system flash c2691-a3js-mz.123-3.bin<br>#copy running-config startup-config<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ios\u555f\u52d5\u9806\u5e8f1\u57f7\u884cpost\u3000\u96fb\u6e90\u958b\u555f\u5f8c\u57f7\u884cpost(pow &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"","fifu_image_alt":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[32],"tags":[],"class_list":["post-890","post","type-post","status-publish","format-standard","hentry","category-cisco-network"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts\/890","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/comments?post=890"}],"version-history":[{"count":0,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/posts\/890\/revisions"}],"wp:attachment":[{"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/media?parent=890"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/categories?post=890"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/systw.net\/note\/wp-json\/wp\/v2\/tags?post=890"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}