ハンドブック:Alpha/インストール/ブートローダー

From Gentoo Wiki
Jump to: navigation, search
This page is a translated version of the page Handbook:Alpha/Installation/Bootloader and the translation is 100% complete.

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎polski • ‎português do Brasil • ‎русский • ‎українська • ‎中文(中国大陆)‎ • ‎日本語 • ‎한국어
Alpha ハンドブック
インストール
インストールについて
メディアの選択
ネットワーク設定
ディスクの準備
stage3のインストール
Gentooベースシステムのインストール
カーネルの設定
システムの設定
ツールのインストール
ブートローダの設定
締めくくり
Gentooの操作
Portageについて
USEフラグ
Portageの機能
Initスクリプトシステム
環境変数
Portageの操作
ファイルとディレクトリ
変数
ソフトウェアブランチの併用
追加ツール
カスタムPortageツリー
高度な機能
ネットワーク設定
はじめに
高度な設定
モジュール式ネットワーク
無線
機能の追加
動的な管理



選択する

Now that the kernel is configured and compiled and the necessary system configuration files are filled in correctly, it is time to install a program that will fire up the kernel when the system is started. Such a program is called a bootloader.

Several bootloaders exist for Linux/Alpha. Choose one of the supported bootloaders, not all. We document aBoot and MILO.

Default: Using aBoot

Note
aboot only supports booting from ext2 and ext3 partitions.

First install aboot on the system

root #emerge --ask sys-boot/aboot

The next step is to make the bootdisk bootable. This will start aboot when booting the system. We make our bootdisk bootable by writing the aboot bootloader to the start of the disk.

root #swriteboot -f3 /dev/sda /boot/bootlx
root #abootconf /dev/sda 2
Note
When using a different partitioning scheme than the one used throughout this chapter, the commands need to be changed accordingly. Please read the appropriate manual pages (man 8 swriteboot and man 8 abootconf). Also, if the root filesystem is ran using the JFS filesystem, make sure it gets mounted read-only at first by adding ro as a kernel option.

Although aboot is now installed, we still need to write a configuration file for it. aboot only requires one line for each configuration, so we can do this:

root #echo '0:2/boot/vmlinux.gz root=/dev/sda3' > /etc/aboot.conf

If, while building the Linux kernel, an initramfs was build as well to boot from, then it is necessary to change the configuration by referring to this initramfs file and telling the initramfs where the real root device is at:

root #echo '0:2/boot/vmlinux.gz initrd=/boot/initramfs-genkernel-alpha-3.16.5-gentoo root=/dev/sda3' > /etc/aboot.conf

Additionally, it is possible to make Gentoo boot automatically by setting up some SRM variables. Try setting these variables from Linux, but it may be easier to do so from the SRM console itself.

root #cd /proc/srm_environment/named_variables
root #echo -n 0 > boot_osflags
root #echo -n '' > boot_file
root #echo -n 'BOOT' > auto_action
root #echo -n 'dkc100' > bootdef_dev

Of course substitute dkc100 with whatever the boot device is.

To get in the SRM console again in the future (to recover the Gentoo install, play with some variables, or whatever), just hit Ctrl+C to abort the automatic loading process.

When installing using a serial console, don't forget to include the serial console boot flag in aboot.conf. See /etc/aboot.conf.example for some further information.

Aboot is now configured and ready to use. Continue with Rebooting the system.

Alternative: Using MILO

Before continuing, decide on how to use MILO. In this section, we will assume that a MILO boot floppy will be created. When booting from an MS-DOS partition on the hard disk, change the commands appropriately.

To install MILO, we use emerge.

root #emerge --ask sys-boot/milo

After MILO has been installed, the MILO images should be in /opt/milo/. The commands below make a bootfloppy for use with MILO. Remember to use the image for the right Alpha-system.

root #fdformat /dev/fd0
root #mformat a:
root #mcopy /opt/milo/milo-2.4-18-gentoo-ruffian a:\milo
root #mcopy /opt/milo/linload.exe a:\linload.exe

If the Alpha system is a Ruffian:

root #mcopy /opt/milo/ldmilo.exe a:\ldmilo.exe

Finally, finish off with:

root #echo -ne '\125\252' | dd of=/dev/fd0 bs=1 seek=510 count=2

The MILO boot floppy is now ready to boot Gentoo Linux. It may be necessary to set environment variables in the ARCS Firmware to get MILO to start; this is all explained in the MILO-HOWTO with some examples on common systems, and examples of the commands to use in interactive mode.

Not reading the MILO-HOWTO is a bad idea.

Now continue with Rebooting the system.


システムのリブート

chroot環境を出て、全てのパーティションをアンマウントします。次に、最終かつ真のテストを実行するためのマジカルコマンドrebootを入力しましょう。

root #exit
cdimage ~#cd
cdimage ~#umount -l /mnt/gentoo/dev{/shm,/pts,}
cdimage ~#umount -R /mnt/gentoo
cdimage ~#reboot

もちろん、ブートCDを取り出しておいてください。そうしないと新しいGentooではなく、再度CDをブートしてしまいます。

新規にインストールされたGentooをリブートした後は、最終章インストールの締めくくりに進みましょう。