last-modified: 2019-04-28 (日) 18:36:58 (1834d)[変更箇所]
まずパーティションの作成
[root@kurage kondo]# /sbin/fdisk /dev/sdd デバイスは正常な DOS 領域テーブルも、Sun, SGI や OSF ディスクラベルも 含んでいません Building a new DOS disklabel with disk identifier 0x1994a9d9. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. このディスクのシリンダ数は 60801 に設定されています。 間違いではないのですが、1024 を超えているため、以下の場合 に問題を生じうる事を確認しましょう: 1) ブート時に実行するソフトウェア (例. バージョンが古い LILO) 2) 別の OS のブートやパーティション作成ソフト (例. DOS FDISK, OS/2 FDISK) 警告: 領域テーブル 4 の不正なフラグ 0x0000 は w(書き込み)によって 正常になります
コマンド (m でヘルプ): n コマンドアクション e 拡張 p 基本領域 (1-4) p 領域番号 (1-4): 1 最初 シリンダ (1-60801, default 1): Using default value 1 終点 シリンダ または +サイズ または +サイズM または +サイズK (1-60801, default 60801): Using default value 60801
コマンド (m でヘルプ): p Disk /dev/sdd: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = シリンダ数 of 16065 * 512 = 8225280 bytes Disk identifier: 0x1994a9d9 デバイス Boot Start End Blocks Id System /dev/sdd1 1 60801 488384001 83 Linux コマンド (m でヘルプ): w 領域テーブルは交換されました! ioctl() を呼び出して領域テーブルを再読込みします。 ディスクを同期させます。
次にフォーマット
[root@kurage kondo]# /sbin/mke2fs -j /dev/sdd1 mke2fs 1.40.4 (31-Dec-2007) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 61063168 inodes, 122096000 blocks 6104800 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=0 3727 block groups 32768 blocks per group, 32768 fragments per group 16384 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 102400000 Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 21 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.
あとe2labelコマンドによってラベルの作成などがあったりするが、なくても良い?