linux-l: Hilfe, wer kennt sich mit LILO gut aus?

Miguel Sastre misjtiac at cetus.zrz.TU-Berlin.DE
Mi Aug 25 16:34:01 CEST 1999


Liebe Linuxer,
ich wäre sehr dankbar, wenn jemand von Euch die eine oder andere Idee zu
meinem Problem beisteuern könnte.

I.   Zuerst stelle ich mein Problem vor.
II.  Dann einen Ausschnitt aus der Readme zu LILO und die daraus
entwickelte lilo.conf.
III. Zu guter Letzt ein Versuch die Sourcen so zu kompilieren, daß die
Option ACTIVATE unterstützt wird.


I. Nun, mein zu lösendes Problem ist folgendes:
-------------------------------------------------------------------------------------------------------------

Festplatte 1 (hda):                           Festplatte 2 (hdb):

hda1 --> win98                               hdb1 --> Progis win98
hda2 --> win95                               hdb2 --> Progis win95
hda3 --> erw. Partition                    hdb3 --> linux
hdb4 --> erw. Partition

Lilo soll nun:

a) Win98 (hda1) mit der zugehörigen Programpartition (hdb1) booten.
    Dazu müssen hda1 und hdb1 aktiv gesetzt werden
    und hda2 und hdb2 versteckt werden.

b) Win95 (hda2) mit der zugehörigen Programpartition (hdb2) booten.
     Dazu müssen hda2 und hdb2 aktiv gesetzt werden
     und hda1 und hdb1 versteckt werden.

c) Linux booten --> null problemo
-------------------------------------------------------------------------------------------------------------------------

II. Meine fruchtlosen Lösungsansätze:

1) Die Datei Readme aus lilo-21.tar.gz bietet hierzu folgendes:

Zitat:
Partition table manipulation
----------------------------

Some non-Linux operating systems obtain information about their
partitions
(e.g. their equivalent of the root file system) from the partition
table.
If more than one such operating system is installed on a PC, they may
have
conflicting interpretations of the content of the partition table. Those

problems can be avoided by changing the partition table, depending on
which
operating system is being booted.

Partition table changes are specified in a CHANGE section in the
configuration file section describing the foreign operating system. Note

that CHANGE sections are only accepted if the build-time option
REWRITE_TABLE  is set.

The CHANGE section contains subsections for each partition whose table
entry needs to be modified. Partitions are specified with
PARTITION=<device_name>

Changes are applied in the sequence in which they appear in the
configuration file. Configurations containing changes that are redundant

either by repeating a previous change or by changing its result further
are
invalid and refused by the map installer.

Internally, all changes are expressed as rules which specify the
location
(disk and offset in the partition table), the value this location must
contain before the change, and the value that has to be stored. As a
safety
measure, the rule is ignored if the previous value is found to be
different.

Partition activation
- - - - - - - - - -
This option is intended for booting systems which determine their boot
partition by examining the active flag in the partition table. The flag
is
enabled with ACTIVATE and disabled with DEACTIVATE. Note that only the
current partition is affected. LILO does not automatically change the
active flags of other partitions and it also allows more than one
partition
to be active at the same time.
Example:
other = /dev/sda4
  label = sco
  change
    partition = /dev/sda4
      activate
    partition = /dev/sda3
      deactivate
Zitatende.


Daraus habe ich folgende lilo.conf gemacht:

# LILO Konfigurations-Datei
# Start LILO global Section
boot=/dev/hda
#compact       # faster, but won't work on all systems.
vga=normal
read-only
prompt
timeout=20
# End LILO global Section
#
other = /dev/hda2
  label = win95
  change
    partition = /dev/hda2
      activate
    partition = /dev/hda1
      deactivate
    partition = /dev/hdb2
      activate
    partition = /dev/hdb1
      deactivate
  table = /dev/hda

#
other = /dev/hda1
  label = win98
  change
    partition = /dev/hda1
      activate
    partition = /dev/hda2
      deactivate
    partition = /dev/hdb1
      activate
    partition = /dev/hdb2
      deactivate
  table = /dev/hda

#
image = /boot/vmlinuz
  root = /dev/hdb4
  label = linux

# END LILO Konfigurations-Datei

Beim Versuch den map-installer lilo obige lilo.conf verabeiten zu lassen

erscheint dann folgende Meldung:
This lilo is compiled without REWRITE_TABLE and doesn´t support the
ACTIVATE option. :-(

-------------------------------------------------------------------------------------------------------------------------------

III. Eine Installation der Sourcen und anschließende Kompilierung und
Installation über
rpm -ba /usr/src/packages/SPECS/lilo.spec
führte ebenfalls zur selben Meldung.

Dies verwundert eigentlich nicht denn wie sich aus obigen Readme ergibt:

"Note that CHANGE sections are only accepted if the build-time option
REWRITE_TABLE  is set."


2) Folglich habe ich als nächtes versucht die build-time option
REWRITE_TABLE zu setzen.

Das Makefile aus lilo-21.tar.gz bietet hierzu folgendes:

Zitat:

# Configuration variables

# They can also be stored in a file /etc/lilo.defines, e.g.
# -DIGNORECASE -DONE_SHOT

# The variables configured in this Makefile are ignored if
# /etc/lilo.defines exists

#   BEEP   Beep after displaying "LILO".
#   IGNORECASE    Image selection is case-insensitive. Passwords are
still
#    case-sensitive.
#   LARGE_EBDA   Load at 8xxxx instead of 9xxxx to leave more room for
the
#    EBDA (Extended BIOS Data Area)
#   NO1STDIAG   Don't show diagnostic on read errors in the first stage
boot
#   NODRAIN   Don't drain keyboard buffer after booting.
#   NOINSTDEF     Don't install a new boot sector if INSTALL is not
specified.
#   ONE_SHOT      Disable the command-line and password timeout if any
key is
#    hit at the boot prompt.
#   READONLY   Don't write to disk while booting, e.g. don't overwrite
the
#    default command line in the map file after reading it.
#   REWRITE_TABLE Enable rewriting the partition table at boot time.
#    loader.
#   USE_TMPDIR   Create temporary devices in $TMPDIR if set
#   VARSETUP   Enables use of variable-size setup segments.
#   XL_SECS=n   Support for extra large (non-standard) floppies.

CONFIG=-DIGNORECASE -DVARSETUP -DREWRITE_TABLE

Zitatende

Leider kann ich die Syntax der Datei lilo.defines nirgendwo finden,
trial and error funzt nicht.

Editieren der config-zeile mit folgenden Varianten brachte auch nichts
neues:

CONFIG=-DIGNORECASE -DVARSETUP -REWRITE_TABLE
==>unrecognized option REWRITE_TABLE

CONFIG=-DIGNORECASE -DVARSETUP
==> This lilo is compiled without REWRITE_TABLE and doesn´t support the
ACTIVATE option.

Ende meiner Ideen.

Es ist durchaus denkbar das die build-time option  REWRITE_TABLE gar
nicht mehr unterstützt wird denn ein Blick
in  die Datei Changes läßt so etwas vermuten.

Im Prinzip ist es mir egal wie, aber das ganz oben angesprochene Problem

sollte doch zu knacken sein oder?

Ich bin für gute Ideen echt dankbar.
Die Dose von der Platte zu putzen ist in jedem Fall eine gute
Idee.....:-)

Vielen Dank in voraus.


MfG

Miguel




Mehr Informationen über die Mailingliste linux-l