木村 at 椎柴生まれ、です。
On Tue, 10 Aug 2010 06:38:10 +0900
"S.Kimura (木村成一)" <[email protected]> wrote:
> On Mon, 9 Aug 2010 10:41:04 +0900
> <[email protected]> wrote:
> > >ウソを書いたかも知れません。以前インストールした際、menu.lst を自分で変更して
> > >grub-install を実行したらしい、という懸念があります。
> >
> > これはやったことがあります。Vineではないのですが。
[中略]
> 確認インストールの件は追って書きます。
> なにしろ実験用マシンが不調でして。
まぁ、話は Linux に関わるのですが……。(以下、すべて i386 版)
実験は、junk で購入した NEC ValueStar VL700R/5 という PC/AT 互換機に、
FreeDOS-1.0、手元にあった FreeBSD-7.0-STABLE-200807 をインストールして行ないました。
A. ブートローダーは lilo か、grub か。
近年、だいたい grub らしい。にしても、全ディストリビューションの調査はほぼ不可能。
B. インストーラーは grub の setup 先を MBR または PBR に指定できるか。
SSD/Linux-0.4-20100723、Vine Linux-5.1、Ubuntu-10.04 などは可能。
Fedora-13-i386-netinst は指定不可だったと記憶しているが、install し切れず。
C. MBR に setup した grub に Windows や FreeBSD を登録できるかどうか。
Vine Linux-5.1。 install 時、GUI mode なら細かく設定できる。
install 時、Text mode だと、FreeBSD を [追加]出来ない。
install 後、grub-install で追加可能。
Ubuntu-10.04。 Windows(or DOS) は登録できる。
install 後、grub-install で追加可能。
SSD/Linux-0.4-20100723。 ssd だけを自動的に grub に登録。
install 後、grub-install で追加可能。
という実験結果を得ました。やはり Vine のインストーラーが健闘(?)しているようです。
最後に資料として、grub.conf (menu.lst) を列挙して置きます。差異が興味ふかい。
// Vine Linux-5.1 が書き込んだ menu.lst
# menu.lst generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,2)
# kernel /boot/vmlinuz-version ro root=/dev/hda3
# initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=5
title Vine Linux (Current kernel)
root (hd0,2)
kernel /boot/vmlinuz ro root=LABEL=/ vga=0x314 splash=silent
initrd /boot/initrd.img
title Vine Linux (Previous kernel)
root (hd0,2)
kernel /boot/vmlinuz.old ro root=LABEL=/ vga=0x314 splash=silent
initrd /boot/initrd.old.img
title FreeBSD
rootnoverify (hd0,1)
chainloader +1
title DOS
rootnoverify (hd0,0)
chainloader +1
// Ubuntu-10.04 が書き込んだ grub.conf
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
set saved_entry=${prev_saved_entry}
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z ${boot_once} ]; then
saved_entry=${chosen}
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env
recordfail; fi; fi
}
insmod ext2
set root='(hd0,3)'
search --no-floppy --fs-uuid --set cfc97005-c02c-4209-9553-1fd9f277d054
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd0,3)'
search --no-floppy --fs-uuid --set cfc97005-c02c-4209-9553-1fd9f277d054
set locale_dir=($root)/boot/grub/locale
set lang=C.UTF-8
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-21-generic' --class ubuntu --class
gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,3)'
search --no-floppy --fs-uuid --set cfc97005-c02c-4209-9553-1fd9f277d054
linux /boot/vmlinuz-2.6.32-21-generic
root=UUID=cfc97005-c02c-4209-9553-1fd9f277d054 ro quiet
initrd /boot/initrd.img-2.6.32-21-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu
--class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,3)'
search --no-floppy --fs-uuid --set cfc97005-c02c-4209-9553-1fd9f277d054
echo 'Loading Linux 2.6.32-21-generic ...'
linux /boot/vmlinuz-2.6.32-21-generic
root=UUID=cfc97005-c02c-4209-9553-1fd9f277d054 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-21-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,3)'
search --no-floppy --fs-uuid --set cfc97005-c02c-4209-9553-1fd9f277d054
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,3)'
search --no-floppy --fs-uuid --set cfc97005-c02c-4209-9553-1fd9f277d054
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "FreeDOS (on /dev/sda1)" {
insmod fat
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 250f-1ef6
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
// Ubuntu grub.cfg のための 差分 (猿真似)
--- grub.cfg.BAK 2010-08-10 21:52:41.717105448 +0900
+++ grub.cfg 2010-08-10 22:03:56.150366318 +0900
@@ -97,6 +97,16 @@
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
+menuentry "FreeBSD (on /dev/sda1)" {
+ insmod ufs
+ set root='(hd0,2,a)'
+ search --no-floppy
+ drivemap -s (hd0) ${root}
+ chainloader +1
+}
+### END /etc/grub.d/30_os-prober ###
+
+### BEGIN /etc/grub.d/30_os-prober ###
menuentry "FreeDOS (on /dev/sda1)" {
insmod fat
set root='(hd0,1)'
// SSD/Linux-0.4-20100723 が書き込んだ menu.lst
# Boot automatically after 5 secs.
timeout 5
# By default, boot the first entry.
default 0
# Fallback to the second entry.
fallback 1
# For booting SSD/Linux 0.4-20100723/2.6.16
title SSD/Linux 0.4-20100723/2.6.16
root (hd0,2)
kernel /vmlinuz root=/dev/hda3
# For booting SSD/Linux 0.4-20100723/2.6.16 from FD
title SSD/Linux 0.4-20100723/2.6.16 from FD
root (fd0)
kernel /bzImage root=/dev/ram
pause Insert instfs floppy disk and type any key.
initrd /initrd.fs.gz
// SSD menu.lst のための差分 (9時間補正なし)
--- menu.lst.ssd 2010-08-13 05:52:25.000000000 +0900
+++ menu.lst 2010-08-13 05:59:41.000000000 +0900
@@ -18,3 +18,14 @@
kernel /bzImage root=/dev/ram
pause Insert instfs floppy disk and type any key.
initrd /initrd.fs.gz
+
+title FreeBSD
+ makeactive
+ rootnoverify (hd0,1,a)
+ chainloader +1
+
+title DOS
+ makeactive
+ rootnoverify (hd0,0)
+ chainloader +1
+
--
木村成一 @千葉県銚子市小長町