boot loader

lilo

# Specifies the boot device. This is where Lilo installs its boot
# block. It can be either a partition, or the raw device, in which
# case it installs in the MBR, and will overwrite the current MBR.
#
boot=/dev/md1
# This option may be needed for some software RAID installs.
#
raid-extra-boot=mbr-only
# Specifies the location of the map file
#
map=/boot/map
# Specifies the number of deciseconds (0.1 seconds) LILO should
# wait before booting the first image.
#
delay=20
#
# Boot up Linux by default.
#
default=Linux
image=/vmlinuz
label=Linux
read-only
# restricted
# alias=1
append="root=/dev/md1 "
initrd=/initrd.img
image=/vmlinuz.old
label=LinuxOLD
read-only
optional
# restricted
# alias=2
append="root=/dev/md1 "
initrd=/initrd.img.old

Ubuntu

liloと同様に、二つ目のMBRにもGRUBが自動でセットされる模様。GRUB installは不要？

/boot/grub/menu.lst (snip)

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 3
## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu
title Ubuntu 8.04.2, kernel 2.6.24-24-server
root (hd0,1)
kernel /boot/vmlinuz-2.6.24-24-server root=/dev/md1 ro quiet splash
initrd /boot/initrd.img-2.6.24-24-server

mdadm

Ubuntu

# BOOT_DEGRADED:
# Do you want to boot your system if a RAID providing your root filesystem
# becomes degraded?
#
# Running a system with a degraded RAID could result in permanent data loss
# if it suffers another hardware fault.
#
# However, you might answer "yes" if this system is a server, expected to
# tolerate hardware faults and boot unattended.
BOOT_DEGRADED=false

# By default, run at 01:06 on every Sunday, but do nothing unless the day of
# the month is less than or equal to 7. Thus, only run on the first Sunday of
# each month. crontab(5) sucks, unfortunately, in this regard; therefore this
# hack (see #380425).
6 1 * * 0 root [ -x /usr/share/mdadm/checkarray ] && [ $(date +\%d) -le 7 ] && /usr/share/mdadm/checkarray --cron --all --quiet

dpkg-reconfigure mdadm

[ ... ] がデフォルト値

sudo dpkg-reconfigure mdadm

/etc/default/mdadm AUTOCHECK

┌───────────────────────────┤ Configuring mdadm ├
│ │
│ If your kernel supports it (>> 2.6.14), mdadm can periodically check the │
│ redundancy of your MD arrays (RAIDs). This may be a resource-intensive │
│ process, depending on your setup, but it could help prevent rare cases │
│ of data loss. Note that this is a read-only check unless errors are │
│ found; if errors are found, mdadm will try to correct them, which may │
│ result in write access to the media. │
│ │
│ The default, if turned on, is to run the checks on the first Sunday of │
│ every month at 01:06 o'clock. │
│ │
│ Should mdadm run monthly redundancy checks of the MD arrays? │
│ │
│ [<Yes>] <No> │
│ │
└──────────────────────────────────────

┌───────────────────────────┤ Configuring mdadm ├
│ │
│ If your root filesystem is on a RAID, and a disk is missing at boot, it │
│ can either boot with the degraded array, or hold the system at a │
│ recovery shell. │
│ │
│ Running a system with a degraded RAID could result in permanent data │
│ loss if it suffers another hardware fault. │
│ │
│ If you do not have access to the server console to use the recovery │
│ shell, you might answer "yes" to enable the system to boot unattended. │
│ │
│ Do you want to boot your system if your RAID becomes degraded? │
│ │
│ <Yes> [<No>] │
│ │
└──────────────────────────────────────