[ << ]
[ < ]
[ Home ]
[ > ]
[ >> ]
10. Configuring the Bootloader
Content:
10.a. Making your Choice
Introduction
Now that your 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 your kernel when you start the system. Such a
program is called a bootloader.
Several bootloaders exist for Linux/Alpha. You must choose one of the supported
bootloaders, not all. You have the choice between aBoot
and MILO.
10.b. Default: Using aboot
Note:
aboot only supports booting from ext2 and ext3
partitions.
|
We first install aboot on our system. Of course we use emerge to
do so:
Code Listing 2.1: Installing aboot |
# emerge aboot
|
The next step is to make our bootdisk bootable. This will start
aboot when you boot your system. We make our bootdisk bootable by
writing the aboot bootloader to the start of the disk.
Code Listing 2.2: Making your bootdisk bootable |
# swriteboot -f3 /dev/sda /boot/bootlx
# abootconf /dev/sda 2
|
Note:
If you use a different partitioning scheme than the one we use
throughout this chapter, you have to change the commands accordingly.
Please read the appropriate manual pages (man 8 swriteboot and
man 8 abootconf). Also, if your 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:
Code Listing 2.3: Creating /etc/aboot.conf |
# echo '0:2/boot/vmlinux.gz root=/dev/sda2' > /etc/aboot.conf
# echo '0:2/boot/vmlinux.gz initrd=/boot/initramfs-genkernel-alpha-3.3.8-gentoo real_root=/dev/sda2' > /etc/aboot.conf
|
Additionally, you can make Gentoo boot automatically by setting up some SRM
variables. You can try setting these variables from Linux, but it may be easier
to do so from the SRM console itself.
Code Listing 2.4: Automatically booting Gentoo |
# cd /proc/srm_environment/named_variables
# echo -n 0 > boot_osflags
# echo -n '' > boot_file
# echo -n 'BOOT' > auto_action
# echo -n 'dkc100' > bootdef_dev
|
If you need to get into the SRM console again in the future (to recover
your Gentoo install, play with some variables, or whatever), just hit
CTRL+C to abort the automatic loading process.
If you're 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.
10.c. Alternative: Using MILO
Before continuing, you should decide on how to use MILO. In this
section, we will assume that you want to make a MILO boot floppy. If you
are going to boot from an MS-DOS partition on your hard disk, you should
amend the commands appropriately.
To install MILO, we use emerge.
Code Listing 3.1: Installing MILO |
# emerge 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 correct image for your Alpha-system.
Code Listing 3.2: Installing MILO on a floppy |
# fdformat /dev/fd0
# mformat a:
# mcopy /opt/milo/milo-2.4-18-gentoo-ruffian a:\milo
# mcopy /opt/milo/linload.exe a:\linload.exe
# mcopy /opt/milo/ldmilo.exe a:\ldmilo.exe
# echo -ne '\125\252' | dd of=/dev/fd0 bs=1 seek=510 count=2
|
Your MILO boot floppy is now ready to boot Gentoo Linux. You may need to
set environment variables in your 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.
10.d. Rebooting the System
Exit the chrooted environment and unmount all mounted partitions. Then type in
that one magical command you have been waiting for: reboot.
Code Listing 4.1: Exiting the chroot, unmounting all partitions and rebooting |
# exit
cdimage ~# cd
cdimage ~# umount -l /mnt/gentoo/dev{/shm,/pts,}
cdimage ~# umount -l /mnt/gentoo{/boot,/proc,}
cdimage ~# reboot
|
Of course, don't forget to remove the bootable CD, otherwise the CD will be
booted again instead of your new Gentoo system.
Once rebooted in your Gentoo installation, finish up with Finalizing your Gentoo Installation.
[ << ]
[ < ]
[ Home ]
[ > ]
[ >> ]
The contents of this document, unless otherwise expressly stated, are licensed under the CC-BY-SA-2.5 license. The Gentoo Name and Logo Usage Guidelines apply.
|