Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[gelöst] von LILO auf grub2 umsteigen
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
oliver2104
Apprentice
Apprentice


Joined: 27 Jul 2004
Posts: 214
Location: Wien

PostPosted: Sat Nov 17, 2018 12:00 pm    Post subject: [gelöst] von LILO auf grub2 umsteigen Reply with quote

Hallo,
ich möchte jetzt doch schön langsam von LILO auf Grub2 umsteigen.
meine gut funktionierende lilo.conf sieht so aus:
Code:

boot=/dev/sda
map=/boot/map
vga=normal
lba32
prompt
timeout=50
default=Win7-64

# Win7_64
other=/dev/sda1
label=Win7-64

# Gentoo64
image=/boot/kernel_gentoo64
root=/dev/sdb1
read-only
label=Gentoo64

die Systemvoraussetzungen sollten bei einer Umstellung auf grub2 aber genau so bleiben.
d.h. grub2 nur im MBR und keine neuen (Boot)Partitionen anlegen, kein GPT, kein (U)EFI.
ist das mit grub2 möglich ?


Last edited by oliver2104 on Mon Nov 19, 2018 10:40 am; edited 1 time in total
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Sat Nov 17, 2018 4:16 pm    Post subject: Reply with quote

Quote:
ist das mit grub2 möglich?

Im Prinzip schon, trortzdem lautet die Antwort strenggenommen "jein":
grub2 steht nicht nur im MBR, sondern auch noch irgendwo auf den vorderen unbenutzen Bereichen der Disk. grub-install wird Dir vermutlich eine Fehlermeldung ausgeben, wenn da nicht genügend Platz sein sollte.
Mit grub-mkconfig bekommst Du ein Beispiel für eine grub.cfg für Dein System. Meine Empfehlung ist, diese Deinen Bedürfnissen anzupassen und sie zu benutzen und den ganzen anderen automatischen Schmarrn von grub2 zu vergessen - der ist m.E. nur für Leute gedacht, die sich selbst mit Anleitung und Beispiel keine grub.cfg erstellen können.
Wenn es nicht geht: Rescue-CD bereithalten und mit lilo zurückrollen...
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Sat Nov 17, 2018 4:54 pm    Post subject: Reply with quote

Bei grub2 habe ich sämtliche USE-Flags deaktiviert bis auf 'nls'. Dadurch ist die Anzahl de Pakete, die grub2 benötigt, relativ klein.

In GRUB_PLATFORMS in make.conf kannst Du die Plattformen definieren, für die grub2 gebaut wird. Auch hier gilt: weniger ist mehr! Ich habe: GRUB_PLATFORMS ="efi-64 pc".
Back to top
View user's profile Send private message
Tyrus
Guru
Guru


Joined: 03 Feb 2018
Posts: 300

PostPosted: Sat Nov 17, 2018 10:45 pm    Post subject: Reply with quote

Also das Gentoo-Handbuch schreibt dazu folgendes:
Quote:

What is the BIOS boot partition?

Eine BIOS Bootpartition ist eine sehr kleine Partition (1 bis 2 MB) in welcher Bootloader wie GRUB2 zusätzliche Daten ablegen können, die nicht in den zugeordneten Speicher passen (einige hundert Bytes im Fall des MBR) und die nirgendwo anders platziert werden können.

Solche Partitionen sind nicht immer notwendig, aber in Anbetracht des geringen Platzverbrauchs und der Schwierigkeiten die wir ansonsten mit der Dokumentation einer Fülle unterschiedlicher Partitionierungen hätten, ist es in jedem Fall empfehlenswert sie zu erstellen.

Der Vollständigkeit wegen: Die BIOS Boot Partition ist erforderlich, wenn ein GPT Partitions-Layout mit GRUB2 verwendet wird, oder wenn das MBP Partitions-Layout mit GRUB2 verwendet wird und die erste Partiton vor der 1 MB Marke auf der Festplatte beginnt.


Ausserdem ist es gut zu wissen das man bei MBR-Layout folgende Einschränkungen hat:
Quote:

Although still supported by most motherboard manufacturers partition tables are considered legacy. Unless working with hardware that is pre-2010, it best to partition a disk using a GUID Partition Table. Readers who must proceed with MBR should acknowledge the following information:

Most post-2010 motherboards consider MBR a legacy (supported, but not ideal) boot mode.
Due to using 32-bit identifiers, master boot record partitioning tables cannot handle disks that are greater than 2 TiBs in size.
Unless a extended partition is created, MBR supports a maximum of four partitions.
The MBR setup does not provide any backup-MBR, so if an application or user overwrites the MBR, all partition information is lost.


Achja es lohnt sich /etc/default/grub zu bearbeiten. Das wird von grub-mkconfig ausgewertet. Dann musste danach nicht soviel manuell nachjustieren an /boot/grub/grub.cfg. Im Optimalfall gar nix. Du kannst noch sys-boot/os-prober einsetzen (einfach mergen - wird dann automatisch von grub-mkconfig genutzt). Das findet dann auch den "Starter" für Windows und erstellt einen passenden Eintrag.

Um zu sagen ob du eine Bios Boot Partition brauchst wäre es gut wenn du mal die Ausgabe von
Code:

parted -l

hier postest. Liegt daran wo bei dir /dev/sda1 startet wenn die Aussage aus dem Handbuch korrekt ist.
Back to top
View user's profile Send private message
oliver2104
Apprentice
Apprentice


Joined: 27 Jul 2004
Posts: 214
Location: Wien

PostPosted: Mon Nov 19, 2018 10:39 am    Post subject: Reply with quote

Danke an Alle für die Antworten.
Code:
# grub-install /dev/sda

hat mir grub2 fehlerlos in den MBR installiert.
Eine Herausforderung war aber die Erstellung der /boot/grub/grub.cfg
Aus der Konfigurationsdatei, erzeugt durch grub-mkconfig, wurde ich nicht schlau.
Hab's dann manuell probiert. Das war aber nicht so einfach, da Dokumentationen
zur manuellen Erstellung einer grub.cfg mit Grub2 eher spärlich zu finden sind.
Unter Grub1 war das besser.
meine /boot/grub/grub.cfg sieht jedenfalls so aus:
Code:
# auf welcher Partition ist die Grub2 Konfiguration ( /boot/grub/grub.cfg ) -> /dev/sdb1 = hd1,1
root=hd1,1
timeout=10

menuentry 'Win7-64' {
  set root='(hd0,msdos1)'
  chainloader +1
}

menuentry 'Gentoo64' {
  linux /boot/kernel_gentoo64 root=/dev/sdb1
}

Ist minimalistisch, aber funktioniert.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Thu Nov 22, 2018 7:19 pm    Post subject: Reply with quote

oliver2104 wrote:
zur manuellen Erstellung einer grub.cfg mit Grub2 eher spärlich zu finden sind.

Die Info-Pages beinhalten alle Kommandos und sind m.E. verhältnismäßig klar.

Wenn Du Beispiele für ein luxuriöseres Menu willst (was ich empfehle), kannst Du Dir ja mal grub-cfg-mv anschauen.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum