オリジナルLinuxの構築備忘録
ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定ブートローダーのコンパイルと導入/設定

5−27.ブートローダのコンパイルと導入/設定

@ liloソースコードを/mnt/target1/usr/srcに展開

  $cd /mnt/target1/usr/src
  $tar -xzvf /usr/src/local/linuxdev/lilo-22.3.3.tar.gz
  $cd lilo-22.3.3

A QuickInstの編集

 319行目 dev="`find /dev -type b -name '[hs]da' | sed 's,/[hs]da$,,;1q'`"
 を以下のように編集する
 dev="/dev"

B liloのコンパイルと導入

  $ROOT=/mnt/target2 ./QuickInst

  QuickInst configures LILO and installs it on your hard disk. It should only be
  used for first-time installations, _not_ to update or modify an existing
  installation of LILO. It will _not_ generate a valid installation with versions
  of LILO below 17.

  The installation procedure can be interrupted by pressing ^C at any time. When
  at a prompt, a sub-shell can be invoked with the exclamation mark.

  Continue ? [yes] エンターキーで次へ

  A directory /boot already exists. If you're installing a new version of
  LILO now, QuickInst has to replace the old files with the new ones.

  Replace old files ? [yes]
  既に/bootを作成しているのでエンターキーで次へ

  Making LILO.......
  コンパイルが開始される

  /sbin/lilo must now be run to complete the update.

  (Disk devices live in /dev)

  Gathering configuration data ...

  (/ is mounted on /dev/hda3) ← 開発機と同じパティションの場合

  Please specify the name of the device where the LILO boot sector should be
  stored. (Suggested locations are the Linux root partition or the MBR of your
  first drive).

  Device name (/dev/hda3) /dev/hda1 と入力する。
ブートローダーのコンパイルと導入/設定開発機のブートローダがMBRに導入されていることが前提
ブートローダーのコンパイルと導入/設定間違えると開発環境を破壊するワン

  Please specify the name of the kernel image file you want to boot by default.

  Default kernel (/boot/linux) エンターキーで次へ
ブートローダーのコンパイルと導入/設定参照される場所は/mnt/target2内だワン
  ./QuickInst: line 1: /boot/linux: No such file or directory
ブートローダーのコンパイルと導入/設定Warningが出るがとりあえず無視だワン
 
  Define additional kernels ? [no] エンターキーで次へ

  Define additional operating systems (e.g. MS-DOS) ? [no] エンターキーで次へ

  Ready to install LILO's boot sector on your hard disk.
  Type !cat /mnt/target2/etc/lilo.conf if you want to check the configuration file.

  Test LILO installation now ? [yes]
  !cat /mnt/target2/etc/lilo.conf と入力し確認する
  # LILO configuration created by QuickInst 21 Tue Apr 29 16:55:17 JST 2003

  boot = /dev/hda1
  compact
  delay = 5 # optional, for systems that boot very quickly
  vga = normal # force sane state
  root = current # use "current" root
  image = /boot/vmlinuz
    label = linux
ブートローダーのコンパイルと導入/設定lilo.confの内容が表示される
  Test LILO installation now ? [yes] エンターキーでテスト導入する

  Added linux *
ブートローダーのコンパイルと導入/設定Warningが出ないこと

  Install LILO now ? [yes] エンターキーでLILOを導入する

  You see now the output of the map installer with verbose progress reporting
  enabled. It will list all items that are installed for booting. Additionally,
  if there are have been warnings, they will be repeated again.

  LILO version 22.3.3, Copyright (C) 1992-1998 Werner Almesberger
  Development beyond version 21 Copyright (C) 1999-2002 John Coffman
  Released 30-Aug-2002 and compiled at 16:50:52 on Apr 29 2003.

  Using MENU secondary loader
  Calling map_insert_data

  Boot image: /boot/vmlinuz
  Added linux *

  Backup copy of boot sector in /boot/boot.0301
  Writing boot sector.
  Boot sector relocation performed

  Done.

C ブートイメージとmapファイルの確認

  $cd /mnt/target2/boot
  $ls -l
  boot.0301 ← hda1を指定した場合(ファイルの大きさは512バイト)
  map

D ブートセクターイメージのコピー

  $cp -p /mnt/target1/usr/src/lilo-22.3.3/boot-test.b /mnt/target2/boot/boot.b


前  戻る  次
ブートローダーのコンパイルと導入/設定