{"id":36,"date":"2023-06-05T12:58:57","date_gmt":"2023-06-05T04:58:57","guid":{"rendered":"http:\/\/pro369.com\/linux\/?p=36"},"modified":"2019-03-15T05:14:06","modified_gmt":"2019-03-15T05:14:06","slug":"linux%e4%b8%bb%e6%a9%9f%e4%bc%ba%e6%9c%8d%e5%99%a8%e6%9e%b6%e8%a8%ad%e6%8a%80%e8%a1%93%ef%bc%88linux%e5%8a%a0%e6%8e%9b%e7%ac%ac%e4%ba%8c%e9%a1%86%e7%a1%ac%e7%a2%9f%ef%bc%89","status":"publish","type":"post","link":"https:\/\/por.tw\/linux\/linux%e4%b8%bb%e6%a9%9f%e4%bc%ba%e6%9c%8d%e5%99%a8%e6%9e%b6%e8%a8%ad%e6%8a%80%e8%a1%93%ef%bc%88linux%e5%8a%a0%e6%8e%9b%e7%ac%ac%e4%ba%8c%e9%a1%86%e7%a1%ac%e7%a2%9f%ef%bc%89\/","title":{"rendered":"Linux\u4e3b\u6a5f\u4f3a\u670d\u5668\u67b6\u8a2d\u6280\u8853\uff08Linux\u52a0\u639b\u7b2c\u4e8c\u9846\u786c\u789f\uff09"},"content":{"rendered":"<p><span style=\"background-color: #ffff00; font-size: medium;\"><strong>Linux\u4e3b\u6a5f\u4f3a\u670d\u5668\u67b6\u8a2d\u6280\u8853\uff08Linux\u52a0\u639b\u7b2c\u4e8c\u9846\u786c\u789f\uff09<\/strong><\/span><\/p>\n<p>\u6d41\u7a0b\u7c21\u4ecb<\/p>\n<p>\u6aa2\u67e5\u786c\u789f\u4ee3\u865f\u2192 fdisk \u2192 mkfs.ext3\u683c\u5f0f\u5316 \u2192 \u6c38\u4e45\u639b\u8f09<\/p>\n<p>\u6aa2\u67e5\u7b2c\u4e8c\u9846\u786c\u789f\u7684\u4ee3\u865f<\/p>\n<p>* \u82e5 IDE \u76f4\u63a5\u6aa2\u67e5 hd \u5b57\u4e32<br \/>\nroot@dns:~# dmesg |grep hd<\/p>\n<p>Kernel command line: root=\/dev\/hda2 ro\u00a0 vga=788 splash=silent<br \/>\n\uff1a<br \/>\n\uff1a<br \/>\nhda: cache flushes supported<br \/>\nhda: hda1 hda2 \u2190\u3000\u7b2c\u4e00\u9846\u786c\u789f\uff0c\u5167\u542b\u5169\u500b\u5206\u5272\u5340<br \/>\nAdding 2931820k swap on \/dev\/hda1.\u00a0 Priority:-1 extents:1 across:2931820k<br \/>\nEXT3 FS on hda2, internal journal<br \/>\nide-scsi is deprecated for cd burning! Use ide-cd and give dev=\/dev\/hdX as device<br \/>\nhda: selected mode 0x46<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/visdacom.com\/linux\/wp-content\/uploads\/2019\/03\/Linux-Server-Project-11-1-650x433.jpg\" alt=\"\" class=\"alignnone size-medium wp-image-501\" width=\"650\" height=\"433\" \/><\/p>\n<p>\u7531\u4ee5\u4e0a\u77e5\uff0c\u53ea\u6709\u4e00\u9846\u786c\u789f\u6642\uff0c\u6703\u53eb hda, \u5206\u6210\u5169\u500b\u5206\u5272\u5340\u3002\u82e5\u6709\u7b2c\u4e8c\u9846\u6703\u51fa\u73fe hdb, \u7b2c\u4e09\u9846 hdc &#8230;\u4f9d\u6b64\u985e\u63a8<\/p>\n<p>* \u82e5 SATA , \u90a3\u9ebc hd \u53ca sd \u7686\u53ef\u80fd<br \/>\nroot@dns:~# dmesg |grep sd<\/p>\n<p>hdc: LITE-ON DVD SOHD-16P9S, ATAPI CD\/DVD-ROM drive<br \/>\nSCSI device sda: 312581808 512-byte hdwr sectors (160042 MB)\u3000\u2190\u3000\u7b2c\u4e00\u9846 sata \u786c\u789f<br \/>\nSCSI device sdb: 312581808 512-byte hdwr sectors (160042 MB)\u3000\u2190\u3000\u7b2c\u4e8c\u9846 sata \u786c\u789f<br \/>\nhdc: ATAPI 48X DVD-ROM drive, 254kB Cache\u00a0 \u2190\u3000\u5149\u789f\u6a5f<\/p>\n<p>\u7531\u4ee5\u4e0a\u77e5\uff0c\u7b2c\u4e00\u9846\u662f sda, \u7b2c\u4e8c\u9846 sdb &#8230;\u4f9d\u6b64\u985e\u63a8<\/p>\n<p>* \u82e5 SCSI \u76f4\u63a5\u6aa2\u67e5 sd \u5b57\u4e32<br \/>\nroot@dns:~# dmesg |grep sd<\/p>\n<p>SCSI device sda: 312581808 512-byte hdwr sectors (160042 MB)\u3000\u2190\u3000\u7b2c\u4e00\u9846 sata \u786c\u789f<br \/>\nSCSI device sdb: 312581808 512-byte hdwr sectors (160042 MB)\u3000\u2190\u3000\u7b2c\u4e8c\u9846 sata \u786c\u789f<\/p>\n<p>\u958b\u59cb\u52d5\u624b<br \/>\n\u5b89\u7f6e\u786c\u789f FDISK<\/p>\n<p>* \u4f7f\u7528 FDISK \u521d\u59cb\u5316\u65b0\u7684\u786c\u789f<br \/>\nroot@dns# fdisk \/dev\/hdb<\/p>\n<p>Command (m for help): x<br \/>\nExpert command (m for help): m<br \/>\nCommand action<br \/>\nb move beginning of data in a partition<br \/>\nc change number of cylinders<br \/>\nd print the raw data in the partition table<br \/>\ne list extended partitions<br \/>\nf fix partition order<br \/>\ng create an IRIX (SGI) partition table<br \/>\nh change number of heads<br \/>\nm print this menu<br \/>\nn add a new partition<br \/>\np print the partition table<br \/>\nq quit without saving changes<br \/>\nr return to main menu<br \/>\ns change number of sectors\/track<br \/>\nv verify the partition table<br \/>\nw write table to disk and exit<\/p>\n<p>1. \u65b0\u589e<br \/>\nCommand (m for help): n<br \/>\n2. \u9078\u5b8c\u5206\u5272\u5340\u5927\u5c0f\u5f8c, \u5beb\u5165<br \/>\nCommand (m for help): w<br \/>\n\u6703\u986f\u793aThe partition table has been altered! \u8a0a\u606f<br \/>\n3. \u96e2\u958b FDISK<br \/>\nCommand (m for help): q<\/p>\n<p>\u683c\u5f0f\u5316\u4e26\u624b\u52d5\u639b\u8f09<\/p>\n<p>* \u683c\u5f0f\u5316 hdb1<br \/>\nroot@dns:# mkfs.ext3 \/dev\/hdb1<\/p>\n<p>* \u5c07\u65b0\u786c\u789f\u639b\u5728\u65b0\u589e\u76ee\u9304<br \/>\nroot@dns# mount -t ext3 \/dev\/hdb1 \/home2<\/p>\n<p>\u5beb\u5165\/etc\/fstab\u6c38\u4e45\u639b\u8f09<\/p>\n<p>* \u6c38\u4e45\u639b\u8f09<br \/>\nroot@dns:~$ vi \/etc\/fstab<\/p>\n<p>#<\/p>\n<p># filesystem mountpoint type options dump pass<br \/>\n\/dev\/sda2 \/ ext3 defaults,errors=remount-ro 0 1<br \/>\n\/dev\/sda1 none swap sw 0 0<br \/>\nproc \/proc proc defaults 0 0<br \/>\n\/dev\/fd0 \/floppy vfat defaults,user,noauto,showexec,umask=022 0 0<br \/>\n\/dev\/cdrom \/cdrom iso9660 defaults,ro,user,noexec,noauto 0 0<br \/>\nnone \/sys sysfs defaults 0 0<br \/>\nnone \/dev\/pts devpts defaults 0 0<br \/>\n\/dev\/hdb1 \/home2 ext3 defaults,errors=remount-ro 0 0<\/p>\n<p>* \u4f9d \/etc\/fstab \u6700\u65b0\u7684\u8a2d\u5b9a\u91cd\u65b0\u639b\u8f09:<br \/>\nroot@dns#mount -a<\/p>\n<p>* \u89c0\u5bdf<\/p>\n<p>1. root@dns# df<br \/>\n2. root@dns# fdisk -l<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux\u4e3b\u6a5f\u4f3a\u670d\u5668\u67b6\u8a2d\u6280\u8853\uff08Linux\u52a0\u639b\u7b2c\u4e8c\u9846\u786c\u789f\uff09 \u6d41\u7a0b\u7c21\u4ecb \u6aa2\u67e5\u786c\u789f\u4ee3\u865f\u2192 fdisk \u2192 mkfs. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":501,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[20],"class_list":["post-36","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-linux"],"_links":{"self":[{"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/posts\/36"}],"collection":[{"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/comments?post=36"}],"version-history":[{"count":0,"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/posts\/36\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/media\/501"}],"wp:attachment":[{"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/media?parent=36"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/categories?post=36"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/tags?post=36"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}