3.6. インストール前に行うハードウェア・OS の設定

この節では、Debian のインストールに先立って必要となるハードウェアの設定について見ていきます。通常この作業では、システムの BIOS/システム用ファームウェアの設定をチェックし、場合によってはその設定を変更することになります。BIOSシステムファームウェアは、ハードウェアが利用する中核的なソフトウェアで、電源投入後のブートプロセスの間に起動される、最も重要なものです。

3.6.1. BIOS 設定メニューの起動

BIOS はマシンのブートに必要となる基本的機能を提供し、OS がハードウェアにアクセスできるようにするものです。これからインストールしようとしているマシンでも、BIOS を設定できるようなメニューがついていると思います。BIOS 設定メニューに入るには、コンピュータの電源を入れてからキーを (一つまたは組み合わせて) 押しておく必要があります。多いのは DeleteF2 キーですが、製造者によっては別のキーを使うこともあります。通常はコンピュータの起動時にどのキーを押して設定画面に入るのか指示するメッセージが表示されるでしょう。

3.6.2. ブートデバイスの選択

BIOS 設定メニューで起動可能な OS をどのデバイスから順に探すのか選択できるようになっています。通常、内蔵ハードドライブや CD/DVD-ROM ドライブ、USB メモリや外付け USB ハードディスクのような USB 大容量デバイスが選択できるでしょう。いまのシステムでは PXE 経由でネットワークからの起動ができるようになっているものもよくあります。

選択したインストール用メディア (CD/DVD ROM、USB メモリ、ネットワーク経由) によりますが、適切な起動デバイスが有効になっていなければここで有効化してください。

ほとんどの BIOS で、システム起動時に起動メニューを呼び出してコンピュータがそのセッションでどのデバイスから起動するか選べるようになっています。これが可能な場合は、通常システム起動時に press F12 for boot menu のような短いメッセージを BIOS が表示します。実際にこのメニューに入るために使うキーはシステムにより様々ですが、よく使われるキーは F12F11F8 があります。このメニューからデバイスを選択した場合は BIOS のデフォルトの順は変更されません。つまり、内蔵ハードディスクを通常第一の起動デバイスに設定している状態で USB メモリから一度だけ起動することができます。

BIOS がその時限りの起動デバイス選択メニューを提供していない場合は、BIOS の設定を変更して debian-installer を起動するデバイスを第一の起動デバイスにする必要があります。

残念ながら一部のコンピュータには BIOS の動作がおかしいものがあります。BIOS 設定メニューにしかるべきオプションがあって USB メモリが第一の起動デバイスに選択されていても USB メモリからの debian-installer の起動ができないかもしれません。こういったシステムの一部では USB メモリを起動メディアとして使うことができません。BIOS 設定のデバイスタイプをデフォルトの USB ハードディスクUSB メモリ から USB ZIPUSB CDROM に変更することにより BIOS を騙して USB メモリから起動することができるものもあります。特に isohybrid CD/DVD イメージを USB メモリで使う場合 (「ハイブリッド CD/DVD イメージを使った USB メモリの準備」 参照)、USB ハードディスクモードで USB メモリから起動しない BIOS では、デバイスタイプを USB CDROM に変更すると起動できることがあります。

BIOS を操作して USB メモリから直接起動することができない場合でも、まだ USB メモリにコピーした ISO を使うという選択があります。「ハードディスク起動ファイルの準備」 を使って debian-installer を起動し、インストーラの ISO イメージを探してハードドライブを走査した後で USB デバイスを選択し、インストール用イメージを選びます。

3.6.3. Systems with UEFI firmware

UEFI (Unified Extensible Firmware Interface) is a new kind of system firmware that is used on many modern systems and is - among other uses - intended to replace the classic PC BIOS.

Currently most PC systems that use UEFI also have a so-called Compatibility Support Module (CSM) in the firmware, which provides excatly the same interfaces to an operating system as a classic PC BIOS, so that software written for the classic PC BIOS can be used unchanged. Nonetheless UEFI is intended to one day completely replace the old PC BIOS without being fully backwards-compatible and there are already a lot of systems with UEFI but without CSM.

On systems with UEFI there are a few things to take into consideration when installing an operating system. The way the firmware loads an operating system is fundamentally different between the classic BIOS (or UEFI in CSM mode) and native UEFI. One major difference is the way the harddisk partitions are recorded on the harddisk. While the classic BIOS and UEFI in CSM mode use a DOS partition table, native UEFI uses a different partitioning scheme called GUID Partition Table (GPT). On a single disk, for all practical purposes only one of the two can be used and in case of a multi-boot setup with different operating systems on one disk, all of them must therefore use the same type of partition table. Booting from a disk with GPT is only possible in native UEFI mode, but using GPT becomes more and more common as hard disk sizes grow, because the classic DOS partition table cannot address disks larger than about 2 Terabytes while GPT allows for far larger disks. The other major difference between BIOS (or UEFI in CSM mode) and native UEFI is the location where boot code is stored and in which format it has to be. This means that different bootloaders are needed for each system.

The latter becomes important when booting debian-installer on a UEFI system with CSM because debian-installer checks whether it was started on a BIOS- or on a native UEFI system and installs the corresponding bootloader. Normally this simply works but there can be a problem in multi-boot environments. On some UEFI systems with CSM the default boot mode for removable devices can be different from what is actually used when booting from hard disk, so when booting the installer from a USB stick in a different mode from what is used when booting another already installed operating system from the hard disk, the wrong bootloader might be installed and the system might be unbootable after finishing the installation. When choosing the boot device from a firmware boot menu, some systems offer two seperate choices for each device, so that the user can select whether booting shall happen in CSM or in native UEFI mode.

Another UEFI-related topic is the so-called secure boot mechanism. Secure boot means a function of UEFI implementations that allows the firmware to only load and execute code that is cryptographically signed with certain keys and thereby blocking any (potentially malicious) boot code that is unsigned or signed with unknown keys. In practice the only key accepted by default on most UEFI systems with secure boot is a key from Microsoft used for signing the Windows bootloader. As the boot code used by debian-installer is not signed by Microsoft, booting the installer requires prior deactivation of secure boot in case it is enabled. Secure boot is often enabled by default on systems that come preinstalled with a 64-bit version of Windows 8 and there is unfortunately no standard way to disable it in the UEFI setup. On some systems, the option to disable secure boot is only made visible when a BIOS password has been set by the user, so if you have a system with secure boot enabled, but cannot find an option to disable it, try setting a BIOS password, powercycle the machine and look again for an appropriate option.

3.6.4. Disabling the Windows 8 fast boot feature

Windows 8 offers a feature called fast boot to cut down system startup time. Technically, when this feature is enabled, Windows 8 does not do a real shutdown and a real cold boot afterwards when ordered to shut down, but instead does something resembling a partial suspend to disk to reduce the boot time. As long as Windows 8 is the only operating system on the machine, this is unproblematic, but it can result in problems and data loss when you have a dual boot setup in which another operating system accesses the same filesystems as Windows 8 does. In that case the real state of the filesystem can be different from what Windows 8 believes it to be after the boot and this could cause filesystem corruption upon further write accesses to the filesystem. Therefore in a dual boot setup, to avoid filesystem corruption the fast boot feature has to be disabled within Windows.

It may also be necessary to disable fast boot to even allow access to UEFI setup to choose to boot another operating system or debian-installer. On some UEFI systems, the firmware will reduce boot time by not initialising the keyboard controller or USB hardware; in these cases, it is necessary to boot into Windows and disable this feature to allow for a change of boot order.

3.6.5. 気をつけるべきハードウェアの問題

USB BIOS サポートとキーボード. PS/2 形式のキーボードがなく、USB のものだけ場合、ある種の非常に古い PC では、ブートローダーメニューでキーボードを使用するため、BIOS 設定で legacy keyboard emulation を有効にする必要があります。が、今日のシステムでは問題になりません。ブートローダーメニューでキーボードが使用できない場合、マザーボードのマニュアルを調べて、Legacy keyboard emulationUSB keyboard support といった BIOS 設定に入ってください。