From Fedora Project Wiki

< Features‎ | Grub2

Revision as of 13:07, 20 May 2012 by Perplex (talk | contribs)

GRUB2

Sommario

QUESTA E' UNA FASE DAVVERO INIZIALE

Questo è un passaggio molto iniziale, anche se stiamo cercando di riportare i progressi qui piuttosto che solo localmente

Passaggio da grub proprietario a grub2 per gestire il boot di un sistema x86


Sviluppatore

Stato attuale

  • Rilascio mirato: 16
  • Ultimo aggiornamento: 8/10/2011
  • Percentuale di completamento: 85%

http://koji.fedoraproject.org/koji/buildinfo?buildID=242356 Almeno il 10% di queste caratteristiche creano e aggiornano i pacchetti per riflettere le modifiche in http://ftp.gnu.org/gnu/grub/.

Descrizione dettagliata

Al momento Fedora usa sostanzialmente un fork di GRUB 0.9x, per varie ragioni storiche. Sarebbe bello potersi allineare con la versione di sviluppo, anche se si tratta di un progetto interamente nuovo.

GRUB2 è alla versione 1.99 (equivalente alla r.c. 3). La wiki del progetto può essere trovata su http://grub.enbug.org/ (o http://www.gnu.org/software/grub/.)

Vantaggi per Fedora

Potrebbero esserci nuove funzionalità, ma attualmente ci sono meno driver.

      • ---***

Grub (proprietario) non è più supportato e le patch non vengono accettate. GRUB2 ha già raggiunto una versione stabile (14 maggio 2011 GRUB 1.99), che Grub non ha mai conquistato.

Scopo

Le modifiche sono in qualche modo localizzate, ma c'è ancora molto da fare. Lo stato attuale si basa sui test che abbiamo effettuato.

Cosa funziona adesso

  • L'avvio del bios MBR come chainload da grub1 funziona
  • L'avvio da MBR funziona
  • La modalità grafica funziona
    • E' necessario avere freetype2-devel installato e compilato con --enable-mkfont
    • E' necessario anche portare gli unifont da http://unifoundry.com/unifont.html
    • Modulo hack semplice per caricare una immagine di sfondo funzionante. Potrebbe certamente essere reso migliore
  • Creazione di /usr/local/etc/defaults/grub (dovrebbe essere /etc, but prefix=/usr/local) consentita per impostare il seguito
    • timeout predefinito, nome distro predefinito, modalità grafica predefinita
    • alcuni dei quali sono imperfetti e dovrebbero essere auto rilevati (es, analisi di /etc/system-release)

Cose che dovrebbero essere testate/funzionanti

  • Modalità EFI
  • password -- Debian ed Ubuntu funzionano con questo upstream dall'8 luglio
  • supporto ai menu nascosti usati per avvio senza sfarfallii
  • supporto al terminale seriale (con timeout)
  • bootonce
  • Aggiungere sempre la voce di singolo utente non è tanto buono -- impostare GRUB_DISABLE_LINUX_RECOVERY in /etc/default/grub
  • Il chainloading di varie versioni di windows
  • L'auto rilevamento di Windows e l'aggiunta al file di configurazione
  • possiamo saltare l'unifont ?
  • supporto per initrd multipli
    • Inoltre, per come è stato "built", il font non è abbastanza buono
  • Assicurare tutte le altre caratteristiche presenti e prendersi cura delle attuali (se qualcuno volesse farne una lista sarebbe utile)
  • Documentazione, documentazione, documentazione...

Varie cose che bisogna far funzionare

  • anaconda deve essere in grado di creare i nuovi file. Oppure almeno eseguire grub-mkconf
  • grubby da aggiornare. Oppure da sfasare da grub-updconf?


Come Testare

It is very easy to test from Grub Legacy type environment, but we will also need to test from Anaconda/Firstinstall.

From an Installed System with Grub Legacy

This was adapted from http://en.gentoo-wiki.com/wiki/Grub2

The following will automatically generate a GRUB2 configuration file including kernels images within your /boot folder, using the auto configuration scripts in /etc/grub.d, the -o specifices an output file, here the default, /boot/grub2/grub.cfg:

grub2-mkconfig -o /boot/grub2/grub.cfg

Testing With Chain Loading

GRUB2 includes a boot image that's loadable from GRUB Legacy, so you can try it out without wiping out your existing, working MBR. To set up GRUB2 without actually writing to the MBR, run

grub2-install --grub-setup=/bin/true /dev/sda

Writing to the MBR

If that works, you can go on testing to writing to your MBR. Same steps as above, but don't tell grub to run the dummy setup program /bin/true

grub2-install /dev/sda

Congratulations! You've reached the point of no return! If you can't boot now you will need to run a rescue CD

From a DVD with Anaconda

An install DVD can be used to install or repair grub, after setting up a working chroot of your filesystems. From a root console:

  1. make a directory to work in:

mkdir /mnt/sysimage

  1. mount your filesystems (device nodes are examples, be sure to fill in your own!):

mount /dev/sda2 /mnt/sysimage

mount /dev/sda1 /mnt/sysimage/boot

  1. bind mount your system filesystems:

mount --bind /dev /mnt/sysimage/dev

mount --bind /proc /mnt/sysimage/proc

mount --bind /sys /mnt/sysimage/sys

  1. enter your chroot

chroot /mnt/sysimage/

You should now be able to install grub2 to your device without interference from the temporary system.

Test matrix here: https://fedoraproject.org/wiki/User:Pjones/Grub2TestMatrix

User Experience

Ultimately, the main thing a user could change is the different config file (grub.cfg vs grub.conf) and the different syntax in the config file. During the normal boot process, the idea should be that it's not that noticeable

Dependencies

We'll have to be sure to update anaconda for the new config file format and also deal with things like grubby (which updates boot loader configs)

Contingency Plan

Keep using GRUB legacy

Documentation

  • The only docs right now are at the upstream site, but they're slim at best.

Release Notes

Fedora è passata da grub legacy a grub2 da Fedora 16. Grub 2 consente opzioni di configurazione migliori, un supporto migliore per architetture non x86, il supporto allo scripting ed alla localizzazione. Grub 2 possiede un nuovo formato e file di configurazione. Consultare il manuale di Grub per maggiori informazioni.

Commenti e Discussione