Xen
  Install
  /boot.cfg
  grub
    pkg_info -D
    menu.lst
    初期設定
    起動画面
  DomU
    xend
    xm create
  DomU NetBSD
  DomU FreeBSD
  hvm
  64/32bit
  problem
  PR

| NetBSD 解説 | sysinst | pkgsrc 各論 | packages | macppc | TsubaiBSD | 絹/software/全文検索
at www.ki.nu

Xen

Last Update: "2010/02/12 19:34:29 makoto"

/boot.cfg

以前は grub が必要でしたが、今は /boot.cfg に記述します。 書き方等は boot.cfg(5) に説明があります。man boot.cfg で読めます。 こう書くと、起動時にこのように聞いて来る、という説明があります。
(従って、以下の説明は無用です)

grub

grub は起動用の道具です。
  • pkg_add (または pkgsrc) を使って grub を入れておく
  • /grub/menu.lst を用意する
  • grub を使って初期設定をする
    1. sudo grub-install /dev/rwd0d
    2. grub --no-floppy

pkg_info -D

pkg_add grub した後に
ttyp2:makoto@genova 20:07:34/080207(~)> pkg_info -D grub
とすると、次のようなお知らせを表示します。
Information for grub-0.97nb8:

Install notice:

$NetBSD: MESSAGE,v 1.6 2006/12/17 19:21:42 jmmv Exp $

If your root filesystem is of a type not supported directly by grub
(e.g., lfs), you may have difficulties.  See the info docs for more
details.

GRUB is not actually installed on your disk until you run a command
such as
        grub-install /dev/wd0d
or
        grub-install '(hd0)'

To boot NetBSD, put something similar to these lines into /grub/menu.lst:

        title NetBSD
        root (hd0,0,a)       # NetBSD on 1st MBR partition of 1st IDE disk
        chainloader +1

Alternatively, for NetBSD 4.x kernels and above, you can use the following
provided that your kernel was built with "options MULTIBOOT" (the default):

        title NetBSD
        root (hd0,0,a)       # NetBSD on 1st MBR partition of 1st IDE disk
        kernel /netbsd
いま、ある NetBSD 3.1.1 と NetBSD 4.0 の dual boot では、次のような /grub/menu.list を使っています。
default=1 
timeout=10
# #######################
        title NetBSD 3.1.1
        root (hd0,0,a)       # NetBSD on 1st MBR partition of 1st IDE disk
        chainloader +1

#Alternatively, for NetBSD 4.x kernels and above, you can use the following
#provided that your kernel was built with "options MULTIBOOT" (the default):
# #######################
        title NetBSD 4.0
        root (hd0,0,h)       # NetBSD on 1st MBR partition of 1st IDE disk
        kernel /netbsd

menu.lst

/grub/menu.lst に起動時の選択を設定します。 例は http://www.netbsd.org/ports/xen/howto.html にも載っています。 藤原が現在使っているものを menu.lst に示します。 ( この例では、/ が 10GB と大きすぎたため、xen.gz は圧縮を解いたものを使っています) これは この画面の下に示した「起動画面」の各行の動作を設定するものです。

初期設定

ttyp0:makoto@tokuda 16:37:39/080205(...packages/All)> sudo grub-install /dev/rwd0d Installation finished. No error reported. This is the contents of the device map /grub/device.map. Check if this is correct or not. If any of the lines is incorrect, fix it and re-run the script `grub-install'. (fd0) /dev/rfd0a (hd0) /dev/rwd0d
# grub --no-floppy
で起動します。
    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename. ]

grub> root (hd0,a)
 Filesystem type is ffs, partition type 0xa9

grub> setup (hd0)
 Checking if "/boot/grub/stage1" exists... no
 Checking if "/grub/stage1" exists... yes
 Checking if "/grub/stage2" exists... yes
 Checking if "/grub/ffs_stage1_5" exists... yes
 Running "embed /grub/ffs_stage1_5 (hd0)"...  15 sectors are embedded.
succeeded
 Running "install /grub/stage1 (hd0) (hd0)1+15 p (hd0,0,a)/grub/stage2 /grub/menu.lst"... succeeded
Done.

grub> quit

起動画面

これで機械の起動時に選択画面が出るようになります。
Last Update: Sat, 07 Jun 2014 22:16:17 GMT 1.66 2008/03/08