[[Linux]]

#contents

* sfdisk [#f6c05426]

 sfdiskについてのあれこれ。

** man sfdisk (抜粋) [#w9406510]

:[名前]|
sfdisk - Linux 用のパーティションテーブル操作ツール

:[書式]|
sfdisk [options] device

:[オプション]|
(自分で良く使うもの)~
-T : 認識されたタイプを表示する~
-s : パーティションサイズをリストする~
-l : デバイスのパーティションをリストする~
-uM : 数値をMB単位で扱う

** 仕様 [#yb017766]
 (既存のパーティション情報が残っている場合、先頭のパーティションに)1TB以上のパーティションを作成しようとすると"no room for partition descriptor"のエラーになる。~
 (既存のパーティション情報が残っている場合、)先頭のパーティションに1TB以上のパーティションを作成しようとすると"no room for partition descriptor"のエラーになる。~
 2TB以上のディスクには使用不可(のハズ)

- 参考情報~
 ref. http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg58998.html

- ソース
 util-linux-2.13-pre7/fdisk/sfdisk.c
 1914 static int
 1915 compute_start_sect(struct part_desc *p, struct part_desc *ep) {
 1916     unsigned long base;
 1917     int inc = (DOS && B.sectors) ? B.sectors : 1;
 1918     int delta;
 1919
 1920     if (ep && p->start + p->size >= ep->start + 1)
 1921       delta = p->start - ep->start - inc;
 1922     else if (p->start == 0 && p->size > 0)
 1923       delta = -inc;
 1924     else
 1925       delta = 0;
 1926
 1927     if (delta < 0) {
 1928         p->start -= delta;                              -----------+
 1929         p->size += delta;                                          | ここが修正対象みたい
 1930         if (is_extended(p->p.sys_type) && boxes == ONESECTOR)      |
 1931           p->size = inc;                                           |
 1932         else if ((int)(p->size) <= 0) {                            |
 1933             warn(_("no room for partition descriptor\n"));         |
 1934             return 0;                                              |
 1935         }                                               -----------+
 1936     }

#br

* 変更履歴 [#le6871b8]

- 2008/11/12 仕様セクションの記述更新
-- ソーストレース結果

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS