Board logo

標題: linux 使用2T以上的空間(2) gdisk with parted gpt [打印本頁]

作者: qa    時間: 2011-4-28 12:05     標題: linux 使用2T以上的空間(2) gdisk with parted gpt

由於使用 parted 轉換已經用安裝光碟分割過的 msdos partition 的系統磁碟至 gpt 時 , root partition 的 partition id 可能會改變造成重開機時找不到 root (如 root 原為/dev/sda5 會變成 /dev/sda2 ), 因此 2-8TB 的系統開機磁碟 (/dev/sda 或 /dev/cciss/c0d0) 需要轉 GPT 分割時需改用 gdisk 轉換
   
轉換的執行步驟如下:
1. ftp/http 至 rpmupdate.hgiga.com/rpm 下載以下兩個rpm套件檔案安裝
    libstdc++-3.4.6-8.i386.rpm
   gdisk-0.6.10-1.el4.rf.i386.rpm

2. 執行 gdisk 磁碟裝置名稱 ( 一般為 /dev/sda  HP Server 為 /dev/cciss/c0d0 )

[root@linux209 root]#gdisk /dev/sda
GPT fdisk (gdisk) version 0.6.10

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present

***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format.
THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by typing 'q' if
you don't want to convert your MBR partitions to GPT format!
************************************************************
2.輸入r
Command (? for help): r
Recovery/transformation command (? for help):
3.輸入f
Recovery/transformation command (? for help): f
4.輸入Y
Warning! This will destroy the currently defined partitions! Proceed? (Y/N): Y
5.輸入w
Recovery/transformation command (? for help): w
6.輸入 Y
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed, possibly destroying your data? (Y/N): Y
OK; writing new GUID partition table (GPT).
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot.
The operation has completed successfully.

7.執行 lilo
[root@linux209 root]#lilo
Added linux *
Added linux-up

8.重開機後再使用 parted 或 gdisk 建立新的 partiton
9.gdisk 的切割方式與 fdisk 大致上相同,建議使用gdisk 完成其餘磁區切割動作。




歡迎光臨 HGIGA Service Docs (http://docs.hgiga.com/Discuz4/) Powered by Discuz! 4.1.0