これって slackware 3.0 に入っていたものだから古いんだ。どうやら バージョンは 1.6 みたい。んでもって最新は 1.9 だ。
というわけで早速。
cipher:~# ls -l lilo.19.tar.gz -rw-r--r-- 1 yokota users 154204 Nov 1 10:42 lilo.19.tar.gz cipher:~# tar xfz lilo.19.tar.gz cipher:~# cd lilo cipher:~# ls CHANGES VERSION cfg.h doc identify.h partition.c COPYING activate.c chain.S dparam.s lilo.19.lsm partition.h INCOMPAT boot.c common.c dump.S lilo.c second.S Makefile boot.h common.h first.S lilo.h temp.c QuickInst bsect.c config.h geometry.c map.c temp.h README bsect.h device.c geometry.h map.h TODO cfg.c device.h identify.c mkdistまずは展開ですな。付属の README とかを読んでみると、どうやら QuickInst を起動しちゃうのが手っ取り早いみたい。んじゃ早速。
自分の環境の /etc/lilo.conf をちゃんとどっかにコピーでもしてお くこと。この QuickInst をまともに最後まで実行すると /etc/lilo.conf を上書きしちゃうから。
準備が整ったら QuickInst を実行。私はその前に Makefile の中のオプティマイズレベルを趣味で変更している。以下は私が実行したとき の全ログです。
cipher:~# ./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 0.13.
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]
Making LILO ...
cc -c -Wall -Wno-parentheses -O6 `( if [ -r $ROOT/etc/lilo.defines ]; then cat $ROOT/etc/lilo.defines; else echo -DIGNORECASE -DVARSETUP -DFIX_TYPE -DHIDE_DOS; fi ) | sed 's/-D/-DLCF_/g'` lilo.c
cc -c -Wall -Wno-parentheses -O6 `( if [ -r $ROOT/etc/lilo.defines ]; then cat $ROOT/etc/lilo.defines; else echo -DIGNORECASE -DVARSETUP -DFIX_TYPE -DHIDE_DOS; fi ) | sed 's/-D/-DLCF_/g'` map.c
cc -c -Wall -Wno-parentheses -O6 `( if [ -r $ROOT/etc/lilo.defines ]; then cat $ROOT/etc/lilo.defines; else echo -DIGNORECASE -DVARSETUP -DFIX_TYPE -DHIDE_DOS; fi ) | sed 's/-D/-DLCF_/g'` geometry.c
cc -c -Wall -Wno-parentheses -O6 `( if [ -r $ROOT/etc/lilo.defines ]; then cat $ROOT/etc/lilo.defines; else echo -DIGNORECASE -DVARSETUP -DFIX_TYPE -DHIDE_DOS; fi ) | sed 's/-D/-DLCF_/g'` boot.c
cc -c -Wall -Wno-parentheses -O6 `( if [ -r $ROOT/etc/lilo.defines ]; then cat $ROOT/etc/lilo.defines; else echo -DIGNORECASE -DVARSETUP -DFIX_TYPE -DHIDE_DOS; fi ) | sed 's/-D/-DLCF_/g'` device.c
cc -c -Wall -Wno-parentheses -O6 `( if [ -r $ROOT/etc/lilo.defines ]; then cat $ROOT/etc/lilo.defines; else echo -DIGNORECASE -DVARSETUP -DFIX_TYPE -DHIDE_DOS; fi ) | sed 's/-D/-DLCF_/g'` common.c
cc -c -Wall -Wno-parentheses -O6 `( if [ -r $ROOT/etc/lilo.defines ]; then cat $ROOT/etc/lilo.defines; else echo -DIGNORECASE -DVARSETUP -DFIX_TYPE -DHIDE_DOS; fi ) | sed 's/-D/-DLCF_/g'` bsect.c
cc -c -Wall -Wno-parentheses -O6 `( if [ -r $ROOT/etc/lilo.defines ]; then cat $ROOT/etc/lilo.defines; else echo -DIGNORECASE -DVARSETUP -DFIX_TYPE -DHIDE_DOS; fi ) | sed 's/-D/-DLCF_/g'` cfg.c
cc -c -Wall -Wno-parentheses -O6 `( if [ -r $ROOT/etc/lilo.defines ]; then cat $ROOT/etc/lilo.defines; else echo -DIGNORECASE -DVARSETUP -DFIX_TYPE -DHIDE_DOS; fi ) | sed 's/-D/-DLCF_/g'` temp.c
cc -c -Wall -Wno-parentheses -O6 `( if [ -r $ROOT/etc/lilo.defines ]; then cat $ROOT/etc/lilo.defines; else echo -DIGNORECASE -DVARSETUP -DFIX_TYPE -DHIDE_DOS; fi ) | sed 's/-D/-DLCF_/g'` partition.c
cc -c -Wall -Wno-parentheses -O6 `( if [ -r $ROOT/etc/lilo.defines ]; then cat $ROOT/etc/lilo.defines; else echo -DIGNORECASE -DVARSETUP -DFIX_TYPE -DHIDE_DOS; fi ) | sed 's/-D/-DLCF_/g'` identify.c
cc -o lilo -O6 -s lilo.o map.o geometry.o boot.o device.o common.o bsect.o cfg.o temp.o partition.o identify.o
cc -E `./lilo -X` first.S -o first.s
as86 -0 -a -w -o first.o -l first.lis first.s
ld86 -0 -s -o first.img first.o
dd if=first.img of=first.b bs=32 skip=1
11+1 records in
11+1 records out
cc -E `( if [ -r $ROOT/etc/lilo.defines ]; then cat $ROOT/etc/lilo.defines; else echo -DIGNORECASE -DVARSETUP -DFIX_TYPE -DHIDE_DOS; fi ) | sed 's/-D/-DLCF_/g'` -DGO=0x`sed '/go/s/^.*go 0 \(....\) A.*$/\1/p;d' first.lis` `./lilo -X` second.S -o second.s
as86 -0 -a -w -o second.o second.s
ld86 -0 -s -o second.img second.o
dd if=second.img of=second.b bs=32 skip=1
122+0 records in
122+0 records out
(dd if=first.b bs=512 conv=sync; dd if=second.b) >boot.b
0+1 records in
1+0 records out
7+1 records in
7+1 records out
cc -E `( if [ -r $ROOT/etc/lilo.defines ]; then cat $ROOT/etc/lilo.defines; else echo -DIGNORECASE -DVARSETUP -DFIX_TYPE -DHIDE_DOS; fi ) | sed 's/-D/-DLCF_/g'` -DGO=0x`sed '/go/s/^.*go 0 \(....\) A.*$/\1/p;d' first.lis` chain.S -DSWAP_FD -o any_b.s
as86 -0 -a -w -o any_b.o any_b.s
ld86 -0 -s -o any_b.img any_b.o
dd if=any_b.img of=any_b.b bs=32 skip=1
6+1 records in
6+1 records out
cc -E `( if [ -r $ROOT/etc/lilo.defines ]; then cat $ROOT/etc/lilo.defines; else echo -DIGNORECASE -DVARSETUP -DFIX_TYPE -DHIDE_DOS; fi ) | sed 's/-D/-DLCF_/g'` -DGO=0x`sed '/go/s/^.*go 0 \(....\) A.*$/\1/p;d' first.lis` chain.S -DSWAP_HD -o any_d.s
as86 -0 -a -w -o any_d.o any_d.s
ld86 -0 -s -o any_d.img any_d.o
dd if=any_d.img of=any_d.b bs=32 skip=1
6+1 records in
6+1 records out
cc -E `./lilo -X` dump.S -DDOS_D -o dump.s \
-DGO=0x`sed '/go/s/^.*go 0 \(....\) A.*$/\1/p;d' first.lis`
as86 -0 -a -w -o dump.o dump.s
ld86 -0 -s -o dump.img dump.o
dd if=dump.img of=dump.b bs=32 skip=1
6+1 records in
6+1 records out
cc -E `( if [ -r $ROOT/etc/lilo.defines ]; then cat $ROOT/etc/lilo.defines; else echo -DIGNORECASE -DVARSETUP -DFIX_TYPE -DHIDE_DOS; fi ) | sed 's/-D/-DLCF_/g'` -DGO=0x`sed '/go/s/^.*go 0 \(....\) A.*$/\1/p;d' first.lis` chain.S -DDOS_D -o os2_d.s
as86 -0 -a -w -o os2_d.o os2_d.s
ld86 -0 -s -o os2_d.img os2_d.o
dd if=os2_d.img of=os2_d.b bs=32 skip=1
6+0 records in
6+0 records out
cc -E `( if [ -r $ROOT/etc/lilo.defines ]; then cat $ROOT/etc/lilo.defines; else echo -DIGNORECASE -DVARSETUP -DFIX_TYPE -DHIDE_DOS; fi ) | sed 's/-D/-DLCF_/g'` -DGO=0x`sed '/go/s/^.*go 0 \(....\) A.*$/\1/p;d' first.lis` chain.S -o chain.s
as86 -0 -a -w -o chain.o chain.s
ld86 -0 -s -o chain.img chain.o
dd if=chain.img of=chain.b bs=32 skip=1
2+1 records in
2+1 records out
as86 -0 -a -w -o dparam.o dparam.s
ld86 -0 -s -o dparam.img dparam.o
dd if=dparam.img of=dparam.com bs=288 skip=1
0+1 records in
0+1 records out
cc -Wall -s -O -o activate activate.c -O6 -s
rm os2_d.img chain.o chain.img dump.img first.img dump.o os2_d.o any_b.o dparam.o second.o second.img any_d.o any_b.img any_d.img
Installing LILO ...
if [ ! -d $ROOT/sbin ]; then mkdir $ROOT/sbin; fi
if [ ! -d $ROOT/etc ]; then mkdir $ROOT/etc; fi
if [ ! -d $ROOT/boot ]; then mkdir $ROOT/boot; fi
if [ -f $ROOT/boot/boot.b ]; then \
mv $ROOT/boot/boot.b $ROOT/boot/boot.old; fi
if [ -f $ROOT/boot/chain.b ]; then \
mv $ROOT/boot/chain.b $ROOT/boot/chain.old; fi
if [ -f $ROOT/boot/any_b.b ]; then \
mv $ROOT/boot/any_b.b $ROOT/boot/any_b.old; fi
if [ -f $ROOT/boot/any_d.b ]; then \
mv $ROOT/boot/any_d.b $ROOT/boot/any_d.old; fi
if [ -f $ROOT/boot/os2_d.b ]; then \
mv $ROOT/boot/os2_d.b $ROOT/boot/os2_d.old; fi
cp boot.b any_b.b any_d.b chain.b os2_d.b $ROOT/boot
cp lilo $ROOT/sbin
strip $ROOT/sbin/lilo
/etc/lilo/install is obsolete. LILO is now re-installed
by just invoking /sbin/lilo
/sbin/lilo must now be run to complete the update.
(Disk devices live in /dev)
Generating /etc/lilo.conf ...
(/ is mounted on /dev/hdb2)
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 (no default) /dev/hda
You are about to install LILO on your MBR. If there are other operating
systems on your hard disk, LILO will act as a boot manager for them. You
have to specify each operating system in your LILO configuration. (More
about this later.)
Please specify the name of the kernel image file you want to boot by default.
Default kernel (no default) /vmlinuz_2.0.24
Define additional kernels ? (no default) no
If you want to boot other operating systems than Linux from your hard disk,
you should configure them now. LILO will take over the entire boot process,
so any currently installed partition switchers or boot managers will stop
to work. (If this scares you, just hit ^C and read the manual.)
Define additional operating systems (e.g. MS-DOS) ? (no default) no
Ready to install LILO's boot sector on your hard disk.
Type !cat /etc/lilo.conf if you want to check the configuration file.
Test LILO installation now ? [yes]
The boot sector and the map file have *NOT* been altered.
Added linux *
Install LILO now ? [yes]
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 19, Copyright 1992-1996 Werner Almesberger
Reading boot sector from /dev/hda
Merging with /boot/boot.b
Boot image: /vmlinuz_2.0.24
Added linux *
/boot/boot.0300 exists - no backup copy made.
Writing boot sector.
Done.
この状態で一度リブートしてみた。ちゃんと Linux が立ち上がりまし
た。でもやっぱり lilo の設定は以前に戻したいので、とっておいた
lilo.conf を /etc/lilo.conf において lilo を実行
しなおしています。
cipher:~# lilo -v LILO version 19, Copyright 1992-1996 Werner Almesberger Reading boot sector from /dev/hda Merging with /boot/boot.b Boot other: /dev/hda1, on /dev/hda, loader /boot/chain.b Added dos * Boot image: /vmlinuz_2.0.24 Added linux Boot image: /vmlinuz_2.0.0 Added linux_2 /boot/boot.0300 exists - no backup copy made. Writing boot sector.今日はルンルンのスィッチオフ。