summaryrefslogtreecommitdiffstats
path: root/help-install/ja
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2009-01-27 17:30:08 +0000
committerPascal Rigaux <pixel@mandriva.com>2009-01-27 17:30:08 +0000
commit5ce8d30439463838f845c78bc926cc9b310a8743 (patch)
treebb1852dc58711c7baee31216a765067dfa49b65b /help-install/ja
parent10658e71475bd964263d09f1a661f24fadfaf496 (diff)
downloadbootloader-theme-5ce8d30439463838f845c78bc926cc9b310a8743.tar
bootloader-theme-5ce8d30439463838f845c78bc926cc9b310a8743.tar.gz
bootloader-theme-5ce8d30439463838f845c78bc926cc9b310a8743.tar.bz2
bootloader-theme-5ce8d30439463838f845c78bc926cc9b310a8743.tar.xz
bootloader-theme-5ce8d30439463838f845c78bc926cc9b310a8743.zip
imported openSUSE.tar.bz2 (from gfxboot-4.1.19-2.1.src.rpm)4.1.19.1
Diffstat (limited to 'help-install/ja')
-rw-r--r--help-install/ja/main.html35
-rw-r--r--help-install/ja/main::bits.html5
-rw-r--r--help-install/ja/main::driverupdate.html7
-rw-r--r--help-install/ja/main::failsafe.html5
-rw-r--r--help-install/ja/main::firmware.html5
-rw-r--r--help-install/ja/main::harddisk.html7
-rw-r--r--help-install/ja/main::help.html7
-rw-r--r--help-install/ja/main::install_src.html7
-rw-r--r--help-install/ja/main::keytable.html5
-rw-r--r--help-install/ja/main::linux.html5
-rw-r--r--help-install/ja/main::memtest.html7
-rw-r--r--help-install/ja/main::noacpi.html9
-rw-r--r--help-install/ja/main::nolapic.html7
-rw-r--r--help-install/ja/main::opt.html9
-rw-r--r--help-install/ja/main::opt::network.html13
-rw-r--r--help-install/ja/main::opt::o_acpi.html7
-rw-r--r--help-install/ja/main::opt::o_apm.html7
-rw-r--r--help-install/ja/main::opt::o_ide.html5
-rw-r--r--help-install/ja/main::opt::o_install.html9
-rw-r--r--help-install/ja/main::opt::o_splash.html5
-rw-r--r--help-install/ja/main::opt::o_vnc.html9
-rw-r--r--help-install/ja/main::rescue.html5
-rw-r--r--help-install/ja/main::videomode.html9
-rw-r--r--help-install/ja/navi.html1
24 files changed, 190 insertions, 0 deletions
diff --git a/help-install/ja/main.html b/help-install/ja/main.html
new file mode 100644
index 0000000..c717b64
--- /dev/null
+++ b/help-install/ja/main.html
@@ -0,0 +1,35 @@
+<h3>
+<a name="main">ブートローダヘルプ</a>
+</h3>
+
+<p><em>@@@product@@@</em> へようこそ</p>
+
+<p>このメニューを使用して目的の機能を選択してください。 このヘルプシステムの操作がうまくいかない場合、 <em>@@@fkey_help@@@</em> キーを押してヘルプシステムの <a href="#help">説明</a> に入ってください。このメニューの主な機能は次の通りです:</p>
+
+<p><a href="#harddisk">ハードディスクから起動</a>: この選択ではシステムには何も変更を加えません。インストールされたオペレーティングシステムを起動するだけです。</p>
+
+<p><a href="#linux">インストール</a>: このインストールモードはほとんどのコンピュータで機能します。 起動中にシステムがフリーズする場合、またはディスクコントローラやネットワークカードなどのハードウエアコンポーネントの検出に問題がある場合、次のインストールオプションを試してください。</p>
+
+<p><a href="#noacpi">インストール -- ACPI 無効</a>: 現在販売されている多くのコンピュータは ACPI を完全に実装していないか、実装に問題があります。この選択によりカーネルの ACPI サポートは無効になりますが、 IDE ハードディスク用の DMA のような多くのパフォーマンス機能は変わらず有効になります。</p>
+
+<p><a href="#nolapic">インストール -- ローカル APIC 無効</a>: 標準インストールが失敗した場合、お使いのハードウエアがローカル APIC に対応していないためかもしれません。 これが原因と考えられる場合は、このオプションを使ってローカル APIC 対応なしでインストールを行なってください。</p>
+
+<p><a href="#failsafe">インストール -- 安全設定</a>: <em>インストール</em> がうまくいかなかった場合、このオプションを選択すると問題が解決されるかもしれません。</p>
+
+<p><a href="#rescue">レスキューシステム</a>: このブートイメージではメモリ内で動作する小さな Linux システムを起動します。この仕組みはシステムが正しく起動しない場合に役立ちます。起動後は root でログインしてください。</p>
+
+<p><a href="#firmware">ファームウエアのテスト</a>: ACPI とその他の BIOS 項目の妥当性を検証するテストツールを起動します。</p>
+
+<p><a href="#memtest">メモリテスト</a>: メモリテストは新しくインストールしたメモリモジュールがきちんと動作しているか確認することができるだけではありません。これはコンピュータシステムの耐久テストであり、ハードウエアの問題が判明することもあります。</p>
+
+<p><a href="#opt">起動オプション</a>: 起動オプションはシステムの動作を完全に変更してしまうかもしれません。 このオプションはカーネル用の設定です。</p>
+
+<p><a href="#help">@@@fkey_help@@@ ヘルプ</a>: このヘルプは状況依存です。起動画面で現在選択中の項目に応じて異なる画面を表示します。このヘルプシステム自身の説明も記載されています。</p>
+
+<p><a href="#keytable">@@@fkey_lang@@@</a>: ブートローダで使用する言語とキーボードマップを設定します。</p>
+
+<p><a href="#videomode">@@@fkey_video@@@ ビデオモード</a>: ここではインストール中に使用する画面解像度を選択します。 グラフィカルなインストールに際して問題が発生した場合、 <em>テキストモード</em> で回避できるかもしれません。</p>
+
+<p><a href="#install_src">@@@fkey_inst@@@ インストール元</a>: インストール元を選択します。</p>
+
+<p><a href="#driverupdate">@@@fkey_dud@@@ ドライバ更新</a>: とても新しいコンピュータにインストールする場合は、ドライバ更新が必要になるかもしれません。</p>
diff --git a/help-install/ja/main::bits.html b/help-install/ja/main::bits.html
new file mode 100644
index 0000000..967d8b0
--- /dev/null
+++ b/help-install/ja/main::bits.html
@@ -0,0 +1,5 @@
+<h3>
+<a name="bits">ソフトウエア種類の選択</a>
+</h3>
+
+<p>@@@product@@@ のうち 32 ビット版と 64 ビット版のどちらをインストールするかを選択することができます。</p>
diff --git a/help-install/ja/main::driverupdate.html b/help-install/ja/main::driverupdate.html
new file mode 100644
index 0000000..7a167f4
--- /dev/null
+++ b/help-install/ja/main::driverupdate.html
@@ -0,0 +1,7 @@
+<h3>
+<a name="driverupdate">ドライバ更新</a>
+</h3>
+
+<p>ドライバ更新のフロッピィディスクまたは CD-ROM を指定する必要がある場合、 <em>@@@fkey_dud@@@</em> を押してください。 Linux カーネルをロードした後、ブートローダがドライバ更新メディアを挿入するよう要求します。</p>
+
+<p>ドライバ更新は一般に、インストールの際に必要となる新しいバージョンのドライバまたはバグ修正が入ったフロッピィディスクの形で提供されます。</p>
diff --git a/help-install/ja/main::failsafe.html b/help-install/ja/main::failsafe.html
new file mode 100644
index 0000000..da1a907
--- /dev/null
+++ b/help-install/ja/main::failsafe.html
@@ -0,0 +1,5 @@
+<h3>
+<a name="failsafe">インストール -- 安全設定</a>
+</h3>
+
+<p>インストール中にハングアップしたり、再現不可能なエラーが発生した場合には <em>インストール -- 安全設定</em> を選択してください。このオプションは IDE ドライブの DMA 設定とすべての電源管理機能を無効にします。 <a href="#o_apm">apm</a> 、 <a href="#o_acpi">acpi</a> および <a href="#o_ide">ide</a> についてのカーネルオプションも併せて参照してください。</p>
diff --git a/help-install/ja/main::firmware.html b/help-install/ja/main::firmware.html
new file mode 100644
index 0000000..5b030f7
--- /dev/null
+++ b/help-install/ja/main::firmware.html
@@ -0,0 +1,5 @@
+<h3>
+<a name="firmware">ファームウエアのテスト</a>
+</h3>
+
+<p>ACPI テーブルと他の多くの BIOS 部品を検証する BIOS チェッカーを開始します。 結果は USB ディスクか、またはネットワーク経由で保存することができます。</p>
diff --git a/help-install/ja/main::harddisk.html b/help-install/ja/main::harddisk.html
new file mode 100644
index 0000000..01478fc
--- /dev/null
+++ b/help-install/ja/main::harddisk.html
@@ -0,0 +1,7 @@
+<h3>
+<a name="harddisk">ハードディスクから起動</a>
+</h3>
+
+<p>お使いのローカルハードディスクにインストールしてあるシステムを起動するには <em>インストール済みの OS を起動</em> を選択してください。起動ができるのは最初のハードディスクの MBR (Master Boot Record) だけであるため、システムを正しくインストールしてある状態でなければなりません。最初のハードディスクデバイス ID はコンピュータの BIOS から提供されるものを使用します。</p>
+
+<p>お使いのドライブから CD や DVD を取り出すのを忘れていてハードディスクからコンピュータを起動したい場合、このオプションをお使いください。</p>
diff --git a/help-install/ja/main::help.html b/help-install/ja/main::help.html
new file mode 100644
index 0000000..16a1ef5
--- /dev/null
+++ b/help-install/ja/main::help.html
@@ -0,0 +1,7 @@
+<h3>
+<a name="help">ヘルプシステムの使用</a>
+</h3>
+
+<p>ブートローダのオンラインヘルプは状況に合わせた表示を行ないます。メニュー項目を選択している場合はその項目についての情報を提供するほか、起動オプションを編集している場合はカーソル位置のオプションについて情報を調べます。</p>
+
+<p>操作キー <ul><li><em>上矢印</em>: 前のリンクを強調表示する</li><li><em>下矢印</em>: 次のリンクを強調表示する</li><li><em>左矢印</em>, <em>Backspace</em>: 前のトピックに戻る</li><li><em>右矢印</em>, <em>Enter</em>, <em>スペース</em>: リンクをたどる</li><li><em>Page Up</em>: 1 ページ分スクロールアップ</li><li><em>Page Down</em>: 1 ページ分スクロールダウン</li><li><em>Home</em>: ページの初めにジャンプ</li><li><em>End</em>: ページの最後にジャンプ</li><li><em>Esc</em>: ヘルプの終了</li></ul></p>
diff --git a/help-install/ja/main::install_src.html b/help-install/ja/main::install_src.html
new file mode 100644
index 0000000..624a121
--- /dev/null
+++ b/help-install/ja/main::install_src.html
@@ -0,0 +1,7 @@
+<h3>
+<a name="install_src">インストール元</a>
+</h3>
+
+<p><em>@@@fkey_inst@@@</em> を押すとインストール元を選択することができます。</p>
+
+<p>このオプションは <a href="#o_install">インストール</a> ブートオプションと同じ意味です。</p>
diff --git a/help-install/ja/main::keytable.html b/help-install/ja/main::keytable.html
new file mode 100644
index 0000000..bd01723
--- /dev/null
+++ b/help-install/ja/main::keytable.html
@@ -0,0 +1,5 @@
+<h3>
+<a name="keytable">言語とキーボードレイアウトの選択</a>
+</h3>
+
+<p>ブートローダで使用する言語とキーボードレイアウトを変更するには、 <em>@@@fkey_lang@@@</em> を押してください。</p>
diff --git a/help-install/ja/main::linux.html b/help-install/ja/main::linux.html
new file mode 100644
index 0000000..d954352
--- /dev/null
+++ b/help-install/ja/main::linux.html
@@ -0,0 +1,5 @@
+<h3>
+<a name="linux">インストール</a>
+</h3>
+
+<p>既定のインストールを開始するには <em>インストール</em> を選んでください。入力された <em>インストール</em> は起動時に使用されます。この項目を選択すると一般的に利用可能な多くのハードウエアが使用できます。</p>
diff --git a/help-install/ja/main::memtest.html b/help-install/ja/main::memtest.html
new file mode 100644
index 0000000..582c68c
--- /dev/null
+++ b/help-install/ja/main::memtest.html
@@ -0,0 +1,7 @@
+<h3>
+<a name="memtest">メモリテスト</a>
+</h3>
+
+<p>付属の <em>メモリテスト</em> を使用することでハードウエアの耐久テストを行なうことができます。この主な目的は壊れたメモリを検出することですが、システムの他の部品についての耐久度を調べることもできます。</p>
+
+<p>ほとんどのメモリ欠陥を検出することができますが、エラーが検出されなくてもメモリが正常であるという保証にはなりません。</p>
diff --git a/help-install/ja/main::noacpi.html b/help-install/ja/main::noacpi.html
new file mode 100644
index 0000000..4b644d1
--- /dev/null
+++ b/help-install/ja/main::noacpi.html
@@ -0,0 +1,9 @@
+<h3>
+<a name="noacpi">インストール -- ACPI 無効</a>
+</h3>
+
+<p>現在のハードウエアでは割り込み処理をコントロールするために ACPI (Advanced Configuration and Power Interface) を必要とする場合があります。 ACPI は古い APM システムに完全に取って代わるものです。</p>
+
+<p>カーネルの起動中に問題が発生した場合、 <em>インストール -- ACPI 無効</em> を選択してください。 ACPI に問題があるコンピュータについての既知の問題点は次の通りです: <ul><li>起動時にカーネルがフリーズする</li><li>PCI カードが正しく検出されていないか、正しく初期化されていない</li></ul></p>
+
+<p><a href="#firmware">ファームウエアのテスト</a> の起動オプションを指定して ACPI 妥当性テストの結果を見ることもできます。</p>
diff --git a/help-install/ja/main::nolapic.html b/help-install/ja/main::nolapic.html
new file mode 100644
index 0000000..73eaba3
--- /dev/null
+++ b/help-install/ja/main::nolapic.html
@@ -0,0 +1,7 @@
+<h3>
+<a name="nolapic">インストール -- ローカル APIC 無効</a>
+</h3>
+
+<p>通常は APIC (Advanced Programmable Interrupt Controller) を利用しても何も問題はありません。 ただし、何か問題が発生した場合はこのオプションを使ってローカル APIC サポートなしで起動してみてください。</p>
+
+<p><a href="#noacpi">ACPI</a> (Advanced Configuration and Power Interface) と取り違えないよう注意してください。</p>
diff --git a/help-install/ja/main::opt.html b/help-install/ja/main::opt.html
new file mode 100644
index 0000000..dc44691
--- /dev/null
+++ b/help-install/ja/main::opt.html
@@ -0,0 +1,9 @@
+<h3>
+<a name="opt">起動オプション</a>
+</h3>
+
+<p>使用できる起動オプションには 2 種類あります。 1 つはインストーラに影響を与えるオプションで、もう 1 つはカーネルオプションです。よく使われるオプションの一部を次に示します:</p>
+
+<p>a) インストーラオプション <ul><li><a href="#o_install">インストール</a> -- インストール元の選択</li><li><a href="#network">ネットワークオプション</a> -- ネットワークオプション</li><li><a href="#o_vnc">VNC オプション</a> -- VNC を経由してインストールするオプション</li></ul></p>
+
+<p>b) カーネルオプション <ul><li><a href="#o_splash">スプラッシュ</a> -- スプラッシュ画面の動作に影響を与えます</li><li><a href="#o_apm">apm</a> -- 電源管理を切り替えます</li><li><a href="#o_acpi">acpi</a> -- "詳細設定と電源インタフェース" の略称です</li><li><a href="#o_ide">ide</a> -- IDE サブシステムを操作します</li></ul></p>
diff --git a/help-install/ja/main::opt::network.html b/help-install/ja/main::opt::network.html
new file mode 100644
index 0000000..cdb27f7
--- /dev/null
+++ b/help-install/ja/main::opt::network.html
@@ -0,0 +1,13 @@
+<a name="o_hostip"/>
+<a name="o_netmask"/>
+<a name="o_gateway"/>
+
+<h3>
+<a name="network">インストーラオプション: ネットワークオプション</a>
+</h3>
+
+<p>ネットワークインタフェースを今すぐ設定することができます。ハードウェアは YaST2 を利用して後から検出します。ネットワークカードを設定するオプションの最低限の設定は IP アドレスとサブネットマスクの項目です。例: <ul><li>hostip=192.168.0.10 netmask=255.255.255.0</li></ul></p>
+
+<p>または短縮して: <ul><li>hostip=192.168.0.10/24</li></ul></p>
+
+<p><a href="#o_install">ネットワークベースのインストール</a> を指定しながらこれらのオプションを両方とも指定しない場合、インストーラは <em>DHCP</em> でネットワークインタフェースを設定しようとします。デフォルトゲートウエイが必要な場合、オプション <em>ゲートウエイ</em> でこのゲートウエイを指定してください。例: <ul><li>gateway=192.168.0.8</li></ul></p>
diff --git a/help-install/ja/main::opt::o_acpi.html b/help-install/ja/main::opt::o_acpi.html
new file mode 100644
index 0000000..b09f95b
--- /dev/null
+++ b/help-install/ja/main::opt::o_acpi.html
@@ -0,0 +1,7 @@
+<h3>
+<a name="o_acpi">カーネルオプション: acpi</a>
+</h3>
+
+<p>ACPI (Advanced Configuration and Power Interface) は、オペレーティングシステムと BIOS の間で決められた電源と設定管理インタフェースの標準です。既定では <em>acpi</em> は BIOS が 2000 年より新しいものであると有効になります。 ACPI の動作をコントロールするために、いくつかのパラメータが用意されています: <ul><li><em>pci=noacpi</em> -- PCI の割り込み制御に ACPI を使わないようにする</li><li><em>acpi=oldboot</em> -- ACPI のうち起動に関連する部分だけを有効にする</li><li><em>acpi=off</em> -- ACPI を完全に無効化する</li><li><em>acpi=force</em> -- BIOS が 2000 年以前の日付の場合でも ACPI を有効にする</li></ul></p>
+
+<p>特に新しいコンピュータでは、古い <a href="#o_apm">apm</a> システムに取って代わっています。</p>
diff --git a/help-install/ja/main::opt::o_apm.html b/help-install/ja/main::opt::o_apm.html
new file mode 100644
index 0000000..33c8228
--- /dev/null
+++ b/help-install/ja/main::opt::o_apm.html
@@ -0,0 +1,7 @@
+<h3>
+<a name="o_apm">カーネルオプション: apm</a>
+</h3>
+
+<p>APM は現在のコンピュータで使用される 2 種類の電源管理ストラテジのうちの 1 つです。この機能はディスクへのサスペンド (Suspend to disk) のような機能に対してノート PC で主に使用されますが、パワーダウンした後にコンピュータの電源をオフにするような機能もあります。 APM は BIOS が正しく動作することを前提に作られているため、 BIOS が壊れた場合は APM の使用が制限されたり、コンピュータが機能しないこともあります。そのため、下記のパラメータでオフにすることもできます <ul><li><em>apm=off</em> -- APM を完全に無効化する</li></ul></p>
+
+<p>いくつかの最新コンピュータでは新しい <a href="#o_acpi">ACPI</a> を利用したほうが利点があるかもしれません。</p>
diff --git a/help-install/ja/main::opt::o_ide.html b/help-install/ja/main::opt::o_ide.html
new file mode 100644
index 0000000..39cef84
--- /dev/null
+++ b/help-install/ja/main::opt::o_ide.html
@@ -0,0 +1,5 @@
+<h3>
+<a name="o_ide">カーネルオプション: ide</a>
+</h3>
+
+<p>IDE は SCSI と異なり、ほとんどのデスクトップワークステーションで広く使用されています。 IDE システムに発生したハードウェア問題を回避するには、カーネルパラメータを使用してください: <ul><li><em>ide=nodma</em> -- IDE ドライブの DMA を無効にする</li></ul></p>
diff --git a/help-install/ja/main::opt::o_install.html b/help-install/ja/main::opt::o_install.html
new file mode 100644
index 0000000..1304a86
--- /dev/null
+++ b/help-install/ja/main::opt::o_install.html
@@ -0,0 +1,9 @@
+<h3>
+<a name="o_install">インストーラオプション: インストール</a>
+</h3>
+
+<p>既定ではローカルの CD-ROM ドライブをインストール元として検索します。ネットワークインストールの場合、 <em>インストール</em> オプションを選択してください。使用可能なインストールプロトコルは下記の通りです。 <ul><li>FTP</li><li>NFS</li><li>HTTP</li></ul></p>
+
+<p>使用する構文は一般的な URL に似ています。 例えばサーバが 192.168.0.1 で、そのサーバのディレクトリ /install から NFS ベースのインストールを行なう場合、以下のようにソースを指定してください: <ul><li>install=nfs://192.168.0.1/install</li></ul></p>
+
+<p>ネットワークカードは <em>DHCP</em> で設定するか、 <a href="#network">ネットワークオプション</a> で説明したように自分でパラメータを指定する必要があります。</p>
diff --git a/help-install/ja/main::opt::o_splash.html b/help-install/ja/main::opt::o_splash.html
new file mode 100644
index 0000000..6bd486b
--- /dev/null
+++ b/help-install/ja/main::opt::o_splash.html
@@ -0,0 +1,5 @@
+<h3>
+<a name="o_splash">カーネルオプション: splash</a>
+</h3>
+
+<p>スプラッシュ画面とはシステムが起動する際に表示される画像のことです。 <ul><li><em>splash=0</em> -- スプラッシュ画面を無効にします。とても古いコンピュータを使用している場合や、何らかのエラーが起こる場合に便利です。</li><li><em>splash=verbose</em> -- スプラッシュ画面を有効にし、あわせてカーネルと起動時のメッセージを表示します。</li><li><em>splash=silent</em> -- スプラッシュ画面を有効にしますが、メッセージを表示しません。進行状況のバーのみを表示します。</li></ul></p>
diff --git a/help-install/ja/main::opt::o_vnc.html b/help-install/ja/main::opt::o_vnc.html
new file mode 100644
index 0000000..1db4c7b
--- /dev/null
+++ b/help-install/ja/main::opt::o_vnc.html
@@ -0,0 +1,9 @@
+<a name="o_vncpassword"/>
+
+<h3>
+<a name="o_vnc">インストーラオプション:vnc</a>
+</h3>
+
+<p>VNC インストールを使用するには、パラメータ vnc と vncpassword を指定してください: <ul><li><em>vnc=1 vncpassword=example</em></li></ul></p>
+
+<p>VNC サーバが起動され、リモートシステムから任意の VNC クライアントを経由して YaST2 をコントロールすることができるようになります。</p>
diff --git a/help-install/ja/main::rescue.html b/help-install/ja/main::rescue.html
new file mode 100644
index 0000000..6e17318
--- /dev/null
+++ b/help-install/ja/main::rescue.html
@@ -0,0 +1,5 @@
+<h3>
+<a name="rescue">レスキューシステム</a>
+</h3>
+
+<p><em>レスキューシステム</em> は小型の RAM ディスクベースのシステムです。ここからインストール済みのシステムにあらゆる種類の変更を行なうことができます。このシステムでは低レベルのツールしか使用できないため、このオプションは熟練者を対象にしています。</p>
diff --git a/help-install/ja/main::videomode.html b/help-install/ja/main::videomode.html
new file mode 100644
index 0000000..7ae04f3
--- /dev/null
+++ b/help-install/ja/main::videomode.html
@@ -0,0 +1,9 @@
+<h3>
+<a name="videomode">ビデオモード選択</a>
+</h3>
+
+<p>グラフィックカードがサポートするビデオモードの一覧を表示するには <em>@@@fkey_video@@@</em> キーを押してください。モニタが表示できるもっとも高いモードがあらかじめ選択されています。</p>
+
+<p>モニタが自動的に検出されないこともあります。その場合は手動でモードを選択してください。</p>
+
+<p>インストール中にグラフィックカードに問題が発生した場合、 <em>テキストモード</em> が回避方法になるかもしれません。</p>
diff --git a/help-install/ja/navi.html b/help-install/ja/navi.html
new file mode 100644
index 0000000..c5d9cb9
--- /dev/null
+++ b/help-install/ja/navi.html
@@ -0,0 +1 @@
+<p><a href="#foobar">FOOBAR</a> に戻る</p>
# is it allowed to modify the partition table bool getting_rid_of_readonly_allowed # is it forbidden to write because the partition table is badly handled, or is it because we MUST not change the partition table bool isDirty # does it need to be written to the disk bool needKernelReread # must we tell the kernel to reread the partition table bool hasBeenDirty # for undo bool rebootNeeded # happens when a kernel reread failed bool partitionsRenumbered # happens when you # - remove an extended partition which is not the last one # - add an extended partition which is the first extended partition int bus, id partition_table_elem primary partition_table_elem extended[] geom geom # internal string prefix # for some RAID arrays device=>c0d0 and prefix=>c0d0p string file # '/dev/hda' ... } struct hd_lvm inherits hd { int PE_size # block size (granularity, similar to cylinder size on x86) string VG_name # VG name part_lvm disks[] # invalid: bus, id, extended, geom } struct raw_hd inherits hd { string type # 0x82, 0x83, 'nfs', ... string mntpoint # '/', '/usr' ... string options # 'defaults', 'noauto' # invalid: isDirty, needKernelReread, hasBeenDirty, rebootNeeded, primary, extended } struct all_hds { hd hds[] hd_lvm lvms[] part_raid raids[] # indexed by number: raids[$n]{device} is "md$n" part_loopback loopbacks[] raw_hd raw_hds[] raw_hd nfss[] raw_hd smbs[] raw_hd davs[] raw_hd special[] # internal: if fstab_to_string($all_hds) eq current_fstab then no need to save string current_fstab } =cut sub main { my ($in, $all_hds, $_nowizard, $do_force_reload) = @_; if ($in->isa('interactive::gtk')) { require diskdrake::hd_gtk; goto &diskdrake::hd_gtk::main; } my ($current_part, $current_hd); while (1) { my $choose_txt = $current_part ? N_("Choose another partition") : N_("Choose a partition"); my $parts_and_holes = [ fsedit::get_all_fstab_and_holes($all_hds) ]; my $choose_part = sub { $current_part = $in->ask_from_listf('diskdrake', translate($choose_txt), sub { format_part_info_short(fsedit::part2hd($_[0], $all_hds), $_[0]) }, $parts_and_holes, $current_part) || return; $current_hd = fsedit::part2hd($current_part, $all_hds); }; $choose_part->() if !$current_part; return if !$current_part; my %actions = my @actions = ( if_($current_part, (map { my $s = $_; $_ => sub { $diskdrake::interactive::{$s}($in, $current_hd, $current_part, $all_hds) } } part_possible_actions($in, $current_hd, $current_part, $all_hds)), '____________________________' => sub {}, ), if_(@$parts_and_holes > 1, $choose_txt => $choose_part), if_($current_hd, (map { my $s = $_; $_ => sub { $diskdrake::interactive::{$s}($in, $current_hd, $all_hds) } } hd_possible_actions_interactive($in, $current_hd, $all_hds)), ), (map { my $s = $_; $_ => sub { $diskdrake::interactive::{$s}($in, $all_hds) } } general_possible_actions($in, $all_hds)), ); my ($actions) = list2kv(@actions); my $a; if ($current_part) { $in->ask_from_({ cancel => N("Exit"), title => 'diskdrake', messages => format_part_info($current_hd, $current_part), }, [ { val => \$a, list => $actions, format => \&translate, type => 'list', sort => 0, gtk => { use_boxradio => 0 } } ]) or last; my $v = eval { $actions{$a}() }; if (my $err = $@) { $in->ask_warn(N("Error"), formatError($err)); } if ($v eq 'force_reload') { $all_hds = $do_force_reload->(); } $current_hd = $current_part = '' if !is_part_existing($current_part, $all_hds); } else { $choose_part->(); } partition_table::assign_device_numbers($_) foreach fsedit::all_hds($all_hds); } return if eval { Done($in, $all_hds) }; if (my $err = $@) { $in->ask_warn(N("Error"), formatError($err)); } goto &main; } ################################################################################ # general actions ################################################################################ sub general_possible_actions { N_("Undo"), ($::expert ? N_("Toggle to normal mode") : N_("Toggle to expert mode")); } sub Undo { my ($_in, $all_hds) = @_; fsedit::undo($all_hds); } sub Wizard { $::o->{wizard} = 1; goto &Done; } sub Done { my ($in, $all_hds) = @_; eval { raid::verify($all_hds->{raids}) }; if (my $err = $@) { $::expert or die; $in->ask_okcancel('', [ formatError($err), N("Continue anyway?") ]) or return; } foreach (@{$all_hds->{hds}}) { if (!write_partitions($in, $_)) { return if !$::isStandalone; $in->ask_yesorno(N("Quit without saving"), N("Quit without writing the partition table?"), 1) or return; } } if (!$::isInstall) { my $new = fs::fstab_to_string($all_hds); if ($new ne $all_hds->{current_fstab} && $in->ask_yesorno('', N("Do you want to save /etc/fstab modifications"), 1)) { $all_hds->{current_fstab} = $new; fs::write_fstab($all_hds); } } 1; } ################################################################################ # per-hd actions ################################################################################ sub hd_possible_actions { my ($_in, $hd, $_all_hds) = @_; ( if_(!$hd->{readonly} || $hd->{getting_rid_of_readonly_allowed}, N_("Clear all")), if_(!$hd->{readonly} && $::isInstall, N_("Auto allocate")), N_("More"), ); } sub hd_possible_actions_interactive { my ($_in, $_hd, $_all_hds) = @_; &hd_possible_actions, N_("Hard drive information"); } sub Clear_all { my ($in, $hd, $all_hds) = @_; my @parts = partition_table::get_normal_parts($hd); foreach (@parts) { RemoveFromLVM($in, $hd, $_, $all_hds) if isPartOfLVM($_); RemoveFromRAID($in, $hd, $_, $all_hds) if isPartOfRAID($_); } if (isLVM($hd)) { lvm::lv_delete($hd, $_) foreach @parts } else { $hd->{readonly} = 0; #- give a way out of readonly-ness. only allowed when getting_rid_of_readonly_allowed $hd->{getting_rid_of_readonly_allowed} = 0; partition_table::raw::zero_MBR_and_dirty($hd); } } sub Auto_allocate { my ($in, $hd, $all_hds) = @_; my $suggestions = partitions_suggestions($in) or return; my %all_hds_ = %$all_hds; $all_hds_{hds} = [ sort { $a == $hd ? -1 : 1 } @{$all_hds->{hds}} ]; eval { fsedit::auto_allocate(\%all_hds_, $suggestions) }; if ($@) { $@ =~ /partition table already full/ or die; $in->ask_warn("", [ N("All primary partitions are used"), N("I can't add any more partition"), N("To have more partitions, please delete one to be able to create an extended partition"), ]); } } sub More { my ($in, $hd) = @_; my $r; $in->ask_from('', '', [ { val => N("Save partition table"), clicked_may_quit => sub { SaveInFile($in, $hd); 1 } }, { val => N("Restore partition table"), clicked_may_quit => sub { ReadFromFile($in, $hd); 1 } }, { val => N("Rescue partition table"), clicked_may_quit => sub { Rescuept($in, $hd); 1 } }, if_($::isInstall || 1, { val => N("Reload partition table"), clicked_may_quit => sub { $r = 'force_reload'; 1 } }), if_($::isInstall, { text => N("Removable media automounting"), val => \$::o->{useSupermount}, type => 'bool' }, ), ], ) && $r; } sub ReadFromFile { my ($in, $hd) = @_; my $file = $::isStandalone ? $in->ask_file(N("Select file")) : devices::make("fd0") or return; eval { catch_cdie { partition_table::load($hd, $file) } sub { $@ =~ /bad totalsectors/ or return; $in->ask_yesorno('', N("The backup partition table has not the same size Still continue?"), 0); }; }; if (my $err = $@) { $in->ask_warn(N("Error"), formatError($err)); } } sub SaveInFile { my ($in, $hd) = @_; my $file = $::isStandalone ? $in->ask_file(N("Select file")) : $in->ask_okcancel(N("Warning"), N("Insert a floppy in drive All data on this floppy will be lost"), 1) && devices::make(detect_devices::floppy()) or return; eval { partition_table::save($hd, $file) }; if (my $err = $@) { $in->ask_warn(N("Error"), formatError($err)); } } sub Rescuept { my ($in, $hd) = @_; my $_w = $in->wait_message('', N("Trying to rescue partition table")); fsedit::rescuept($hd); } sub Hd_info { my ($in, $hd) = @_; $in->ask_warn('', [ N("Detailed information"), format_hd_info($hd) ]); } ################################################################################ # per-part actions ################################################################################ sub part_possible_actions { my ($_in, $hd, $part, $_all_hds) = @_; $part or return; my %actions = my @l = ( N_("Mount point") => '($part->{real_mntpoint} && common::usingRamdisk()) || (!isBusy && !isSwap && !isNonMountable)', N_("Type") => '!isBusy && $::expert && (!readonly || ($part->{type} & 0xff) == 0x83)', N_("Options") => '$::expert', N_("Resize") => '!isBusy && !readonly && !isSpecial || isLVM($hd) && isMounted && isThisFs("xfs", $part)', N_("Move") => '!isBusy && !readonly && !isSpecial && $::expert && 0', # disable for the moment N_("Format") => '!isBusy && !readonly && ($::expert || $::isStandalone)', N_("Mount") => '!isBusy && (hasMntpoint || isSwap) && maybeFormatted && ($::expert || $::isStandalone)', N_("Add to RAID") => '!isBusy && isRawRAID && !isSpecial', N_("Add to LVM") => '!isBusy && isRawLVM', N_("Unmount") => '!$part->{real_mntpoint} && isMounted', N_("Delete") => '!isBusy && !readonly', N_("Remove from RAID") => 'isPartOfRAID', N_("Remove from LVM") => 'isPartOfLVM', N_("Modify RAID") => 'isPartOfRAID && !isMounted($all_hds->{raids}[$part->{raid}])', N_("Use for loopback") => '!$part->{real_mntpoint} && isMountableRW && !isSpecial && hasMntpoint && $::expert', ); my ($actions_names) = list2kv(@l); my %macros = ( readonly => '$hd->{readonly}', hasMntpoint => '$part->{mntpoint}', isPrimary => 'isPrimary($part, $hd)', ); if ($part->{type} == 0) { if_(!$hd->{readonly}, N_("Create")); } else { grep { my $cond = $actions{$_}; while (my ($k, $v) = each %macros) { $cond =~ s/$k/qq(($v))/e; } $cond =~ s/(^|[^:\$]) \b ([a-z]\w{3,}) \b ($|[\s&\)])/$1 . $2 . '($part)' . $3/exg; eval $cond; } @$actions_names; } } sub Create { my ($in, $hd, $part, $all_hds) = @_; my ($def_start, $def_size, $max) = ($part->{start}, $part->{size}, $part->{start} + $part->{size}); $part->{maxsize} = $part->{size}; $part->{size} = 0; if (!fsedit::suggest_part($part, $all_hds)) { $part->{size} = $part->{maxsize}; $part->{type} ||= 0x483; } #- update adjustment for start and size, take into account the minimum partition size #- including one less sector for start due to a capacity to increase the adjustement by #- one. my ($primaryOrExtended, $migrate_files); my $type = type2name($part->{type}); my $mb_size = $part->{size} >> 11; my $has_startsector = ($::expert || arch() !~ /i.86/) && !isLVM($hd); $in->ask_from(N("Create a new partition"), '', [ if_($has_startsector, { label => N("Start sector: "), val => \$part->{start}, min => $def_start, max => ($max - min_partition_size($hd)), type => 'range' }, ), { label => N("Size in MB: "), val => \$mb_size, min => min_partition_size($hd) >> 11, max => $def_size >> 11, type => 'range' }, { label => N("Filesystem type: "), val => \$type, list => [ partition_table::important_types() ], sort => 0 }, { label => N("Mount point: "), val => \$part->{mntpoint}, list => [ fsedit::suggestions_mntpoint($all_hds), '' ], disabled => sub { my $p = { type => name2type($type) }; isSwap($p) || isNonMountable($p) }, type => 'combo', not_edit => 0, }, if_($::expert && $hd->hasExtended, { label => N("Preference: "), val => \$primaryOrExtended, list => [ '', "Extended", "Primary", if_($::expert, "Extended_0x85") ] }, ), ], changed => sub { if ($part->{start} + ($mb_size << 11) > $max) { if ($_[0] == 0) { # Start sector changed => restricting Size $mb_size = ($max - $part->{start}) >> 11; } else { # Size changed => restricting Start sector $part->{start} = $max - ($mb_size << 11); } } }, complete => sub { $part->{size} = from_Mb($mb_size, min_partition_size($hd), $max - $part->{start}); #- need this to be able to get back the approximation of using MB $part->{type} = name2type($type); $part->{mntpoint} = '' if isNonMountable($part); $part->{mntpoint} = 'swap' if isSwap($part); fs::set_default_options($part); check($in, $hd, $part, $all_hds) or return 1; $migrate_files = need_migration($in, $part->{mntpoint}) or return 1; eval { fsedit::add($hd, $part, $all_hds, { force => 1, primaryOrExtended => $primaryOrExtended }) }; if (my $err = $@) { if ($err =~ /raw_add/ && $hd->hasExtended && !$hd->{primary}{extended}) { $in->ask_warn(N("Error"), N("You can't create a new partition (since you reached the maximal number of primary partitions). First remove a primary partition and create an extended partition.")); return 0; } else { $in->ask_warn(N("Error"), $@);