資源描述:
《ubuntu掛載新硬盤測試成功.docx》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫。
1、Ubuntu掛載新硬盤1、加掛硬盤Shell代碼1.sudo?hdparm?-I?/dev/sdb???????硬盤硬件安裝后,此命令測試linux系統(tǒng)是否能找到掛載的未分區(qū)硬盤??sudohdparm-I/dev/sdb硬盤硬件安裝后,此命令測試linux系統(tǒng)是否能找到掛載的未分區(qū)硬盤?2、創(chuàng)建分區(qū)Shell代碼1.sudo?fdisk?/dev/sdb??sudofdisk/dev/sdb??????sda是第一塊SCSI硬盤,sdb第二塊,以此類推...物理分區(qū)使用a、b編號,每個物理硬盤最多有四個主邏輯分區(qū)(或擴展分區(qū)),所以自動分區(qū)中,擴展分區(qū)sda2下
2、第一個邏輯分區(qū)編號從5開始第一次執(zhí)行sudofdisk/dev/sdb,出現(xiàn)了Error:Unabletoopen/dev/sdb-unrecogniseddisklabel.?提示找不到磁盤標(biāo)簽,可以使用parted進行分區(qū)(sudoparted?/dev/sdb)。Shell代碼1.Command?(m?for?help):??2.這里按m獲得幫助??3.a???toggle?a?bootable?flag???將分區(qū)設(shè)置為啟動區(qū)??4.b???edit?bsd?disklabel????編輯bsd的disklabel??5.c???toggle?the?do
3、s?compatibility?flag??設(shè)置該分區(qū)為dos分區(qū)??6.d???delete?a?partition?刪除分區(qū)??7.l???list?known?partition?types??列出已知的分區(qū)類型??8.m???print?this?menu??打印幫助列表??9.n???add?a?new?partition?創(chuàng)建新分區(qū)??10.o???create?a?new?empty?DOS?partition?table??11.p???print?the?partition?table查看分區(qū)信息??12.q???quit?without?sav
4、ing?changes?退出不保存??13.s???create?a?new?empty?Sun?disklabel??14.t???change?a?partition's?system?id改變分區(qū)類型??15.u???change?display/entry?units??16.v???verify?the?partition?table??17.w???write?table?to?disk?and?exit?保存退出??18.x???extra?functionality?(experts?only)??19.??20.Command?(m?for?he
5、lp):p??//查看新硬盤的分區(qū)??21.********************************************************************??1.Disk?/dev/sdb:?1000204?MB,?1000202273280?bytes??2.255?heads,?63?sectors/track,?121601?cylinders??3.Units?=?cylinders?of?16065?*?512?=?8225280?bytes??4.Device?Boot?Start?End?Blocks?Id?System??
6、5.********************************************************************??6.Command?(m?for?help):n??//創(chuàng)建新分區(qū)??7.File?system?type??(default?ext2):?ext3????//輸入想使用的分區(qū)格式??8.Partition?name:??backup??????????????????????//輸入分區(qū)的名字??9.First?cylinder??(default?0cyl):????????????????//第幾個柱面,我們按照默
7、認(rèn)??10.Last?cylinder?or?+size?or?+sizeMB?or?+sizeKB??(default?0cyl):+1000000M????//這里我們按大小輸入?即+1000000M?(注意這個M為大寫)??11.Warning:?You?requested?a?partition?from?0cyl?to?121576cyl.??????????????????12.The?closest?location?we?can?manage?is?1cyl?to?121575cyl.??Is?this?still??13.acceptable?t
8、o?you