Lilo auf einer Partition

Warum Debian und/oder eine seiner Spielarten? Was muss ich vorher wissen? Wo geht es nach der Installation weiter?
Antworten
Luise
Beiträge: 171
Registriert: 20.11.2009 17:09:52

Lilo auf einer Partition

Beitrag von Luise » 16.07.2011 20:24:17

Alles, was ich im Netz zu dem Problem finde, ist uralt, und ich weiß
nicht, inwiefern es noch gilt - ganz klar ist es mir auch da nicht
geworden, wie das funktioniert bzw. in meinem Fall funktionieren würde
:? .

Ich habe auf meinem netbook 4 bootfähige Linux-Systeme. Sie sind durch
grub2 im MBR verewigt.

Auf einem der Systeme möchte ich jetzt lilo installieren . Ich will das
dann auf die Partition schreiben lassen, in der lilo installiert ist -
also nicht in den MBR.

Ich denke, ich weiß, wie ich das mache. Mir ist auch klar, dass ich auf
diese Partition dann die boot flag setzen muss.

Was ich aber überhaupt nicht verstehe: Wie sieht das jetzt zuerst bei
dem boot-Vorgang aus, also auf dem 1. Bildschirm nach dem booten? Da ist
dann doch weiterhin nur das Eingangsmenu von grub, also das, was im MBR
steht, oder?

Wie kriege ich dann das den Rechner dazu, über lilo zu booten??

guennid

Re: Lilo auf einer Partition

Beitrag von guennid » 16.07.2011 20:57:35

Luise hat geschrieben:Wie kriege ich dann das den Rechner dazu, über lilo zu booten??
Indem du lilo in den MBR schreibst. Ich denke, du solltest dich für einen von den beiden bootloadern entscheiden. Wozu das Gegurke mit zwei Progs für den Rechnerstart. grub2 kann sicherlich mehr als lilo. Dafür ist letzterer eben einfacher zu warten. Aber zwei? Musst du selbst wissen, ob du das brauchst..

maledora4

Re: Lilo auf einer Partition

Beitrag von maledora4 » 16.07.2011 22:07:30

Hm, wenn er Lilo in den MBR schreibt, dann starten die anderen Drei Linuxe mit Grub2 bestimmt nicht mehr.

@Luise
Du mußt m.E. nach der Installation von Lilo in die Bootpartition anschließend

-den Rechner herunterfahren
-das Linux starten, welches die Grub2 Dateien verwaltet und hier ein

Code: Alles auswählen

update-grub
ausführen. Damit werden Deine Änderungen in die /boot/grub/grub.cfg geschrieben und das Linux mit Lilo sollte nach einem Neustart mit im Bootmenü des Grub2 zur Auswahl stehen. Wenn Du es auswählst gibt Grub2 das weitere an Lilo ab und dieses startet das geänderte System.

Vorher solltest Du aber mit

Code: Alles auswählen

grub-mkconfig
Deine aktuelle Konfiguration anschauen und erreichbar kopieren (ehrlich gesagt, traue ich dem Grub2 immer noch nicht über den Weg :oops: ).

Luise
Beiträge: 171
Registriert: 20.11.2009 17:09:52

Re: Lilo auf einer Partition

Beitrag von Luise » 18.07.2011 02:42:11

Hm ja - danke.

Ich traue grub2 auch nicht - deshalb wollte ich so schrittweise auf lilo wechseln - dazu brauche ich dann aber doch wieder grub. Also werde ich das vergessen.

Ich verstehe das alles einfach nicht.

Sagen wir mal, ich hätte Win im MBR und wollte es da lassen. Die Platte wäre sonst leer.

Dazu würde ich ein Linux System installieren und lilo auf die Linux Partition schreiben.

Wie würde ich dann das Linux-System booten können?

Luise
Beiträge: 171
Registriert: 20.11.2009 17:09:52

Re: Lilo auf einer Partition

Beitrag von Luise » 18.07.2011 02:43:23

guennid hat geschrieben:
Luise hat geschrieben:Wie kriege ich dann das den Rechner dazu, über lilo zu booten??
Indem du lilo in den MBR schreibst. Ich denke, du solltest dich für einen von den beiden bootloadern entscheiden. Wozu das Gegurke mit zwei Progs für den Rechnerstart. grub2 kann sicherlich mehr als lilo. Dafür ist letzterer eben einfacher zu warten. Aber zwei? Musst du selbst wissen, ob du das brauchst..
Ich versuche, etwas zu lernen :-)

guennid

Re: Lilo auf einer Partition

Beitrag von guennid » 18.07.2011 07:26:31

Ich muss da wohl passen, für mich ist dein Vorhaben wohl eine Nummer zu groß. Mehrere Linuxe parallel auf einem Rechner habe ich nie betrieben. Und vielleicht ist lilo dafür nun wirklich ungeeignet, aber das müssen andere beurteilen. Ich bevorzuge lilo, weil es im "normalen" Betrieb (eventuell mit einem parallelen WIN) so schön unkompliziert ist.
Den praktischen Nutzen deines Vorhabens sehe ich nicht so recht, 2.-,3.- und 4.-linux könntest du doch auch in einer virtuellen Maschine betreiben. Aber interessant ist es schon, was du da vorhast. Bin gespannt, wie du es hinkriegst.

Was dein WIN-Beispiel angeht: So war wohl der Übergang zu linux bei den meisten Usern. Und ich habe nie gehört, dass das so machbar gewesen wäre. Der Weg war eigentlich immer: WIN-Bootloader im MBR mit lilo überschreiben und win von lilo aus booten (wobei das WIN in der Regel automatisch korrekt in der lilo.conf eingetragen wurde).

Grüße, Günther

[edit] Hier habe ich etwas gefunden, was evtl. nutzbar wäre. In der Tat steinalt, aber ich sehe nicht, warum das nicht mehr anwendbar sein sollte.
siehe auch: http://debianforum.de/forum/viewtopic.p ... 39&p=92619.
Möglicherweise reduziert sich das Problem im Prinzip darauf, dass du root=??? aus dem allgemeinen Abschnitt der lilo.conf nehmen und angepasst mehrfach in die für die speziellen linuxe geltenden Abschnitte eintragen musst. Aber ich vermute, um ein lilo im MBR der Platte wirst du nicht herumkommen.
Die UUIDs würde ich erst mal nicht verwenden, sondern mit sda1, sda2, etc arbeiten.

Benutzeravatar
KBDCALLS
Moderator
Beiträge: 22455
Registriert: 24.12.2003 21:26:55
Lizenz eigener Beiträge: MIT Lizenz
Wohnort: Dortmund
Kontaktdaten:

Re: Lilo auf einer Partition

Beitrag von KBDCALLS » 18.07.2011 11:22:52

Lilo in die Partition und vom Grub Grub aus startet man ihn per chainloading. Dann kommt sich nix ins Gehege.
Was haben Windows und ein Uboot gemeinsam?
Kaum macht man ein Fenster auf, gehen die Probleme los.

EDV ist die Abkürzung für: Ende der Vernunft

Bevor du einen Beitrag postest:
  • Kennst du unsere Verhaltensregeln
  • Lange Codezeilen/Logs gehören nach NoPaste, in Deinen Beitrag dann der passende Link dazu.

guennid

Re: Lilo auf einer Partition

Beitrag von guennid » 18.07.2011 11:30:40

@KBDCALLS

Ich glaube, langfristig möchte Luise sich von grub trennen. :wink:

Grüße, Günther

Luise
Beiträge: 171
Registriert: 20.11.2009 17:09:52

Re: Lilo auf einer Partition

Beitrag von Luise » 18.07.2011 13:52:50

guennid hat geschrieben:@KBDCALLS

Ich glaube, langfristig möchte Luise sich von grub trennen. :wink:

Grüße, Günther
Genau.

Ich erkenne durchaus (zumindest teilweise) die Vorzüge von grub2 - und erkenne sie auch an.

Aber so lange das Editieren so umständlich ist und auch nur (in meinem Fall) eher zufällig irgendwie so weit erfolgreich war, dass ich damit arbeiten konnte - die /boot/grub/grub.cfg aber völlig undurchsichtig geworden ist, so dass ich keine Ahnung habe, was da eigentlich los ist --- so lange will ich eher kurzfristig! von grub weg.

Ich habe einfach nur Sorge, dass ich evtl. nach einem Wechsel nicht mehr booten kann, weil ich irgendwas falsch gemacht habe und dann auch nicht weiß, wie ich das von Knoppix oder einer anderen live-CD aus reparieren soll/kann.

guennid

Re: Lilo auf einer Partition

Beitrag von guennid » 18.07.2011 13:58:45

Das sollte mit jeder live-cd+chroot leistbar sein. Ich denke, du kannst dir auch den jetzigen MBR via dd sichern und notfalls zurückschreiben. Such mal unter mbr sichern/wiederherstellen. dd braucht noch ein oder zwei Parameter, die ich jetzt nicht im Kopf habe.

Grüße, Günther

pferdefreund
Beiträge: 3800
Registriert: 26.02.2009 14:35:56

Re: Lilo auf einer Partition

Beitrag von pferdefreund » 19.07.2011 19:25:24

Ich starte mit Lilo 2 Linuxe und ein Win98 - und habe sogar einen lilo im MBR
und einen in einer Linuxpartition. Klappt alles.
Das eine LInux wird dann gestartet wie win auch über chainloader.
hab dan 2 Lilo-Menues und das wichtigste -es funktioniert und ist meiner
Meinung nach einfacher einzurichten wie grub - aber das ist Geschmackssache.
Lilo im MBR

Code: Alles auswählen


# LILO configuration file
# Start LILO global Section
# If you want to prevent console users to boot with init=/bin/bash,
#  restrict usage of boot params by setting a passwd and using the option
#  restricted.
#password=bootpwd
#restricted
append="hdc=ide-scsi"
boot=/dev/hda
#compact       # faster, but won't work on all systems.
lba32
vga=normal
read-only
prompt
timeout=300
# End LILO global Section
#
# test 2.4.32
image = /boot/vmlinuz-2.4.36.7
  root = /dev/hdb5
  label = Linux-Prod-neu
# test 2.4.32
image = /boot/testkernel
  root = /dev/hdb5
  label = Linux-Produktiv
#
other = /dev/hdb3
  label = neues
  table = /dev/hdb
# der rest
other = /dev/hda1
  label = windows
  table = /dev/hda
# der aktuelle
image=/boot/vmlinuz-2.6.88
        root=/dev/hdb3
	label=linux88
	read-only
	append="apm=power_off hdc=ide-scsi"

Lilo in Partition

Code: Alles auswählen

# /etc/lilo.conf - See: `lilo(8)' and `lilo.conf(5)',
# ---------------       `install-mbr(8)', `/usr/share/doc/lilo/',
#                       and `/usr/share/doc/mbr/'.

# +---------------------------------------------------------------+
# |                        !! Reminder !!                         |
# |                                                               |
# | Don't forget to run `lilo' after you make changes to this     |
# | conffile, `/boot/bootmess.txt' (if you have created it), or   |
# | install a new kernel.  The computer will most likely fail to  |
# | boot if a kernel-image post-install script or you don't       |
# | remember to run `lilo'.                                       |
# |                                                               |
# +---------------------------------------------------------------+

# Specifies the boot device.  This is where Lilo installs its boot
# block.  It can be either a partition, or the raw device, in which
# case it installs in the MBR, and will overwrite the current MBR.
#
boot=/dev/hdb3
read-only
# Specifies the device that should be mounted as root. (`/')
#
root=/dev/hdb3

# This option may be needed for some software RAID installs.
#
# raid-extra-boot=mbr-only

# Enable map compaction:
# Tries to merge read requests for adjacent sectors into a single
# read request. This drastically reduces load time and keeps the
# map smaller.  Using `compact' is especially recommended when
# booting from a floppy disk.  It is disabled here by default
# because it doesn't always work.
#
# compact

# Installs the specified file as the new boot sector
# You have the choice between: text, bmp, and menu
# Look in lilo.conf(5) manpage for details
#
install=menu

# Specifies the location of the map file
#
map=/boot/map

# You can set a password here, and uncomment the `restricted' lines
# in the image definitions below to make it so that a password must
# be typed to boot anything but a default configuration.  If a
# command line is given, other than one specified by an `append'
# statement in `lilo.conf', the password will be required, but a
# standard default boot will not require one.
#
# This will, for instance, prevent anyone with access to the
# console from booting with something like `Linux init=/bin/sh',
# and thus becoming `root' without proper authorization.
#
# Note that if you really need this type of security, you will
# likely also want to use `install-mbr' to reconfigure the MBR
# program, as well as set up your BIOS to disallow booting from
# removable disk or CD-ROM, then put a password on getting into the
# BIOS configuration as well.  Please RTFM `install-mbr(8)'.
#
# password=tatercounter2000

# Specifies the number of deciseconds (0.1 seconds) LILO should
# wait before booting the first image.
#
delay=60
prompt

# You can put a customized boot message up if you like.  If you use
# `prompt', and this computer may need to reboot unattended, you
# must specify a `timeout', or it will sit there forever waiting
# for a keypress.  `single-key' goes with the `alias' lines in the
# `image' configurations below.  eg: You can press `1' to boot
# `Linux', `2' to boot `LinuxOLD', if you uncomment the `alias'.
#
# message=/boot/bootmess.txt
#	prompt
#	delay=100
#	timeout=100

# Specifies the VGA text mode at boot time. (normal, extended, ask, <mode>)
#
# vga=ask
# vga=9
#
# Kernel command line options that apply to all installed images go
# here.  See: The `boot-prompt-HOWTO' and `kernel-parameters.txt' in
# the Linux kernel `Documentation' directory.
#
# append=""
# If you used a serial console to install Debian, this option should be
# enabled by default.
# serial=
#
# Boot up Linux by default.
#
default=linux26-38
# der aktuelle
image=/boot/vmlinuz-2.6.36
	label=linux2636
	read-only
	append="apm=power_off"
image=/boot/vmlinuz-2.6.38.3
	label=linux26-38
	read-only
	append="apm=power_off"
	
# If you have another OS on this machine to boot, you can uncomment the
# following lines, changing the device name on the `other' line to
# where your other OS' partition is.
#
other=/dev/hda1
	label=Windows9xMe
#	restricted
#	alias=2



maledora4

Re: Lilo auf einer Partition

Beitrag von maledora4 » 19.07.2011 20:58:12

pferdefreund hat geschrieben:...es funktioniert und ist meiner
Meinung nach einfacher einzurichten wie grub...
Bitte darauf achten, daß hier @Luise mit den Eigenheiten von Grub2 kämpft und nicht mit Grub(Legacy).

Das sind zwei Paar verschiedene Schuhe!
Eben mit diesem Grub-Legacy läßt sich das Problem genauso einfach lösen, wie mit Lilo (könnte ich sagen :roll: )

Luise
Beiträge: 171
Registriert: 20.11.2009 17:09:52

Re: Lilo auf einer Partition

Beitrag von Luise » 01.08.2011 14:28:31

Also ich wollte squeeze sowieso noch einmal neu installieren - mir fällt die englische Version leichter und auf squeeze war noch nicht viel drauf außer dem, was installiert worden war.

Das habe ich gestern gemacht und bei der Installation lilo als bl ausgewählt und in den mbr schreiben lassen.

So weit, so bestens :-)

Dann wollte ich lilo weiter konfigurieren und habe - da meine Kenntnisse aus früheren lilo Konfiguratiionen verblasst und evtl. auch veraltet sind - im Netz nach Insturktionen geschaut und auch gleich gefunden - aber danach war ich mal wieder völlig verwirrt.

Unter http://wiki.debian.org/LILO fand ich (auszugsweise)

Other Installation Information *
Any partition that has a Linux Kernel that you want to boot must
be mounted
so that the installer will be able to map the location of
the kernel.
Dann

Code: Alles auswählen

Configuration

Or, how to build a LILO configuration file.

These control individual operating systems options

These control individual operating systems options
[..]
Linux
   image=/mnt/hda2/vmlinuz   # kernel image location (mount dependent)
   initrd=/mnt/hda2/initrd.img  # initrd image location (mount dependent)
   root=/dev/hda2            # root for this kernel
   label=linux               # menu entry for this OS
   read-only                 # initially mount filesystems read-only

[..]
Und dann eine Beispiel-Konfiguration:

Code: Alles auswählen

Example Configuration File

lilo.conf:

   verbose=2                 # increase information displayed when lilo runs

   #*******''' Installation Target Options '''******#

   boot=/dev/hda             # the target drive or partition
   map=[0]/mnt/hda3/boot/map    # sector address map file to be created by lilo ($
   lba32                     # allows addressing the disk above the 1024th cyl$

   # For floppy installation:
   # you must mount floppy: mount /dev/fd0 /floppy
   # boot=/dev/fd0
   # map=/floppy/boot/map

   #********''' Menu Presentation Options '''*******#

   install=text              # selects menu presentation mode
   prompt                    # show a prompt
   timeout=150               # timeout in tenths of a second (150 = 15 sec)
#***************''' OS Options '''***************#

   # generic 1
   other=/dev/hda6           # boot from specified partition boot record
   label=1                   # menu entry for this OS

   # generic 2
   other=/dev/hda11          # boot from specified partition boot record
   label=2                   # menu entry for this OS

   # kernel 1
   ]image=/mnt/hda6/vmlinuz   # kernel image location (mount dependent)
   initrd=/mnt/hda6/initrd.img   # initrd image location (mount dependent)
   root=/dev/hda6            # root for this kernel
   label=k1                  # menu entry for this OS
   read-only                 # initially mount filesystems read-only
   #   optional              # ignore this option if it does not exist
# kernel 2
   ]image=/mnt/hda11/vmlinu   # kernel image location (mount dependent)
   initrd=/mnt/hda11/initrd.img # initrd image location (mount dependent)
   root=/dev/hda11           # root for this kernel
   label=k2                  # menu entry for this OS
   read-only                 # initially mount filesystems read-only
   #   optional              # ignore this option if it does not exist

   # Boot from Floppy
   other=/dev/fd0
   label=fd
   unsafe                    # don't do any checks to see if it is bootable
Ich verstehe einfach nicht, was das mit dem /mnt in der config auf sich hat:? :? :?

Was soll wann wo gemountet sein? Wieso?? Beim Hochfahren ist doch nix gemountet.

Da der Artikel aus dem Debian Wiki ist, will ich ihn auch nicht einfach ignorieren.

Kann ich immer noch die config so erstellen, wie Pferdefuß als Beispiel gegeben hat?

Ich will nicht experimentieren, weil ich (noch) kein bu des mbr habe und hier auch kein floppy Laufwerk. Wenn ich also was falsch mache, komme ich evtl. auch nicht mehr nach dem neuen squeeze.

Mit "man lilo komme" ich nicht weiter und die docus in /usr/... bringen auch nichts :(

Antworten