サーバーのよく使うコマンドメモ| fdisk

2015年4月2日

コマンド サーバー テクノロジー

Summery

ディスクをフォーマットする。 パーティションの書き消し。

Construction

$ fdisk [option] [device]

Option

-l : パーティションテーブルの表示 [対話型] n : 新規パーティション作成 v : 領域テーブルの照合 w : テーブルをディスクに書き込む d : 領域の削除 l : 領域タイプリストの表示 p : 領域テーブルの表示

Sample

# ハード・ディスクのパーティションを分割する $ fdisk /dev/hda1 # 新しい領域を作成 Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4):1 First cylinder (1-767) :1 Last cylinder or +size or +sizeM or +sizeK: +128M # 設定可能なパーティション・タイプを表示 Command (m for help): l # パーティションのコードを変更 Command (m for help): t Partition number (1-4):1 # SWAP領域に設定 Hex code (type L to list codes) : 82 Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4):2 First cylinder (67-767) :67 Last cylinder or +size or +sizeM or +sizeK: 767 Command (m for help): t Partition number (1-4):2 # Linux領域に設定 Hex code (type L to list codes) : 83 Command (m for help): p Disk /dev/hda: 128 heads, 63 sectors, 767 cylinders Units = cylinders of 8064 * 512 bytes Device Boot Start End Blocks Id System /dev/hda1 1 66 266080+ 82 Linux swap /dev/hda2 67 767 2826432 83 Linux # 情報を書き込んで終了する Command (m for help): w

Discription

fdisk: illegal option -- - usage: fdisk [-ieu] [-f mbrboot] [-c cyl -h head -s sect] [-S size] [-r] [-a style] disk -i: initialize disk with new MBR -u: update MBR code, preserve partition table -e: edit MBRs on disk interactively -f: specify non-standard MBR template -chs: specify disk geometry -S: specify disk size -r: read partition specs from stdin (implies -i) -a: auto-partition with the given style -d: dump partition table -y: don't ask any questions -t: test if disk is partitioned `disk' is of the form /dev/rdisk0. auto-partition styles: boothfs 8Mb boot plus HFS+ root partition (default) hfs Entire disk as one HFS+ partition dos Entire disk as one DOS partition raid Entire disk as one 0xAC partition

人気の投稿

このブログを検索

ごあいさつ

このWebサイトは、独自思考で我が道を行くユゲタの少し尖った思考のTechブログです。 毎日興味がどんどん切り替わるので、テーマはマルチになっています。 もしかしたらアイデアに困っている人の助けになるかもしれません。

ブログ アーカイブ