Σελίδα 1 από 10

Boot loader GRUB 2, υπερ-πλήρης οδηγός!

ΔημοσίευσηΔημοσιεύτηκε: 29 Σεπ 2009, 20:43
από ftso
##### GRUB 2 #####



:arrow: ΚΕΦΑΛΑΙΟ 1

Εισαγωγή
-Ιστορία
-Διαφορές grub legacy (1) με grub 2
-Grub 2 εντολές

Εν συντομία, ο [boot loader] είναι το πρώτο πρόγραμμα λογισμικού όπου εκτελείται όταν ξεκινάει ένας υπολογιστής.
Είναι υπεύθυνος για τη φόρτωση και τη μεταβίβαση του ελέγχου για το λογισμικό του πυρήνα, του λειτουργικού συστήματος (όπως η Hurd ή το Linux). Ο πυρήνας, με τη σειρά του, προετοιμάζει το υπόλοιπο του λειτουργικού συστήματος (π.χ. GNU)." (gnu.org)

Ο πρωτότυπος GRUB (Grand Unified Bootloader) αναπτύχθηκε από τον Erich Stefan Boleyn, από τον οποίο προήλθε ο GRUB που γνωρίζουμε οι περισσότεροι, η έκδοση GRUB 0.9x, και ότι αναφέρεται τώρα ως GRUB Legacy (ή ακόμη και ο GRUB 1 από ορισμένους συγγραφείς). Ο GRUB 2 αντικαθιστά τον GRUB Legacy. (Ο GRUB 2 είναι στην πραγματικότητα το τελικό αποτέλεσμα των εκδόσεων GRUB 1.xx? π.χ., 1,96, 1,97, ...)

Για την ιστορία του GRUB κοιτάξτε και μερικά χρήσιμα links ,
http://www.gnu.org/software/grub/

Ο GRUB 2 είναι καθαρότερος, πιο αποτελεσματικός, ισχυρός και πιο κομψός, ποικιλοτρόπως είναι πιο απλός στη χρήση από τον GRUB Legacy.
GRUB 2: http://www.gnu.org/software/grub/grub-2.en.html
mailing list για την ανάπτυξη,
GRUB-devel: http://lists.gnu.org/mailman/listinfo/grub-devel
Και το Wiki: http://grub.enbug.org/

Ο GRUB 2 είναι ο προεπιλεγμένος bootloader στο 9,10
https: / / lists.ubuntu.com/archives/ubuntu-devel-announce/2009-June/000573.html


Οι διαφορές μεταξύ του GRUB Legacy και του GRUB 2

Από την πλευρά του χρήστη, η μεγαλύτερη διαφορά μεταξύ των δύο εκδόσεων του GRUB αφορά το αρχείο ρυθμίσεων του boot menu .
GRUB 2: / boot / grub / grub.cfg
GRUB Legacy: / boot / grub / menu.lst

Το αρχείο ρυθμίσεων χρησιμοποιείται για να παράγει το boot menu οπου θα δείτε κατά την εκκίνηση.
Στον GRUB Legacy, μπορείτε να επεξεργαστείτε το menu.lst άμεσα και με οποιοδήποτε τρόπο θέλετε.
Στον GRUB 2, δεν θα πρέπει να επεξεργαστείτε το grub.cfg άμεσα.
Αντί για αυτό, επεξεργαστείτε το αρχείο / etc / default / grub (το οποίο περιέχει κάποιες προεπιλεγμένες ρυθμίσεις).
Aυτό το αρχείο δεδομένων τροφοδοτεί script στο φάκελο / etc / grub.d,
και μπορείτε να επεξεργαστείτε τα script (αρχεία κειμένου) στο φάκελο / etc / grub.d,
Αυτά τα script χρησιμοποιήθηκαν για τη δημιουργία του αρχείου διαμόρφωσης / boot / grub / grub.cfg.
Όταν χρειάζεστε ένα καινούριο grub.cfg, κάντε απλά sudo update-grub ή sudo grub-mkconfig.


Είναι εννοιολογικά απλό στο GRUB 2 :
Μπορείτε να επεξεργαστείτε το αρχείο / etc / default / grub και μπορείτε να επεξεργαστείτε το script στο / etc / grub.d, μετά, εκτελέστε την εντολή sudo update-grub (ή sudo grub-mkconfig),
και το αρχείο grub.cfg θα δημιουργείται αυτόματα .

Το αρχείο ρυθμίσεων του GRUB 2 grub.cfg φαίνεται διαφορετικό από το menu.lst GRUB Legacy.
Για παράδειγμα, στον GRUB legacy, χρησιμοποιείτε
default 0
timeout 5
Στον GRUB 2, default και timeout είναι μεταβλητές, και είναι
set default = 0
set timeout = 5

Η καταχώρηση εκκίνησης GRUB στο menu.lst μπορεί να μοιάζει κάπως έτσι:
Κώδικας: Επιλογή όλων
title     Ubuntu 8.04.3 LTS, kernel 2.6.24-24-generic
    root   (hd1,2)
    kernel   /boot/vmlinuz-2.6.24-24-generic root=UUID=0df17bc5-0056-4ef7-bfca-251194b6eb44 ro quiet splash
    initrd   /boot/initrd.img-2.6.24-24-generic




Στον GRUB 2 grub.cfg, θα μοιάζει κάπως έτσι:
Κώδικας: Επιλογή όλων
  ### BEGIN /etc/grub.d/10_Linux ###
    menuentry "Ubuntu 8.04.3 LTS, kernel 2.6.24-24-generic" {
    set root=(hd1,2)
    linux  /boot/vmlinuz-2.6.24-24-generic root=UUID=0df17bc5-0056-4ef7-bfca-251194b6eb44 ro quiet splash
    initrd   /boot/initrd.img-2.6.24-24-generic
    }
    ### END /etc/grub.d/10_Linux ###




Σημειώστε πως η γραμμή τίτλος άλλαξε στο GRUB 2: Χρήση menuentry αντί αυτού, να θέσει το κείμενο σε εισαγωγικά, και να αρχίσει η εγγραφή εκκίνησης με ένα αριστερό στήριγμα { τελειώνει με ένα σωστό ζεύγος }.
Αντί του πυρήνα, η λέξη Linux χρησιμοποιείται. το Initrd είναι το ίδιο.
Αντί του root =, στον GRUB 2 είναι set root = (στον GRUB 2, ο root δεν είναι μια σταθερή αξία, είναι μια μεταβλητή).

sudo grub δεν έχετε ένα GRUB 2 κέλυφος στην Κονσόλα
Στον GRUB Legacy, ο χρήστης μπορεί να ανοίξει το κέλυφος του GRUB, πληκτρολογώντας sudo grub, και μετά χρησιμοποιήστε το για να εγκαταστήσετε/επανεγκαταστήσετε τον GRUB (root-setup-quit) για το Master Boot Record ή σε ένα partition boot sector.
Στον GRUB 2, δεν υπάρχει τέτοια επιλογή. Αντί αυτού, η βασική εντολή στην Κονσόλα (BASH) ειναι η εντολή grub-install
Στην Κονσόλα, ως root, θα χρησιμοποιήσετε το sudo grub-install για να εγκαταστήσετε/επανεγκαταστήσετε τον GRUB 2 για το Master Boot Record ή σε ένα partition boot sector.


Τα ονόματα των συσκευών έχουν αλλάξει . Στον GRUB Legacy, η αρίθμηση των δύο σκληρών δίσκων και τα διαμερίσματα ξεκινούν από το μηδέν. (hd0, 0) ο πρώτος σκληρός δίσκος είναι (hd0), το πρώτο διαμέρισμα (partition zero).
[β] Στον GRUB 2, η αρίθμηση των σκληρών δίσκων επίσης ξεκινάει από το μηδέν [/ b]: hd0 είναι ο πρώτος σκληρός δίσκος.
Αλλά η αρίθμηση κατάτμηση ξεκινάει από το 1 : (hd0, 1) είναι ο πρώτος σκληρός δίσκος, το πρώτο διαμέρισμα (partition one).

Στον GRUB Legacy, χρησιμοποιούμε την εντολή Αναζήτησης, π.χ., grub> find / boot / grub / menu.lst.
Στον GRUB 2, η εντολή αναζήτησης αντικαθιστάτε με την εντολή
: grub>search /boot/grub/grub.cfg.

Στον GRUB Legacy, η εντολή geometry (at the grub> prompt) είναι πολύ χρήσιμο για την λιστα συσκευων ως GRUB που βλέπει ο υπολογιστή σας.
Δεν χρησιμοποιείται στον GRUB 2.
Αντί αυτού την εντολή λίστας ls (στο grub> prompt) αντικαθιστά την εντολή γεωμετρία .

Ο GRUB Legacy χρησιμοποιεί στάδια: stage_1, stage_1.5, και stage_2.
Αυτα αντικαθίστανται στον GRUB 2 από boot.img (ένα 512-byte αρχείο που αντιστοιχεί στο stage_1 και είναι εγκατεστημένο σε ένα MBR), δεν υπάρχει stage_1.5 στον GRUB 2, και το core.img
στον GRUB 2 παίρνει τη θέση του stage_2 (ή, ίσως, τόσο το stage 1.5 και stage_2).
Λεπτομέρειες: Βλέπε τμήμα 4 του υποτμήματος "grub-install: Μια βασική εντολή."



GRUB 2 Εντολές - σε σύγκριση με τον GRUB Legacy
Πίνακας Σύγκρισης:
http://grub.enbug.org/CommandList
Χρήσιμα στοιχεία κλειδιά για την σημείωση:

GRUB Legacy <-> GRUB 2


find έχει αντικατασταθεί με το search
geometry έχει φύγει και έχει αντικατασταθεί από ls
kernel (in menu.lst) αντικαθίσταται από το linux (και άλλους όρους για διαφορετικούς OSs)
title (in menu.lst) αντικαθίσταται από το menuentry (in grub.cfg)
root εξακολουθεί να χρησιμοποιείται, αλλά τώρα είναι a variable
setup έχει φύγει, λειτουργεί ως grub-install
quit is gone (halt is sometimes used)
map αντικαθίσταται από το drivemap
device αντικαθίσταται από το loopback (κάνει μια κίνηση από ένα αρχείο)
set είναι ο όρος GRUB 2 που χρησιμοποιείται για να ορίσετε μια μεταβλητή




:arrow: ΚΕΦΑΛΑΙΟ 2
(Σημαντικά στοιχεία για το μενού εκκίνησης, grub.cfg)

Σύντομη εκδοχή -- Γενικά -- Λεπτομέρειες
/etc/grub/default --> /etc/grub.d --> /boot/grub/menu.lst
Κανόνες για την τροποποίηση του grub.cfg, /etc/default/grub, και των αρχείων script στο /etc/grub.d
Η αρίθμηση των συσκευών (hdx,y) έχει αλλάξει στο GRUB 2:
Τα διαμερίσματα y ξεκινούν την αρίθμηση από το 1, ενώ οι σκληροί δίσκοι από το μηδέν.
Η ονομασία Λίνουξ των συσκευών παραμένει η ίδια: sdxn, x = a, b, c, ... n = 1, 2, 3, ...


Σύντομη εκδοχή:
/etc/grub/default --> /etc/grub.d --> /boot/grub/menu.lst
Κανόνες:
-- Μην τροποποιείτε το /boot/grub/grub/cfg.
-- Μπορείτε να τροποποιήσετε (ως root) το /etc/default/grub
(χρόνος αναμονής, προεπιλεγμένο ΛΣ, επιλογές πυρήνα, ανάλυση του μενού εκκίνησης)
-- Μπορείτε να τροποποιήσετε (ως root)τα script στο /etc/grub.d.
-- Μαζί, το /etc/default/grub και τα script στο /etc/grub.d δημιουργούν το /boot/grub/grub.cfg.
-- Για να δημιουργήστε ένα script, ξεκινήστε με ένα αρχείο κειμένου ως root: kdesudo kate
-- Για να μετατρέψετε το όνομα αρχείου σε εκτελέσιμο: sudo chmod 744 /etc/grub.d/όνομα αρχείου
ή sudo chmod +x /etc/grub.d/όνομα αρχείου
-- Για να αφαιρέσετε την άδεια εκτέλεσης από το όνομα αρχείου: sudo chmod -x /etc/grub.d/όνομα αρχείου
-- Για να ανοίξετε τον Konqueror (Dolphin) ως root: kdesudo konqueror
-- Δημιουργήστε ένα καινούριο αρχείο παραμετροποίησης /boot/grub/grub.cfg μετά την τροποποίηση του /etc/default/grub και την τροποποίηση, δημιουργία ή διαγραφή script στο /etc/grub.d, ως εξής:
sudo update-grub ή sudo grub-mkconfig

Λίστα ελέγχου, ελέξτε αυτό: grub-mkconfig ... χρησιμοποιείται αντί για update-grub στην Karmic Koala?
sudo grub-mkconfig ?

Σημαντικό: Η αρίθμηση συσκευών έχει αλλάξει στο GRUB 2
Στον GRUB 2 (όπως και στο παλιό GRUB), οι η αρίθμηση των σκληρών δίσκων ξεκινάει από το 0: hd0 είναι ο πρώτος σκληρός δίσκος. Στον GRUB 2 (αντίθετα με τον παλιό GRUB), η αρίθμηση των διαμερισμάτων ξεκινάει από το 1: (hd0,1) είναι το πρώτο διαμέρισμα στον πρώτο σκληρό δίσκο. i (hd0,2) είναι το δεύτερο διαμέρισμα στον πρώτο. (hd1,0) είναι το πρώτο διαμέρισμα στον δεύτερο σκληρό δίσκο.

Η ονομασία των συσκευών Linux παραμένει ίδια όπως και στο παλιό GRUB.
sda είναι ο πρώτος σκληρός δίσκος. sdb είναι ο δεύτερος σκληρός δίσκος. sdc είναι ο τρίτος κ.ο.κ
sda1 είναι το πρώτο διαμέρισμα του πρώτου σκληρού δίσκου. sda2 είναι το δεύτερο διαμέρισμα του πρώτου σκληρού δίσκου κ.ο.κ.


Λεπτομέρειες
Το αρχείο παραμετροποίησης ονομάζεται /boot/grub/grub.cfg κι αυτό δημιουργεί το μενού εκκίνησης που βλέπετε στην οθόνη σας όταν εκκινήτε τον Η/Υ (κι έτσι το /boot/grub/grub.cfg μπορεί να ονομαστεί και αρχείο παραμετροποίησης του μενού εκκίνησης). ΔΕΝ πρέπει να το τροποποιήσετε (είναι μόνο για ανάγνωση). Δημιουργείται από έναν φάκελο με script που ονομάζεται /etc/grub.d. Ένα άλλο σημαντικό αρχείο είναι το /etc/grub/default κι αυτό τροφοδοτεί με προκαθορισμένα δεδομένα τα script στο /etc/grub.d. Μπορείτε να επεξεργαστείτε το /etc/grub/default (ως root). Μπορείτε επίσης να επεξεργαστείτε τα script στο /etc/grub.d (ως root). Εάν δημιουργήσετε ένα καινούριο αρχείο στο /etc/grub.d, θα πρέπει να το κάνετε εκτελέσιμο εφόσον θέλετε να συμπεριλάβετε την εγγραφή στο αρχείο παραμετροποίησης grub.cfg. Εάν δεν θέλετε να εκτελείται κάποιο script (κι έτσι να απομακρύνετε την εγγραφή από το grub.cfg), πρέπει να αφαιρέσετε το εκτελέσιμο μέρος (δηλ. Να απομακρύνετε την άδεια εκτελέσιμου).

>>> Σημαντική υπενθύμιση:
Δημιουργήστε ένα νέο grub.cfg μετά από οποιαδήποτε αλλαγή στο /etc/default/grub ή στο /etc/grub.d, πληκτρολογώντας:
sudo update-grub ή grub-mkconfig


Για ειδικούς: Επεξεργασία του grub.cfg
Το αρχείο είναι μόνον για ανάγνωση έτσι θα πρέπει να αλλάξετε τα δικαιώματα ώστε να συμπεριλαμβάνουν και την εγγραφή:
Κώδικας: Επιλογή όλων
sudo chmod +w  /boot/grub/grub.cfg

Μετά κάντε τις αλλαγές σας ως root και αποθηκεύεστε το αρχείο. Όταν εκτελεστεί το update-grub το αρχείο επιστρέφει σε κατάσταση μόνον για ανάγνωση ΚΑΙ οι αλλαγές σας μπορεί να διαγραφούν (κι για αυτό να χαθούν).
Προαιρετικά: Μετά την επεξεργασία, επαναφέρεται τα δικαιώματα ώστε να μην επιτρέπεται η εγγραφή:
Κώδικας: Επιλογή όλων
sudo chmod -w  /boot/grub/grub.cfg

ή
Κώδικας: Επιλογή όλων
sudo chmod 444 /boot/grub/grub.cfg




Το αρχείο των εξ ορισμού ρυθμίσεων /etc/grub/default
Αυτό το αρχείο τροφοδοτεί τα script στο /etc/grub.d με δεδομένα. Περιέχει το εξ ορισμού λειτουργικό σύστημα, τον χρόνο αναμονής, τις επιλογές πυρήνα, την ανάλυση οθόνης του γραφικού μενού εκκίνησης και άλλες προεπιλεγμένες ρυθμίσεις. Μπορείτε να επεξεργαστείτε αυτό το αρχείο με δικαιώματα διαχειριστή.

Ο φάκελος με τα script /etc/grub.d
Τα script αυτά δημιουργούν το /boot/grub/grub.cfg όταν εκτελείται η εντολή update-grub (ή η εντολή grub-mkconfig) (ως root). Η σειρά των εγγραφών στο grub.cfg αντιστοιχεί στην σειρά των αρχείων στο /etc/grub.d, αρχίζοντας με 00_header, μετά 01_όνομα script, κοκ., συμπεριλαμβάνοντας όλα τα αρχεία που το όνομά τους ξεκινάει από NN_, όπου NN είναι ένας διψήφιος αριθμός και _ είναι η υπογράμμιση (Πλήκτρα Shift+μείον). Στην συνέχεια υπάρχουν script το όνομα των οποίων ξεκινάει από ένα γράμμα (π.χ., a_άλλο ένα script).

Μπορείτε να επεξεργαστείτε τα αρχεία script (ως root) ή να δημιουργήσετε καινούρια. Για να δημιουργήσετε μια νέα εγγραφή στο grub.cfg,δημιουργείτε απλά ένα νέο αρχείο script: ένα αρχείο κειμένου το οποίο θα κάνετε εκτελέσιμο (όπως ένα πρόγραμμα). Για να αφαιρέσετε μια εγγραφή από το grub.cfg, αφαιρέστε την άδεια εκτελέσιμου από το αντίστοιχο αρχείο script στο /etc/grub.d. (Εάν η εγγραφή αντιστοιχεί σ' ένα δικό σας script, μπορείτε επίσης να το διαγράψετε από το /etc/grub.d).
Βλ. ΚΕΦΑΛΑΙΟ 4 Ειδικά θέματα – Δημιουργία δικών σας εγγραφών εκκίνησης.

Τροποποίηση των αρχείων script στο /etc/grub.d:
Εκτελέστε την εργασία σας ως root.
Για να κάνετε το αρχείο /etc/grub.d/όνομα αρχείου εκτελέσιμο:
Κώδικας: Επιλογή όλων
sudo chmod 744 /etc/grub.d/<όνομα αρχείου>

Για να απομακρύνετε το εκτελέσιμο μέρος από το αρχείο όνομα αρχείου:
Κώδικας: Επιλογή όλων
sudo chmod -x /etc/grub.d/<όνομα αρχείου>

Όταν τελειώσετε εκτελέστε
Κώδικας: Επιλογή όλων
sudo update-grub ή sudo grub-mkconfig

για να δημιουργήσετε ένα νέο αρχείο παραμετροποίησης του μενού εκκίνησης /boot/grub/grub.cfg.
GUI: Πως να ορίσετε άδειες σε:
-KDE:
Ανοίξτε τον Konqueror ή τον Dolphin ως root (π.χ., kdesudo konqueror).
Ανοίξτε το αρχείο.
Δεξί κλικ > Ιδιότητες > Άδειες, προχωρημένες άδειες
-Gnome:
Ανοίξτε τον nautilus ως root (π.χ., gksudo nautilus).
Ανοίξτε το αρχείο.
Δεξί κλικ > Ιδιότητες > Άδειες, προχωρημένες άδειες



Συμβουλή: Για να ανοίξτε ένα αρχείο στο /etc/grub.d (ως root)
Τα αρχεία στο /etc/grub.d είναι script. Έτσι, ως root, εάν κάνετε κλικ σ' ένα απ' αυτά, αυτό θα θελήσει να εκτελεστεί ή να τρέξει σαν πρόγραμμα. Αντί γι' αυτό, για να ανοίξετε ένα script για τροποποίηση/προβολή, κάντε δεξί κλικ στο αρχείο script κι άνοιγμα με Kate ή Kwrite. Αυτό ανοίγει το αρχείο ως αρχείο κειμένου. Τώρα μπορείτε να το διαβάσετε ή να το τροποποιήσετε.
Λεπτομέρειες:
-GUI, εργασία ως root: Ανοίξτε τον Konqueror (ή τον nautilus, ή τον Dolphin) ως root και εκτελέστε:
kdesudo dolphin ή gksudo nautilus
-CLI, εργασία ως root (kde, gnome και cli αντίστοιχα):
Κώδικας: Επιλογή όλων
kdesudo kate /etc/grub.d/<όνομα_σκριπτ>

ή
Κώδικας: Επιλογή όλων
gksudo gedit /etc/grub.d/<όνομα_σκριπτ>

ή
Κώδικας: Επιλογή όλων
sudo nano /etc/grub.d/<όνομα_σκριπτ>




Σύντομη αναφορά
Τα (πρότυπα) αρχεία στο /etc/grub.d (το καθένα είναι ένα script) είναι:
00_header
05_debian_theme: Ορίζει φόντο, χρώματα κειμένου, θέματα
10_hurd Εντοπίζει πυρήνες Hurd
10_linux Εντοπίζει πυρήνες Linux βάσει των αποτελεσμάτων της εντολής lsb_release.
20_memtest86+: Εάν υπάρχει το αρχείο /boot/memtest86+.bin, συμπεριλαμβάνεται στο μενού εκκίνησης.
30_os-prober: Αναζητά λειτουργικά Λίνουξ και μη σε όλα τα διαμερίσματα και τα συμπεριλαμβάνει στο μενού εκκίνησης.
40_custom: Ένα πρότυπο για προσθήκη προσωπικών εγγραφών μενού εκκίνησης.

Βλ. Παράρτημα: άδειες, δουλεύοντας ως root, κάνοντας ένα αρχείο εκτελέσιμο, κονσόλα κ.ά. θέματα.



:arrow: ΚΕΦΑΛΑΙΟ 3
(Διόρθωση σφαλμάτων)

Μια λίστα ελέγχου με πράγματα που μπορείτε να προσπαθήσετε για να διορθώσετε ένα χαλασμένο σύστημα
Γενικές οδηγίες για αναζήτηση λύσεων
Με Ctrl+Alt+Del γίνετε επανεκκίνηση του Η/Υ σας (οποιαδήποτε στιγμή)
Super Grub Disk: Πολύ σημαντικός
Σημαντικές εντολές: sudo update-grub (grub-mkconfig) και sudo grub-install
Χρόνος αναμονής & προεπιλεγμένο ΛΣ, αλλαγή
Επιλογές πυρήνα, αλλαγές
Για να εμφανίσετε ή να αποκρύψετε το μενού εκκίνησης
Έλλειψη εγγραφής ΛΣ στο μενού εκκίνησης
Τροποποίηση του μενού εκκίνησης κατά την εκκίνηση: το πλήκτρο "e"
Η γραμμή εντολών GRUB grub> -- Τι μπορείτε να κάνετε μ' αυτήν
=> Συλλογή πληροφοριών και εκκίνησης ενός ΛΣ
Βασική μέθοδος διάσωσης: Επανεγκατάσταση του GRUB 2 με την χρήση του Live CD
Χρήση του Live CD για επεξεργασία αρχείων στο ΛΣ σας


Γενικές οδηγίες για αναζήτηση λύσεων

Όταν δεν μπορείτε να εκκινήσετε το ΛΣ της επιλογής σας, υπάρχουν δύο πιθανές αιτίες:
το μενού εκκίνησης είναι προβληματικό και/ή
η εγκατάσταση του GRUB 2 είναι προβληματική.

Για να διορθώσετε το πρόβλημα, έχετε δύο επιλογές:
εκκινήστε το ΛΣ με κάποιον τρόπο και διορθώστε το ή
διορθώστε το έξω από το ΛΣ.

Πριν εξετάσουμε τις δύο αυτές επιλογές, σημειώστε δύο σημαντικά πράγματα:
> Η διόρθωση του μενού εκκίνησης είναι ταυτόσημη με την διόρθωση του αρχείου παραμετροποίησης του μενού εκκίνησης /boot/grub/grub.cfg. Μερικές φορές μπορείτε να το κάνετε αυτό προσωρινά χρησιμοποιώντας το πλήκτρο επεξεργασίας εν κινήσει "e" (βλ. Υποκεφάλαιο παρακάτω). Για να το διορθώσετε μόνιμα ΔΕΝ επεξεργάζεστε το grub.cfg άμεσα, αλλά επεξεργάζεστε το αρχείο /etc/default/grub και/ή τα script στο /etc/grub.d και στην συνέχεια εκτελείτε την εντολή update-grub (ή grub-mkconfig) για να δημιουργήσετε ένα νέο grub.cfg.
> Για να διορθώσετε την εγκατάσταση του GRUB 2, συνήθως χρειάζεται επανεγκατάσταση του GRUB 2 με χρήση της εντολής grub-install στην κονσόλα. Μπορείτε να το κάνετε αυτό μέσα από το ΛΣ (εφόσον μπορέσετε να το εκκινήσετε κατά κάποιον τρόπο) ή μέσα από ένα Live (x)ubuntu CD ή μέσα από κάποιο άλλο ΛΣ Linux OS στον σκληρό σας δίσκο. Δεν μπορείτε να το κάνετε από την γραμμή εντολών του GRUB 2 (grub>), όταν ξεκινάει ο Η/Υ. (Στο παλιό GRUB, αυτό γινόταν με εμφάνιση της γραμμής εντολών grub> και χρήση των εντολών root και setup.)


Τώρα ας εξετάσουμε καθεμία από τις δύο επιλογές για επιδιόρθωση του προβλήματος.

--> Πως να εκκινήσετε το ΛΣ σας όταν υπάρχει πρόβλημα εκκίνησης του ΛΣ:
(1) SGD, ή (2) χρήση της γραμμής εντολών grub>, ή (3) χρήση του πλήκτρου "e".
Μερικές συμβουλές και λεπτομέρειες:

> Χρησιμοποιήστε το Super Grub Disk για να εκκινήσετε το ΛΣ σας. Μπορείτε να διορθώσετε την εκκίνηση με το SGD (στις επιλογές GNU/Linux) ή απλά να χρησιμοποιήσετε το SGD για να εκκινήσετε το ΛΣ, έτσι ώστε να αποκτήσετε πρόσβαση σ' αυτό. Εάν χρησιμοποιήσετε το SGD για να διορθώσετε την εκκίνηση, αυτό θα επανεγκαταστήσει το GRUB στον σκληρό σας δίσκο, γι' αυτό βεβαιωθείτε ότι αυτό θέλετε πραγματικά. Επίσης, μπορεί να το κάνει αυτό χρησιμοποιώντας το παλιό GRUB ή το GRUB 2, ανάλογα με την έκδοση του SGD CD που χρησιμοποιήτε. Φυσικά, εάν μπορείτε να μπείτε στο λειτουργικό σας, τότε μπορείτε να διορθώσετε τα πάντα, γι' αυτό ίσως και να μην είστε και πολύ επιλεκτικοί σ' αυτό το σημείο.
Σημείωση: Ως μια τεχνική σημείωση σ' αυτό το πλαίσιο, μπορείτε επίσης να χρησιμοποιήσετε το δικό σας GRUB 2 disk/flashdrive για να εκκινήσετε το ΛΣ σας, εφόσον έχετε φτιάξει από πριν κάτι τέτοιο.

> Εκκινήστε το ΛΣ σας μόνοι σας χειρωνακτικά χρησιμοποιώντας την γραμμή εντολών GRUB 2 , grub>, ΕΦΟΣΟΝ έχετε πρόσβαση σ' αυτήν! (Μερικές φορές δεν υπάρχει η πρόσβαση αυτή.) Βλ. Το υποκεφάλαιο παρακάτω με τίτλο "Η γραμμή εντολών GRUB grub> -- Τι να κάνετε μ' αυτήν."

> Εκκινήστε στο ΛΣ σας μόνοι σας διορθώνοντας το μενού εκκίνησης (επεξεργασία του "εν κινήσει" χρησιμοποιώντας το πλήκτρο "e" όταν αυτό εμφανιστεί στην οθόνη). Αλλά μερικές φορές δεν βλέπετε καν το μενού εκκίνησης. Βλ. Το υποκεφάλαιο παρακάτω με τίτλο "Επεξεργασία του μενού εκκίνησης κατά την εκκίνηση: το πλήκτρο 'e'" Εφόσον επιτύχετε κι επειδή αυτές οι επεξεργασίες με το πλήκτρο "e" είναι μόνον προσωρινές, θα πρέπει να κάνετε τις αλλαγές μόνιμες αφού μπείτε στο ΛΣ (με επεξεργασία του /etc/default/grub ή των script στο /etc/grub.d και στην συνέχεια να δημιουργήσετε ένα νέο grub.cfg χρησιμοποιώντας update-grub ή grub-mkconfig.


--> Πως να διορθώσετε το πρόβλημα έξω από το ΛΣ:
(1) Χρησιμοποιήστε ένα Live CD, ή (2) διορθώστε το μέσα από ένα άλλο ΛΣ.
Μερικές λεπτομέρειες:

> Χρήση ενός Live CD.
Μέσα από ένα Live Kubuntu CD (ή σχεδόν οποιοδήποτε άλλο live Linux CD), μπορείτε να επανεγκαταστήσετε το GRUB και/ή να επεξεργαστείτε αρχεία (/etc/default/grub ή τα script στο /etc/grub.d).
Βλ. Υποκεφάλαια παρακάτω: "Βασική μέθοδος διάσωσης: Επανεγκατάσταση του GRUB 2 με την χρήση του Live CD" και "Χρήση ενός Live CD για επεξεργασία αρχείων στο ΛΣ σας”.

> Διορθώστε το πρόβλημα μέσα από κάποιο άλλο λειτουργικό σύστημα Linux, ΕΦΟΣΟΝ μπορείτε να εκκινήσετε σ' αυτό!
Από εκεί μπορείτε να επεξεργαστείτε τα αρχεία του προβληματικού ΛΣ και/ή να επανεγκαταστήσετε το GRUB 2 με grub-install.

(ΣΗΜΕΙΩΣΗ: Από το δεύτερο ΛΣ, ή ακόμη κι από ένα Live CD, θα πρέπει να προσαρτήσετε το διαμέρισμα του προβληματικού ΛΣ, εκτός κι αν διαπιστώσετε κοιτάζοντας στον διαχειριστή αρχείων ότι έχει ήδη προσαρτηθεί αυτόματα.)


ΠΕΡΙΛΗΨΗ – Μια περίληψη των γενικών οδηγιών αναζήτησης λύσεων

Όταν δεν μπορείτε να εκκινήσετε το ΛΣ σας, υπάρχουν δύο πιθανές αιτίες:
το μενού εκκίνησης είναι προβληματικό
και/ή
η εγκατάσταση του GRUB 2 είναι προβληματική.


Για να διορθώσετε το πρόβλημα, έχετε δύο επιλογές:
--> εκκινήστε το ΛΣ με κάποιον τρόπο και διορθώστε το:
(1) SGD, ή (2) με χρήση της γραμμής εντολών grub>, ή (3) με χρήση του πλήτρου "e" για να προβείτε σε προσωρινές διορθώσεις.
ή
--> διορθώστε το έξω από το ΛΣ:
(1) Χρησιμοποιήστε ένα Live CD ή (2) διορθώστε το πρόβλημα μέσα από ένα άλλο ΛΣ.



Υπενθυμίσεις:
--- Για να διορθώσετε το grub.cfg μόνιμα, ΜΗΝ επεξεργαστείτε το grub.cfg άμεσα, αλλά επεξεργαστείτε το αρχείο /etc/default/grub και/ή τα script στο /etc/grub.d και στην συνέχεια εκτελέστε update-grub (ή grub-mkconfig) για να δημιουργήσετε ένα νέο grub.cfg.
--- Μπορείτε να επανεγκαταστήσετε το GRUB 2 με grub-install μέσα από το ΛΣ ή μέσα από ένα Live Kubuntu CD ή μέσα από ένα άλλο ΛΣ Linux. Δεν μπορείτε να το κάνετε από την γραμμή εντολών GRUB 2 (grub>) όταν ξεκινάει ο Η/Υ.

[Τέλος των γενικών οδηγιών αναζήτησης λύσεων]


Με Ctrl+Alt+Del γίνεται επανεκκίνηση του Η/Υ (οποιαδήποτε στιγμή)
Εάν ο Η/Υ σας κολλήσει κατά την διάρκεια των πειραμάτων/δοκιμών/αναζητήσεων λύσης για τον φορτωτή εκκίνησής, χρησιμοποιήστε το Ctrl+Alt+Del για να επανεκκινήστε τον Η/Υ. Όμως, να είστε έτοιμοι να κάνετε και κάτι παράλληλα!
Παραδείγματα του τι να κάνετε:
-- Πριν χρησιμοποιήσετε το Ctrl+Alt+Del, τοποθετήστε το Super Grub Disk CD στην υποδοχή του CD, έτσι ώστε να μπορέσετε να επανεκκινήσετε σ' αυτό και να διασώσετε το ΛΣ σας.
-- Να είστε έτοιμοι να πατήστε το πλήκτρο πρόσβασης στο BIOS. Αυτό θα σας εξασφαλίσει αρκετό χρόνο ή θα σας δώσει την ευκαιρία να αλλάξετε την σειρά εκκίνησης των σκληρών δίσκων ή να τοποθετήσετε ένα live CD ή το SGD στην υποδοχή του CD, ή να ετοιμάσετε τις σημειώσεις κτλ.
-- Εάν εμφανιζόταν το μενού εκκίνησης, αφήστε τον Η/Υ να επανεκκινήσει σ' αυτό και στην συνέχεια εισέλθετε σε κατάσταση επεξεργασίας (πατώντας το πλήκτρο "e") ή εισέλθετε στο GRUB 2 CLI (πατώντας το πλήκτρο "c"), και στην συνέχεια προσπαθήστε να διορθώσετε τα πράγματα μέσα απ' αυτό.

Super Grub Disk: Πολύ σημαντικό
Είτε πιστεύετε ότι σας χρειάζεται είτε όχι, αποκτήστε το τώρα δωρεάν, ως ένα εκκινήσιμο CD που θα σας βοηθήσει να εκκινήσετε το λειτουργικό σας σύστημα, όταν αυτό θα έχει πρόβλημα. Μπορείτε να κατεβάσετε το SGD από εδώ:
http://www.supergrubdisk.org/
Αναζητήστε την έκδοση CD ROM iso, κατεβάστε την, κάψτε τη ως εικόνα iso σ' ένα CD (με το K3b), δοκιμάστε το σύντομα (τρέχοντάς το και δοκιμάζοντας διάφορες επιλογές μενού δίχως να επιλέξετε κάτι. Στην συνέχεια βγείτε απ' αυτό ή χρησιμοποιήστε το για να εκκινήσετε το ΛΣ σας). Φυλάξτε το SGD CD κάπου πρόχειρα ώστε να το βρίσκετε εύκολα.

Συμβουλή (χρήση του SGD για εκκίνηση στο προβληματικό ΛΣ σας)
Επιλέξτε GNU/Linux > Fix Boot (διόρθωση εκκίνησης) και στην συνέχεια επιλέξτε το προβληματικό διαμέρισμα.
Εάν αποφασίσετε απλά να βγείτε από το SGD (δίχως καμία αλλαγή), κάντε το, επιλέξτε reboot (επανεκκίνηση), μπείτε στο BIOS, αφαιρέστε το SGD CD, βγείτε από το BIOS, και συνεχίστε την επανεκκίνηση.


Βασικές εντολές: sudo update-grub (grub-mkconfig) και sudo grub-install
Χρησιμοποιήστε αυτές τις δύο εντολές για να “φρεσκάρετε” την εγκατάσταση GRUB 2.
update-grub ή grub-mkconfig: δημιουργεί ένα νέο αρχείο παραμετροποίησης του μενού εκκίνησης boot/grub/grub.cfg.
grub-install: δημιουργεί μια πλήρη, καινούρια εγκατάσταση GRUB 2, συμπεριλαμβανόμενου του /boot/grub/grub.cfg.

Η εντολή
sudo update-grub ή grub-mkconfig
θα δημιουργήσει ένα νέο μενού εκκίνησης /boot/grub/grub.cfg. Για να το κάνει αυτό, χρησιμοποιεί το /etc/default/grub και τα script στο /etc/grub.d. Θα πρέπει να εκτελέσετε αυτή την εντολή μετά την επεξεργασία του προεπιλεγμένου αρχείου ή των script.

> Σελίδα Man: (8)UPDATE-GRUB – δημιουργία του grub.cfg.
http://grub.enbug.org/FranklinPiat/update-grub.manpage

Η εντολή
sudo grub-install [INSTALL_ DEVICE]
εγκαθιστά ή επανεγκαθιστά το GRUB 2 στην συσκευή INSTALL_DEVICE.

Βλ. ΚΕΦΑΛΑΙΟ 4: grub-install: μια βασική εντολή:
Προς το παρόν, ιδού μερικά βασικά χαρακτηριστικά της:

sudo grub-install /dev/sda
εγκαθιστά τον GRUB 2 στο Κύριο Μητρώο Εκκίνησης (Master Boot Record) του σκληρού δίσκου sda. Και
sudo grub-install /dev/sda1
εγκαθιστά τον GRUB 2 στον τομέα εκκίνησης (boot sector) του διαμερίσματος sda1.
Έτσι, το grub-install ολοκληρώνει την εργασία εγκατάστασης των πάντων:
Ιδού τι κάνει: Δημιουργεί τον φάκελο /boot/grub (εφόσον δεν υπάρχει ήδη), αντιγράφει αρχεία του GRUB 2 σ' αυτόν από το “κύριο” φάκελο εικόνων /usr/lib/grub/i386-pc, ανιχνεύει τους σκληρούς σας δίσκους και τις συσκευές και τον πίνακα διαμερισμάτων, φτιάχνει ένα καινούριο χάρτη συσκευών (device.map), δημιουργεί και εγκαθιστά το boot.img (στο MBR) και το core.img, και δημιουργεί το /boot/grub/grub.cfg.

> Σελίδα Man: (8)GRUB-INSTALL - Εγκατάσταση GRUB στον σκληρό σας δίσκο
http://grub.enbug.org/FranklinPiat/grub-install.manpage

Αναζήτηση λύσεων
-- Αφού εκτελέσετε sudo update-grub, βεβαιωθείτε ότι η γραμμή set default=(hdx,y) είναι σωστή (δηλ. ότι η σειρά των εγγραφών του μενού δεν άλλαξε την θέση του προεπιλεγμένου λειτουργικού).
-- sudo grub-install --recheck [INSTALL_DEVICE]
=> Εάν εμφανιστεί κάποιο σφάλμα όταν εκτελείτε το sudo grub-install, δοκιμάστε ξανά με sudo grub-install --recheck [INSTALL_DEVICE].


Χρόνος αναμονής και προεπιλεγμένο ΛΣ, αλλαγή
Ο χρόνος αναμονής είναι ο χρόνος εκείνος σε δευτερόλεπτα πριν το (φωτισμένο)προεπιλεγμένο ΛΣ εκκινήσει αυτόματα (εάν δεν παρέμβετε πατώντας κάποιο πλήκτρο). Για να αλλάξετε τις τιμές αυτές, ανοίξτε το αρχείο /etc/default/grub ως root, κάντε τις αλλαγές, σώστε το αρχείο, κλείστε το και στην συνέχεια δημιουργήστε ένα νέο /boot/grub/grub.cfg εκτελώντας την εντολή sudo update-grub.

Άνοιγμα του /etc/default/grub ως root
Εφόσον ο διαχειριστής αρχείων σας υποστηρίζει κάτι τέτοιο, ανοίξτε τον διαχειριστή αρχείων, περιηγηθείτε /etc/default/grub, κάντε δεξί κλικ στο αρχείο, Ενέργειες, Επεξεργασία ως Root. Διαφορετικά:
Ανοίξτε τον διαχειριστή αρχείων ως και συνεχίστε από εκεί:
-KDE: kdesudo dolphin
-Gnome: gksudo nautilus
ή
ανοίξτε το αρχείο ως root με γραφικό editor:
-KDE: kdesudo kate /etc/default/grub
-Gnome: gksudo gedit /etc/default/grub

Δείγμα (βλ. το δικό σας αρχείο /etc/default/grub):
GRUB_DEFAULT=0
GRUB_TIMEOUT=5

GRUB_DEFAULT=0 επιλέγει την εγγραφή εκκίνησης #0 (δηλ. Την πρώτη εγγραφή) ως προεπιλεγμένο ΛΣ για αυτόματη εκκίνηση. Οι εγγραφές εκκίνησης βρίσκονται στο αρχείο /boot/grub/grub.cfg. Ξεκινούν με μια γραμμή
menuentry "κάποιο κείμενο περιγραφής" {
και τελειώνουν με
}

Οι εγγραφές εκκίνησης αριθμούνται από το μηδέν. Έτσι η πρώτη εγγραφή μενού είναι η εγγραφή εκκίνησης #0, η δεύτερη εγγραφή μενού είναι η εγγραφή εκκίνησης #1, κ.ο.κ.

Συμβουλή αναζήτησης λύσεων: Ελέγξτε την ρύθμιση του προεπιλεγμένου ΛΣ μετά από update-grub
Εάν προσθέσατε ή αφαιρέσατε πρόσφατα μια εγγραφή εκκίνησης (με επεξεργασία κάποιου /etc/grub.d script) και εκτελέσατε sudo update-grub για να δημιουργήσετε ένα νέο μενού εκκίνησης, μπορεί να χρειαστεί να ελέγξτε και να τροποποιήσετε την γραμμή "GRUB_DEFAULT= " (στο /etc/default/grub) σε περίπτωση που έχει αλλάξει η προεπιλεγμένη αρίθμηση.

(ΛΙΣΤΑ ΕΛΕΓΧΟΥ: Ελέγξτε επίσης: sudo grub-set-default N.)


Επιλογές πυρήνα, αλλαγή
Για να αλλάξετε αυτές τις παραμέτρους, ανοίγετε το αρχείο /etc/default/grub σαν Υπερχρήστης (root), κάνετε τις αλλαγές, Save (Αποθήκευση), exit (Εξοδος). (Κοιτάξτε πιο επάνω στα Timeout and Default OS (Προεπιλεγμένο ΛΣ) για συμβουλές με το editing (Αλλαγες κειμενου).) Η γραμμή /etc/default/grub είναι περίπου σαν και αυτή από κάτω:

Κώδικας: Επιλογή όλων
GRUB_CMDLINE_LINUX="quiet splash"


Για να γίνει το boot menu ορατό ή αόρατο
Ψάξτε για αυτή τη γραμμή στο αρχείο /etc/default/grub:

Κώδικας: Επιλογή όλων
# GRUB_HIDDEN_TIMEOUT=0


Όταν υπάρχει ο χαρακτήρας #, θα βλέπετε το boot menu κατά την εκκίνηση του Η/Υ σας.

Αν ο χαρακτήρας # απουσιάζει, δεν θα βλέπετε το boot menu.

Για μία λεπτομερή εξήγηση των άλλων τρόπων που χρησιμοποιείται, κοιτάξτε:

GRUB 2 Basics drs305

http://ubuntuforums.org/showthread.php?t=1195275

Απούσα εγγραφή λειτουργικού λογισμικού στο boot menu
Εάν εκτελείτε το update-grub, και κάποια επιλογή(entry) είναι απούσα στο boot menu, μπορείτε να προσθέσετε την επιλογή σαν ιδιαίτερη (custom) επιλογή. Δείτε στο SECTION 4 από κάτω, Ειδικά Θέματα (Special Topics) Boot menu: Δημιουργείστε μια ιδιαίτερη επιλογή για boot.

Editing το boot menu κατά την εκκίνηση χρησιμοποιώντας το πλήκτρο "e"
Όταν εκκινείτε/επανεκκινείτε τον Η/Υ σας, εμφανίζεται το boot menu. Εάν διαλέξετε μια επιλογή (ένα Λειτουργικό Σύστημα (OS) για την εκκίνηση) και πάρετε μήνυμα λάθους, εάν μπορείτε να επιστρέψετε στο boot menu (η να επανεκκινήσετε για να πάτε στο boot menu), πιθανόν να μπορέσετε να κάνετε κάποια διόρθωση η να πειραματιστείτε με το boot menu για να το καταφέρετε να δουλέψει. Κοιτάξτε και τις βοηθητικές συμβουλές στο τέλος του boot menu. Στο boot menu, μαρκάρετε μια επιλογή, πληκτρολογείστε το "e", και θα δείτε τις επιλογές (menu entry statements) για το αντίστοιχο Λειτουργικό Σύστημα. Κοιτάξτε τις συμβουλές βοηθείας στο τέλος αυτού του menu. Εάν μαρκάρετε μια γραμμή και πληκτρολογείστε το "e", η γραμμή θα σας προσφερθεί για edit (χρησιμοποιώντας τα πλήκτρα με τα βελάκια, delete, κλπ.). Πληκτρολογώντας ESC επιστρέφετε στην προηγούμενη οθόνη.

Οι αλλαγές που κάνετε στο boot menu είναι αλλαγές "μιας χρήσεως" και όχι μόνιμες. Για να τις κάνετε μόνιμες, θα πρέπει να edit το αρχείο /etc/default/grub η και τα script files στο αρχείο /etc/grub.d, πιθανώς ακόμα να χρειαστεί να κάνετε και μια ιδιαίτερη (custom) επιλογή για boot (SECTION 4 Ειδικά Θέματα Boot menu: Δημιουργία μιας Ιδιαίτερης (custom) Επιλογής boot), και να δημιουργήσετε ένα νέο αρχείο /boot/grub/grub.cfg με την εντολή

Κώδικας: Επιλογή όλων
sudo update-grub


η

Κώδικας: Επιλογή όλων
sudo grub-mkconfig
.

Η γραμμή εντολών GRUB (GRUB prompt) grub> -- Πώς να την χρησιμοποιήσετε
=> Για να πάρετε πληροφορίες ή να εκκινήσετε ένα Λειτουργικό Σύστημα

Μπορείτε να πάτε στην γραμμή εντολών GRUB grub> με τρεις τρόπους:

> "c": Κατά την επανεκκίνηση, μόλις δείτε το boot menu, πληκτρολογείστε το "c" για να πάτε στη γραμμή εντολών grub>. (Η το Control+c στο Edit mode menu.) (Πληκτρολογώντας το πλήκτρο ESC , επιστρέφετε στο boot menu.)

> Δεν βλέπετε boot menu! Πιθανώς επανεκκινήσατε τον Η/Υ σας και δεν είδατε το boot menu αντ' αυτού μεταφερθήκατε κατευθείαν στη γραμμή εντολών του GRUB 2: grub> .

Η:

> Μπαίνετε κατευθείαν στην γραμμή εντολών grub> όταν επανεκκινείτε χρησιμοποιώντας το δικό σας GRUB 2 flash drive (έτσι υποτίθεται ότι πρέπει να γίνεται!).

Από την γραμμή εντολών grub> , μπορείτε να δώσετε εντολές οι οποίες,

θα σας βοηθήσουν να βρείτε πληροφορίες για τους δίσκους σας,

ή

να επανεκκινήσετε τον Η/Υ σας.

Για να τα κάνετε, θα χρησιμοποιήσετε τις πληροφορίες από:

ΤΜΗΜΑ 4 Ειδικά Θέματα, το υπο-τμήμα
"4 τρόποι να εκκινήσετε ένα Λειτουργικό Σύστημα" – Με κατ' ευθείαν εκκίνηση, configfile, symlinks, chainloader

ΤΜΗΜΑ 4 Ειδικά Θέματα, το υπο-τμήμα
"Πως να πάρετε πληροφορίες για τους δίσκους σας και εξαρτήματα (devices)"
=> Ιδιαίτερη προσοχή χρειάζεται η εντολή ls και η χρήση του TAB στο τέλος.

Παράδειγμα Εκκίνηση μέσω symlinks; και χρήσης της εντολής ls

grub>

Χρησιμοποιήστε την εντολή ls για να δείτε πώς το GRUB 2 βλέπει τους δίσκους και τις κατατμήσεις (partitions):

Κώδικας: Επιλογή όλων
grub>ls


Από το αποτέλεσμα, πιθανόν να χρησιμοποιήσετε την εντολή ls ξανά, αυτή τη φορά για να δείτε αρχεία σε συγκεκριμένους καταλογους (directories).

Για παράδειγμα, για να ερευνήσετε το δίσκο (hd0,8), μπορείτε να κάνετε list το root κατάλογο του (hd0,8), ως εξής:

Κώδικας: Επιλογή όλων
grub>set root=(hd0,8)
grub>ls /


και μετά για να δείτε τον πυρήνα(ες) στο /boot,

Κώδικας: Επιλογή όλων
grub>ls  /boot


Η, εάν δώσετε την εντολή

Κώδικας: Επιλογή όλων
grub>ls  (hd0,8)


θα πάρετε τον τύπο του filesystem και το UUID.

Ένας άλλος τρόπος για να δούμε τι περιέχει το root:
Κώδικας: Επιλογή όλων
grub> ls  (hd0,8)/


προσοχή στην κάθετο, δεν έχει κενό.

Ας υποθέσουμε ότι είδατε, η επιβεβαιώσατε ότι το Λειτουργικό Σύστημα που θέλετε να εκκινήσετε είναι στο (hd0,8) (= sda8).

Μπορείτε συνεπώς να εκκινήσετε το Λειτουργικό χρησιμοποιώντας το symlinks ως εξής:

Κώδικας: Επιλογή όλων
grub>set root=(hd0,8)
grub>linux /vmlinuz  root=/dev/sda8  ro  quiet splash
grub>initrd /initrd.img
grub>boot


Τι γίνεται αν δεν μπορέσετε να θυμηθείτε τις επιλογές του πυρήνα ro quiet splash;

Μπορείτε να το κάνετε με τον ακόλουθο τρόπο:

Κώδικας: Επιλογή όλων
grub>set root=(hd0,8)
grub>linux /vmlinuz  root=/dev/sda8
grub>initrd /initrd.img
grub>boot


(Η επιλογή 'read-only', ro, είναι σημαντική, αλλά θα επιλεχθεί αυτόματα, αν δεν επιλεχθεί εξ επί τούτου. Ευχαριστώ τον dibl για αυτήν την πληροφορία.)

Παράδειγμα Αν θέλετε να επανεκκινήσετε η να σβήσετε τον Η/Υ σας

Για επανεκκίνηση, πηγαίνετε στην γραμμή εντολών του GRUB 2 πληκτρολογώντας το "c", και μετά, την επόμενη εντολή:

Κώδικας: Επιλογή όλων
grub>reboot


Για το σβήσιμο του Η/Υ

Κώδικας: Επιλογή όλων
grub>halt


Παράδειγμα Εντολής Chainloader

Ας υποθέσουμε ότι έχετε ήδη εγκαταστήσει το GRUB 2 στο boot sector του (hd0,8) partition το οποίο περιέχει το Λειτουργικό Σύστημα. (Αυτό θα το κάνατε χρησιμοποιώντας την εντολή):

Κώδικας: Επιλογή όλων
sudo grub-install /dev/sda8


Μπορείτε λοιπόν να εκκινήσετε αυτό το λειτουργικό χρησιμοποιώντας την εντολή chainloader ως εξής:

Κώδικας: Επιλογή όλων
grub>set root=(hd0,8)
grub>chainloader +1
grub>boot


Η,

Κώδικας: Επιλογή όλων
grub>chainloader (hd0,8)+1
grub>boot


(Σημείωση για την χρήση της εντολής boot

Όταν εκκινείτε από την γραμμή εντολών grub> , πρέπει να χρησιμοποιήσετε την εντολή boot για να εκκινήσει. Όμως, στο αρχείο (configuration file) /boot/grub/grub.cfg, ΔΕΝ χρειάζεται να χρησιμοποιήσετε την εντολή boot – εκεί εννοείται.)

Σημαντική Μέθοδος Rescue (Key Rescue Method):

Επανεγκατάσταση του GRUB 2 με χρήση του Live CD

(Ημιτελής. Βλέπε:

GRUB 2 Live CD Install Guide

http://grub.enbug.org/Grub2LiveCdInstallGuide

Σχόλιο: TODO – να ξαναδοκιμάσω αυτή τη μέθοδο, δεν έχω καταφέρει να την κάνω να δουλέψει, μπορεί να την κάνετε να δουλέψει αν έχετε μια πιο πρόσφατη έκδοση του GRUB 2 η στην 9.10.)
> Βλέπε Appendix: Chroot, Οδηγίες χρήσης.

-> -> Ενημέρωση 20 Σεπτεμβρίου 2009:

Θα σας δώσω δύο τρόπους να προσπαθήσετε. Χρησιμοποιώντας τις διάφορες “pre-release version(s)” του GRUB 2, δεν κατάφερα να κάνω την μέθοδο "chroot" (GRUB2LiveCdInstallGuide) να δουλέψει. Κατάφερα όμως κάτι άλλο να δουλέψει και θα το ονομάσω “Μέθοδο 1” Για τους χρήστες Kubuntu, ξαναέγραψα τη μέθοδο "chroot" ώστε να περιέχει περισσότερες λεπτομέρειες. Λοιπόν, πρώτα παρουσιάζω την “Μέθοδο 1” και μετά την μέθοδο "chroot".

Μέθοδος 1: Εγκατάσταση η επανεγκατάσταση του GRUB 2 χρησιμοποιώντας ένα Live CD

Το (χ)ubuntu Live CD περιέχει τα αρχεία GRUB 2, ειδικότερα, σε μια “live” συνεδρία, θα βρείτε τα master αρχεία του GRUB 2, αρχεία "image" στο /usr/lib/grub/i386-pc. Συνεπώς, μπορείτε να τα χρησιμοποιείσετε για την εγκατάσταση, η επανεγκατάσταση του GRUB 2.

Κάνετε τα εξής...

-Εκκινείστε το (χ)ubuntu Live CD.
Διαλέξτε την επιλογή να δοκιμάσετε το Kubuntu χωρίς να κάνετε εγκατάσταση.

-Εκκινείστε το Konsole (kde) ή gnome-terminal (gnome)

-Περιεργαστείτε τα partitions με την εντολή
Κώδικας: Επιλογή όλων
sudo fdisk -lu


-Διαπιστώστε πιο είναι το root partition. Στο παράδειγμά μας, είναι το sda2.

-Κάνετε ένα mount point (κατάλογο) για το partition sda2:
Κώδικας: Επιλογή όλων
sudo mkdir /media/sda2


-Mount sda2 στο mount point:
Κώδικας: Επιλογή όλων
sudo mount /dev/sda2 /media/sda2


-Mount των devices στη συνεδρία Live CD:
Κώδικας: Επιλογή όλων
sudo mount --bind /dev /media/sda2/dev


-Εγκαταστήστε (η επανεγκαταστήστε) το GRUB 2 (στο MBR του δίσκου sda) χρησιμοποιώντας τα αρχεία του GRUB 2 στο sda2:
Κώδικας: Επιλογή όλων
sudo grub-install --root-directory=/media/sda2  /dev/sda


Μπορεί να πάρετε το παρακάτω λάθος:
Κώδικας: Επιλογή όλων
grub-probe: error: Cannot find a GRUB drive for /dev/sda8.  Check your device.map.
Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly.


Εάν σας συμβεί αυτό, δοκιμάστε:
-
Κώδικας: Επιλογή όλων
sudo grub-install --recheck --root-directory=/media/sda2 /dev/sda
Installation finished. No error reported.


Αυτά είναι τα περιεχόμενα του device map
/media/sda2/boot/grub/device.map.

Ελέγξτε αν τα αποτελέσματα είναι σωστά. Εάν κάποια από τις γραμμές είναι λάθος,
διορθώστε την και επανεκτελέσατε το script `grub-install'.
(hd0) /dev/sda

(Επιτυχία)


-Μετά, unmount και τα δυο filesystems:
Κώδικας: Επιλογή όλων
sudo umount /media/sda2/dev
sudo umount /media/sda2


-Βγείτε από τo Konsole ή gnome-terminal:
Κώδικας: Επιλογή όλων
exit


-Κάντε μια δοκιμή:
Βγείτε από το Live CD, επανεκκινήσατε, δείτε αν έχετε επιδιορθώσει το πρόβλημα στην εκκίνηση (εκκινώντας από το χαλασμένο partition).

[Τέλος της Μεθόδου 1]

- - - - - - - - -

Η επόμενη μέθοδος (2):

Εγκατάσταση ή επανεγκατάσταση του GRUB 2 με την χρήση του Live CD
Η Μέθοδος "chroot" (GRUB2LiveCdInstallGuide)

Βήματα:
-Εκκινήστε το (x)ubuntu Live CD.

-Διαλέξτε την επιλογή της δοκιμής του (x)ubuntu χωρίς εγκατάσταση.

-Εκκινήστε το Konsole (kde) ή gnome-terminal (gnome):

-Περιεργαστείτε τα partitions με την εντολή
Κώδικας: Επιλογή όλων
sudo fdisk -lu


-Εξακριβώστε το root partition. Στο παράδειγμά μας είναι το sda2.
(Εάν έχετε ένα ξεχωριστό /boot partition, δέστε την παραπομπή που αναφέρεται.)

-Δημιουργείστε ένα mount point (κατάλογο) για το partition sda2:
Κώδικας: Επιλογή όλων
sudo mkdir /media/sda2


-Mount sda2 στο mount point:
Κώδικας: Επιλογή όλων
sudo mount /dev/sda2 /media/sda2


-Mount τα devices στη συνεδρία Live CD:
Κώδικας: Επιλογή όλων
sudo mount --bind /dev /media/sda2/dev


-Chroot στο sda2:
Κώδικας: Επιλογή όλων
sudo chroot /media/sda2


-Εγκαταστήστε (η επανεγκαταστήστε) το GRUB 2 (στο MBR του δίσκου sda):
Κώδικας: Επιλογή όλων
sudo grub-install /dev/sda


-Επίλυση προβλημάτων: Εάν πάρετε το μήνυμα,
Κώδικας: Επιλογή όλων
Auto-detection of filesystem failed


-δοκιμάστε:
Κώδικας: Επιλογή όλων
sudo grub-install --recheck /dev/sda


-Βγείτε από το Chroot πληκτρολογώντας
Κώδικας: Επιλογή όλων
exit

ή
Control+d.

-Αποπροσαρτήσατε και τα δυο συστήματα αρχείων Unmount both filesystems:
Κώδικας: Επιλογή όλων
sudo umount /media/sda2/dev
sudo umount /media/sda2

(Υπενθύμιση: Εάν έχετε ενα ξεχωριστό /boot και το προσαρτήσατε, αποπροσαρτήσετε το τώρα.)

-Βγείτε από το Konsole ή gnome-terminal:
Κώδικας: Επιλογή όλων
exit


-Δοκιμάστε το:

-Βγείτε από το Live CD, επανεκκινήσατε, δείτε εάν επισκευάσατε το πρόβλημα της εκκίνησης (εκκινώντας απο το χαλασμένο partition).

Σχόλιο Εγώ έλαβα τα ακόλουθα μηνύματα λαθών:

Κώδικας: Επιλογή όλων
grub-install /dev/sda
grub-probe: error: cannot find a device for /boot/grub
Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly


Οπότε δοκίμασα:
Κώδικας: Επιλογή όλων
grub-install [b]--recheck[/b] /dev/sda
grub-probe: error: cannot find a device for /boot/grub
Auto-detection of a filesystem module failed
Please specify the module with the option `--modules' explicitly.
grub-probe: error: Cannot get the real path of `/dev/sda'
Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly.


[Τέλος του Οδηγού GRUB2LiveCdInstall]



Χρησιμοποιώντας το Live CD για να edit φακέλους στο Λειτουργικό σας Σύστημα

Αυτό γίνεται κατά τον συνήθη τρόπο. Φυσικά, εάν θέλετε, μπορείτε να χρησιμοποιείσετε SGD για να εκκινήσετε το Λειτουργικό Σύστημα και να κάνετε τις αλλαγές από εκεί.

Ακολουθεί μια σύντομη περιγραφή τού κύριου τρόπου χρήσης του Kubuntu Live CD.

Εκκινήστε το Live (x)ubuntu CD, εκκινήστε το Konsole, μετά, με την ιδιότητα του Υπερχρήστη δημιουργείστε ενα κατάλογο (directory), προσαρτήστε το σύστημα αρχείων που περιέχει τον φάκελο που θέλετε να edit, ανοίχτε το φάκελο (πιθανόν ως Υπερχρήστης), κάντε το edit , αποθήκευση (save), εξοδος (quit), αποπροσαρτηστε (unmount) το σύστημα αρχείων (the filesystem), εξοδος (exit).
Παράδειγμα
Αν ο φάκελος που ονομάζεται file_name που θέλετε να κάνετε αλλαγες (edit) είναι στο sdb3 (=(hd1,3)),
ξεκινείστε μια συνεδρία Live CD (x)ubuntu,
εκκινήστε το Konsole ή gnome-terminal:
Κώδικας: Επιλογή όλων
sudo fdisk -lu     

# για να δείτε τις κατατμήσεις που έχετε,
εάν χρειαστεί, φτιάξτε ενα κατάλογο με το όνομα /media/sdb3:
Κώδικας: Επιλογή όλων
sudo mkdir /media/sdb3

προσαρτήστε το sdb3 στο κατάλογο /media/sdb3:
Κώδικας: Επιλογή όλων
sudo mount /dev/sdb3  /media/sdb3

κάντε αλλαγή στο κατάλογο:
Κώδικας: Επιλογή όλων
cd /media/sdb3

κατόπιν, μπορείτε να προχωρήσετε με διάφορους τρόπους:
Εκκινήσατε το Konqueror/Dolphin/nautilus σαν Υπερχρήστης, μετά ανοίχτε το file_name:
-KDE:
Κώδικας: Επιλογή όλων
kdesudo konqueror

ή
Κώδικας: Επιλογή όλων
kdesudo dolphin

-Gnome:
Κώδικας: Επιλογή όλων
gksudo nautilus



Κάντε τις αλλαγές, μετά File > Save, File > Quit.

Η ανοίχτε το file_name σαν Υπερχρήστης με το Kate, και κάντε τις αλλαγές:
-KDE:
Κώδικας: Επιλογή όλων
kdesudo kate /<path to>/<file_name>

-Gnome:
Κώδικας: Επιλογή όλων
gksudo gedit /<path to>/<file_name>


Κάντε τις αλλαγές, μετά File > Save, File > Quit

αποπροσαρτήστε το κατάλογο; προσέξτε την ορθογραφία της εντολής αποπροσάρτησης umount:

Κώδικας: Επιλογή όλων
sudo umount /media/sdb3





:arrow: ΚΕΦΑΛΑΙΟ 4
Ειδικά Θέματα
Εγκαθιστώντας το GRUB 2 στον Η/Υ σας
grub-install Η πιο χρήσιμη εντολή
Οι διάφοροι τύποι ρυθμίσεων της εντολής.
"c," grub>, Konsole/gnome-terminal BASH, edit "e", emu,
Συμπλήρωση εντολής μέσω του πλήκτρου ΤΑΒ
Πώς να λάβετε πληροφορίες σχετικά με τους δίσκους και τις συσκευές σας
Εντολές κλειδιά:
Στην Κονσόλα/τερματικό : sudo fdisk -lu
Στην γραμμή εντολών του GRUB 2 : grub> ls
Boot menu: Προσθέτοντας και αφαιρώντας μια καταχώρηση Λειτουργικού Συστήματος (ΛΣ)
Boot menu: Δημιουργώντας προσαρμοσμένη καταχώρηση
Boot menu: Φτιάχνοντας το δικό σας προσαρμοσμένο grub.cfg
4 Τρόποι εκκίνησης ενός Λ.Σ (Λειτουργικού Συστήματος): configfile (φάκελος ρυθμίσεων), symlinks (συμβολικοί δεσμοί), direct booting (άμεση εκκίνηση), chainloader (αλυσιδωτός εκκινητής)
Αποκλειστική κατάτμηση GRUB 2: Πώς να την δημιουργήσετε
GRUB 2 Flashdrive: Πώς να το δημιουργήσετε
Η χρήση του όρου "root"
GRUB's Root Device, the Linux statement, root=UUID=,
--root-directory=DIR INSTALL_DEVICE
Dual booting: Πως να το στήσετε <-- τοποθετήστε αυτό στο τέλος του 4ο μέρους

Cheat sheet:
Πρακτικές Υπενθυμίσεις για το GRUB 2: καταγραφή αρχείων "κλειδιών" , εντολές, μέθοδοι


Εγκαθιστώντας το GRUB 2 στον Η/Υ σας

Για να εγκαταστήσετε το GRUB 2 στον Η/Υ σας ώστε αυτό να εκκινεί τον Η/Υ με τα ΛΣ , χρειάζονται δύο βήματα

1 Χρειάζεται να πάρετε τα αρχεία GRUB 2 που είναι εγκαταστημένα στον H/Y, κάπου μέσα στο σύστημα αρχείων του Κubuntu.
2 Μετά να χρησιμοποιήσετε αυτά τα αρχεία του GRUB 2 για να κάνετε εγκατάσταση το GRUB 2 στους δίσκους ή στις συσκευές του υπολογιστή σας, έτσι ώστε να μπορεί να σας εξυπηρετήσει ως bootloader για να ξεκινήσει τον Η/Υ σας με το (x)ubuntu και τα άλλα ΛΣ.

Βήμα 1: Πάρτε τα αρχεία του GRUB 2
Εγκαταστήστε το πακέτο του GRUB 2 στο λειτουργικό σας σύστημα Kubuntu χρησιμοποιώντας τον διαχειριστή πακέτων.
Ή, στην Κονσόλα, τύπωσε την παρακάτω εντολή:
Κώδικας: Επιλογή όλων
sudo apt-get install grub-pc



Έλεγξε το: ανοίξτε τον διαχειριστή αρχείων (nautilus ή Dolphin ή άλλον), και δείτε τα αρχεία του GRUB 2 κάτω από
/usr/lib/grub/i386-pc (ονομάζεται κατάλογος εικόνα του GRUB 2, και περιέχει μια συλλογή από τα "κύρια" αρχεία του GRUB).

Βήμα 2: Εγκαταστήστε τα αρχεία του GRUB 2 έτσι ώστε να σας εξυπηρετούν ως ένας bootloader
Ας υποθέσουμε ότι ο πρώτος δίσκος εκκίνησης (first boot drive) στο BIOS είναι ο sda (όπως φαίνεται στο (x)ubuntu χρησιμοποιώντας στo τερματικό την εντολή sudo fdisk -lu). Τότε, εγκαταστήστε το GRUB 2 στο Master Boot Record του sda:
Κώδικας: Επιλογή όλων
sudo grub-install /dev/sda


Αυτό επίσης αντιγράφει τα αρχεία του GRUB 2 στο /boot/grub.
Μετά για να δημιουργήσετε ένα φρέσκο αρχείο ρύθμισης του boot menu (/boot/grub/grub.cfg), τρέξτε
sudo update-grub or sudo grub-mkconfig

Περισσότερες Λεπτομέρειές Σχετικά Με Αυτό

ΠΡΟΣΟΧΗ, ξεκάθαρη προειδοποίηση:
Έχετε ένα εκκινήσιμο (bootable) Super Grub Disk CD, πρόχειρο σε περίπτωση που προκληθεί μπέρδεμα και δεν μπορείτε να εκκινήσετε τον H/Y σας.

Για να εγκαταστήσετε τα αρχεία του GRUB 2 στον Η/Υ σας, ανοίξτε το τερματικό και τρέξτε τις εντολές
Κώδικας: Επιλογή όλων
sudo apt-get update

Κώδικας: Επιλογή όλων
sudo apt-cache search grub-pc

(το οποίο επιστρέφει: grub-pc - GRand Unified Bootloader, version 2 (PC/BIOS version))

Κώδικας: Επιλογή όλων
sudo apt-get install grub-pc


Μετά, εγκαταστήστε το GRUB 2 στο Master Boot Record (MBR) στον πρώτο δίσκο εκκίνησης (first boot drive) σύμφωνα με το BIOS . Για παράδειγμα, αν αυτό το MBR είναι στον δίσκο sda, η εντολή θα ήταν
Κώδικας: Επιλογή όλων
sudo grub-install /dev/sda


Και μετά αναβαθμίστε το grub.cfg:
Κώδικας: Επιλογή όλων
sudo update-grub

(ή sudo grub-mkconfig)

Κάντε επανεκκίνηση και δείτε τι έγινε.
Το παλιό GRUB μπορεί να είναι ακόμα εκεί (άρα είδατε μία καταχώρηση boot menu στο chainload μεσα στο GRUB 2), σε αυτήν την περίπτωση μπορείτε να τρέξετε
sudo update-from-grub-legacy
για να αντικαταστήσετε το Legacy GRUB με το GRUB 2 ΕΑΝ ΕΠΙΘΥΜΕΙΤΕ ΝΑ ΤΟ ΚΑΝΕΤΕ ΕΤΣΙ.


Επίλυση Προβλημάτων
Εγκαθιστώντας το GRUB 2 στο MBR: χρησιμοποιώντας το --recheck
Παράδειγμα:
sudo grub-install /dev/sda
grub-probe: error: cannot find a GRUB drive for /dev/sda. (Μετ. --> grub-probe: σφάλμα: δεν μπορεί να βρει έναν δίσκο GRUB για το /dev/sda )
Auto-detection of a filesystem module failed. (Μετ. --> Η αυτόματη ανίχνευση ενός module απέτυχε)
Please specify the module with the option '--modules' explicitly. (Μετ. --> Παρακαλώ ορίστε το module με την παράμετρο '--modules' ρητά)

Επομένως, δοκιμάστε το εξής:
sudo grub-install --recheck /dev/sda
Η εγκατάσταση ολοκληρώθηκε. Δεν αναφέρθηκε κανένα σφάλμα.
Αυτό είναι τα περιεχόμενα του χάρτη συσκευής /boot/grub/device.map.
Ελέγξτε εαν αυτό είναι σωστό ή όχι. Αν κάποια απο τις γραμμές είναι λάθος,
διόρθωσε την και ξανατρέξτε το 'grub-install'.
(hd0) /dev/sda


- - - - -
[Αρχή υποενότητας]
grub-install Η πιο χρήσιμη εντολή

Πλήρη μορφή: grub-install [ΠΑΡΑΜΕΤΡΟΣ] ΣΥΣΚΕΥΗ_ΕΓΚΑΤΑΣΤΑΣΗΣ

Δυο πολύ σημαντικές παράμετροι είναι:
--recheck
Εξετάζει ένα χάρτη συσκευής ακόμη και αν υπάρχει ήδη
--root-directory=DIR
Εγκαθιστά τις εικόνες του GRUB κάτω από τον κατάλογο DIR αντί κάτω απο τον κατάλογο-ρίζα (root)
(δείτε την συζήτηση από παρακάτω.)

Παραδείγματα:
ΣΥΣΚΕΥΗ_ΕΓΚΑΤΑΣΤΑΣΗΣ μπορεί να είναι /dev/sda, /dev/sda1, hd0, hd1, etc.
grub-install /dev/sda εγκαθιστά το GRUB 2 στο MBR του δίσκου sda.
grub-install /dev/sda1 εγκαθιστά το GRUB 2 στον τομέα εκκίνησης (boot sector) της κατάτμησης sda1.
grub-install hd0 εγκαθιστά το GRUB 2 στο MBR του δίσκου hd0.
grub-install --root-directory=/media/sdb1 /dev/sda
τοποθετεί τα αρχεία του GRUB 2 στην προσαρτημένη κατάτμηση /media/sdb1
και μετά εγκαθιστά το GRUB 2 στο MBR του οδηγού sda.
(Αν δεν υπάρχει ο κατάλογος /boot/grub directory στο sdb1, αυτός θα δημιουργηθεί και θα γεμίσει με αρχεία του GRUB 2.)
grub-install --recheck --root-directory=/media/sdb1 /dev/sda
Κάντε το ξανά, και εξετάστε το /boot/grub/device.map (ξανά).


Χρησιμοποιήστε την εντολή sudo grub-install για αυτούς τους σκοπούς:
για να ανανεώσετε όλη την εγκατάστασή του GRUB 2 ή όταν επανεγκαθιστάς (re-install) το GRUB 2 για να διορθώσεις ένα πρόβλημα ή όταν εγκαθιστάς το GRUB 2 σε ένα άλλο μέρος ή σε αποκλειστική κατάτμηση GRUB 2 ή σε ένα φλασάκι USB .

Ένα ειδικό script, grub-install είναι ένα ειδικό script, που λέγεται βοηθητικό πρόγραμμα, το οποίο καλεί πολλά άλλα βοηθητικά προγράμματα (scripts) για να το βοηθήσουν στην δουελιά του. Τύπωσε αυτήν την εντολή στην Κονσόλα (Τερματικό) ως υπερχήστης (χρησιμοποιώντας sudo). Αυτό τα κάνει όλα για εσάς : είναι μια ειδική εντολή που διορθώνει τα πάντα (όλα).

Σημείωση: /usr/lib/grub/i386-pc
Η κύρια συλλογή αρχείων του GRUB 2 στο ΛΣ σας φυλάσσονται στον κατάλογο εικόνα του GRUB 2 /usr/lib/grub/i386-pc. Αυτά είναι εκεί από τότε που εγκαταστήσατε το GRUB 2 στον Η/Υ σας (ή στο ΛΣ) χρησιμοποιώντας τον διαχειριστή πακέτων σας ή χρησιμοποιώντας (sudo) apt-get install grub-pc.

η εντολή grub-install κάνει τα παρακάτω για σας:

> Η εντολή sudo grub-install αντιγράγει τα αρχεία του GRUB 2 απο τον /usr/lib/grub/i386-pc στον κατάλογο /boot/grub. Αν ο κατάλογος /boot/grub δεν υπάρχει ακόμα, δημιουργείται.
> Εξετάζει τον τύπο της κατάτμησης σας και τις κατατμήσεις (χρησιμοποιώντας grub-probe).
> Φτιάχνει μια προσαρμοσμένη έκδοση του core.img για την εγκατάσταση σας, ένα από τα δύο είναι πολύ σημαντικά αρχεία (μαζί με το boot.img). (Στους όρους του Legacy GRUB ,, το boot.img αντιστοιχεί στο stage_1 και το core.img στο stage_2.)
> Τελικά αυτό εγκαθιστά το GRUB 2 στον Η/Υ σας έτσι ώστε να μπορεί να ξενικά μερικά ΛΣ για εσάς. (Χρησιμοποιεί το grub-setup για να το κάνει, τοποθετώντας το boot.img στο MBR του πρώτου δίσκου εκκίνησης (first boot drive) σύμφωνα με το BIOS και εγκαθιστά το core.img είτε μετά το MBR είτε σε ένα σύστημα αρχείων (π.χ., στον τομέας εκκίνησης (boot sector) της κατάτμησης του ΛΣ ) δείτε τις σημειώσεις παρακάτω για μερικές λεπτομέρειες.)

Δυο χρήσιμοι παράμετροι
--recheck
Εξετάζει ένα χάρτη συσκευής ακόμη και αν υπάρχει ήδη
--root-directory=DIR
Εγκαθιστά τις εικόνες του GRUB κάτω από τον κατάλογο DIR αντί κάτω από τον κατάλογο-ρίζα (root)

--recheck
Εάν η εντολή grub-install αποτύχει, λόγο ενός συστήματος αρχείου ή επειδή δεν βρήκε κάτι, δοκιμάστε ξανά με την παράμετρο --recheck , όπως σε αυτό το παράδειγμα:
sudo grub-install --recheck --root-directory=/media/sdb1 /dev/sda

--root-directory=DIR
Πολύ χρήσιμη. Αντί να τοποθετείτε τα αρχεία του GRUB στον κατάλογο /boot/grub κάτω από τον κατάλογο-ρίζα (root) του ΛΣ σας, μπορείτε να χρησιμοποιήσετε αυτή την παράμετρο για να δημιουργήσετε τον κατάλογο /boot/grub κάπου αλλού, και μετά να χρησιμοποιήσετε αυτά τα αρχεία του GRUB 2 για να εγκαταστήσετε το GRUB 2 στο MBR ενός σκληρού δίσκου, ή στον τομέα εκκίνησης μιας κατάτμησης, ή αλλού (π.χ., στο φλασάκι USB ή σε αποκλειστική κατάτμηση GRUB 2).
DIR είναι ένας κατάλογος, όπότε είναι προσαρτημένος. Έτσι, αν χρησιμοποιείτε την κατάτμηση sdb1, για παράδειγμα, πρέπει να την προσαρτήσετε, λόγου χάρη, στο /media/sdb1.

Αποκλειστική κατάτμηση GRUB 2
Ας υποθέσουμε πως το ΛΣ σας είναι σε κάποια κατάτμηση σε ένα από τους σκληρούς δίσκους. Και ας υποθέσουμε πως θέλετε να δημιουργήσετε μια αποκλειστική κατάτμηση GRUB 2 στην συσκευή sdb1, και ότι ο πρώτος δίσκος εκκίνησης σύμφωνα με το BIOS είναι ο sda, και επιθυμείς να τοποθετήσετε τα αρχεία του GRUB 2 στην (κατάτμηση) sdb1 και να τα χρησιμοποιήσετε για να εγκαταστήσετε το GRUB στο MBR του (δίσκου) sda. Εδώ είναι η εντολή:

sudo grub-install --root-directory=/media/sdb1 /dev/sda

Παρατηρήστε πως η (κατάτμηση) sdb1 είναι προσαρτημένη ως /media/sdb1 : επίσης αυτή ο (δίσκος) sda ορίζεται ως συσκευή: /dev/sda (όχι απλώς sda).

δείτε την υποενότητα με τίτλο "αποκλειστική κατάτμηση GRUB 2: Πως να την δημιουργήσετε" παρακάτω


USB flash drive
Ας υποθέσουμε πως το φλασάκι σας το οποίο φαίνεται στο Κubuntu ως /dev/sdc και είναι προσαρτημένο στο /media/flashdrive. Μετά η εντολή για να τοποθετήσετε και να εγκαταστήσετε το GRUB 2 σε αυτό , είναι:

sudo grub-install --root-directory=/media/flashdrive /dev/sdc

δείτε την υποενότητα με τίτλο "αποκλειστική κατάτμηση GRUB 2: Πως να την δημιουργήσετε" παρακάτω

Περισσότερες πληροφορίες στο:
- grub-install
http://grub.enbug.org/FranklinPiat/grub-install.manpage
-grub-setup (Μάλλον δεν θα το χρησιμοποιήσετε απο μόνο του, εσείς θα χρησιμοποιήσετε grub-install και θα το αφήσετε να κάνει την δουελιά για σας.)
http://grub.enbug.org/FranklinPiat/grub-setup.manpage


Σημείωση: Μερικές πληροφορίες σχετικά με την εγκατάσταση του boot.img και του core.img.
O Legacy GRUB χρησιμοποιεί στάδια (stages): stage_1, stage_1.5, and stage_2. Αυτά ατνικαταστάθηκαν στο GRUB 2 από το boot.img (ένα αρχείο μεγέθους 512-byte που αντιστοιχεί στο stage_1 και εγκαθίσταται σε ένα MBR), δεν υπάρχει stage_1.5 στο GRUB 2 και το core.img στο GRUB 2 παίρνει την θέση του stage_2 (ή, ίσως, και των δύο , stage 1.5 και stage_2): είναι ειδικά φτιαγμένο για την εγκατάσταση του Η/Υ σας. Το boot.img δείχνει το core.img: το core.img είναι ενσωματωμένο σε κάποια καθορισμένη τοποθεσία (σε ένα δισκο), αλλά συχνά αυτή η τοποθεσία είναι στον ίδιο κύλινδρο με το MBR που περιέχει το boot.img. (Λεπτομέρειες: το MBR πηγαίνει στον τομέα (sector) 1 και είναι 512 bytes, και εκεί είναι που πηγαίνει το boot.img. Αυτός ο πρώτος κύλινδρος έχει 63 τομείς (sectors), ώστε να αφήνει 62 τομείς ή 31,744 bytes (=62*512) όπου το core.img μπορεί να είναι ενσωματωμένο. Αυτός ο πρώτος κύλινδρος (των 63 τομέων περιέχει το boot.img και το core.img) προηγείται της αρχής της πρώτης κατάτμησης σε εκείνο το δίσκο, ο οποίος θα αρχίζει στον τομέα (sector) 63 (η μέτρηση των τομέων ξεκινά από το μηδέν, ώστε 63 τομείς μας φέρνουν στο τέλος του τομέα 62 = η αρχή του τομέα 63). Θα το δείτε αυτό αν τρέξετε ως υπερχρήστης (root) , fdisk -lu.)

[Τέλος υποενότητας: grub-install H πιο χρήσιμη εντολή]
- - - - -

Οι διάφοροι τύποι ρυθμίσεων της εντολής.
"c," grub>, Konsole BASH, επεξεργασία (edit) "e", emu
Όταν δουλεύετε με το GRUB, πρέπει να δουλεύετε με δικαιώματα υπερχρήστη και έτσι πρέπει να χρησιμοποιείτε sudo ή gksudo ή kdesudo (cli, gnome και kde αντίστοιχα).
Για παράδειγμα, sudo grub-install /dev/sda, gksudo nautilus, kdesudo dolphin, κτλ.
Οι ρυθμίσεις (modes) της εντολής που μπορείτε να χρησιμοποιήσετε στο GRUB 2 είναι οι ακόλουθες.
-- Τερματικό (BASH), στο (x)ubuntu, στην συνηθισμένη γραμμή εντολών (ως υπερχρήστης), ~#:
-- GRUB 2 emu (από την Κονσόλα, πληκτρολογήστε sudo grub-emu [ΠΑΡΑΜΕΤΡΟΣ]: αυτό σας εμφανίζει μια γραμμή εντολών grub> prompt)
=>Περισσότερα πάνω στο GRUB 2 emu αργότερα.
-- διεπαφή γραμμής εντολών του GRUB 2 (CLI), grub>.
Όταν επανεκκινείτε τον Η/Υ σας, πάντε στο boot menu, και πιέστε το κουμπί "c" , θα εμφανιστεί μια γραμμή εντολών GRUB 2, grub>. Αυτή είναι η διεπαφή γραμμής εντολών του GRUB 2. Επίσης θα σας εμφανίζεται το grub> σε κάθε επανεκκίνηση αν δεν έχετε boot menu, (δηλ) αν το grub.cfg ή το boot menu είναι χαλασμένο. (δείτε στην ΕΝΟΤΗΤΑ 3, την υποενότητα με τίτλο "Η γραμμή εντολών του GRUB grub> -- Τι να κάνετε με αυτό")
-- Edit mode. Άμεση επεξεργασία (on the fly): όταν κάνετε επανεκκίνηση και βλέπει το GRUB 2 boot menu, μπορείτε να χρησιμοποιήσετε το κουμπί "e" για να επεξεργαστείτε το boot menu σας σε μια προσωρινή βάση temporary (οι διάφορες επεξεργασίες δεν είναι μόνιμες εκτός αν τις κάνετε αργότερα). (δείτε την ΕΝΟΤΗΤΑ 3 -- Επεξεργασία του boot menu κατά την εκκίνηση: κουμπί "e".)

=> Σε όλες τις περιπτώσεις, υπάρχει έτοιμη βοήθειά , και οι εντολές είναι περίπου οι ίδιες σε όλους τους τρόπους καταχώρησης με λίγες επί μέρους διαφορές

Βοήθεια
Κονσόλα BASH CLI:
Προσθέτοντας το --help σε μια εντολή στην γραμμή εντολών: για παράδειγμα sudo update-grub --help.
Γραμμή εντολών (CLI) GRUB (grub>):
Στην γραμμή εντολών του GRUB 2 απλά πληκτρολογήστε help και πατήστε Enter.
Για να πάρετε βοήθεια σχετικά με μια εντολή, γράψτε help <όνομα_εντολής>.
Παράδειγμα: grub>help ls σας δίνει πληροφορίες για την εντολή ls.
Λειτουργία Επεξεργασίας (Edit mode):
Οι "πληροφορίες κλειδία" είναι στο κάτω μέρος τις οθόνης αφού πατήσετε "e"
για να μπείτε στο edit mode απο το boot menu που βρίσκεται στην οθόνη σας.
Επίσης, σε αυτό το σημείο, μπορείτε να πατήσετε Control+c για να εμφανιστεί ένα grub>,
μετά δώστε help και/ή χρησιμοποιήστε την συμπλήρωση εντολής μέσω του πλήκτρου ΤΑΒ.

Συμπλήρωση εντολής μέσω του πλήκτρου ΤΑΒ (grub>)
Καθώς γράφετε μετά το grub>, προσπαθήστε να πατήσετε το κουμπί TAB και δείτε τι συμβαίνει: σε πολλές περιπτώσεις, το GRUB θα προσπαθήσει να σας βοηθήσει να ολοκληρώσετε την γραμμή με κάτι που έχει νόημα ή με επιλογές. Οπότε πληκτρολογήστε όσα πιο πολλά θυμάστε ή μαντέψτε και πληκτρολογήστε , μετά πατήστε TAB, έπειτα μπορείτε να πληκτρολογήστε άλλη μια εικασία και να πατήσετε ξανά TAB , και ούτω κάθε εξής μέχρι να ολοκληρώσεις την γραμμή με τον τρόπο που θέλεις.

Η αρίθμηση συσκευών στο GRUB 2 είναι διαφορετική
(hdx,y): x σκληρός δίσκος, y κατάτμηση
Οι σκληροί δίσκοι ξεκινούν από το μηδέν (x=0), όπως και στο Legacy GRUB.
Οι κατατμήσεις ξεκινούν από το 1 (y=1), στο Legacy GRUB , οι κατατμήσεις ξεκινούν από το μηδέν.


Πώς να πάρετε πληροφορίες για τους δίσκους, τις συσκευές και τα αρχεία σας
Πληροφορία-Κλειδί: στην Κονσόλα sudo fdisk -lu και grub> ls
Θα δούμε και τις δυο περιπτώσεις: Στην γραμμή εντολών του Kubuntu (Κονσόλα) και στο grub> prompt.

Γραμμή εντολών (BASH) Κονσόλας

Εξερευνώντας τους σκληρούς σας δίσκους: sudo fdisk -lu
=> sudo fdisk -lu is πολύ χρήσιμο, πολύ σημαντικό.
Αριθμός έκδοσης του GRUB: grub-install -v
Χώρος δίσκου: df -h -T
UUIDs (δείτε την ΣΗΜΕΙΩΣΗ παρακάτω):
blkid (ή δοκίμασε sudo blkid) επίσης:
ls /dev/disk/by-uuid/ -alh
grub.cfg, για να το δείτε: cat /boot/grub/grub.cfg
fstab (πίνακας με τα συστήματα αρχείων), για να το δείτε: cat /etc/fstab
Προσάρτηση (mount), πως προσαρτώνται τα συστήματα αρχείων: cat /etc/mtab ή: mount
Κατάλογος εκκίνησης /boot, για να τον βρείς: df /boot
Έκδοση του πυρήνα (Kernel) και έκδοση του gcc (gcc = o μεταγλωττιστής GNU που χρησιμοποιείτε για να χτίσεις τον kernel(πυρήνα)):
cat /proc/version
Έκδοση Πυρήνα (Kernel): uname -r
Έκδοση/Όνομα Linux: lsb_release -a
(κρατήστε πατημένο το κουμπί Shift και το σύμβολο του μείον για να πάρετε _ (κάτω κάθετος) . LSB = Linux Standard Base)
Έκδοση KDE (KDE=K Desktop Environment)
για KDE 3.5: kde-config –version και για KDE 4: kde4-config --version
Έκδοση Gnome: gnome -version (?)


ΣΗΜΕΙΩΣΗ: UUID = Universally Unique Identifier (κατα λέξη Καθολικό Μοναδικό Αναγνωριστικό)
Ξεκινώντας το (x)ubuntu στην έκδοση 8.10, τα UUIDs χρησιμοποιούνται για την αναγνώριση των κατατμήσεων. Ένα UUID είναι ένας αριθμός 16-byte (= 128 bits).
Σε κανονική μορφή , ένα UUID συνίσταται από 32 δεκαεξαδικά ψηφία, εμφανίζεται σε 5 ομάδες που χωρίζονται με παύλες.

Στην γραμμή εντολών του GRUB, grub>

Εξερευνώντας τους σκληρούς σας δίσκους: grub> ls
=> Πολύ χρήσιμο, πολύ σημαντικό.
(στο Legacy GRUB, η εντολή geometry χρησιμοποιείται αντί για την εντολή ls )

Η εντολή ls είναι πολύ χρήσιμη
grub>ls
σας δίνει ένα κατάλογο με τους σκληρούς σας δίσκους και τις κατατμήσεις όπως τα βλέπει το GRUB, δηλαδή με τον συμβολισμό συσκευής του GRUB 2 (hdx,y).
grub>ls /
σας δείχνει τα αρχεία κάτω απο την τρέχουσα, κύρια συσκευή (root device) του GRUB 2 . Μπορείτε να ορίσετε αυτήν την χρησιμοποιώντας root=. Για παράδειγμα:
grub>set root=(hd0,8)
grub>ls /
σας δείχνει όλα τα αρχεία κάτω από τον κατάλογο-ρίζα (root)
grub>ls /boot
σας δείχνει αρχεία --συμπεριλαμβανομένων και των πυρήνων(kernels)-- κάτω από το /boot.

Είδη UUIDs και συστημάτων αρχείων
grub>ls (hd0,8)
σας εμφανίζει πληροφορίες σχετικά με την κατάτμηση (hd0,8) συμπεριλαμβανομένων, το σύστημα αρχείων και το UUID της.

Τα περιεχόμενα ενός καταλόγου: grub>ls -l /directory
Παράδειγμα
grub>ls -l /boot
σας δείχνει τα αρχεία του πυρήνα (kernel) και τα αρχεία initrd.
(Η παράμετρος -l υποδηλώνει την εμφάνιση μιας μεγάλης λίστας και δίνει περισσότερες πληροφορίες. Για να δείτε όλα τα αρχεία, συμπεριλαμβανομένων και των κρυφών αρχείων,
χρησιμοποιήστε την παράμετρο -a: grub>ls -a -l /boot ή grub>ls -al /boot)

GRUB 2 emulation sudo grub-emu
Στην Κονσόλα, για να εμφανιστεί ένα grub> prompt, πληκτρολογήστε sudo grub-emu.
Για να κλείσετε το emu και να επιστρέψετε στην Κονσόλα, πληκτρολογήστε halt.
>>> ΣΗΜΑΝΤΙΚΟ sudo grub-emu and then grub>ls
Καθώς δουλεύετε στην Κονσόλα απο Kubuntu, μπορεί να χρειάζεται να ξέρετε πως βλέπει το GRUB τους δίσκους σας και τις κατατμήσεις , των (hdx,y). Μπορείτε να αλλάξετε emulation made (sudo grub-emu)) και να δώσετε την εντολή λίστας (ls) στην γραμμή εντολών του GRUB (grub>ls) για να δείτε τους δίσκους και τις συσκευές του GRUB. πληκτρολογήστε halt για να επιστρέψετε στην λειτουργία BASH της Κονσόλα.

Χρησιμοποιώντας τις εντολές search και cat/u]
Αρχεία του GRUB, σε ποιές κατατμήσεις partitions είναι μέσα: grub>search /boot/grub/boot.img
Boot menu, σε ποίες κατατμήσεις (partitions )είναι μέσα : grub>search /boot/grub/grub.cfg
Πυρήνας (Kernel), που είναι: grub>search /vmlinuz
Boot menu, για να το δείτε: grub>cat (hdx,y)/boot/grub/grub.cfg
fstab, για να το δείτε: grub>cat (hdx,y)/etc/fstab
Device.map, για να το δείτε: grub>cat (hdx,y)/boot/grub/device.map


(ΣΗΜΕΙΩΣΗ: Στο Legacy GRUB, η εντολή find χρησιμοποιείται αντί για την εντολή search.)

[u]Επανακκίνειστε (reboot), ή απενεργοποιείστε (halt) τον H/Y
από την γραμμή εντολών
-Στo τερματικό:
sudo shutdown -r now (επανακκινεί τον Η/Υ)
sudo shutdown -h now (απενεργοποιεί τον Η/Υ)
-Στο GRUB:
grub>reboot (επανακκινεί τον Η/Υ)
grub>halt (απενεργοποιεί τον Η/Υ)


Boot menu: Προσθέτοντας και αφαιρώντας μια καταχώρηση λειτουργικού συστήματος (ΛΣ) στο grub.cfg
Κανόνας: ΔΕΝ επεξεργάζεστε απευθείας το grub.cfg . Αντί για αυτό, δουλεύετε με αρχεία script μέσα στον φάκελο /etc/grub.d.

-- Τα λειτουργικά συστήματα Linux, προστίθενται αυτόματα
Δείτε το grub.cfg σας. Το τμήμα
Κώδικας: Επιλογή όλων
    ### BEGIN /etc/grub.d/10_linux ###
    ### END /etc/grub.d/10_linux ###

περιέχει λειτουργικά συστήματα Linux τα οποία ανιχνεύονται αυτόματα από το GRUB 2 χρησιμοποιώντας το αρχείο script /etc/grub.d/10_linux. Τα περισσότερα ΛΣ Linux πρέπει να ανιχνεύονται με αυτόν τον τρόπο και να συμπεριλαμβάνονται στο boot menu grub.cfg. Αν αυτό δεν γίνεται, μπορείτε να δημιουργήσετε μια προσαρμοσμένη καταχώρηση εκκίνησης (boot entry) (δείτε παρακάτω το "Boot menu: Δημιουργήστε μια προσαρμοσμένη καταχώρηση εκίνησης").

-- Τα Windows και άλλα Λειτουργικά Συστήματα (ΛΣ) προσθέτονται αυτόματα
Αυτό γίνεται με το script /etc/grub.d/30_os-prober.

-- Προσθέτοντας και αφαιρώντας ΛΣ από τον Η/Υ σας. Αφού το κάνετε αυτό,
δημιουργείστε ένα νέο grub.cfg: sudo update-grub

-- Προσθέστε μια καταχώρηση στο boot menu φτιάχνοντας την δικιά σας προσαρμοσμένη καταχώρηση εκκίνησης, και μετά τρέξτε:
sudo update-grub
για να δημιουργηθεί ένα καινούριο grub.cfg.
(δείτε την υποενότητα παρακάτω: "Boot menu: Δημιουργήστε μια προσαρμοσμένη καταχώρηση εκκίνησης")

-- Αφαιρώντας μια καταχώρηση εκκίνησης από το grub.cfg:
Δύο επιλογές.
(1) Απλά αφαιρέστε τα εκτελέσιμα κομμάτια από το αρχείο script στο /etc/grub.d τα οποία αντιστοιχούν στην (π.χ,δημιουργία) καταχώρησης εκκίνησης.
Παράδειγμα: Αν αυτό το αρχείο ονομάζεται 43_MyOS-1, τότε τρέξτε τις εντολές της Κονσόλας
sudo chmod -x /etc/grub.d/43_MyOS-1
sudo update-grub
(2) Ή, αφαίρεστε το αρχείο script (για την καταχώρηση εκκίνησης) από τον φάκελο /etc/grub.d. Και μετά τρέξτε
sudo update-grub για να δημιουργηθεί το νέο αρχείο grub.cfg.
ΣΗΜΕΙΩΣΗ: Αν το προσαρμοσμένο αρχείο περιέχει περισσότερες από μια καταχωρήσεις εκκίνησης, μπορείτε να αφαιρέσεις οποιονδήποτε αριθμό από αυτές, αφήνοντας τις υπόλοιπες. Μετά τρέξτε run sudo update-grub για να δημιουργηθεί το νέο boot menu σας, grub.cfg.


Boot menu: Προσαρμοσμένη καταχώρηση εκκίνησης
Αυτό είναι εύκολο, συνήθως.
-- Υπάρχουν 4 τρόποι για να κάνετε μια καταχώρηση εκκίνησης (δείτε το "4 Τρόποι εκκίνησης ενος Λ.Σ (Λειτουργικού Συστήματος)").
-- Υπάρχει ένα προσαρμοσμένο πρότυπο (template) στο /etc/grub.d/40_custom.
-- Αφού έχετε γράψει το αρχείο script για την καταχώρηση εκκίνησης, κάντε το εκτελέσιμο.
-- Μετά δημιουργήστε ένα καινούριο grub.cfg τρέχοντας sudo update-grub.

δείτε την υποενότητα παρακάτω: "4 Τρόποι εκκίνησης ενός Λ.Σ (Λειτουργικού Συστήματος)."
( configfile (φάκελος ρυθμίσεων), symlinks (συμβολικοί δεσμοί), direct booting (άμεση εκκίνηση), chainloader (αλυσιδωτός εκκινητής) )


Επίλυση Προβλημάτων: Μερικές φορές όταν τρέχετε grub-install ή update-grub, αποτυγχάνει να ανιχνεύσει ένα από τα ΛΣ σας και το αποκλείει από το boot menu grub.cfg. Σε αυτήν την περίπτωση, μπορείτε να κάνετε μια προσαρμοσμένη καταχώρηση για αυτό (με την μορφή αρχείου script στο /etc/grub.d).

Άμεση εκκίνηση (direct booting) Για να πάρετε ένα πρότυπο για μερικές απο τις καταχωρίσεις, έχετε δύο επιλογές: (1) Να το πάρετε από το παλιό σας boot menu (/boot/grub/menu.lst) του Legacy GRUB (εάν αυτό είναι διαθέσιμο στον Η/Υ σας). Ή, μπορεί επίσης να είναι εδώ, δημιουργημένο από το GRUB 2: menu.lst_backup_by_grub2_postinst. (2) Πάντε στο ίδιο το λειτουργικό σύστημα (το οποίο θέλετε να συμπεριλάβετε), ή ίσως να αποκτήσετε πρόσβαση στο σύστημα αρχείων του, χρησιμοποιώντας ένα live CD, και πάρτε τις πληροφορίες από το παλιό σας boot menu.

Παραδείγματα
Φτιάχνοντας μια προσαρμοσμένη καταχώρηση (για το) sidux. Μέθοδος: Άμεση εκκίνηση.
Αυτό βοηθά αν έχεις ένα πρότυπο για μερικές καταχωρήσεις. Στο παλιό boot menu (/boot/grub/menu.lst) του Legacy GRUB μου, είχα αυτήν την καταχώρηση εκκίνησης (boot entry) για το sidux:

Κώδικας: Επιλογή όλων
title      Debian GNU/Linux, sidux kernel 2.6.28-5.slh.3-sidux-686
    root      (hd0,2)
    kernel      /boot/vmlinuz-2.6.28-5.slh.3-sidux-686 root=UUID=306d94a5-107b-4c9e-ae03-a159e18dc1c7 ro quiet vga=791
    initrd      /boot/initrd.img-2.6.28-5.slh.3-sidux-686


Χρησιμοποιώντας ένα πρότυπο (π.χ., /etc/grub.d/40_custom), δημιουργείστε ένα εκτελέσιμο αρχείο για την καταχώρηση εκκίνησης του sidux:
ανοίξτε ένα άδειο αρχείο κειμένου (ως υπερχρήστης)
kdesudo kate
Αποθηκεύστε το νέο αρχείο ως, πέστε, /etc/grub.d/41_sidux_sda3
Αντιγράψτε τις γραμμές του kernel (πυρήνα) και του initrd από το menu.lst, αλλάξτε το “kernel” σε “linux,” προσαρμόστε τους αριθμούς κατάτμησης του sidux ώστε να συμμορφώνονται με την σύμβαση του GRUB 2:
Legacy GRUB: (hd0,2)
GRUB 2: (hd0,3)
Επίσης, διπλό-ελέγξτε το UUID της (κατάτμησης) sda3 τρέχοντας sudo blkid.
Αποτέλεσμα:
Το αρχείο /etc/grub.d/41_sidux_sda3 μοιάζει όπως αυτό:

Κώδικας: Επιλογή όλων
#!/bin/sh

    echo "Adding sidux" >&2
    cat << EOF
    menuentry "sidux on sda3"  {
    set root=(hd0,3)
    linux      /boot/vmlinuz-2.6.28-5.slh.3-sidux-686 root=UUID=306d94a5-107b-4c9e-ae03
    a159e18dc1c7 ro quiet vga=791
    initrd      /boot/initrd.img-2.6.28-5.slh.3-sidux-686
    }
    EOF


Το echo είναι η αιτία που μια γραμμή θα εμφανιστεί στην οθόνη, αφού τρέξετε sudo update-grub, η οποίο θα γράφει “sidux on sda3” ώστε να μπορείτε να δείτε ότι έγινε (π.χ., ότι το sidux ενσωματώθηκε στο grub.cfg).

Κάντε το αρχείο εκτελέσιμο (αυτό είναι ένα script, ένα είδος προγράμματος):
sudo chmod 744 /etc/grub.d/ 41_sidux_sda3
Ή,
sudo chmod +x /etc/grub.d/ 41_sidux_sda3
Ή, σε GUI (Γραφικό Περιβάλλον),
Ως υπερχρήστης, ανοίξτε το dolphin (kdesudo dolphin) ή τον nautilus (gksudo nautilus), πάντε στο /etc/grub.d, δεξί κλίκ στο 41_sidux_sda3, Ιδιότητες, και κάντε κλικ στο κουτάκι “Εκτελέσιμο” . Ελέγξτε τις Advanced Permission καθώς έχετε τις ιδιότητες ανοιχτές.

Για να ενσωματώσεις το αρχείο 41_sidux_sda3 του sidux ως καταχώρηση εκκίνησης στο αρχείο ρυθμίσεων του boot menu /boot/grub/grub.cfg, τρέξτε
sudo update-grub
Ελέξτε ότι το sidux είναι στο boot menu σας , ανοίγοντας το /boot/grub/grub.cfg.


Boot menu: Φτιάχνοντας το δικό σας custom grub.cfg
Αυτό είναι εύκολο. (Για παράδειγμα, δείτε παρακάτω την υποενότητα "Αποκλειστική κατάτμηση του GRUB 2: Πως να την δημιουργήσετε.")
Παρμένη απευθείας από τον εξαιρετικό και λεπτομερή οδηγό του drs305 , Τα βασικά του GRUB 2:
http://ubuntuforums.org/showthread.php?t=1195275

Φτιάχνοντας ένα άκρως προσαρμοσμένο κατάλογο: Εντάξει, παραδεχτείτε πως είστε ένας μανιακός με τον έλεγχο και θέλετε να δείτε μόνο πως να το φτιάξετε μόνοι σας- προσαρμοσμένοι τίτλοι , χωρίς "memtest86+" και περιττούς kernels. Εδώ είναι πως το κάνετε:
-- Τρέξτε sudo update-grub για να λάβετε τους τρέχοντες διαθέσιμους πυρήνες (kernels).
-- Αντιγράψτε τις επιθυμητές καταχωρήσεις "menuentry" απο το /boot/grub/grub.cfg στο /etc/grub.d/40_custom . Η καταχώρηση ξεκινά με την γραμμή που αρχίζει από το "menuentry" και τελειώνει με μια γραμμή που περιέχει "}".
-- Προσθέστε άλλο ένα αντικείμενο "menuentry" το οποίο θέλετε να το βλέπετε στο boot menu.
-- Επεξεργαστείτε τους τίλους από την γραμμή του "menuentry" αν επιθυμείτε (μέσα από τα εισαγωγικά ). Μην αλλάξετε την γραμμή του "menuentry". Κάθε καταχώρηση θα πρέπει να ξεκινά με μια γραμμή "menuentry" και να τελειώνει με ένα "}" στην τελευταία γραμμή .
-- Αφαιρέστε τα εκτελέσιμα (bit) απο το /etc/grub.d/10_linux, /etc/grub.d/20_memtest86+ και /etc/grub.d/30_os-prober
Αφαιρώντας τα εκτελέσιμα από οποιοδήποτε αρχείο στο /etc/grub.d αποκλείει τα αρχεία από το να συμπεριληφθούν στις ενημερώσεις του GRUB. Για να το κάνετε:
sudo chmod -x /etc/grub.d/grub.d/10_linux /etc/grub.d/20_memtest86+ /etc/grub.d/30_os-prober
-- Τρέξτε "sudo update-grub"
-- Τα ενημερωμένο αρχείο /boot/grub/grub.cfg θα πρέπει να περιέχει μόνο τμήματα για "00_header", "05_debian_theme" και "40_custom".
-- Το αρχείο grub.cfg δεν θα ενημερωθεί με προσθήκη ενός νέου πυρήνα (kernel). Για να προσθέσετε ένα νέο πυρήνα , κάντε το
"10_linux" εκτελέσιμο, και τρέξτε "sudo update-grub" για να ανανεώσετε τους διαθέσιμους πυρήνες (kernels), και να επαναλάβετε αυτές τις οδηγίες.


4 Τρόποι εκκίνησης ενος Λ.Σ (Λειτουργικού Συστήματος)
(φάκελος ρυθμίσεων) configfile, (συμβολικοί δεσμοί)symlinks, (άμεση εκκίνηση) direct booting, (αλυσιδωτός εκκινητής) chainloader

Μπορείτε να χρησημοποιήσετε αυτές τις μεθόδους
-- σε ένα κατάλογο εκκινητή (boot menu)
-- σε μία grub> προτροπή (στο GRUB CLI)
ΣΗΜΕΙΩΣΗ:(CLI=commant line interface) τερματικό εντολών (GRUB=Grand Unified Bootloader) Μεγάλος ενοποιημένος εκκινητής
για να εκκινήσετε ένα Λ.Σ. Αν τις χρησημοποιήσετε σε GRUB CLI, πρέπει να πληκτρολογήσετε την εντολήboot στο τέλος για να κάνετε τις μεθόδους (συμβολικοί δεσμοί) symlinks, (άμεση εκκίνηση) direct booting και (αλυσιδωτός εκκινητής) chainloader να δουλέψουν. Δεν χρειάζεστε την εντολή boot στο configfile menu. Δεν χρειάζεστε την εντολή boot στο grub.cfg (υπάρχει ήδη εκεί).

ΣΗΜΕΙΩΣΗ: Αυτά γίνονται ίδια όπως στον προηγούμενο GRUB αλλά με καινούργια διαμόρφωση (format).
Δείτε όμως την παρακάτω σημείωση στο φάκελο ρυθμίσεων (configfile).

ΣΗΜΕΙΩΣΗ: Κάθε είσοδος του εκκινητή ξεκινά με μιά γραμμή
menuentry "...κάποιο κείμενο..." {
και τελειώνει με
}

>>> Εκκινώντας με το φάκελο ρυθμίσεων (Configfile booting)
Αυτό είναι εύκολο και ευέλικτο υπάρχει όμως μιά ΠΡΟΕΙΔΟΠΟΙΗΣΗ:
Και τα δύο Λ.Σ πρέπει να χρησημοποιούν την ίδια έκδοση του GRUB--και το Λ.Σ που δουλεύετε σε αυτό (στο οποίο βρίσκετε το boot menu) και το Λ.Σ που εκκινήτε.

Για παράδειγμα , σκεφτείτε αυτές τις δύο δηλώσεις στον κατάλογο εκκίνησης (menuentry):
Κώδικας: Επιλογή όλων
set root=(hd1,2)
configfile /boot/grub/grub.cfg


Ένας ισότιμος τρόπος να το κάνετε είναι αυτός:
Κώδικας: Επιλογή όλων
configfile  (hd1,2)/boot/grub/grub.cfg


Αυτό δίνει την εντολή πρόσβασης στον GRUB 2 στο διαμέρισμα (hd1,2), να βρεί και να σας δείξει τον φάκελο /boot/grub/grub.cfg, ώστε να μπορέσετε να επιλέξετε ποιό απο τα Λ.Σ να εκκινήσετε, και εκκινείτε το Λ.Σ που επιλέγετε. Ο GRUB που κάνει την εργασία είναι ο τοπικός GRUB, και όχι ο GRUB στόν (hd1,2). Ο τοπικός GRUB πρέπει να έχει την ικανότητα να μετααφράσει τις εντολές που βρίσκει στό grub.cfg του Λ.Σ που επιθυμείτε να εκκινήσετε.

Πότε να αποφεύγετε τον φάκελο ρυθμίσεων (configfile)
Όταν υπάρχουν διαφορετικές εκδόσεις του GRUB στον υπολογιστή σας, είναι καλύτερα να αποφεύγετε να χρησημοποιήτε τον φάκελο ρυθμίσεων (configfile).
Αντί αυτού χρησημοποιήστε τον αλυσιδωτό εκκινητή (chainloader) η συμβολικούς δεσμούς (symlinks).

Παράδειγμα: (Πάρθηκε από ένα αρχείο grub.cfg. Το σημείο # υποδηλώνει ένα σχόλιο.)

Κώδικας: Επιλογή όλων
#  Kubuntu 8.04.3 on sdb2, by configfile
menuentry “Kubuntu 8.04.3 on sdb2, by configfile”  {
set root=(hd1,2)
configfile /boot/grub/grub.cfg
}



>>> Συμβολικοί δεσμοί (Symlinks)που χρησημοποιούνται σε μια είσοδο εκκινητή (boot entry)
Οι συμβολικοί δεσμοί είναι σαν τις συντομεύσεις, και κατευθύνουν τον έλεγχο απο τον δεσμό στον φάκελο τον οποίο δείχνουν. Οι συμβολικοί δεσμοί για τον πυρήνα (kernel) και των (initrd) φακέλων είναι ήδη έτοιμοι για το σύστημα. Κοιτάξτε μόνοι σας. Εμφανίστε όλους τους φακέλους σε λίστα (-a) συνοπτικά η λεπτομεριακά (-l) κάτω απο το διαμέρισμα υπερχρήστη (root) (/) δίνοντας την ακόλουθη εντολή:

Κώδικας: Επιλογή όλων
ls -a -l  /

lrwxrwxrwx   1 root root    33 2009-08-02 11:01 initrd.img -> boot/initrd.img-2.6.24-24-generic
lrwxrwxrwx   1 root root    33 2009-04-19 17:14 initrd.img.old -> boot/initrd.img-2.6.24-23-generic
lrwxrwxrwx   1 root root    30 2009-08-02 11:01 vmlinuz -> boot/vmlinuz-2.6.24-2 4-generic
lrwxrwxrwx   1 root root    30 2009-04-19 17:14 vmlinuz.old -> boot/vmlinuz-2.6.24-23-generic

Ο συμβολικός δεσμός (symlink) για τον πυρήνα (kernel) είναι vmlinuz, και vmlinuz points για τον νεότερο πυρήνα (kernel).
Ο συμβολικός δεσμός (symlink) initrd είναι initrd.img, και initrd.img points για τον νεότερο πυρήνα (kernel).

ΣΗΜΕΙΩΣΗ: Το "l" στα αριστερά υποδηλώνει δεσμό ("link.") Παρατηρήστε πως οι δεσμοί (links) δείχνουν πρός τους στοχευμένους φακέλους και ακολουθούνται απο το σύμβολο ->. Παρατηρήστε πως οι συμβολικοί δεσμοί (symlinks) είναι αποθηκευμένοι μέσα στο Λ.Σ στο επίπεδο του υπερχρήστη (root level).

ΣΗΜΕΙΩΣΗ: Εάν θέλετε να δημιουργήσετε μία είσοδο εκκίνησης (boot entry) για το παλιό πυρήνα (older kernel) και initrd, θα πρέπει να χρησημοποιήσετε τους συμβολικούς δεσμούς (symlinks) για αυτά, vmlinuz.old και initrd.img.old.

Αν χρησημοποιήσετε άμεση εκκίνηση (direct booting), πρέπει να γράψετε το ακριβές όνομα του πυρήνα (kernel) και (initrd):
linux /boot/vmlinuz-2.6.24-24-generic root=UUID= vb687f89-ggjd-6ach-7755-77241i4b4fk3 ro quiet splash
initrd /boot/initrd.img-2.6.24-24-generic

Με συμβολικούς δεσμούς (symlinks),το vmlinuz αρχίζει στον υπερχρήστη (root) και δείχνει πρός vmlinuz-2.6.24-24-generic και το initrd.img αρχίζει στον υπερχρήστη (root) και δείχνει πρός initrd.img-2.6.24-24-generic, έτσι μπορείτε πολλύ απλά να γράψετε,
Κώδικας: Επιλογή όλων
linux /vmlinuz  root=UUID= vb687f89-ggjd-6ach-7755-77241i4b4fk3 ro quiet splash
initrd /initrd.img


ΣΗΜΕΙΩΣΗ: (intrd= initial radom memory disk) προσωρινός φάκελος προετοιμασίας συστήματος γιά εκκίνηση

Παρά όλα αυτά , για να το απλοποιήσετε όταν υπάρχει ανάγκη εκκίνησης στην προτροπή (grub>), μπορείτε να το κάνετε απλά με αυτό τον τρόπο:
Αν υποθέσουμε ότι το Λ.Σ είναι το Kubuntu 9.10 στον (hd0,8) = sda8. τότε θα είχατε

Κώδικας: Επιλογή όλων
menuentry “Kubuntu 9.10 on sda8, by symlinks”  {
set root=(hd0,8)
linux /vmlinuz root=/dev/sda8 ro quiet splash
initrd /initrd.img
}


η ακόμα ποιό απλά οταν δεν μπορείτε να θυμηθήτε τις επιλογές του πυρήνα (kernel) "ro quiet splash":

Κώδικας: Επιλογή όλων
menuentry “Kubuntu 9.10 on sda8, by symlinks”  {
set root=(hd0,8)
linux /vmlinuz root=/dev/sda8
initrd /initrd.img
}


(Το ro = Read-Only είναι η προκαθορισμένη τιμή. Ευχαρηστήρια στον dibl για αυτή την πληροφορία.)

ΣΗΜΕΙΩΣΗ για τις διαδρομές (paths)
Σημειώστε ότι οι διαδρομές (paths) πρός τους συμβολικούς δεσμούς (symlinks) αρχίζουν απο το επίπεδο του υπερχρήστη (root /) (διότι οι συμβολικοί δεσμοί (symlinks) είναι αποθηκευμένοι στον φάκελο του υπερχρήστη (root /)); όπως και οι διαδρομές (paths) του ενεργού πυρήνα (kernel & initrd) φακέλων ξεκινούν στην εκκίνηση (/boot) (αφού ο πυρήνας (kernel) και οι (initrd) φάκελοι είναι αποθηκευμένοι στον εκκινητή (/boot))

Άλλο ένα παράδειγμα :

Κώδικας: Επιλογή όλων
# Kubuntu 9.10 on sdb7 symlinks, [u]normal mode[/u]
menuentry “Kubuntu 9.10 on sdb7, by symlinks”  {
set root=(hd1,7)
linux /vmlinuz root=/dev/sdb7 ro quiet splash
initrd /initrd.img
}

Αυτή είναι η κανονική λειτουργεία.

Αν θέλετε να εκκινήσετε την λειτουργεία επαναφοράς (recovery mode) σε επίπεδο χρήστη (single user),
αντικαταστήστε τις επιλογές του πυρήνα (kernel) απο “ro quiet splash” σε “ro single” (χωρίς τα εισαγωγικά)


>>> Άμεση εκκίνηση(Direct booting)
In direct booting, you use the actual kernel and initrd file names in the boot menuentry.

NOTE: Αν χρησημοποιήσετε άμεση εκκίνηση στον GRUB CLI, ie., στην προτροπή grub> , μπορείτε να χρησημοποιήσετε την ακολουθία εναλλαγής (TAB) για να κάνετε την εργασίας σας ποιό εύκολη.
Για παράδειγμα,
grub>linux /boot/<Πιέστε τώρα το (TAB)>
και θα προκύψουν καποιές επιλογές όπως ,vmlinuz-2.6.24-24-generic

Παράδειγμα:

Κώδικας: Επιλογή όλων
#   Kubuntu 8.04 on sdb3, direct booting
menuentry "Kubuntu 8.04 on sdb3, direct booting" {
set root=(hd1,3)
linux   /boot/vmlinuz-2.6.24-24-generic root=UUID=db287e84-cbdd-4ca1-8745-85241a3b3fe2 ro quiet splash
initrd   /boot/initrd.img-2.6.24-24-generic
}



>>> Αλυσίδωτή Εκκίνηση (Chainloader booting)
Όταν εκκινήτε ένα Λ.Σ αλυσιδωτά , στην ουσία χρησημοποιήτε μια αλυσίδα εντολών για να περάσετε τον έλεγχο της εκκίνησης από τον τοπικό σας (GRUB) σε κάποιον άλλο φορτωτή εκκίνησης που βρίσκετε στο (MBR=Master Boot Record) ενός σκληρού δίσκου η σε έναν τομέα εκκίνησης ενος διαμερίσματος σκληρού δίσκου.


NOTE: Αυτό για να δουλέψει, πρέπει πρώτα ο φορτωτής εκκίνησης (bootloader) να είναι εγκατεστημένος στο (MBR=Master Boot Record) η στον τομέα εκκίνησης (boot sector).

Ένα παράδειγμα Λίνουξ

Κώδικας: Επιλογή όλων
menuentry “Kubuntu 9.10 on sdb7, by chainloader”  {
set root=(hd1,7)
chainloader +1
}


Ο "chainloader +1" προτρέπει την μετάβαση στον τομέα 1 (sector 1) (του (hd1,7)) και δίνει τον έλεγχο στον φορτωτή εκκίνησης (bootloader) που βρίσκεται εκεί .

Αυτό το παράδειγμα για να δουλέψει, ο φορτωτής εκκίνησης (bootloader) (π.χ, GRUB 2) πρέπει να είναι εγκατεστημένος στο διαμέρισμα (hd1,7).
Για να εγκαταστήσετε τον GRUB 2 στον τομέα εκκίνησης του διαμερίσματος sdb7 (=(hd1,7)):
sudo grub-install /dev/sdb7

Αυτός είναι ένας ακόμα τρόπος για να γράψετε την ποιό πάνω είσοδο εκκίνησης (boot entry):
Κώδικας: Επιλογή όλων
menuentry “Kubuntu 9.10 on sdb7, by chainloader”  {
chainloader  (hd1,7)+1
}


ΣΗΜΕΙΩΣΗ/Προειδοποίηση? -- ΓΙΑ ΝΑ ΓΙΝΕΙ -- Qqmike να το ελέγξει.
Ο Herman λέει: Αν προσπαθείτε να φορτώσετε αλυσιδωτά έναν τομέα εκκίνησης διαμερίσματος ,μπορεί να χρειαστεί να χρησημοποιήσετε την επιλογή -f η --force, η οποία προτρέπει τον GRUB να αγνοήσει το γεγονός οτι ίσως δεν υπάρχει υπογραφή εκκινούμενου δίσκου εκεί, (!= 0xaa55). Δεν είμαι σίγουρος ακόμα πότε ακριβώς αυτό χρειαζεται η δεν χρειάζεται.Φαίνετε οτι χρειάζετε μόνο στην κτάσταση CLI GRUB.

Άλλο ένα παράδειγμα Λίνουξ

Κώδικας: Επιλογή όλων
menuentry “Drive sdc = hd2 by chainloader”  {
chainloader  (hd2)+1
}

Άν ένας φορτωτής εκκίνησης (bootloader) (π.χ, GRUB 2) έχει εγκατασταθεί στον φάκελο του κύριου εκκινητή (Master Boot Record) του δίσκου sdc (= hd2), η εντολή εισόδου (menuentry) θα εκκινήσει τον σκληρό δίσκο δίνοντας τον έλεγχο στον φορτωτή εκκίνησης (bootloader) σε κάθε MBR.

Αυτό το παράδειγμα για να δουλέψει, ο φορτωτής εκκίνησης,(bootloader) (π.χ, GRUB 2) πρέπει να είναι εγκατεστημένος στο (Master Boot Record) του δίσκου sdc (= hd2). Για να εγκαταστήσετε τον (GRUB 2) στον φάκελο του κύριου εκκινητή (MBR) του δίσκου sdc δώστε στο τερματικό την εντολή:

Κώδικας: Επιλογή όλων
sudo grub-install /dev/sdc


Παράδειγμα
Κώδικας: Επιλογή όλων
Windows XP on sda1
menuentry “Windows XP on sda1, by chainloader”  {
set root=(hd0,1)
chainloader +1
}



Αποκλειστικό διαμέρισμα GRUB 2 : Πως να το φτιάξετε
Εδώ και πάλι τα πράγμματα είναι ασύγκριτα ποιό εύκολα απο ότι στον Legacy GRUB.

1 Δημιουργήστε το διαμέρισμα GRUB 2.
Φτιάξτε ένα διαμέρισμα που θα χρησημοποιηθεί αποκλειστικά για τον GRUB 2 και διαμορφώστε το. για την διαμόρφωση χρησημοποιήστε το GParted απο το Live CD , δώστε μια χαρακτηριστική ταμπέλα π.χ “GRUB2” ( χωρίς τα εισαγωγικά ) (πηγαίνοντας GParted,>Partition > Labels).
(Ελεγξτε το μέθος του φακέλου /boot/grub για να αποφασίσετε το μέγεθος της διαμέρησης. Οι φάκελοι GRUB 2 χρησημοποιούν μόνο 572 KB (96 αρχεία, συμπεριλαμβάνοντας και τα 12 παλαιότερα) στην δική μου εγκατάσταση.)

2 Φτιάξτε το grub.cfg.
Στο σύστημα αρχείων του χρήστη (home directory), φτιάξτε ένα αρχείο κειμένου ονομάστε'το grub.cfg και δημιουργήστε μέσα σε αυτό τον δικό σας διαμορφωμένο κατάλογο εκκίνησης (boot menu) για το αποκλειστικό διαμέρισμα GRUB 2 . (Δείτε το παρακάτω παράδειγμα.)
(Υπάρχουν δύο τρόποι για να φτιάξετε ένα αρχείο κειμένου: (1) Δεξί κλίκ στην επιφάνεια εργασίας, Δημιουργία νέου>Αρχείο κειμένου;) η (2) Ανοίξτε με τον επεξεργαστή κειμένου (text editor) Kate ένα νέο κενό έγγραφο πληκτρολογόντας στο τερματικό kate και αποθηκεύσε το με το όνομα grub.cfg στό σύστημα αρχείων του χρήστη σας (home directory) μόνο! Για να το κάνετε αυτό σαν υπερχρήστης (root), πληκτρολογήστε kdesudo kate, αλλά αυτό δεν είναι απαραίτητο σε αυτό το σημείο.)
ΠΡΟΣΟΧΗ: Ίσως θέλετε να τελειοποιήσετε τον κατάλογο εκκίνησης (boot menu) τώρα για να τον έχετε έτοιμο. Για να δημιουργήσετε τις εισόδους εκκίνησης (boot entries) στο αρχείο grub.cfg, ρίξτε μια ματιά στην παρακάτω υποενότηταs "4 Τρόποι για να εκκινήσετε ένα Λ.Σ."

3 Εγκαταστήστε τον GRUB 2 στο MBR.
Απο το Kubuntu Λ.Σ σας, εγκαταστήστε τον GRUB 2 κύριο φάκελο εκκίνησης (Master Boot Record) (απο τον πρώτο σκληρό δίσκο που βλέπει το BIOS ) χρησημοποιώντας τους GRUB 2 φακέλους του αποκλειστικού διαμερίσματος GRUB 2.
ΠΑΡΑΔΕΙΓΜΑ:
Υποθέτουμε πως ο δίσκος sdb1 είναι το αποκλειστικό διαμέρισμα GRUB 2 , και πως είναι προσαρτημένος σαν /media/sdb1 (η αν δώσατε έσεις την ετικέτα ,GRUB2 στον δίσκο sdb1, θα μπορούσε να είναι /media/GRUB2). συνεχίζοντας αν επιθυμείτε να εγκαταστήσετε τον GRUB 2 στο αρχείο MBR του δίσκου sda ο οποίος είναι καταχωρημένος στο BIOS σαν ο πρώτος δίσκος εκκίνησης.
Κάντε το με αυτόν τον τρόπο:
Κώδικας: Επιλογή όλων
sudo grub-install –root-directory=/media/sdb1  /dev/sda

See: http://grub.enbug.org/FranklinPiat/grub-install.manpage
(Αυτό επίσης θα δημιουργήσει για εσάς τον κατάλογο /boot/grub στο διαμέρισμα GRUB 2.)

4 Σάν υπερχρήστης (root), αντιγράψτε το grub.cfg απο τον κατάλογο του χρήστη σας στο διαμέρισμα GRUB 2 στον φάκελο
/boot/grub. (Για να το κάνετε αυτό σε γαρφικό περιβάλον (GUI), ανοίξτε τον διαχειρηστή αρχείων σας σαν υπερχρήστης και εργαστείτε από εκεί; π.χ., kdesudo konqueror η kdesudo dolphin.)

5 Ορίστε το σημείο εκκίνησης (flag) του αποκλειστικού διαμερίσματος GRUB 2 και επανεκκινήστε για να το δοκιμάσετε.

Ορίζοντας το σημείο εκκίνησης (flag) στο αποκλειστικό διαμέρισμα GRUB 2 :
Αυτό γίνετε είτε με το GParted απο το Λ.Σ (K > System > Partition editor) η απο το GParted Live CD. Εάν το κάνετε απο το GParted Live CD, πρέπει να γίνει με τον ακόλουθο τρόπο:
Αφού συμπληρώσετε το βήμα 4 (αντιγράφωντας το grub.cfg αρχείο στο διαμέρισμα), τοποθετείστε το GParted Live CD μέσα στο CD του υπολογιστή και αφήστε πρώτα να το διαβάσει, πατήστε άκυρο, επανεκκινήστε τον υπολογιστή σε GParted Live, ορίστε το σημείο εκκίνησης του αποκλειστικού διαμερίσματος GRUB 2 (Partition > Manage Flags), GParted > Quit, διπλό κλίκ στο GParted (στο μεγάλο κατάλογο στην κορυφή) για να διακόψετε και να επανεκκινήσετε , όταν προτραπείτε αφαιρέστε το GParted Live CD, και αφήστε τον υπολογιστή να επανεκκινήσει ( τώρα θα χρησημοποιεί το αποκλειστικό διαμέρισμα GRUB 2), και δείτε αν δουλεύει.

ΠΡΟΣΟΧΗ: Θυμηθείτε να κρατάτε το Super Grub Disk live CD εύκαιρο.

ΣΗΜΑΝΤΙΚΗ ΣΗΜΕΙΩΣΗ ΓΙΑ ΤΙΣ ΕΝΗΜΕΡΏΣΕΙΣ ΤΟΥ ΠΥΡΗΝΑ (KERNEL):
Χρησημοποιώντας αυτή την μέθοδο για να δημιουργήσετε ένα αποκλειστικό διαμέρισμα GRUB 2 partition, ΕΙΣΤΕ ο διαχειρηστής του διαμορφωμένου φάκελου εκκίνησης /boot/grub/grub.cfg που βρίσκετε στο διαμέρισμαt GRUB 2. Αυτά που συζητήσαμε μέχρι εδώ δεν ισχύουν για--/etc/default/grub και the scripts /etc/grub.d και update-grub--. Πρέπει να κρατήσετε ξεχωριστά αυτά τα δύο "δεικνειόμενα". Διαμορφώστε χειροκίνητα τον GRUB 2 αποκλειστικό φάκελο grub.cfg. Αν ποτέ υπάρξει πρόβλημα , θα πρέπει να επανεγκαταστήσετε χειροκίνητα τον GRUB 2 στον MBR (του πρώτου εκκινούμενου δίσκου στο BIOS) απο το αποκλειστικό διαμέρισμα GRUB 2.


ΠΑΡΑΔΕΙΓΜΑ Εδώ είναι ο αποκλειστικός μου GRUB 2 /boot/grub/grub.cfg:
Κώδικας: Επιλογή όλων
#
#  grub.cfg
#  This is my custom boot menu, called /boot/grub/grub.cfg, located in my dedicated Grub 2 partition sda1.

#  Set the timeout
set timeout=10

#  Set the default boot entry.
set default=0

#  Kubuntu 9.10 on sda8 by chainload
menuentry "Kubuntu 9.10 on sda8, by chainload" {
chainloader (hd0,8)+1
}

#  Kubuntu 9.10 on sda8 by configfile
menuentry "Kubuntu 9.10 on sda8, by configfile" {
configfile (hd0,8)/boot/grub/cfg
}

#  Kubuntu 9.10 on sda8 by symlink
menuentry "Kubuntu 9.10 on sda8, by symlink" {
set root=(hd0,8)
linux /vmlinuz root=/dev/sda8 ro quiet splash
initrd /initrd.img
}

#  Kubuntu 8.04.3 on sda2, by configfile
menuentry "Kubuntu 8.04.3 on sda2, by configfile" {
configfile (hd0,2)/boot/grub.cfg
}

# sidux on sda3, by direct booting
menuentry "sidux on sda3"  {
set root=(hd0,3)
linux      /boot/vmlinuz-2.6.28-5.slh.3-sidux-686 root=UUID=306d94a5-107b-4c9e-ae03-a159e18dc1c7 ro quiet vga=791
initrd      /boot/initrd.img-2.6.28-5.slh.3-sidux-686
}



GRUB 2 σε USB (USB flash drive)

Για τις αρχές της εγκατάστασης του GRUB 2, Δείτε την συζήτηση κάτω απο τα "Εγκαθιστώντας τον GRUB 2" and "Η εντολή εγκατάστασης του GRUB (The grub-install Command)."

Παράδειγμα
(Οι δοκιμές μου απο αυτό.)

Χρησημοποίησα μία Kingston 1 GB , παρά του ότι το μέγεθος των φακέλων του GRUB 2 είναι 51 MB.
Διαμόρφωσα τον δίσκο flash σαν ext2 (χρησημοποιόντας τον διαχειρηστή διαμερισμάτων GParted). (θα μπορούσατε να χρησημοποιήσετε κάποιο άλλο σύστημα αρχείων FAT32 η ext3 η άλλο σύστημα)
Ορίστε το σημείο εκκίνησης στο νέο διαμέρισμα που φτιάξατε (χρησημοποιήστε το GParted για να το κάνετε αυτό: Partition > Manage Flags).
Έξοδος απο το GParted. Αποσυνδέστε το δίσκο flashdrive, και επανασυνδέστε τον.

Στο (χ)ubuntu, για να δείτε πως ονομάζετε δώστε την εντολή
Κώδικας: Επιλογή όλων
sudo fdisk -lu

Αποτέλεσμα:
Κώδικας: Επιλογή όλων
Disk /dev/sdb: 1031 MB, 1031798784 bytes
255 heads, 63 sectors/track, 125 cylinders, total 2015232 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x000f0fe1
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63     2008124     1004031   83  Linux


Ο Konqueror (η το Dolphin ή ο Nautilus) δείχνει πως είναι συνδεδεμένο σαν /media/disk.

=> Έτσι φαίνετε σαν sdb με το διαμέρισμα sdb1 συνδεδεμένο σαν /media/disk.

Εγκαταστήστε τον GRUB 2 στον δίσκο flashdrive. Δώστε στο τερματικό την εντολή:
Κώδικας: Επιλογή όλων
sudo grub-install --root-directory=/media/disk  /dev/sdb

Αποτέλεσμα:
Κώδικας: Επιλογή όλων
Installation finished. No error reported.
This is the contents of the device map /media/disk/boot/grub/device.map.

Ελέγξτε αν αυτό είναι σωστό η όχι. Άν κάποιες γραμμές είναι λάθος διορθώστε τις και εκτελέστε πάλι την ακολουθία εντολών (script) `grub-install'.
Κώδικας: Επιλογή όλων
(hd0)   /dev/sda
(hd1)   /dev/sdb



(Απο την σκοπιά του (x)ubuntu.)
(Αυτή είναι η χαρτογράφηση του δίσκου flashdrive, /boot/grub/device.map. Θα το αγνοήσω αυτό! Δέν έχει μεγάλη σημασία. Θα μπορούσατε να το διαμορφώσετε σαν υπερχρήστης (root) να διαβάζει
(hd0) /dev/sda
όπως φαίνετε απο την σκοπιά του δίσκου flashdrive όταν χρησιμοποιήται σαν δίσκος εκκίνησης.)
Άσ προχωρήσουμε τώρα ...

Ελέγξτε αν δημιουργήθηκε το /boot/grub και αν υπάρχουν μέσα σε αυτό οι φάκελοι του GRUB 2 .
Επανεκκινήστε και διαμορφώστε τις ρυθμίσεις του BIOS έτσι ώστε να εκκινεί απο τον δίσκο flashdrive (USB booting)
Το επόμενο πράγμα που είδα στην οθόνη είδα:
grub>

Χρησημοποίησα την εντολή ls για να δώ τους δίσκους και τα διαμερίσμα τα στον υπολογιστή:
grub>ls

Αφού ο υπολογιστής ξεκίνησε από το flashdrive ο δίσκος διαβάστηκε σαν (hd0,1). (Ο δίσκος από τον οποίο εκκινεί ο υπολογιστής διαβάζεται πάντα κατά την διαδικασία εκκίνησης σαν hd0--Αυτός είναι ένας απαράβατος όρος.)

Ο σκλήρός μου που συνήθως διαβάζεται σαν hd0 τώρα διαβάστηκε σαν hd1 και το Λ.Σ Kubuntu 9.10 ήταν στον (hd1,8).
Ετσι για να εκκινήσω το (x)ubuntu, Έδωσα την εντολή
grub>chainloader (hd1,8)+1
grub>boot
ΣΗΜΕΙΩΣΗ:
Έχοντας ήδη εγκαταστήσει τον GRUB 2 στο διαμέρισμα του τομέα εκκίνησης του Kubuntu σε περίπτωση που εάν ποτέ χρειαστεί να εκκινήσω αλυσιδωτά σε αυτό. (Χρησημοποίησα στο τερματικό του Kubuntu την εντολή, sudo grub-install /dev/sda8, όπου ο sda8 είναι το διαμέρισμα του Kubuntu όταν δεν υπάρχει άλλος σκληρός δίσκος προσαρτημένος στον υπολογιστή μου.) Εάν το το είχα ήδη κάνει αυτό, δεν θα μπορούσα να εκκινήσω αλυσιδωτά το Kubuntu οπότε θα έπρεπε να βρώ κάποιον άλλο τρόπο, θα χρησημοποιούσα για παράδειγμα συμβολικούς δεσμούς (symlinks):
grub>ls
Η ποιό πάνω εντολή θα μου έδειχνε ότι το Kubuntu είναι στο (hd1,8) ότα θα εκκινούσα τον GRUB 2 απο το δίσκο flashdrive, έτσι για να το εκκινήσω, θα έδινα την εντολή:
grub>set root=(hd1,8)
grub>linux /vmlinuz
grub>initrd /initrd.img
grub>boot

Η θα μπορούσατε να κάνετε αυτό (άν θυμόσαστε πώς!):
grub>set root=(hd1,8)
grub>linux /vmlinuz ro quite splash
grub>initrd /initrd.img
grub>boot


Έτσι λοιπόν εκκίνησα το (x)ubuntu χρησημοποιώντας το GRUB 2 δίσκο flashdrive.

Φτιάχνοντας ένα κατάλογο εκκίνησης (boot menu) για τον δίσκο flashdrive:
μπορείτε να δημιουργήσετε έναν φάκελο κειμένου (text file0 /boot/grub/grub.cfg για τον δίσκο flashdrive ακριβώς όπως επιδείχθηκε στο "Φτιάχνοντας ένα αποκλειστικό διαμέρισμα GRUB 2".

ΤΕΧΝΙΚΉ ΣΗΜΕΙΩΣΗ: Για να το κάνετε αυτό θα πρέπει να εργαστείτε σαν υπερχρήστης (root), ας πούμε ανοίγοντας τον Konqueror η το Dolphin σαν υπερχρήστης (kdesudo konqueror), η το Kate (kdesudo kate). Παρ' όλα αυτά δεν χρειάζεσται ένα grub.cfg στον δίσκο flashdrive. Μπορείτε απλά να το χρησημοποιήσετε όπως και εγώ για να δείτε τους δίσκους σας και μετά να εκκινήσετε ένα Λ.Σ. Άν δημιουργήσετε ένα αρχείο grub.cfg για τον δίσκο flashdrive ;ίσως θα θέλετε να συμπεριλάβετε και το Λ.Σ σε αυτό, και να χρησημοποιήται το GRUB 2 δίσκοflashdrive για να εκκινήται σε περίπτωση ανάγκης όπως και με το Super Grub Disk. Απλά θυμηθήτε ότι χρησημοποιώντας το grub.cfg στο δίσκο flashdrive, οι άλλοι δίσκοι του υπολογιστή θα μετακινηθούν κατά ένα αφού κατά την εκκίνηση ο δίσκος flashdrive θα διαβαστεί σαν hd0. Άν ο adrian15 δημιουργήσει ένα Super Grub Disk γιά τον GRUB 2 και συμπεριλάβει την λειτουργία της usb μετατόπισης (usbshift) , τότε η ιστορία αλλάζει--για τις αρχές του "USB drive shifting," δείτε το πώς να δημιουργήσετε έναν GRUB δίσκο flashdrive:

http://kubuntuforums.net/forums/index.p ... =3081748.0
[Τέλος Υποενότητας]


Η χρήση του όρου ριζικός "root"
Η δήλωση της ριζικής συσκευής του GRUB στο λίνουξ, root=UUID=, --root-directory=DIR INSTALL_DEVICE
(για να γίνει -- επέκταση/περισότερη διευκρίνηση)

ΠΑΡΑΔΕΙΓΜΑ
Σκεφτείτε αυτή την είσοδο (menuentry):
Κώδικας: Επιλογή όλων
### BEGIN /etc/grub.d/10_Linux ###
menuentry "Ubuntu 8.04.3 LTS, kernel 2.6.24-24-generic" {
set root=(hd1,2)
linux  /boot/vmlinuz-2.6.24-24-generic root=UUID=0df17bc5-0056-4ef7-bfca-251194b6eb44 ro quiet splash
initrd   /boot/initrd.img-2.6.24-24-generic
}


Η γραμμή
set root=(hd1,2)
δηλώνει την ριζική συσκευή του GRUB. Η ριζική συσκευή του GRUB είναι το διαμέρισμα που περιέχει τον πυρήνα (kernel) τους φακέλους vmlinuz και initrd files. Έτσι αυτό είναι το διαμέρισμα που περιέχει τον κατάλογο εκκίνησης /boot. Επίσης αφού οι φάκελοι εκκίνησης GRUB περιέχονται στο /boot/grub, οι φάκελοι GRUB βρίσκονται στο ίδιο διαμέρισμα εκκίνησης /boot. Σημείωση αυτό το κομμάτι της γραμμής λίνουξ: root=UUID=0df17bc5-0056-4ef7-bfca-251194b6eb44. Το παγκόσμιο μοναδικό προσδιοριστικό UUID (Universally Unique identifier) διαδρά με το διαμέρισμα που περιέχει το ριζικό σύστημα αρχείων (/) του Λ.Σ (σε αυτή την περίπτωση, Ubuntu 8.04.3 LTS, kernel 2.6.24-24-generic) Αυτό το διαμέρισμα (που προσδιορίστηκε από κάθε UUID) περνάει στον πυρήνα του λίνουξ (kernel) δηλώνοντας root=UUID=0df17bc5-0056-4ef7-bfca-251194b6eb44 στη γραμμή του λίνουξ.
Έτσι η γραμμή "set root=(hd1,2)" είναι ένα μύνημα στον GRUB 2; και η γραμμή "root=UUID=0df17bc5-0056-4ef7-bfca-251194b6eb44" είναι ένα μύνημα στον πυρήνα του (kernel).

Συνήθως για τους περισότερους χρήστες το ριζικό διαμέρισμα του GRUB (τοποθεσία του πυρήνα (kernel) και των φακέλων initrd) είναι ίδιο με το ριζικό διαμέρισμα του Λ.Σ. Σε αυτή την περίπτωση η ριζική συσκευή GRUB (διαμέρισμα) (hd1,2) θα ήταν η ίδια με το ριζίκό σύστημα αρχείων του Kubuntu (και για αυτό το UUID 0df17bc5-0056-4ef7-bfca-251194b6eb44 θα ήτα αυτό τουw (hd1,2)). Παρ' όλα αυτά αυτό δεν είναι το θέμα. Εάν έχετε ένα ξεχωριστό διαμέρισμα εκκίνησης /boot (ξεχωριστό απο το ριζικό σύστημα του ΛΣ.), Τοτε η δήλωση
set root=(hdx,y)
και η
root=UUID=xxx
δήλωση στην γραμμή λίνουξ θα διαδρούσαν σε δύο διαφορετικά διαμερίσματα.


Αλλη μία χρήση της λέξης ριζικός "root" και διαμορφώνοντας έναν ριζικό "root" για τον GRUB προκύπτει στην δήλωση
sudo grub-install --root-directory=DIR INSTALL_DEVICE; για παράδειγμα
sudo grub-install --root-directory=/sdb1 sda
όπου ο κατάλογος (DIR) είναι sdb1 και INSTALL_DEVICE είναι sda (i.e., ο MBR του δίσκου sda).
Αυτό κετευθήνει τον GRUB να εγκαταστήσει τα είδωλα στην INSTALL_DEVICE (χρησημοποιώντας τους φακέλους του καταλόγου αρχείων /usr/lib/grub/i386-pc/) κάτω απο τον κατάλογο αρχείων DIR αντί του ριζικού καταλόγου (root) (/) του Λ.Σ.


Διπλή εκκίνηση: Πώς να την διαμορφώσετε
Σε αυτό θα πρέπει να ακολουθήσετε τους οδηγούς του παλαιότερου GRUB, ακολουθήστε τον παρακάτω σύνδεσμο:
How To GRUB Methods - Toolkit
http://kubuntuforums.net/forums/index.p ... =3081671.0
(Δείτε τους τομείς 5 και 6)

Οι διαφορές θα αφορούν μόνο στο πώς θα διαμορφώσετε τα πράγματα, ειδικά τον κατάλογο εκκίνησης grub.cfg. Όπως θα ξέρετε στον GRUB 2, δεν διαμορφώνετε απ' ευθείας τον grub.cfg. Αντί αυτού διαμορφώνετε τον προκαθορισμένο φάκελο /etc/default/grub και τους φακέλους ακολουθίας εντολών (script) στο /etc/grub.d ακολουθώντας το Πώς να .
ΓΙΑ ΝΑ ΓΙΝΕΙ: Περισότερα πανω σε αυτό αργότερα.

- - - - - - - - - -
Cheat Sheet
Πρακτικές υπενθυμήσεις για τον GRUB 2 -- για αυτούς που ξέρουν τι κάνουν;)

Φάκελοι εικόνα: /usr/lib/grub/i386-pc/
boot/grub/grub.cfg Φάκελος διαμόρφωσης για τον κατάλογο εκκίνησης (boot menu). ΜΗΝ ΤΟΝ ΤΡΟΠΟΠΟΙΉΤΑΙ.
/etc/default/grub Προκαθορισμένος φάκελος ρυθμίσεων (διακοπή (Timeout), Προκαθορισμένο Λ.Σ (Default OS), Επιλογές πυρήνα (kernel options))
/etc/grub.d Φάκελος ακολουθίας εντολών του κατάλογου εκκίνησης (boot menu scripts):
00_header; 05_debian_theme: Background, text colors, themes
10_hurd Locates Hurd kernels; 10_linux Locates Linux kernels; 20_memtest86+
30_os-prober: Ερευνά για λίνουξ και άλλα Λ.Σ σε όλα τα διαμερίσματα
40_custom: Πρότυπο για διαμορφωμένες εισόδους εκκίνησης
Περισσότερα: /boot/grub/device.map, boot.img (MBR), core.img

Φτιάχνοντας τα πράγματα, Διάσωση
Ctrl+Alt+Del reboot PC; Super Grub Disk
Νέο grub.cfg: sudo update-grub or sudo grub-mkconfig
Εγκτάσταση , Επανεγκατάσταση του GRUB 2: sudo grub-install [ΣΥΣΚΕΥΗ_ΕΓΚΑΤΆΣΤΑΣΗΣ]
Στο MBR: sudo grub-install /dev/sdx; partition: sudo grub-install /dev/sdxn
If error: grub-install --recheck /dev/sdx; sudo grub-install --recheck /dev/sdxn
Εγκτάσταση του GRUB 2 στο MBR του δίσκου sda χρησημοποιόντας τον GRUB 2 στο /dev/sdb1/boot/grub:
sudo grub-install –root-directory=/media/sdb1 /dev/sda
Εγκτάσταση του GRUB 2 στον υπολογιστή (/usr/lib/grub/i386-pc/): sudo apt-get install grub-pc

Διάσωση με Live CD : Επανεγκατάσταση του GRUB 2
Κώδικας: Επιλογή όλων
sudo mkdir /media/sda2  /media/dev
sudo mount /dev/sda2 /media/sda2
sudo mount --bind /dev /media/sda2/dev

Εγκατάσταση του GRUB 2 στο MBR του δισκου sdb [η στο διαμέρισμα sda2] χρησημοποιόντας τους φακέλους GRUB 2 στον δίσκο sda2:
Κώδικας: Επιλογή όλων
sudo grub-install --root-directory=/media/sda2 /dev/sdb [or /dev/sda2]
umount  /media/sda2  /media/dev


Δίσκοι, Διαμερίσματα, Πληροφορίες sudo fdisk -lu & grub>ls
Ονομάζοντας: (hdx,y) or sdzy: drive x starts at 0; partitions y start at 1
Τερματικό εντολών: sudo fdisk -lu; df -hT; mounting: cat /etc/mtab; or: mount
UUIDs: sudo blkid; ls /dev/disk/by-uuid/ -alh
Kernel ver: uname -r; cat /proc/version; Linux ver: lsb_release -a
sudo grub-emu and then grub>ls
GRUB devices/drives: grub>ls; grub>ls -al directory
UUID of (hdx,y): grub>ls (hdx,y)
Ψάχνωντας: grub>search /boot/grub/grub.cfg; grub>search /boot/grub/boot.img

Σύνταξη, Επιλογές εκκίνησης
Φάκελος ρυθμίσεων: set root=(hdx,y) and configfile /boot/grub/grub.cfg; or:
configfile (hdx,y)/boot/grub/grub.cfg
symlinks: linux /vmlinuz root=UUID= xxx ro quiet splash; initrd /initrd.img
symlinks: linux /vmlinuz root=/dev/sdxn ro quiet splash
Αλυσιδωτά: set root=(hdx,y) and chainloader +1; chainloader (hdx,y)+1
Αλυσιδωτός MBR: chainloader (hdx)+1

Δικαιώματα
Εκτελέσιμο: sudo chmod 744 /etc/grub.d/file; Remove: sudo chmod -x /etc/grub.d/file
Ανάγνωση μόνο, όλοι: sudo chmod 444 /etc/grub.d/file
Εκτέλεση σε γραφικό (GUI): kdesudo konqueror η (dolphin), δεξί κλίκ στόν (rt-click on) φάκελο (file), Ιδιότητες (Properties), Δικαιώματα (Permissions)
grub.cfg: sudo chmod +w /boot/grub/grub.cfg; sudo chmod -w /boot/grub/grub.cfg

Δημιουργήστε μια ακολουθία εντολών (script) όνομάστε το /etc/grub.d/NN_myscript
Άδειος φάκελος κειμένου: kdesudo kate; Φάκελος (File) > Αποθήκευση ώς (Save As) /etc/grub.d/NN_myscript
Πληκτρολογήστε το (δείτε το πάρα κατω πρότυπο παράδειγμα).
Κάντε το εκτελέσιμο: sudo chmod 744 /etc/grub.d/NN_myscript
or, sudo chmod +x /etc/grub.d/NN_myscript
Γραφικό (GUI): kdesudo konqueror (dolphin), δεξί κλίκ (rt-click), Ιδιότητες (Properties), Δικαιώματα (Permissions)
Make new grub.cfg: sudo update-grub, sudo grub-mkconfig

> Πρότυπα, διαμορφωμένη είσοδος εκκίνησης για τον φάκελο /etc/grub.d/NN_name
Κώδικας: Επιλογή όλων
#!/bin/sh
echo "Adding name" >&2
cat << EOF
menuentry "name of OS boot entry"  {
set root=(hdx,y)
linux  /boot/vmlinuz-xyz root=UUID=xxx
initrd  /boot/initrd.img-xyz
}
EOF


Τροποποίηση μιας ακολουθίας εντολών (script)
Γραφικό, kdesudo konqueror, rt-click on script file, Open With Kate/Kwrite.
Τερματικό, kdesudo kate /etc/grub.d/script_name
Edit the file, File>Save, Exit. New grub.cfg: sudo up-date grub; sudo grub-mkconfig

Δίσκος Flashdrive /dev/sdc, sdc1 προσαρτημένος σε /media/disk; ορίστε σημείο εκκίνησης; εγκατασταση του GRUB 2:
sudo grub-install --root-directory=/media/disk /dev/sdc

Ξεχωριστό διαμέρισμα του GRUB 2: προσαρτημένος σε /media/sdb1; sda=MBR του πρώτου δίσκοθ στο BIOS
sudo grub-install –root-directory=/media/sdb1 /dev/sda

Εργασία σαν υπερχρήστης (root) (8.10+: kdesudo; 8.04: kdesu)
kdesudo kate /path-to-file; kdesudo konqueror (or dolphin)
Στο τερματικό σαν υπερχρήστης: sudo –i; sudo su
Γραφικός διαχειρηστής αρχείων (GUI), πλοήγηση στον φάκελο, δεξί κλίκ στον φάκελο, Πράξη, Τροποποίηση σαν υπερχρήστης.
sudo [ΕΝΤΟΛΗ]; sudo grub-install [ΣΥΣΚΕΥΗ_ΕΓΚΑΤΑΣΤΑΣΗΣ];
sudo update-grub; sudo grub-mkconfig

[Τέλος του GRUB 2 Πρακτικές Υπενθυμήσεις]




:arrow: ΚΕΦΑΛΑΙΟ 5
Εκπαιδευτικά μαθήματα: Που μπορείτε να μεταβείτε για να μελετήσετε το GRUB 2

GRUB 2 Τα βασικά, από drs305
http://ubuntuforums.org/showthread.php?t=1195275
Απολύτως θαυμάσια μεταχείριση της επεξεργασίας του μενού εκκίνησης(boot menu) και μερικές βασικές έννοιες κλειδιά του GRUB 2

GRUB 2 Εγχειρίδιο λειτουργίας
http://grub.enbug.org/Manual
Ελπίζουμε σε αυτό να βρείτε όλα όσα χρειάζεστε, μαζί με τις σελίδες χειρισμού(man pages).

GNU GRUB 1.96/2
http://members.iinet.net/%7Eherman546/p20.html
Φαίνεται ότι είναι μια εγκυκλοπαιδική, περιεκτική κάλυψη.

Τα εκπαιδευτικά μαθήματα για το UBUNTU έναντι των αντίστοιχων για το KUBUNTU:
Ένα εκπαιδευτικό μάθημα του GRUB 2 που έχει γραφτεί για το Ubuntu εφαρμόζεται στο Kubuntu. Παρακολουθήστε τις φανερές διαφορές σε μερικές εντολές και σε εργαλεία του λειτουργικού συστήματος.
Στο Ubuntu θα δείτε
gksudo gedit /boot/grub/grub.cfg
χρησιμοποιείται για να ανοίγετε το grub.cfg σαν διαχειριστές χρησιμοποιώντας τον επεξεργαστή κειμένου gedit.
Στο Kubuntu, θα χρησιμοποιούσατε
kdesudo kate /boot/grub/grub.cfg.
Στο Kubuntu, πιθανόν θα χρησιμοποιείτε Konqueror ή Dolphin σαν το διαχειριστή αρχείων σας. Επίσης υπάρχουν διαφορετικοί διαχειριστές πακέτων που χρησιμοποιούνται σε κάθε λειτουργικό, ακόμα και μέσα στο ίδιο λειτουργικό κάποιες φορές! Νομίζω ότι θα είστε ικανοί να το ξεκαθαρίζετε, και πάντα μπορείτε να θέτετε ερωτήσεις σε ένα από τα κανονικά φόρουμ του Kubuntu.
>>> Οι εντολές του GRUB είναι οι ίδιες στο Ubuntu και στο Kubuntu και στα άλλα Linux λειτουργικά.

Κοιτάξτε επίσης τις Αναφορές που περιλαμβάνουν βασικά θέματα και προχωρημένα/ειδικά θέματα.

= = = = = = = = = = = = = = = = = = = =
Παράρτημα: Τεχνικές

--- Εγκαθιστώντας το Kubuntu--τοποθέτηση του GRUB 2
--- Δουλεύοντας σαν διαχειριστές -- κοιτάξτε παρακάτω
--- Δικαιώματα: ανάγνωση, γραφή, εκτέλεση; αλλαγή του εκτελέσιμου bit – κοιτάξτε παρακάτω
--- Ο όρος chroot -- πως χρησιμοποιείται -- δείτε παρακάτω
--- Κονσόλα, δείτε:
Εντολές στην κονσόλα: Αρχάριοι: 3 μέρη
http://kubuntuforums.net/forums/index.p ... =3091607.0
--- Το κληροδότημα του GRUB, δείτε:
Πως χρησιμοποιούνται οι μέθοδοι και τα εργαλεία του GRUB
http://kubuntuforums.net/forums/index.p ... =3081671.0

= = = = = = = = = = = = = =
Εγκαθιστώντας το (χ)ubuntu-- τοποθέτηση του GRUB 2
Η μέθοδος με το Live CD

Η μέθοδος εγκατάστασης με το Live CD είναι εύκολη, γρήγορη και βολική, διότι κατόπιν θα έχετε ένα Live CD να το χρησιμοποιείτε για τη διάσωση και επισκευή του συστήματός σας.

Εγκαθιστώντας τα αρχεία του GRUB 2

Ο GRUB 2 είναι καθιερωμένος στο (χ)ubuntu ξεκινώντας από το 9.10. Κατά τη διάρκεια της εγκατάστασης του από το Live CD, μπορείτε να ορίσετε αν θέλετε να εγκατασταθεί ο GRUB 2, και αν όντως θέλετε, που να τοποθετηθεί. Πως γίνεται αυτό:

Ξεκινήστε τον εγκαταστάτη του Live CD .
Βήμα: Οργάνωση του δίσκου(Disk Setup)
"Καθoρίστε τις κατατμήσεις του δίσκου(Partitions) χειροκίνητα"
Βήμα: Σύνοψη
Το κουμπί”για προχωρημένους”(Advanced button) που είναι χαμηλά δεξιά.
Tσεκάρετε ή μην τσεκάρετε για να εγκαταστήσετε το πρόγραμμα φόρτωσης εκκινητήρα (bootloader) του GRUB 2
Επιλέξτε από την πτυσσόμενη λίστα που να εγκαταστήσετε το GRUB 2
sda = O Master Boot Record(MBR) του οδηγού sda
sda1 = η πρώτη κατάτμηση του οδηγού sda
sdb = Ο MBR του οδηγού sdb
κ.τ.λ.


Προσοχή:

> Εάν εγκαταστήσετε το GRUB σε ένα MBR (sda, sdb, sdc, κ.τ.λ.), αυτό θα γράψει πάνω από κάθε άλλο πρόγραμμα φόρτωσης εκκινητήρα (bootloader) που είναι ήδη εγκατεστημένο σε αυτό το MBR, και τότε ο GRUB 2 από το τρέχον λειτουργικό που εγκαθιστάς θα ελέγχει το μενού εκκίνησης που βλέπεις όταν εκκινείς το PC σου. Αυτό είναι εντάξει, απλά να το γνωρίζεις.

> Εάν εγκαταστήσετε το GRUB 2 σε ένα τομέα μιας κατάτμησης εκκίνησης, όπου εγκαθιστάτε το τρέχον λειτουργικό (π.χ., sdan, όπου n=1,2,3,4...), όταν επανεκκινείτε το PC σας, θα πρέπει να εκκινείτε χειροκίνητα το νέο λειτουργικό που μόλις εγκαταστήσατε. Μπορείτε να το κάνετε χρησιμοποιώντας το chainloader, ως ακολούθως:
-- Επανεκκινήστε
-- Εάν δείτε ένα μενού εκκίνησης (από μια προηγούμενη εγκατάσταση λειτουργικού Linux), πιέστε το κλειδί “c” για να πάρετε ένα προτρεπτικό του grub, grub>. Εάν δεν δείτε ένα μενού εκκίνησης αλλά μόνο το προτρεπτικό του GRUB, grub>, τότε είναι εντάξει επίσης.
-- Ας πούμε ότι το νέο λειτουργικό σας Kubuntu εγκαταστάθηκε στο sda9. Είναι το ίδιο με το (hd0,9). Τότε
grub>chainloader (hd0,9)+1
grub>boot
και θα εκκινήσετε μέσα στο νέο σας λειτουργικό.

Δημιουργώντας νέα μενού εκκίνησης

> Στο νέο σας λειτουργικό, μπορείτε να δημιουργήσετε ένα ολόκληρο μενού εκκίνησης απλά εκτελώντας τις εντολές sudo update-grub or sudo grub-mkconfig.

> Στα υπάρχοντα λειτουργικά σας, μπορείτε να ξαναδημιουργήσετε μενού εκκίνησης για να συμπεριλάβετε το νέο σας λειτουργικό με τον ίδιο τρόπο:
Κονσόλα
sudo update-grub or sudo grub-mkconfig

> Στη χειρότερη περίπτωση, εάν για κάποιο λόγο δεν δουλεύει, μπορείτε να δημιουργήσετε μια συνήθη εισαγωγή εκκίνησης για να συμπεριλάβετε το νέο σας λειτουργικό. Δείτε το τμήμα 4. Για να πάρετε τις λεπτομέρειες του μενού εισαγωγής για το νέο λειτουργικό, για το υπάρχον grub.cfg, ίσως να πρέπει να εκκινήσετε μέσα στο νέο λειτουργικό και να αντιγράψετε τις λεπτομέρειες από το δικό του grub.cfg. Ή, απλά εκκινήστε το νέο σας λειτουργικό χρησιμοποιώντας συμβολοσυνδέσμους ή chainloader (από ένα άλλο μενού εκκίνησης λειτουργικού), για το οποίο δεν χρειάζεστε καθόλου λεπτομέρειες ειδικές για το νέο λειτουργικό. Δείτε το Τμήμα 4, "4 τρόποι για να εκκινήσετε σε ένα λειτουργικό."

= = = = = = = = = = = = = =
Δουλεύοντας ως διαχειριστής

Ανοίγοντας έναν επεξεργαστή κειμένου (π.χ., Kate, Kwrite, κ.τ.λ.) για να δείτε το αρχείο και/ή να το επεξεργαστείτε :
-KDE:
kdesudo kate η διαδρομή του αρχείου
Παράδειγμα: kdesudo kate /etc/fstab
-Gnome:
gksudo gedit η διαδρομή του αρχείου
Παράδειγμα: gksudo gedit /etc/fstab

Ανοίγοντας ένα άδειο αρχείο κειμένου ως διαχειριστής:
kdesudo kate ή gksudo gedit
(μετά Αρχείο > Αποθήκευση ως)

Ανοίγοντας έναν διαχειριστή αρχείων ως διαχειριστής:
στο kde: kdesudo konqueror (ή dolphin)
στο gnome: gksudo nautilus

Ανοίγοντας ένα τερματικό ως διαχειριστής:
sudo –i (για να πάρετε ένα τερματικό “διαχειριστή”)
ή:
sudo su

Ο διαχειριστής αρχείων σας ίσως υποστηρίζει αυτό το χαρακτηριστικό:
Ανοίξτε το διαχειριστή αρχείων, πλοηγηθείτε μέχρι το αρχείο, κάνετε δεξί κλικ πάνω στο αρχείο, Ενέργειες, Επεξεργασία ως διαχειριστής.

Στη γραμμή εντολών της κονσόλας (BASH): Χρησιμοποιήστε sudo.
Παράδειγμα: sudo fdisk -lu
Για να ανοίξετε μια γραφική εφαρμογή (έναν επεξεργαστή κειμένου, έναν διαχειριστή αρχείων), χρησιμοποιήστε είτε kdesudo είτε kdesu (δείτε παραπάνω).

= = = = = = = = = = = = = = =
Δικαιώματα: ανάγνωση, γραφή, εκτέλεση; αλλάξτε το εκτελέσιμο bit

Δείτε το μέρος 2 από
Εντολές στην κονσόλα: Αρχάριοι: 3 μέρη
http://kubuntuforums.net/forums/index.p ... =3091607.0
Ιδιοκτησία και δικαιώματα Χρησιμοποιήστε ls -l για να τα δείτε; chown & chmod για να τα αλλάξετε.
Δείτε tuxfiles
http://www.tuxfiles.org/linuxhelp/filepermissions.html
(συμβολικός τρόπος)
Εδώ υπάρχει ένα φύλλο σύντομης υπενθύμισης για εκείνους που γνωρίζουν αυτό το υλικό:

Θέτοντας ιδιοκτησία και δικαιώματα σε γραφικό περιβάλλον GUI
Ανοίξτε Konqueror ή Dolphin ως διαχειριστής (kdesudo konqueror), πλοηγηθείτε στο αρχείο ή τον κατάλογο, δεξί κλικ, Ιδιότητες, δικαίωμα, κάντε αλλαγές, OK. Στον Konqueror/Dolphin, κάντε κλικ στο κουμπί “Δικαιώματα για προχωρημένους” για να δείτε όλες τις επιλογές: ιδιοκτήτες, ομάδα, άλλοι και ανάγνωση, γραφή, εκτέλεση.

CLI
ιδιοκτήτης--ομάδα--άλλοι
Για κάθε κλάση: ανάγνωση, γραφή, εκτέλεση
ls -l: θέτει σε λίστα τα αρχεία, χρησιμοποιεί ένα μορφότυπο μακριάς λίστας => δείχνει την ιδιοκτησία και τα δικαιώματα

Δικαιώματα – αριθμητικός τύπος
Υπάρχουν 8 πιθανότητες (2*2*2) για ανάγνωση (on ή off) - γραφή (on ή off) - εκτέλεση (on ή off) δικαιώματα σε ένα αρχείο ή κατάλογο (2*2*2 = 8 ). Τα οκταδικά ισοδύναμα για αυτούς τους δυαδικούς αριθμούς είναι:
Κώδικας: Επιλογή όλων
0: ---;  1: --x;  2: -w-;  3: -wx;  4:  r--;  5:  r-x;  6:  rw-:  7:  rwx

744: Ο ιδιοκτήτης μπορεί να κάνει τα πάντα, η ομάδα έχει μόνο δικαίωμα ανάγνωσης, οι άλλοι έχουν μόνο δικαίωμα ανάγνωσης

Δικαιώματα – συμβολικός τύπος
Υποθέστε ότι το αρχείο xyzfile ανήκει στον διαχειριστή.
Για να το κάνετε εκτελέσιμο για όλους τους χρήστες
sudo chmod +x xyzfile
Για να αλλάξετε το δικαίωμα εκτέλεσης από όλους τους χρήστες
sudo chmod -x xyzfile

--> Δείτε Tuxfiles

= = = = = = = = = = = = = = =
Ο όρος Chroot – πως χρησιμοποιείται
Από, Μέρος 3 του
Εντολές στην κονσόλα: Αρχάριοι: 3 μέρη
http://kubuntuforums.net/forums/index.p ... =3091607.0

Ο όρος “chroot μέσα σε μια κατάτμηση” σημαίνει να εισέρχεστε σε μια κατάτμηση με δικαιώματα διαχειριστή(“ως διαχειριστής”). (Ο κατάλογος του διαχειριστή θέτεται ισότιμος με την κατάτμηση.)
Εδώ εξηγούμε πως γίνεται:
Ας πούμε ότι το (χ)ubuntu βρίσκεται στην κατάτμηση sda2, κάτι σπάει εκεί και πρέπει να χρησιμοποιήσετε το Kubuntu σας.
Βάζετε το Live CD σε chroot μέσα στο sda2 και διορθώνετε το πρόβλημα. Από το Live (χ)ubuntu CD γράφετε σε κονσόλα:
Κώδικας: Επιλογή όλων
sudo mkdir /media/fixthings
sudo mount /dev/sda2  /media/fixthings
sudo chroot  /media/fixthings

=> Τώρα είστε “μέσα” στο sda2 “ως διαχειριστής” και μπορείτε να εργαστείτε από εκεί σαν να είχατε εκκινήσει πραγματικά μέσα σε αυτό. Το προτρεπτικό εντολής είναι προτρεπτικό διαχειριστή “... :/#” Μπορείτε να εισάγετε τις εντολές που θα χησιμοποιήσετε για να διορθώσετε το πρόβλημα στο sda2. Όταν το κάνετε, τυπώστε exit για να φύγετε από το προτρεπτικό διαχειριστή:
exit
Τώρα το προτρεπτικό είναι κανονικό, προτρεπτικό μη διαχειριστή “... :~$”
Για να είστε ασφαλείς, αποπροσαρτήστε την κατάτμηση:
Κώδικας: Επιλογή όλων
sudo umount /dev/sda2  /media/fixthings

=> ΠΡΟΣΟΧΗ Μην χρησιμοποιείτε το chroot εκτός κι αν ξέρετε τι κάνετε; μπορείτε να καταστρέψετε το σύστημα αρχείων του (χ)ubuntu εάν κάνετε ένα λάθος ενώ χρησιμοποιείτε το chroot.



-Τέλος-

Ο πρωτότυπος αγγλικός οδηγός έχει γραφτεί από τον Qqmike στο kubuntuforums.net
Η μετάφραση έγινε στην έκδοση "9/23/09" με βάση τον πρωτότυπο οδηγό.

---------------------------------------------------------------------------------------------------
Ένα μεγάλο μπράβο :clap: στα μέλη του φόρουμ που ανέλαβαν την μετάφραση:
vagrale13, Epirotes, MakisM1, c7p, giormatsis, dimosfire


Re: Grub 2 (οδηγός προς μετάφραση)

ΔημοσίευσηΔημοσιεύτηκε: 29 Σεπ 2009, 20:43
από ftso
Αναφορές

Grub 2 Τα Βασικά, από drs305
http://ubuntuforums.org/showthread.php?t=1195275
Απολύτως θαυμάσια μεταχείριση της επεξεργασίας του μενού εκκίνησης(boot menu) και μερικές βασικές έννοιες κλειδιά του GRUB 2.

Grub 2 Εγχειρίδιο λειτουργίας
http://grub.enbug.org/Manual
Ελπίζουμε σε αυτό να βρείτε όλα όσα χρειάζεστε, μαζί με τις σελίδες χειρισμού(man pages).

GRUB 2: Live CD Οδηγός εγκατάστασης
http://grub.enbug.org/Grub2LiveCdInstallGuide
Φαίνεται ότι αυτή είναι η αυθεντική και οριστική αντιμετώπιση από 9-9-2009.

GNU GRUB 1.96/2
http://members.iinet.net/%7Eherman546/p20.html
Φαίνεται ότι είναι μια εγκυκλοπαιδική, περιεκτική κάλυψη.

GRUB 2 -- Ubuntu Wiki -- FrontPage
http://grub.enbug.org/

GRUB 2 -- Ubuntu Wiki
https://wiki.ubuntu.com/Grub2

FranklinPiat, Wiki -- good stuff!
Grub v2 εγχειρίδιο, σελίδες λειτουργιών
http://grub.enbug.org/FranklinPiat/GrubManual

GRUB 2, επίσημη ιστοσελίδα
http://www.gnu.org/software/grub/grub-2.en.html

GNU GRUB, κύρια ιστοσελίδα, κληροδότημα του GRUB
http://www.gnu.org/software/grub/

GRUB Wiki: grub.cfg
http://grub.enbug.org/grub.cfg

GRUB 2 Εντολές, GRUB Wiki
http://grub.enbug.org/CommandList
Compares GRUB Legacy to GRUB 2 commands.

Διαχειριστής εκκίνησης
https://help.ubuntu.com/community/StartUpManager

GRUB & GRUB 2 Διαδικασία εκκίνησης
http://www.pixelbeat.org/docs/disk/

Φορτωτής εκκίνησης
http://en.wikipedia.org/wiki/Boot_loader

GNU GRUB
http://en.wikipedia.org/wiki/GRUB

Επιλογές εκκίνησης
https://help.ubuntu.com/community/BootOptions

Παράμετροι πυρήνα
http://www.kernel.org/doc/Documentation ... meters.txt

Κληροδότημα του GRUB
-- Πως χρησιμοποιούνται οι μέθοδοι και τα εργαλεία του GRUB
http://kubuntuforums.net/forums/index.p ... =3081671.0

GParted Live CD
http://gparted.sourceforge.net/livecd.php
Για να δημιουργείτε κατατμήσεις και να μορφοποιείτε το σκληρό σας δίσκο.

Super Grub Disk
http://www.supergrubdisk.org/
Θα εκκινήσετε μέσα στο λειτουργικό σας, όταν δεν μπορείτε να το κάνετε μόνοι.

GRUB 2 εγκατάσταση
http://www.techenclave.com/guides-and-t ... 92883.html

GRUB2 Θεματοποίηση
http://ubuntuforums.org/showthread.php?t=1182436

KernelTeam/Grub2Testing
https://wiki.ubuntu.com/KernelTeam/Grub2Testing

Χρησιμοποιώντας το UUID
https://help.ubuntu.com/community/UsingUUID

BIOS Εκκίνηση, κατάτμηση, και γιατί χρησιμοποιείται ο GRUB?
http://grub.enbug.org/BIOS_Boot_Partition

GUID Πίνακας κατάτμησης
http://en.wikipedia.org/wiki/GUID_Partition_Table

Τεχνική σημείωση TN2166, Μυστικά του GPT
http://developer.apple.com/mac/library/ ... n2166.html

Εκκινήστε ένα εικονικό αρχείο μέσω Grub 2
http://michael-prokop.at/blog/2009/05/2 ... via-grub2/

USB πολλαπλής εκκίνησης με Grub2 (εκκινήστε απευθείας από εικονικά αρχεία)
http://www.panticz.de/MultiBootUSB

GRUB Γραφικά Μενού Ανάπτυξη Ημερολόγιο
http://grub.gibibit.com/Journal

Debian Wiki, GRUB, grub.cfg
http://wiki.debian.org/Grub/grub.cfg.manpage
As of 9-9-09, it doesn't exist.

Κάνοντας μικροαλλαγές στο GRUB 2
http://www.drlock.com/blog/2008/07/11/tweaking-grub-2/

GRUB 2 διαμόρφωση, shirish
http://www.techenclave.com/guides-and-t ... 93512.html

Πως να εγκαταστήσετε το GRUB 2 στο Ubuntu 9.04
http://www.linuxtoday.com/news_story.ph ... 5-OS-HL-SM

Δημιουργώντας μια κατάτμηση αφιερωμένη στο GRUB
http://www.troubleshooters.com/linux/gr ... tition.htm

Κονσόλα/τερματικό, γραμμή εντολών:
Εντολές στην κονσόλα: Αρχάριοι: 3 μέρη
http://kubuntuforums.net/forums/index.p ... =3091607.0
και
tuxfiles
http://www.tuxfiles.org/linuxhelp/dirs.html
Δικαιώματα, συστήματα αρχείων, χρησιμοποιώντας τη γραμμή εντολών.

Re: Grub 2 (οδηγός προς μετάφραση)

ΔημοσίευσηΔημοσιεύτηκε: 29 Σεπ 2009, 20:56
από ftso
Παρακάτω δίνω κομμάτια του οδηγού.
Όποιος μπορεί να τα μεταφράσει σωστά λέξη λέξη και χωρίς να χαλάσει την μορφοποίηση το αναφέρει και ξεκινάει.
Μόλις τελειώσει, παραθέτει την μετάφραση σε code tag .
Προσοχή! Η ορολογία και οι εντολές θα πρέπει να μείνουν αμετάφραστες.
O grub 2 απ'ότι φαίνεται θα μας συντροφεύει για αρκετό καιρό..οπότε ο οδηγός θα είναι πλήρης και διαχρονικός και για αυτό αξίζει μια προσπάθεια μετάφρασης απ'όλους όσους μπορούν.

ΚΟΜΜΑΤΙ 1 (το ανέλαβε ο vagrale13)
Κώδικας: Επιλογή όλων
[b]SECTION  1[/b]
[b]Introduction[/b]
   History:  GRUB Legacy, GRUB 2
   Differences between GRUB Legacy and GRUB 2
   GRUB 2 commands

[b]History:  GRUB Legacy, GRUB 2[/b]
"Briefly, [i]boot loader[/i] is the first software program that runs when a computer starts. It is responsible for loading and transferring control to the operating system kernel software (such as the Hurd or the Linux). The kernel, in turn, initializes the rest of the operating system (e.g. GNU)." (gnu.org)

The original GRUB (GRand Unified Bootloader) was developed by Erich Stefan Boleyn, from which came the GRUB most of us know, GRUB version 0.9x, and that is now referred to as GRUB Legacy (or even GRUB 1 by some writers).  GRUB 2 replaces GRUB Legacy.  (GRUB 2 is actually the end result of versions GRUB 1.xx; e.g., 1,96, 1.97, ...)

For the history of GRUB and some interesting links, see
http://www.gnu.org/software/grub/

GRUB 2 is cleaner, more efficient, powerful, and more elegant, in many ways it is simpler to use than GRUB Legacy.
GRUB 2:  http://www.gnu.org/software/grub/grub-2.en.html
Its mailing list for development,
GRUB-devel:   http://lists.gnu.org/mailman/listinfo/grub-devel
And the Wiki:   http://grub.enbug.org/

GRUB 2 is the default bootloader in 9.10
https://lists.ubuntu.com/archives/ubuntu-devel-announce/2009-June/000573.html


[b]Differences between GRUB Legacy and GRUB 2[/b]

From the user's view, the biggest difference between the two versions of GRUB concerns the [u]boot menu configuration file[/u].
GRUB 2:   /boot/grub/grub.cfg
GRUB Legacy:   /boot/grub/menu.lst
The configuration file is used to generate the boot menu you see at boot time.
In GRUB Legacy, you can edit menu.lst directly and in any way you wish.
In GRUB 2, you should not edit grub.cfg directly.  Instead, you edit the file /etc/default/grub (which contains some default settings); this file feeds data to scripts in the folder /etc/grub.d.  And you may edit the scripts (text files) in the folder /etc/grub.d; these scripts are used to generate the configuration file /boot/grub/grub.cfg.  When you need a new grub.cfg, simply do sudo update-grub or sudo grub-mkconfig.
[b]It is conceptually simple in GRUB 2[/b]:
You can edit the file /etc/default/grub and you can edit the scripts in /etc/grub.d, then run the command sudo update-grub (or sudo grub-mkconfig), and the file grub.cfg is automatically generated.

[u]The configuration file in GRUB 2 grub.cfg looks different[/u] than the GRUB Legacy menu.lst.  For example, in GRUB legacy, you use
default 0
timeout 5
In GRUB 2, default and timeout are variables, and it is
set default =0
set timeout=5

A boot entry in GRUB Legacy menu.lst might look like this:
title     Ubuntu 8.04.3 LTS, kernel 2.6.24-24-generic
root   (hd1,2)
kernel   /boot/vmlinuz-2.6.24-24-generic root=UUID=0df17bc5-0056-4ef7-bfca-251194b6eb44 ro quiet splash
initrd   /boot/initrd.img-2.6.24-24-generic

In GRUB 2 grub.cfg, it would look like this:

### BEGIN /etc/grub.d/10_Linux ###
menuentry "Ubuntu 8.04.3 LTS, kernel 2.6.24-24-generic" {
set root=(hd1,2)
linux  /boot/vmlinuz-2.6.24-24-generic root=UUID=0df17bc5-0056-4ef7-bfca-251194b6eb44 ro quiet splash
initrd   /boot/initrd.img-2.6.24-24-generic
}
### END /etc/grub.d/10_Linux ###

Note how the title line is changed in GRUB 2:  Use [u]menuentry[/u] instead, put the text in quotes, and start the boot entry with a left brace {, ending it with a right brace }.  Instead of kernel, the word linux is used; initrd is the same.  Instead of root=, in GRUB 2 it is set root= (in GRUB 2, root is not a constant value, it is a variable).

[u]sudo grub does not get you a GRUB 2 shell at Konsole[/u]
In GRUB Legacy, the user may open a GRUB shell by typing sudo grub, and then use it to install/re-install GRUB (root-setup-quit) to a Master Boot Record or to a partition boot sector.  In GRUB 2, there is no such option.  Instead, the key command is the Konsole (BASH) command [u]grub-install.[/u]  At Konsole, as root, you will use sudo grub-install to install/re-install GRUB 2 to a Master Boot Record or to a partition boot sector.

[u]Device names have changed[/u].  In GRUB Legacy, the numbering of both hard drives and partitions start at zero.  (hd0,0) is the first hard drive (hd0), the first partition (partition zero).  [b]In GRUB 2, the numbering of hard drives also starts at zero[/b]: hd0 is the first hard drive.  But [b][u]partition numbering starts at 1[/u][/b]:  (hd0,1) is the first hard drive, the first partition (partition one).

In GRUB Legacy, we use the find command; e.g., grub>find /boot/grub/menu.lst.  [u]In GRUB 2, the search command replaces the find command[/u]:  grub>search /boot/grub/grub.cfg.

In GRUB Legacy, the geometry command (at the grub> prompt) is very useful for listing devices as GRUB sees them on your PC.  It is not used in GRUB 2.  Instead [u]the list command ls[/u] (at the grub> prompt) [u]replaces the geometry command[/u].

GRUB Legacy uses stages: stage_1, stage_1.5, and stage_2.  Those are replaced in GRUB 2 by[u] [b]boot.img[/b][/u] (a 512-byte file that corresponds to stage_1 and is installed to a MBR); there is no stage_1.5 in GRUB 2; and [u][b]core.img[/b][/u] in GRUB 2 takes the place of stage_2 (or, perhaps, of both stage 1.5 and stage_2).  Details:  See Section 4 the subsection "grub-install:  A key command."


[b]GRUB 2  Commands --  compared to GRUB Legacy[/b]
Comparison chart:
http://grub.enbug.org/CommandList
Key useful items to note:

[u][b]GRUB Legacy  <-->  GRUB 2[/b][/u]

[b]find[/b] is replaced with [b]search[/b]
[b]geometry[/b] is gone and replaced by [b]ls[/b]
[b]kernel[/b] (in menu.lst) is replaced by [b]linux[/b] (and other terms for different OSs)
[b]title[/b] (in menu.lst) is replaced by [b]menuentry[/b] (in grub.cfg)
[b]root[/b] is still used but is now [b]a variable[/b]
[b]setup[/b] is gone; the work is done by [b]grub-install[/b]
[b]quit[/b] is gone [b](halt[/b] is sometimes used)
[b]map[/b] is replaced by [b]drivemap[/b]
[b]device[/b] is replaced by [b]loopback[/b] (makes a drive out of a file)
[b]set[/b] is a GRUB 2 term used to set a variable



ΚΟΜΜΑΤΙ 2 (το ανέλαβε ο Epirotes)
Κώδικας: Επιλογή όλων
[b]SECTION  2   Key Facts About the Boot menu, grub.cfg[/b]

   Quick version -- Overview -- Details
   /etc/grub/default  -->  /etc/grub.d  -->  /boot/grub/menu.lst
   Rules for editing grub.cfg, /etc/default/grub, and the script files in /etc/grub.d
   GRUB 2 device numbering (hdx,y) is new:
       Partitions y start at 1; hard drives x start at zero
   Linux device notation is the same: sdxn, x = a, b, c, ... n = 1, 2, 3, ...


Quick version:
/etc/grub/default  -->  /etc/grub.d  -->  /boot/grub/menu.lst
Rules:
--  Do not edit /boot/grub/grub/cfg.
--  You may edit (as root) /etc/default/grub
         (timeout, default OS, kernel options, resolution of the boot menu)
--  You may edit (as root) the scripts in /etc/grub.d.
--  Together, /etc/default/grub and the scripts in /etc/grub.d generate /boot/grub/grub.cfg.
--  To create a script, start with a text file as root: kdesudo kate
--  To make [i]filename[/i] executable: sudo chmod 744 /etc/grub.d/[i]filename[/i]
         or, sudo chmod +x  /etc/grub.d/[i]filename[/i]
--  To remove execute permission from [i]filename:[/i] sudo chmod -x /etc/grub.d/[i]filename[/i]
--  To open Konqueror (Dolphin) as root:  kdesudo konqueror
--  [u]Generate a new configuration file[/u] /boot/grub/grub.cfg after editing /etc/default/grub and after editing, creating, or deleting scripts in /etc/grub.d, as follows:
[b]sudo update-grub[/b]  or  [b]sudo grub-mkconfig[/b]

[u]TODO[/u], check this: grub-mkconfig ... used instead of update-grub in Karmic Koala?
sudo grub-mkconfig ?

IMPORTANT:  [u][b]GRUB 2 device numbering is new[/b][/u]
In GRUB 2 (as in GRUB Legacy), hard drives start at zero:  hd0 is the first hard drive.  In GRUB 2 (unlike GRUB Legacy), partition numbering starts at 1:  (hd0,1) is the first partition in the first hard drive;  (hd0,2) is the second partition in the first hard drive;  (hd1,0) is the first partition in the second hard drive.

[b]Linux device notation is the same as in GRUB Legacy.[/b]
sda is the first hard drive; sdb is the second hard drive; sdc is the third; etc.
sda1 is the first partition of the first hard drive;  sda2 is the second partition of the first hard drive; etc.


[b]Details[/b]
The configuration file is called /boot/grub/grub.cfg, and it generates the [u]boot menu[/u] you see on your screen when you boot your PC (and so, /boot/grub/grub.cfg can be called the boot menu configuration file).  You are NOT supposed to edit it (it is read-only).  It is generated from a folder of scripts called /etc/grub.d.  Another key file is /etc/grub/default and it feeds default data to the scripts in /etc/grub.d.  You may edit /etc/grub/default (as root).  You may also edit the scripts in /etc/grub.d (as root).  If you create a new file in /etc/grub.d, you must make it executable if you want the entry included in the configuration file grub.cfg.  If you do not want a script to execute (and so remove that entry from grub.cfg), you must remove the execute bit (i.e., remove the execute permission).

[b]>>> Key reminder[/b]:
Generate a [u]new grub.cfg after changing anything[/u] in /etc/default/grub or /etc/grub.d, by:
[b]sudo update-grub[/b] or [b]grub-mkconfig[/b]


Experts:  Editing grub.cfg
The file is read-only, so change permission to include Write:
sudo chmod +w  /boot/grub/grub.cfg
Then do the edits as root and Save.  When update-grub is run, the file returns to read-only, AND your edits may be overwritten (and therefore gone).
Optional: After editing, restore permissions to disallow writing:
sudo chmod -w  /boot/grub/grub.cfg   or
sudo chmod 444 /boot/grub/grub.cfg

[b]The default settings file  /etc/grub/default[/b]
This file feeds data to the scripts in /etc/grub.d.  It contains the Default operating system, the Timeout, kernel options, resolution of the graphical boot menu, and other default settings.  You may edit this file with root privileges.

[b]The folder of scripts /etc/grub.d[/b]
These scripts generate /boot/grub/grub.cfg when the [u]update-grub[/u] command (or grub-mkconfig command) is run (as root).  The order of the entries in grub.cfg corresponds to the order of the files in /etc/grub.d, starting with 00_header, then 01_scriptname, etc., through all files starting with NN_ where NN is a 2-digit number and _ is the underscore (Shift+(minus sign)); then comes scripts whose names start with a letter (e.g., a_anotherscript).

You may edit the script files (as root) or create new ones.  To create a new entry in grub.cfg, you simply create a new script file:  a text file that you make executable (like a program).  To remove an entry from   grub.cfg, remove the execute permission from the corresponding script file in /etc/grub.d.  (If the entry corresponds to a custom script you wrote, you may also delete that script file from /etc/grub.d).
See SECTION 4  Special Topics -- Create a custom boot entry.

Editing the script files in /etc/grub.d:
   Do your work as root.
   To make the file /etc/grub.d/[i]filename [/i]executable:
   sudo chmod 744 /etc/grub.d/[i]filename[/i]
   To remove the execute bit from the file [i]filename:[/i]
   sudo chmod -x /etc/grub.d/[i]filename[/i]
   When done, run
   sudo update-grub or sudo grub-mkconfig
   to generate a new boot menu configuration file /boot/grub/grub.cfg.
GUI: How to set permissions
   Open Konqueror or Dolphin as root (e.g., kdesudo konqueror).
   Open the file.
   Right-click > Properties > Permissions, Advanced Permissions


[u]Tip[/u]:  To open a file in /etc/grub.d (as root)
The files in /etc/grub.d are scripts.  So, as root, if you click on one, it will want to execute or run like a program.  Instead, to open a script for editing/viewing, right-click on the script file, Open With Kate or Kwrite.  That opens the file as a text file.  Now you can read it or edit it.
Details:
GUI, working as root:  Open Konqueror (Dolphin) as root and work from there:
kdesudo konqueror
CLI, working as root: kdesudo kate /etc/grub.d/[i]script_name[/i]


Quick reference
The (standard) files in /etc/grub.d (each is a script) are:
00_header
05_debian_theme: Set background, text colors, themes
10_hurd Locates Hurd kernels
10_linux Locates Linux kernels based on results of the lsb_release command.
20_memtest86+: If the file /boot/memtest86+.bin exists, it is included in the boot menu.
30_os-prober: Searches for Linux and other OS's on all partitions; includes them in the boot menu.
40_custom: A template for adding custom boot menu entries.

See Appendix: permissions, working as root, making a file executable, Konsole, and other topics.


=  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =
=  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =
[b]SECTION 3   Fixing Things[/b]
[b]A checklist of things to try to fix a broken system[/b]
  [u]  A Troubleshooting Outline[/u]
   Ctrl+Alt+Del will reboot your PC (at any time)
   Super Grub Disk:  Very Important
   [b]Key commands[/b]:   [u]sudo update-grub[/u] ([u]grub-mkconfig[/u]) and  [u] sudo grub-install[/u]
   Timeout & Default OS, changing
   Kernel options, changing
   To see or to hide the boot menu
   Missing OS entry in the boot menu
   Editing the boot menu during booting: "e" key
   [b]The GRUB prompt grub>  -- What to do with it[/b]
       => Getting information and booting an OS
   [b]Key Rescue Method[/b]:  [u]Re-installing GRUB 2 using Live CD[/u]
   Using a Live CD to edit files in your OS


[b]Troubleshooting Outline[/b]

When you can't boot into your OS, there are two possible causes:
   the boot menu is flawed, and/or
   the GRUB 2 installation is flawed.

To fix it, you have two choices:
   boot into the OS somehow and fix it;
or
   fix it from outside the OS.

Before looking at these two choices, [u]note two important things[/u]:
>   To fix the boot menu means to fix its configuration file /boot/grub/grub.cfg.  You can sometimes do that temporarily using the edit-on-the-fly "e" key (see subsection below).  To fix it permanently, you do NOT edit grub.cfg directly; but rather you edit the file /etc/default/grub and/or you edit the script(s) in /etc/grub.d, and then you run the command update-grub (or grub-mkconfig) to generate a new grub.cfg.
>   To fix the GRUB 2 installation, that usually means re-installing GRUB 2 using, at Konsole, the command grub-install.  You can do this from inside the OS (if you can boot into it somehow), or from a Live Kubuntu CD or from another Linux OS on your hard drive.  You cannot do it from the GRUB 2 prompt (grub>) when booting the PC.  (In GRUB Legacy, you could do it by getting the grub> prompt and using the root and setup commands.)

Now let's look at each of your two choices for fixing the problem.

-->[b] How to boot into your OS when you can't seem to boot into your OS[/b]:
(1) SGD, or (2) use the grub>, or (3) use the "e" key.
Some tips and details:

>  Use Super Grub Disk to boot into it.  You may have SGD fix the boot (under GNU/Linux options), or simply use SGD to boot the OS so you can get into it.  If you use SGD to fix the boot, it will re-install GRUB to your drive, so make sure that's what you want; also, it may do so using either GRUB Legacy or GRUB 2, depending on the SGD CD version you are using.  Of course, if you can get booted into the OS, then you can fix anything and everything, so maybe you won't be feeling too picky at this point.
Note:   As a technical note, along these lines, you can also use your own GRUB 2 disk/flashdrive to boot your OS, if you built one.

>  Boot into your OS yourself, manually, using the GRUB 2 prompt, grub>, ASSUMING you can get the prompt!  (Sometimes, you can't.)  See the Subsection below titled "The GRUB prompt grub>  -- What to do with it."

>  Boot into your OS yourself by fixing the boot menu (editing it "on-the-fly" using the "e" key when you see it on the screen).  But sometimes, you don't see the boot menu.  See the Subsection below titled   "Editing the boot menu during booting: 'e' key"  If you are successful, since these "e" edits are only temporary, after booting into the OS, you must make the changes permanent (by editing /etc/default/grub or the script(s) in /etc/grub.d and then generate a new grub.cfg using update-grub or grub-mkconfig.


--> [b] How to fix the problem from outside the OS[/b]:
(1) Use a Live CD, or (2) Fix it from another OS.
Some details:

>   Use a Live CD.
From a Live Kubuntu CD (or most any live Linux CD), you can re-install GRUB and/or perform edits on files (/etc/default/grub or the script(s) in /etc/grub.d).
See the subsections below:  "Key Rescue Method:  Re-installing GRUB 2 using Live CD" and "Using a Live CD to edit files in your OS."

>   Fix the problem from another Linux OS, ASSUMING you are able to boot into one!
From there, you can edit files in your broken OS and/or re-install GRUB 2 using grub-install.

(NOTE: From the second OS, or even from a Live CD, you'd have to mount the broken OS partition; or perhaps looking in your file manager you'd see it is automatically mounted for you.)


[u][b]SUMMARY -- a summary Troubleshooting outline[/b][/u]

When you can't boot into your OS, there are two possible causes:
   the boot menu is flawed, and/or
   the GRUB 2 installation is flawed.

To fix it, you have two choices:

-->  Boot into the OS somehow and fix it:
   (1) SGD, or (2) use the grub>, or (3) use the "e" key to make temporary edits.
Or
-->  Fix it from outside the OS:
   (1) Use a Live CD, or (2) Fix it from another OS.

Reminders:
---   To fix grub.cfg permanently, do NOT edit grub.cfg directly; edit the file /etc/default/grub  and/or  the script(s) in /etc/grub.d, then run update-grub (or grub-mkconfig) to generate a new grub.cfg.
---   You can re-install GRUB 2 using grub-install from inside the OS or from a Live Kubuntu CD or from another Linux OS.  You cannot do it from the GRUB 2 prompt (grub>) when booting the PC.

[End of Troubleshooting Outline]


[b]Ctrl+Alt+Del will reboot your PC (at any time)[/b]
If your PC freezes up during the experiments/testing/troubleshooting of your bootloader, use [b]Ctrl+Alt+Del[/b] to re-boot the PC.  [u]Be prepared to do something[/u], though!
[u]Examples of what to do[/u]:
--  Before using Ctrl+Alt+Del, put the Super Grub Disk CD in the CD tray so you can re-boot to it and rescue your OS.
--  Be prepared to press the key required to enter your BIOS setup.  That will buy you some time, or give you a chance to change hard drive booting order, or put a live CD or SGD in the CD tray, or get your notes ready, etc.
--  If you have been getting a boot menu, let the PC reboot into it, then enter Edit mode (pressing the "e" key) or enter the GRUB 2 CLI (pressing the key "c"), then try to fix things from there.


[b]Super Grub Disk:  Very Important[/b]
Whether you think you need it or not, get it now, free, as a bootable CD which will get you booted into your operating system in case you can't.  SGD can be downloaded here:
http://www.supergrubdisk.org/
Look for a CD ROM iso version, download it, burn it as an iso image to a CD (using K3b), test it briefly (by running it and stepping through a few menus but not choosing anything; then Quit; or, use it to boot into your OS).  Keep your SGD CD handy.

[u]Tip[/u] (using SGD to boot into your broken OS)
Choose GNU/Linux > Fix Boot, then select the broken partition.
Should you decide to simply Quit the SGD (without doing anything), do so, select reboot, enter your BIOS setup, remove the SGD CD, exit BIOS, and continue rebooting.


[b][u]Key commands[/u][/b]:   [b]sudo update-grub[/b] ([b]grub-mkconfig[/b]) and [b]sudo grub-install[/b]
Use these two commands to "freshen up" your GRUB 2 installation.
update-grub or grub-mkconfig: builds a new boot menu configuration file  boot/grub/grub.cfg.
grub-install:  builds a complete, fresh GRUB 2 installation, including /boot/grub/grub.cfg.

The command
[b][u]sudo update-grub[/u][/b] or [b]grub-mkconfig[/b]
will generate a new boot menu /boot/grub/grub.cfg.  To do so, it uses /etc/default/grub and the scripts in /etc/grub.d.  You should run this command after editing the default file or the scripts.

>  Man page:  (8)UPDATE-GRUB - Generate grub.cfg.
http://grub.enbug.org/FranklinPiat/update-grub.manpage

The command
[u][b]sudo grub-install[/b][/u] [INSTALL_ DEVICE]
installs or re-installs GRUB 2 to INSTALL_DEVICE.

See SECTION 4:    grub-install: A key command:
For now, here's some highlights:

sudo grub-install /dev/sda
installs GRUB 2[u] to the Master Boot Record[/u] of drive sda.  And
sudo grub-install /dev/sda1
installs GRUB 2 [u]to the boot sector[/u] of the partition sda1.
In doing so, grub-install [u]does a complete job of setting up everything[/u]:
[u]Here's what it does[/u]:   It builds the directory /boot/grub (if it doesn't already exit), copies GRUB 2 files to it from the "master" image directory /usr/lib/grub/i386-pc, probes your drives and devices and partition table, makes a new device.map, builds and installs boot.img (to MBR) and core.img, and builds /boot/grub/grub.cfg.

>  Man page:  (8)GRUB-INSTALL - Install GRUB on your drive.
http://grub.enbug.org/FranklinPiat/grub-install.manpage

[u]Troubleshooting[/u]
--  After running sudo update-grub, make sure that the line set default=(hdx,y) is correct (i.e., that the order of the menuentries did not change the default OS position).
--  [b][u]sudo grub-install --recheck[/u][/b]   [INSTALL_DEVICE]
=> If you get an error running sudo grub-install, try it again with sudo grub-install --recheck [INSTALL_DEVICE].


[b]Timeout and Default OS, changing[/b]
The [b]timeout[/b] is the length of time in seconds before the (highlighted) [b]default[/b] OS is automatically booted (if you do not intervene by touching a key).  To change these values, open the file /etc/default/grub as root, make the changes, Save, exit, then generate a new  /boot/grub/grub.cfg by running sudo update-grub.

[u]Opening /etc/default/grub as root[/u]
If your file manager supports it, open the file manager, navigate to /etc/default/grub, right-click on the file, Actions, Edit as Root.  Otherwise:
Open the file manager as root and work from there:
   kdesudo konqueror
   kdesudo dolphin
Or, open the file as root using Kate or Kwrite:
   kdesudo kate /etc/default/grub

Sample (see your file /etc/default/grub):
GRUB_DEFAULT=0
GRUB_TIMEOUT=5

GRUB_DEFAULT=0 selects boot entry #0 (i.e., the first entry) as the default OS to be booted automatically.  Boot entries can be seen in your /boot/grub/grub.cfg file; they start with a line
menuentry "some descriptive text"  {
and end with
}

Boot entries are counted from zero; so the first menuentry is boot entry #0, the second menuentry is boot entry #1, etc.

[u]Troubleshooting Tip[/u]:   [u]Check default OS setting after update-grub[/u]
If you recently added/removed a boot entry (by editing a /etc/grub.d script) and ran sudo update-grub to generate a new boot menu, you might have to check and edit the line "GRUB_DEFAULT= " (in /etc/default/grub) if the default sequence number changed.

(TO DO:  Check also: sudo grub-set-default N.)




ΚΟΜΜΑΤΙ 3(Το ανέλαβε ο MakisM1)

Κώδικας: Επιλογή όλων
[b]Kernel options, changing[/b]
To change these values, open the file /etc/default/grub as root, make the changes, Save, exit.  (See Timeout and Default OS above for editing tips.)  The line in /etc/default/grub looks like this (or similar):
GRUB_CMDLINE_LINUX="quiet splash"


[b]To see or to hide the boot menu[/b]
Look for this line in the file /etc/default/grub:
# GRUB_HIDDEN_TIMEOUT=0

With the # sign present, you will see the boot menu upon booting your PC.
With the # removed, you will not see the boot menu.

For a detailed explanation of the other ways this works, see
GRUB 2 Basics drs305
http://ubuntuforums.org/showthread.php?t=1195275


[b]Missing OS entry in the boot menu[/b]
If you run update-grub, and there is a missing entry in your boot menu, you can add that entry as a custom entry.  See SECTION 4 below, Special Topics   Boot menu:  Create a custom boot entry.


[b]Editing the boot menu during booting using the "e" key[/b]
When you boot/re-boot your PC, the boot menu appears.  If you select an entry (an OS to boot into) and get an error, and if you are able to return to the boot menu (or re-boot again to get it), you may be able to fix things or to experiment with your boot menu to see if something will work.  See the help tips at the bottom of the boot menu.  At the boot menu, highlight an entry, press the "e" key, and you'll see the menuentry statements for that OS.  See the help tips at the bottom of that menu.  If you highlight a line, press the "e" key, that line will be displayed so you can edit it (using arrow keys, delete, etc.).  Pressing ESC returns you to the previous screen.

The edits you make to the boot menu are [u]"on-the-fly" edits and are not permanent[/u].  To make them permanent, you'll have to edit /etc/default/grub and/or the script files in /etc/grub.d, perhaps even making a custom boot entry if necessary (SECTION 4  Special Topics   Boot menu:  Create a custom boot entry), then generate a new /boot/grub/grub.cfg file by issuing sudo update-grub or sudo grub-mkconfig.


[b]The GRUB prompt grub>  -- What to do with it[/b]
      => Getting information and booting an OS

You may get the GRUB prompt grub> in three ways:

>   "c" key:   You re-boot and upon seeing the boot menu, press the "c" key to get the grub>.  (Or Control+c at the Edit mode menu.)  (By pressing the ESC key, you get back to the boot menu.)
Or:
>   No boot menu!   Perhaps, you re-booted your PC and didn't see any boot menu but instead got dropped to the GRUB 2 prompt: grub>.
Or:
>   You get a grub> when re-booting using your own GRUB 2 flash drive (which is what is usually supposed to happen!).

From the grub> prompt, you may be able to issue commands to
   help you gather information about your drives
or
   boot your computer.

Use these resources:
SECTION 4  Special Topics, the subsection
"4 ways to boot an OS" -- direct booting configfile, symlinks, chainloader
SECTION 4  Special Topics, the subsection
"How to get information about your drives and devices"
=> In particular, take special note of [u]the ls command and the use of TAB completion[/u].

Example  Booting using symlinks; and using the ls command

grub>
Use the ls command to see how GRUB 2 sees your drives and partitions:
grub>ls
From the output, you may decide to use ls again, this time listing files in certain directories.
For example, to investigate (hd0,8), you can list the files under the root directory of (hd0,8), like this:
grub>set root=(hd0,8)
grub>ls  /
And then to see the kernel(s) under /boot,
grub>ls  /boot
Or, if you do
grub>ls  (hd0,8)
you'll get the filesystem type and UUID.
Another way to see what's under the root:
grub> ls  (hd0,8)/
(note the slash, no spaces)

Suppose you see or confirm that the OS you want to boot is on (hd0,8) (= sda8).
Then, you might try to boot that OS using symlinks like this:
grub>set root=(hd0,8)
grub>linux /vmlinuz  root=/dev/sda8  ro  quiet splash
grub>initrd /initrd.img
grub>boot

But what if you can't remember the kernel options   ro quiet splash ?
Then this way will also work:
grub>set root=(hd0,8)
grub>linux /vmlinuz  root=/dev/sda8
grub>initrd /initrd.img
grub>boot

(The read-only option, ro, is important, but it is a default option if not specified directly.  Thanks goes to dibl for this information.)

Example   If you need to re-boot or shut down the PC
To reboot, get the GRUB 2 prompt by pressing "c" key, and then
grub>reboot
To shut down
grub>halt

Example   Chainloader
Suppose you had previously installed GRUB 2 to the boot sector of the (hd0,8) partition containing your OS.  (You would have done that using sudo grub-install /dev/sda8)  Then you may boot that OS using chainloader as follows:

grub>set root=(hd0,8)
grub>chainloader +1
grub>boot

Or,
grub>chainloader (hd0,8)+1
grub>boot

(NOTE about using [u]the boot command[/u]
When booting at the grub> prompt, you must use the boot command to make it go.  However, in the configuration file /boot/grub/grub.cfg, you do NOT need to use the boot command--it is implied there.)



[b]Key Rescue Method[/b]:

[b][u]Re-installing GRUB 2 using Live CD[/u][/b]

(In progress.  See reference:
GRUB 2 Live CD Install Guide
http://grub.enbug.org/Grub2LiveCdInstallGuide
Comment:  TODO -- re-test this; it didn't work yet for me, but it might work for you if you have a more current version of GRUB 2 or in 9.10.)
> See Appendix: Chroot, how-to.

-> -> [u]Update 20 September 2009[/u]:

I'm going to give you two ways to try this.  Using the various pre-release version(s) of GRUB 2, I have not been able to get the "chroot" method (GRUB2LiveCdInstallGuide) to work yet.  But I did get something else to work, and I'll call that "Method 1."  Also, for Kubuntu users, I have re-written the "chroot" method to include a few more details.  So, here's Method 1, then the "chroot" method.


[u]Method 1: Installing or re-installing GRUB 2 using a Live CD[/u]

Your Kubuntu Live CD contains GRUB 2 files; specifically, in a live session, you will find the master GRUB 2 "image" files in /usr/lib/grub/i386-pc.  Thus, they can be used to install or re-install GRUB 2.  Here's how ...

Start your Kubuntu Live CD.
Choose the option to try Kubuntu without installing.
Open Konsole (Terminal): K-Menu > System > Konsole
Explore your partitions using
sudo fdisk -lu
Determine your root partition.  In this example, ours is sda2.
Make a mount point (directory) for partition sda2:
sudo mkdir /media/sda2
Mount sda2 on the mount point:
sudo mount /dev/sda2 /media/sda2
Make a mount point (directory) for /dev:
sudo mkdir /media/dev
Mount the devices in your Live CD session:
sudo mount --bind /dev /media/dev
Install (or re-install) GRUB 2 (into the MBR of drive sda) using the GRUB 2 files in sda2:
sudo grub-install --root-directory=/media/sda2  /dev/sda

You may get this error:
grub-probe: error: Cannot find a GRUB drive for /dev/sda8.  Check your device.map.
Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly.

If so, try this:
sudo grub-install --recheck --root-directory=/media/sda2 /dev/sda
Installation finished. No error reported.
This is the contents of the device map /media/sda2/boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.
(hd0)   /dev/sda

(and so this was successful)

Then, unmount both filesystems:
sudo umount /dev/sda2  /media/sda2
sudo umount /dev  /media/dev
Leave Konsole:
exit
Test it:
Exit out of the Live CD, reboot, see if you fixed your booting problem (by booting into the broken partition).

[End of Method 1]
- - - - - - - - - -

The next method:
[u]Installing or re-installing GRUB 2 using a Live CD[/u]
[u]The "chroot" method[/u] (GRUB2LiveCdInstallGuide)

Steps:
Start your Kubuntu Live CD.
Choose the option to try Kubuntu without installing.
Open Konsole (Terminal): K-Menu > System > Konsole
Explore your partitions using
sudo fdisk -lu
Determine your root partition. Our example to demonstrate this method is sda2.
(If you have a separate /boot partition, see the reference cited.)
Make a mount point (directory) for partition sda2:
sudo mkdir /media/sda2
Mount sda2 on the mount point:
sudo mount /dev/sda2 /media/sda2
Make a mount point (directory) for /dev:
sudo mkdir /media/dev
Mount the devices in your Live CD session:
sudo mount --bind /dev /media/dev
Chroot into sda2:
sudo chroot /media/sda2
Install (or re-install) GRUB 2 (into the MBR of drive sda):
sudo grub-install /dev/sda
Troubleshooting:  If you get Auto-detection of filesystem failed, try:
sudo grub-install --recheck /dev/sda
Exit out of the Chroot by typing exit; or by Control+d.
Unmount both filesystems
sudo umount /dev/sda2 /media/sda2
sudo umount /media/dev
(Reminder: If you have a separate /boot and mounted it above, unmount it now.)
Leave Konsole:
exit
Test it:
Exit out of the Live CD, reboot, see if you fixed your booting problem (by booting into the broken partition).

[u]Comment[/u]   The error messages for me were:
# grub-install /dev/sda
grub-probe: error: cannot find a device for /boot/grub
Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly
So, I tried
# grub-install [b]--recheck[/b] /dev/sda
grub-probe: error: cannot find a device for /boot/grub
Auto-detection of a filesystem module failed
Please specify the module with the option `--modules' explicitly.
grub-probe: error: Cannot get the real path of `/dev/sda'
Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly.

[End of GRUB2LiveCdInstallGuide]
- - - - -

[b]Using a Live CD to edit files in your OS[/b]
This is done as you would normally do it.  Of course, if you wish, you may use SGD to boot into your OS and do the editing from there.
Here is an outline of a standard way to use your Kubuntu Live CD.

Boot the Live Kubuntu CD, open Konsole, then as root make a directory, mount the filesystem containing the file you need to edit, open that file (possibly as root), edit it, save, quit, unmount the filesystem, exit.
[u]Example[/u]
If the file called file_name that you need to edit is on sdb3 (=(hd1,3)), start a Live CD Kubuntu session, open Konsole:
sudo fdisk -lu     # to see/check your partitions, if necessary
# make a directory called /media/sdb3:
sudo mkdir /media/sdb3
# mount device sdb3 on directory /media/sdb3:
sudo mount /dev/sdb3  /media/sdb3
# change to that directory:
cd /media/sdb3
Then you may proceed in various ways:
Open Konqueror/Dolphin as root, then open the file_name:
in 8.10 or later:   kdesudo konqueror (or dolphin)
in 8.04:  kdesu konqueror (dolphin)
Make your edits, then File > Save, File > Quit.
Or, open  file_name  as root using Kate, then do the edits:
in 8.10 or later:  kdesudo kate /path_to file_name
in 8.04:  kdesu kate  /path_to file_name
Make your edits, then File > Save, File > Quit
# unmount the directory; note the spelling of umount:
sudo umount /media/sdb3

Re: Grub 2 (οδηγός προς μετάφραση)

ΔημοσίευσηΔημοσιεύτηκε: 29 Σεπ 2009, 21:01
από ftso
ΚΟΜΜΑΤΙ 4(Το ανέλαβε ο c7p)
Κώδικας: Επιλογή όλων
[b]SECTION 4[/b]
[b]Special Topics[/b]
   Installing GRUB 2 to your PC
   [b]grub-install     The most useful command[/b]
   The various types of command modes.
        "c,"  grub>,  Konsole BASH,  edit  "e", emu,
   TAB Completion
   How to get information about your drives and devices
      Key commands:
         At Konsole :   sudo fdisk -lu
         At the GRUB 2 prompt:  grub> ls
   Boot menu:  Adding or removing an OS entry
   Boot menu:  Create a custom boot entry
   Boot menu:  Making your own custom grub.cfg
   4 ways to boot an OS: configfile,  symlinks,  direct booting,  chainloader
   [b]Dedicated GRUB 2 partition[/b]:  How to build it
   [b]GRUB 2 Flashdrive:[/b] How to build it
   Use of the term "root"
      GRUB's Root Device, the Linux statement, root=UUID=,
      --root-directory=DIR INSTALL_DEVICE
   Dual booting:  How to set it up <-- put this at the end of Section 4

Cheat sheet:
   [b]GRUB 2  Practical Reminders[/b]: listing of key files, commands, methods


[b]Installing GRUB 2  To Your PC[/b]

To install GRUB 2 to your PC so it boots your PC into your OSs, two steps are required.

1   You need to get the GRUB 2 files installed to your PC, somewhere in the Kubuntu filesystem.
2   Then use those GRUB 2 files to install GRUB 2 to your PC's drives or devices so it can serve as a bootloader to boot your PC into your Kubuntu and your other OSs.

Step 1:  [b]Get the GRUB 2 files[/b]
Install the GRUB 2 package in your Kubuntu OS using your package manager.  Or, at Konsole, issue the following command:
sudo apt-get install grub-pc

Check it:  Open your file manager (Konqueror or Dolphin or other), and see the GRUB 2 files under
[b]/usr/lib/grub/i386-pc[/b]  (called the GRUB 2 image directory, and contains a set of "master" GRUB files).

Step 2:  [b]Install the GRUB 2 files so they serve as a bootloader[/b]
Suppose your first BIOS boot drive is sda (as seen in Kubuntu using at Konsole the command sudo fdisk -lu).   Then, install GRUB 2 to the Master Boot Record of sda:
sudo grub-install /dev/sda

This also copies the GRUB 2 files into /boot/grub.
Then to generate a fresh boot menu configuration file (/boot/grub/grub.cfg), run
sudo update-grub or sudo grub-mkconfig

[u]More Details About This[/u]

CAUTION, fair warning:
[u]Have a bootable Super Grub Disk CD handy[/u] in case this messes up booting your PC.

To install GRUB 2 files to your PC, open Konsole and run the commands
sudo apt-get update
sudo apt-cache search grub-pc
(returns: grub-pc - GRand Unified Bootloader, version 2 (PC/BIOS version))
sudo apt-get install grub-pc
Then, install GRUB 2 to the Master Boot Record of your first BIOS boot drive.  For example, if that MBR is sda, the command would be
sudo grub-install /dev/sda
And then update grub.cfg:
sudo update-grub
(or sudo grub-mkconfig)
Reboot to see what happens.
The old GRUB may also still be there (in which case you saw an entry on the boot menu to chainload into GRUB 2), in which case you may run
sudo update-from-grub-legacy
to replace GRUB Legacy with GRUB 2 IF YOU WISH TO DO SO.

[u]Troubleshooting[/u]
Installing GRUB 2 to the MBR: using [b][u]--recheck[/u][/b]
Example
sudo grub-install /dev/sda
grub-probe: error: cannot find a GRUB drive for /dev/sda.
Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly.
So, try this:
[b]sudo grub-install --recheck /dev/sda[/b]
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.
(hd0)   /dev/sda


- - - - -
[Start subsection]
[b]grub-install     The most useful command[/b]

Full form:  grub-install [OPTION]  INSTALL_DEVICE

Two very important options are
--recheck
      Probe a device map even if it already exists
--root-directory=DIR
      Install GRUB images under the directory DIR instead of the root directory
(See discussion below.)

Examples:
INSTALL_DEVICE may be /dev/sda, /dev/sda1, hd0, hd1, etc.
grub-install /dev/sda   installs GRUB 2 to the MBR of drive sda.
grub-install /dev/sda1   installs GRUB 2 to the boot sector of partition sda1.
grub-install hd0   installs GRUB 2 to the MBR of drive hd0.
grub-install  --root-directory=/media/sdb1  /dev/sda
   sets up GRUB 2 files in the mounted partition /media/sdb1
   and then installs GRUB 2 to the MBR of drive sda.
   (If there is no /boot/grub directory in sdb1, it will be created and filled with GRUB 2 files.)
grub-install  --recheck --root-directory=/media/sdb1  /dev/sda
   Do it again, and probe the /boot/grub/device.map  (again).

[u]Use the command  sudo grub-install  for these purposes[/u]:
to refresh the entire GRUB 2 installation, or when you are re-installing GRUB 2 to fix a problem, or when you are installing GRUB 2 to another place or to a dedicated GRUB 2 partition or to a USB (flash) drive.

A master script
grub-install is a master script, called a utility, that invokes many other utilities (scripts) to help do its work. You issue this command at Konsole (Terminal) as root (using sudo).  It does everything for you; it's a master fix-it-all command.

Note:  [b]/usr/lib/grub/i386-pc[/b]
The master set of GRUB 2 files in your OS are kept in the GRUB 2 image directory /usr/lib/grub/i386-pc.  They get there when you install GRUB 2 to your PC (or OS) using your package manager or using (sudo) apt-get install grub-pc.

[u]grub-install does the following for you[/u]:

>  The command  sudo grub-install  copies the GRUB 2 files from /usr/lib/grub/i386-pc to the directory /boot/grub.  If /boot/grub does not yet exist, it is created.
>  It probes your partition type and partitions (using grub-probe).
>  It builds a custom version of core.img for your setup, one of two very important files (along with boot.img).  (In GRUB LEGACY terms,, boot.img corresponds to stage_1 and core.img to stage_2.)
>  Finally it installs GRUB 2 to your PC so it can boot some OS(s) for you.  (It uses grub-setup to do this, setting boot.img in the MBR of your first BIOS boot drive and installs core.img either after the MBR or to a file system (e.g., your OS partition boot sector)  See the note below for a few details.)

[u]Two useful options[/u]
--recheck
      Probe a device map even if it already exists
--root-directory=DIR
      Install GRUB images under the directory DIR instead of the root directory

--recheck
If your grub-install command fails, complaining about a filesystem or not finding something, try it again with the option --recheck; like this example:
sudo grub-install  --recheck  --root-directory=/media/sdb1  /dev/sda

--root-directory=DIR
Very useful.  Instead of setting up your GRUB files in /boot/grub under the root directory of your OS, you can use this option to build a /boot/grub directory anywhere, and then use those GRUB 2 files to install GRUB 2 to a hard drive MBR, or to a partition boot sector, or elsewhere (e.g., USB drive or dedicated GRUB 2 partition).
DIR is a directory, and so it is mounted.  Thus, if using partition sdb1, for example, you must mount it, as say, /media/sdb1.

[u]Dedicated GRUB 2 partition[/u]
Suppose your OS is on some partition on one of your hard drives.  And suppose you wish to build a dedicated GRUB 2 partition in sdb1, and that your first BIOS boot drive is sda, and that you wish to setup GRUB 2 files in sdb1 and use those to install GRUB to the MBR of sda.  Here's the command:

sudo grub-install  --root-directory=/media/sdb1  /dev/sda

Note that sdb1 is mounted as /media/sdb1; also that sda is specified as a device:  /dev/sda (not just sda).

See the subsection below titled "Dedicated GRUB 2 partition:  How to build it"


[u]USB flash drive[/u]
Suppose your flash drive is seen in Kubuntu as /dev/sdc and it is mounted as /media/flashdrive.  Then the command to setup and install GRUB 2 to it is:

sudo grub-install --root-directory=/media/flashdrive   /dev/sdc

See the subsection below titled "GRUB 2 Flashdrive: How to build it"

More details at:
grub-install
http://grub.enbug.org/FranklinPiat/grub-install.manpage
grub-setup  (You will probably never use this by itself; you will use grub-install and let it do the work for you.)
http://grub.enbug.org/FranklinPiat/grub-setup.manpage

NOTE:  A few details about installing boot.img and core.img.
GRUB Legacy uses stages: stage_1, stage_1.5, and stage_2.  Those are replaced in GRUB 2 by [b]boot.img[/b] (a 512-byte file that corresponds to stage_1 and is installed to a MBR); there is no stage_1.5 in GRUB 2; and [b]core.img[/b] in GRUB 2 takes the place of stage_2 (or, perhaps, of both stage 1.5 and stage_2); it is built specific to your PC setup.  The boot.img points at core.img; core.img is embedded in some fixed location (on a disk), but usually that location is in the same "cylinder" as the MBR that contains boot.img.  (Details:  the MBR goes into sector 1 and is 512 bytes, and that's where boot.img goes.  This first cylinder has 63 sectors, so that leaves 62 sectors or 31,744 bytes (=62*512) where core.img may be embedded.  This first cylinder (of 63 sectors containing boot.img and core.img) precedes the start of the first partition on that disk, which would start at sector 63 (counting of sectors starts at zero, so 63 sectors take us to the end of sector 62 = the start of sector 63).  You will see this if you run as root fdisk -lu.)

[End of subsection:  grub-install     The most useful command]
- - - - -

[b]The various types of command modes[/b]
   "c,"  grub>,  Konsole BASH,  edit  "e", emu
When working with GRUB, you must work with root privileges and so you must use sudo and kdesudo.  For example, sudo grub-install /dev/sda, kdesudo konqueror, etc.
The command modes you may use in GRUB 2 are the following.
--  Konsole (BASH), in Kubuntu, at your regular prompt (as root),  ~#:
--  GRUB 2 emu  (from Konsole, issue sudo grub-emu [OPTION]; this gives you a grub> prompt)
         =>TODO: More on this later.
--  GRUB 2 command line interface (CLI), grub>.
When you re-boot your PC, get the boot menu, and press the "c" key, you get a GRUB 2 prompt, grub>.  That is the GRUB 2 CLI.  You will also get grub> upon re-booting if you don't have a boot menu, grub.cfg, or if your boot menu is broken.  (See SECTION 3, the subsection titled "The GRUB prompt grub>  -- What to do with it")
--  Edit mode.  Editing on the fly: when you re-boot and see your GRUB 2 boot menu, you can use the "e" key to edit your boot menu on a temporary basis (the edits are not permanent unless you later make them so).  (See SECTION 3 -- Editing the boot menu during booting: "e" key.)

=> In all cases, help is nearby, and the commands are generally the same (or nearly so) in all modes, with a few differences.

[u]Help[/u]
Konsole  BASH  CLI:
   Appending --help to a command in CLI; for example sudo update-grub --help.
GRUB CLI (grub>):
   At the GRUB 2 prompt simply type help and press Enter.
   To get help with a command, type help <command name>.
   Example: grub>help ls  tells you about the command ls.
Edit mode:
   The key tips are at the bottom of the screen after your press "e"
   to enter the edit mode from your on-screen boot menu.
   Also, at that point, you can press Control+c to get a grub>,
   then type help and/or use TAB completion.

[b]TAB completion[/b]  (grub>)
While typing after the grub>, try pressing the TAB key and see what happens: in many cases, GRUB will try to help you complete the line with something meaningful or with choices.  So type as much as you can recall or type a guess, then press TAB, then you may have to type another guess and press TAB again, and so on until you complete the line the way you want it.

[b]GRUB 2 device numbering is different[/b]
(hdx,y):  hard drive x, partition y
Hard drives start at zero (x=0), same as for GRUB Legacy.
[b][u]Partitions start at 1[/u][/b] (y=1); in GRUB Legacy, partitions start at zero.



[b]How to get information about your drives, devices, and files[/b]
Key:  at Konsole  [b]sudo fdisk -lu[/b];  and  [b]grub> ls[/b]
We'll look at two cases:  At the command line in Kubuntu (Konsole); and at the grub> prompt.

[u]Konsole (BASH) command line[/u]

[b]Exploring your hard drive(s):[/b]   [b]sudo fdisk -lu[/b]
   =>  sudo fdisk -lu is [u]very useful, very important[/u].
GRUB version number:   grub-install -v
Drive space:   df -h -T
UUIDs (see NOTE below):
   blkid  (or try sudo blkid); also:
   ls  /dev/disk/by-uuid/  -alh
grub.cfg, to see it:   cat  /boot/grub/grub.cfg
fstab (filesystem table), to see it:   cat /etc/fstab
Mounting, how filesystems are mounted:   cat  /etc/mtab   or:   mount
Boot directory /boot, to find it:   df  /boot
Kernel version and gcc version (gcc=the GNU compiler used to build the kernel):
   cat  /proc/version
Kernel version:   uname -r
Linux version/name:  lsb_release -a
  (hold the Shift key and the minus sign key to get _ . LSB = Linux Standard Base)
KDE version (KDE=K Desktop Environment)
   for KDE 3.5:  kde-config –version   and for KDE 4:  kde4-config --version

NOTE: UUID  =  Universally Unique Identifier
Starting with Kubuntu version 8.10, UUIDs are used to identify partitions.  A UUID is a 16-byte number (= 128 bits).  In canonical form, a UUID consists of 32 hexidecimal digits, displayed in 5 groups separated by hyphens.

[u]At a GRUB prompt, grub>[/u]

Exploring your hard drive(s):   [b]grub> ls[/b]
   => [b]Very useful, very important.[/b]
        ([b]in GRUB Legacy, the geometry command is used instead of ls[/b])

[u]The ls command is very useful[/u]
grub>ls
gives you a list of your hard drives and partitions as GRUB sees them, in (hdx,y) GRUB 2 device notation.
grub>ls  /
shows you the files under the current GRUB 2 root device.  You can set that device using set root=. For example:
grub>set root=(hd0,8)
grub>ls  /
shows you all files under root.
grub>ls /boot
shows you all files--including kernels--under /boot.

[u]UUIDs and filesystem type[/u]
grub>ls  (hd0,8)
shows you information about the partition (hd0,8) including its filesystem type and its UUID.

[u]The contents of a directory:    grub>ls  -l  /directory[/u]
Example
grub>ls  -l  /boot
shows you the kernel and initrd files.
(The option -l indicates "long form" and gives more information.  To see all files, including hidden files, use the option -a:  grub>ls -a -l  /boot; or grub>ls -al  /boot)

[u]GRUB 2 emulation   sudo grub-emu[/u]
At Konsole, to get a grub> prompt, type sudo grub-emu.
To exit emu and return to Konsole, type halt.
>>> [u]IMPORTANT[/u]    [b]sudo grub-emu and then grub>ls[/b]
While you are working at Konsole in Kubuntu, you may need to know how GRUB sees your drives and partitions, the (hdx,y)'s.  You can switch into emulation made (sudo grub-emu)) and issue the list (ls) command at the GRUB prompt (grub>ls) to see your drives and GRUB devices.  Type halt to return to BASH mode in Konsole.

[u]Using search and cat[/u]
GRUB files, what partitions they are in:   grub>search /boot/grub/boot.img
Boot menu, what partition(s) it is in:   grub>search /boot/grub/grub.cfg
Kernel, where it is:   grub>search /vmlinuz
Boot menu, to see it:   grub>cat (hdx,y)/boot/grub/grub.cfg
fstab, to see it:   grub>cat (hdx,y)/etc/fstab
Device.map, to see it: grub>cat (hdx,y)/boot/grub/device.map

(NOTE:  [b]In GRUB Legacy, the find command is used instead of search[/b].)

[u]Restart (reboot), or shutdown (halt) your PC[/u] at a command line
At Konsole:
sudo shutdown -r now   (re-boots the PC)
sudo shutdown -h now   (shuts down the PC)
In GRUB:
grub>reboot   (re-boots the PC)
grub>halt   (shuts down the PC)


[b]Boot menu:  Adding or removing an OS entry to grub.cfg[/b]
Rule:  You do NOT edit grub.cfg directly.  Instead, you work with script files in the folder /etc/grub.d.

--  Linux operating systems, added automatically
Look at your grub.cfg.  The section
### BEGIN /etc/grub.d/10_linux ###
### END /etc/grub.d/10_linux ###
contains Linux operating systems that were automatically detected by GRUB 2 using the script file /etc/grub.d/10_linux.  Most of your Linux OSs should be detected this way and included in the boot menu grub.cfg.  If not, you can create a custom boot entry (see below, "Boot menu:  Create a custom boot entry").

--  Windows and other OSs added automatically
This is done by the script /etc/grub.d/30_os-prober.

--  Adding or removing OSs from your PC.  After doing so,
generate a new grub.cfg:   sudo update-grub

--  Add a boot menu entry by making your own[u] custom boot entry[/u], then run:
sudo update-grub
to generate a new grub.cfg.
(See subsection below: "Boot menu:  Create a custom boot entry")

--  Removing a boot entry from grub.cfg:
Two choices.
(1)   Simply remove the execute bit from the script file in /etc/grub.d that corresponds to (i.e., generates) the boot entry.
Example: If that file is named 43_MyOS-1, then run the Konsole commands
sudo chmod -x /etc/grub.d/43_MyOS-1
sudo update-grub
(2)   Or, remove the script file (for the boot entry) from the folder /etc/grub.d.  Then run
sudo update-grub to generate the new grub.cfg file.
NOTE:  If a custom file contains more than one boot entry, you may remove any number of them, leaving the rest.  Then run sudo update-grub to generate your new boot menu, grub.cfg.


[b]Boot menu:  Custom boot entry[/b]
This is easy, usually.
--  There are 4 ways to make a boot entry (see "4 Ways To Boot an OS").
--  There is a custom template at /etc/grub.d/40_custom.
--  After you write the script file for your custom boot entry, make it executable.
--  Then generate a new grub.cfg by running sudo update-grub.

See the subsection below: "4 Ways To Boot an OS."
   (direct booting, configfile, symlinks, chainload)

Troubleshooting:  Sometimes when you run grub-install or update-grub, it will fail to detect one of your OSs and excludes it from the boot menu grub.cfg.  In that case, you could make a custom entry for it (as a script file in /etc/grub.d).

[u]Direct booting[/u]   To get a model for some of the entries, you have two choices:  (1)  Get it from your old boot menu (/boot/grub/menu.lst) from GRUB Legacy (if that is available on your PC).  Or, it may also be here, made by GRUB 2:  menu.lst_backup_by_grub2_postinst.  (2)  Go into the operating system itself (the one you wish to include), or perhaps access its filesystem using a live CD, and get the information from its own boot menu.

[u]Example[/u]
Making a custom entry for sidux.  Method: Direct booting.
It helps if you have a model for some of the entries.  In the old boot menu (/boot/grub/menu.lst) from my GRUB Legacy, I had this boot entry for sidux:

title      Debian GNU/Linux, sidux kernel 2.6.28-5.slh.3-sidux-686
root      (hd0,2)
kernel      /boot/vmlinuz-2.6.28-5.slh.3-sidux-686 root=UUID=306d94a5-107b-4c9e-ae03-a159e18dc1c7 ro quiet vga=791
initrd      /boot/initrd.img-2.6.28-5.slh.3-sidux-686

Using a template (e.g., /etc/grub.d/40_custom), create an executable file for the sidux boot entry:
Open an empty text document (as root)
kdesudo kate
Save the new file as, say, /etc/grub.d/41_sidux_sda3
Copy the kernel & initrd lines from menu.lst, change “kernel” to “linux,” adjust the sidux partition number to conform to GRUB 2 convention:
Legacy GRUB:      (hd0,2)
GRUB 2:         (hd0,3)
Also, double check the UUID for sda3 by running sudo blkid.
Result:
The file /etc/grub.d/41_sidux_sda3  looks like this:

#!/bin/sh

echo "Adding sidux" >&2
cat << EOF
menuentry "sidux on sda3"  {
set root=(hd0,3)
linux      /boot/vmlinuz-2.6.28-5.slh.3-sidux-686 root=UUID=306d94a5-107b-4c9e-ae03
a159e18dc1c7 ro quiet vga=791
initrd      /boot/initrd.img-2.6.28-5.slh.3-sidux-686
}
EOF

The echo statement causes a line to be printed to the screen after executing sudo update-grub that says “sidux on sda3” so you can see it got done (i.e., that sidux got incorporated into the grub.cfg).

Make the file executable (it is a script, a type of program):
sudo chmod 744 /etc/grub.d/ 41_sidux_sda3
Or,
sudo chmod +x /etc/grub.d/ 41_sidux_sda3
Or, in GUI,
As root, open Konqueror (kdesudo konqueror), access /etc/grub.d, right click on 41_sidux_sda3, Properties, and check the “Executable” box; check Advanced Permission while you are at it.

To incorporate the sidux file 41_sidux_sda3 as a boot entry in the boot menu configuration file  /boot/grub/grub.cfg, run
sudo update-grub
Check that sidux is in your boot menu by opening /boot/grub/grub.cfg.


[b]Boot menu:  Making your own custom grub.cfg[/b]
This is easy.  (For another example, see the subsection below "Dedicated GRUB 2 partition:  How to build it.")
Taken directly from [u]drs305 excellent, detailed guide, GRUB 2 Basics[/u]:
http://ubuntuforums.org/showthread.php?t=1195275

Building a Totally Customized Menu: Ok, admit you are a control freak and you want to see only what you build yourself - customized titles, no "memtest86+" and no extra kernels. Here is how you do it:
-- Run sudo update-grub to get the current available kernels.
-- Copy the desired "menuentry" listings from /boot/grub/grub.cfg to /etc/grub.d/40_custom The entry begins with the line starting with "menuentry" and ends with a line containing "}".
-- Add any other "menuentry" items you wish to see on the boot menu.
-- Edit the titles of the "menuentry" line if desired (between the quotation symbols). Do not change the lines following the "menuentry" line. Each entry should start with a "menuentry" line and end with a "}" on the last line.
-- Remove the executable bit from /etc/grub.d/10_linux, /etc/grub.d/20_memtest86+ and /etc/grub.d/30_os-prober
Removing the executable bit from any file in /etc/grub.d will exclude the file from being included in GRUB updates.  To do it:
sudo chmod -x /etc/grub.d/grub.d/10_linux /etc/grub.d/20_memtest86+ /etc/grub.d/30_os-prober
-- Run "sudo update-grub"
-- The updated /boot/grub/grub.cfg file should now contain only sections for "00_header", "05_debian_theme" and "40_custom".
-- The grub.cfg file will not be updated with the addition of a new kernel. To add a new kernel, make
"10_linux" executable, run "sudo update-grub" to refresh the available kernels, and repeat these instructions.




ΚΟΜΜΑΤΙ 5(Το ανέλαβε ο giormatsis)
Κώδικας: Επιλογή όλων
[b]4 Ways To Boot an OS[/b]
   configfile,  symlinks,  direct booting,  chainloader

You can use these methods
--   in a boot menu
--   at a grub> prompt (at the GRUB CLI)
to boot OSs.  If you use them at the GRUB CLI, you must type[u] the command boot[/u] at the end to make the methods symlinks, direct booting and chainloader work.  You do not need the command boot in a configfile menu.  You do not need the boot command in grub.cfg (it is implied there).

NOTE:  These are done the same as in GRUB Legacy but with a new format.
But see the note on configfile below.

NOTE:  Each boot entry starts with a line
menuentry "...some text..." {
and ends with
}

>>>   [u]Configfile booting[/u]
This is easy and flexible; however, there's a [u]caveat:[/u]
Both OSs must use the same version of GRUB--both the OS you are working in (where the boot menu is kept) and the OS you are booting.

For example, consider these two statements in a menuentry:
set root=(hd1,2)
configfile /boot/grub/grub.cfg

An equivalent way of doing it is this:
configfile  (hd1,2)/boot/grub/grub.cfg

That tells your GRUB 2 to access partition (hd1,2), find the file /boot/grub/grub.cfg, show you that file so you can make a choice of which OS to boot, then boot the OS you choose.  The GRUB doing the work is your native GRUB, the one you are using, not the GRUB in (hd1,2).  Your native GRUB must be able to interpret the commands it finds in the grub.cfg of the OS you wish to boot.

[u]When to avoid configfile[/u]
When there is a mixture of GRUB versions on your PC, it is best to avoid using configfile.
Instead, use chainloader or symlinks.

Example (Taken from a grub.cfg.  The # sign indicates a comment.)

#  Kubuntu 8.04.3 on sdb2, by configfile
menuentry “Kubuntu 8.04.3 on sdb2, by configfile”  {
set root=(hd1,2)
configfile /boot/grub/grub.cfg
}


>>>   [u]Symlinks used in a boot entry[/u]
Symlinks are like shortcuts, and they direct control from the link to the file they point at.  Symlinks for the kernel and initrd files are already set up for you.  Look for yourself.  List all files (-a) in long or detailed form (-l) under your root partition (/) by issuing the following command at Konsole:

ls -a -l  /
lrwxrwxrwx   1 root root    33 2009-08-02 11:01 initrd.img -> boot/initrd.img-2.6.24-24-generic
lrwxrwxrwx   1 root root    33 2009-04-19 17:14 initrd.img.old -> boot/initrd.img-2.6.24-23-generic
lrwxrwxrwx   1 root root    30 2009-08-02 11:01 vmlinuz -> boot/vmlinuz-2.6.24-2 4-generic
lrwxrwxrwx   1 root root    30 2009-04-19 17:14 vmlinuz.old -> boot/vmlinuz-2.6.24-23-generic

The symlink for the kernel is vmlinuz, and vmlinuz points at the NEWEST kernel.
The symlink for the initrd is initrd.img, and initrd.img points at the NEWEST initrd.

NOTE:   The "l" at the left indicates "link."  Note how the links point at their target files following the symbol ->.  Note that the [u]symlinks are stored in your OS at the root level[/u].

NOTE:   If you wish to [u]make a boot entry for the older kernel and initrd[/u], you must use the symlinks for them, [u]vmlinuz.old and initrd.img.old[/u].

If you use direct booting, you have to write out the exact kernel and initrd names:
linux /boot/vmlinuz-2.6.24-24-generic root=UUID= vb687f89-ggjd-6ach-7755-77241i4b4fk3 ro quiet splash
initrd /boot/initrd.img-2.6.24-24-generic

With symlinks, vmlinuz starts at root and points at  vmlinuz-2.6.24-24-generic  and  initrd.img  starts at root and points at  initrd.img-2.6.24-24-generic, so you can write more simply,
linux /vmlinuz  root=UUID= vb687f89-ggjd-6ach-7755-77241i4b4fk3 ro quiet splash
initrd /initrd.img

However, to simplify this when you are in an emergency trying to boot at the GRUB prompt (grub>), do it simply this way:
Suppose this OS is Kubuntu 9.10 in (hd0,8) = sda8.  Then you'd have

menuentry “Kubuntu 9.10 on sda8, by symlinks”  {
set root=(hd0,8)
linux /vmlinuz root=/dev/sda8 ro quiet splash
initrd /initrd.img
}

or even simpler, when you can't remember the kernel options  "ro quiet splash":

menuentry “Kubuntu 9.10 on sda8, by symlinks”  {
set root=(hd0,8)
linux /vmlinuz root=/dev/sda8
initrd /initrd.img
}

(ro = Read-Only and is the default.  Thanks to dibl for this information.)

[u]NOTE about the paths[/u]
Notice the paths to the symlinks start at root / (since the symlinks are stored under root /); whereas the paths to the actual kernel & initrd files start at /boot (since the kernel and initrd are stored under /boot)

Another Example

# Kubuntu 9.10 on sdb7 symlinks, [u]normal mode[/u]
menuentry “Kubuntu 9.10 on sdb7, by symlinks”  {
set root=(hd1,7)
linux /vmlinuz root=/dev/sdb7 ro quiet splash
initrd /initrd.img
}

This is normal mode.  [u]If you want recovery mode[/u] (single user),
replace the kernel options “ro quiet splash” with “ro single” (without quotes)


>>>   [u]Direct booting[/u]
In direct booting, you use the actual kernel and initrd file names in the boot menuentry.
NOTE
If you use direct booting at the GRUB CLI, ie., at grub> prompt, you may use TAB completion to make your job easier.
For example,
grub>linux /boot/<Press TAB key now>
and you will get some choices, such as vmlinuz-2.6.24-24-generic

Example

#   Kubuntu 8.04 on sdb3, direct booting
menuentry "Kubuntu 8.04 on sdb3, direct booting" {
set root=(hd1,3)
linux   /boot/vmlinuz-2.6.24-24-generic root=UUID=db287e84-cbdd-4ca1-8745-85241a3b3fe2 ro quiet splash
initrd   /boot/initrd.img-2.6.24-24-generic
}


>>>   [u]Chainloader booting[/u]
When you boot an OS by chainloading, you use the chainloader command to pass control of the booting from your native GRUB to some other bootloader located in the MBR of a disk somewhere or in the
boot sector of a partition.

NOTE:  For this to work, a bootloader must first be installed to the target MBR or boot sector.

[u]A Linux example[/u]

menuentry “Kubuntu 9.10 on sdb7, by chainloader”  {
set root=(hd1,7)
chainloader +1
}

"chainloader +1" says to go to sector 1 (of (hd1,7)) and turn control over to the bootloader found there.

For this example to work, a bootloader (e.g., GRUB 2) must be installed to the partition (hd1,7).
To install GRUB 2 to the boot sector of partition sdb7 (=(hd1,7)):
sudo grub-install /dev/sdb7

This is another way to write the same boot entry:
menuentry “Kubuntu 9.10 on sdb7, by chainloader”  {
chainloader  (hd1,7)+1
}

NOTE/Caveat? -- TODO -- Qqmike to check this.
Herman says:   If you're trying to chainload a partition boot sector, you might need to use the -f option, which tells GRUB to ignore the fact that there might not be a bootable disc signature there, (!= 0xaa55). I'm not sure about exactly when that's needed or isn't needed yet. It seems to be only needed in CLI Mode GRUB.

Another Linux example

menuentry “Drive sdc = hd2 by chainloader”  {
chainloader  (hd2)+1
}

If a bootloader (e.g., GRUB 2) has been installed to the Master Boot Record of drive sdc (= hd2), the menuentry will boot that hard drive by turning control over to the bootloader in its MBR.

For this example to work, a bootloader (e.g., GRUB 2) must be installed to the Master Boot Record of drive sdc (= hd2).  To install GRUB 2 to the Master Boot Record of drive sdc:
sudo grub-install /dev/sdc

Example

Windows XP on sda1
menuentry “Windows XP on sda1, by chainloader”  {
set root=(hd0,1)
chainloader +1
}



[b]Dedicated GRUB 2 Partition:  How To Build It[/b]
Again, this is straightforward, much easier than in GRUB Legacy.

1   Create the GRUB 2 partition.
Create a partition to be used as your dedicated GRUB 2 partition and format it.  I use GParted Live CD to do this.  At that time, you may if you wish, again using GParted, set a Label  on your partition;  e.g., “GRUB2” (without the quotation marks) (in GParted, use Partition > Labels).
(Check the size of the /boot/grub folder to determine how big to make the partition.  GRUB 2 files use just 572 KB (96 files, including 12 old ones) on my installation.)

2   Create grub.cfg.
[u]In your home directory[/u], create a text file called grub.cfg and build your custom boot menu for the dedicated GRUB 2 partition.  (For a sample, see below.)
(To create the text file, two ways:  (1) Right-click on your Desktop, Create New > Text File; or (2) open text editor Kate to an empty document by typing at Konsole  kate  and save it under the name grub.cfg in your home directory only!  To do this as root, use kdesudo kate, but that is not necessary at this point.)
[u]Caution:[/u]  You may want to completely build your boot menu now and have it ready to go.  To make your boot entries in your grub.cfg, see the subsection below "4 Ways To Boot an OS."

3   Install GRUB 2 to the MBR.
From your Kubuntu OS, install GRUB 2 to the Master Boot Record (of your first BIOS boot drive) using GRUB 2 files set up in your dedicated GRUB 2 partition.
Example
Suppose sdb1 is your dedicated GRUB 2 partition, and assume it is mounted as /media/sdb1 (or, if you set the label GRUB2 on sdb1, this might be /media/GRUB2).  And suppose you wish to install GRUB 2 to the MBR of sda which is set in BIOS to be your first boot drive.
Do it this way:
sudo grub-install –root-directory=/media/sdb1  /dev/sda
See:   http://grub.enbug.org/FranklinPiat/grub-install.manpage
(That will also build the directory /boot/grub for you in your GRUB 2 partition.)

4   As root, copy your grub.cfg from your home directory to the GRUB 2 partition under the folder /boot/grub.  (To do this in GUI, open your file manager as root and work from there; e.g., kdesudo konqueror or kdesudo dolphin.)

5  Set the boot flag on your dedicated GRUB 2 partition and re-boot to test it.

Set the boot flag on the dedicated GRUB 2 partition:
Do that using GParted either from your OS (K > System > Partition editor) or from the GParted Live CD.  If you do it using the GParted Live CD, you might go this way now:
After completing Step 4 (copying the grub.cfg file into the partition), put the GParted Live CD in the CD tray, let it be recognized, press Cancel, re-boot into GParted Live, set the boot flag on your dedicated GRUB 2 partition (Partition > Manage Flags), GParted > Quit, then double click GParted (large menu at top) to quit and re-boot, when prompted remove the GParted Live CD, and let the PC re-boot (and it will now be using your dedicated GRUB 2 partition), and see if it works.

CAUTION:  Remember to keep Super Grub Disk live CD handy.

[u]IMPORTANT NOTE ABOUT KERNEL UPDATES[/u]:
Using this method of building a dedicated GRUB 2 partition, YOU are in charge of the boot configuration file /boot/grub/grub.cfg that is located in the GRUB 2 partition.  The stuff we talked about above--/etc/default/grub and the scripts /etc/grub.d and update-grub--does not apply.  You must keep these two "shows" separate.  [u]Edit the dedicated GRUB 2 file grub.cfg manually[/u].  If there ever is a problem, you may have to manually re-install GRUB 2 to the MBR (of the first BIOS boot drive) from the dedicated GRUB 2 partition.


[u]Example[/u]   Here's my dedicated GRUB 2  /boot/grub/grub.cfg:

#
#  grub.cfg
#  This is my custom boot menu, called /boot/grub/grub.cfg, located in my dedicated Grub 2 partition sda1.

#  Set the timeout
set timeout=10

#  Set the default boot entry.
set default=0

#  Kubuntu 9.10 on sda8 by chainload
menuentry "Kubuntu 9.10 on sda8, by chainload" {
chainloader (hd0,8)+1
}

#  Kubuntu 9.10 on sda8 by configfile
menuentry "Kubuntu 9.10 on sda8, by configfile" {
configfile (hd0,8)/boot/grub/cfg
}

#  Kubuntu 9.10 on sda8 by symlink
menuentry "Kubuntu 9.10 on sda8, by symlink" {
set root=(hd0,8)
linux /vmlinuz root=/dev/sda8 ro quiet splash
initrd /initrd.img
}

#  Kubuntu 8.04.3 on sda2, by configfile
menuentry "Kubuntu 8.04.3 on sda2, by configfile" {
configfile (hd0,2)/boot/grub.cfg
}

# sidux on sda3, by direct booting
menuentry "sidux on sda3"  {
set root=(hd0,3)
linux      /boot/vmlinuz-2.6.28-5.slh.3-sidux-686 root=UUID=306d94a5-107b-4c9e-ae03-a159e18dc1c7 ro quiet vga=791
initrd      /boot/initrd.img-2.6.28-5.slh.3-sidux-686
}



[b]GRUB 2 Flashdrive (USB flash drive)[/b]

For the principles of installing GRUB 2, see the discussion under "Installing GRUB 2" and "The grub-install Command."

[u]Example[/u]
(My test of this.)

I used a 1 GB Kingston, although the GRUB 2 files used just 51 MB.
Partition and format the flash drive as ext2 (using GParted Partition Editor). (You could also use FAT32 or ext3 or some other filesystem.)
Set the boot flag on the newly created partition (use GParted to do that: Partition > Manage Flags).
Exit GParted. Unplug the flashdrive, then plug it in.

In Kubuntu, to see how it is named, at Konsole run
sudo fdisk -lu
Output:
Disk /dev/sdb: 1031 MB, 1031798784 bytes
255 heads, 63 sectors/track, 125 cylinders, total 2015232 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x000f0fe1
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63     2008124     1004031   83  Linux

Konqueror (or Dolphin) indicated it is mounted as /media/disk.

=> So it is seen as sdb with the partition sdb1 mounted as /media/disk.

Install GRUB 2 to the flash drive.  At Konsole:
sudo grub-install --root-directory=/media/disk  /dev/sdb
Output:
Installation finished. No error reported.
This is the contents of the device map /media/disk/boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.
(hd0)   /dev/sda
(hd1)   /dev/sdb

(This is seen from Kubuntu's point of view now.)
(This is the device.map on the flash drive, /boot/grub/device.map.  I will ignore this!  Doesn't matter too much.  You could edit it as root to read
(hd0)  /dev/sda
as seen from the point of view of the flash drive when it is used as a boot drive.)
Let's move on, now ...

Check to see that /boot/grub is created and filled with GRUB 2 files.
[u]Reboot, setting BIOS to boot from the flash drive (USB booting)[/u].
The next thing I saw on the screen was:
grub>

I used the GRUB 2 command ls to see my drives and partitions (on the PC):
grub>ls

Since the PC booted from the flash drive, it was seen as hd0 with partition (hd0,1).  (The drive that the PC actually boots from is always seen during its booting session as hd0--this is a general fact.)

My regular HDD, normally seen as hd0 was now seen as hd1 and my Kubuntu 9.10 was in (hd1,8).
So, to boot into Kubuntu, I did
grub>chainloader (hd1,8)+1
grub>boot
NOTE:
Previously I had already installed GRUB 2 to the partition boot sector of Kubuntu in case I ever needed to chainload into it.  (I used at Konsole in Kubuntu, sudo grub-install /dev/sda8, where sda8 is my Kubuntu partition when there is no other drive attached to the PC.)  Had I not already done this, I could could NOT chainload into Kubuntu and would have to boot into Kubuntu in some other way, for example  using symlinks:
grub>ls
would show me that Kubuntu is on (hd1,8) when booting from my GRUB 2 flash drive, and so to boot it, I'd do:
grub>set root=(hd1,8)
grub>linux /vmlinuz
grub>initrd /initrd.img
grub>boot
Or, you could do this (if you remembered how!):
grub>set root=(hd1,8)
grub>linux /vmlinuz ro quite splash
grub>initrd /initrd.img
grub>boot

Thus, I booted into Kubuntu using the GRUB 2 flash drive.

Building a boot menu for the flash drive:
You can create a text file /boot/grub/grub.cfg for the flash drive exactly as demonstrated under building a Dedicated GRUB 2 Partition.

[u]Technical Note[/u]:  To do so, you will probably have to work as root, say by opening Konqueror or Dolphin as root (kdesudo konqueror), or by opening Kate as root (kdesudo kate).  However, you do not necessarily need a grub.cfg on the flash drive.  You can simply use it as I did to explore your drives and then boot into an OS.  If you do build a grub.cfg for it, you might include the OS(s) on your hard drive(s), and use the GRUB 2 flash drive to boot in emergencies, as you would use Super Grub Disk.  Just remember that from the point of view of the grub.cfg on your flash drive, the other drives in your PC are shifted by 1 since upon booting the flash drive, it will be seen as hd0.  If adrian15 builds Super Grub Disk for GRUB 2 and includes his usbshift function, then the story changes--for the principle of "USB drive shifting," see my how on building a GRUB flash drive:
-- How To Make GRUB Thumb Drive
http://kubuntuforums.net/forums/index.php?topic=3081748.0
[End of the flashdrive subsection]


[b]Use of the Term "root"[/b]
GRUB's Root Device, the Linux statement, root=UUID=, --root-directory=DIR INSTALL_DEVICE
(To Do -- expand/clarify further)

Example
Consider this menuentry:
### BEGIN /etc/grub.d/10_Linux ###
menuentry "Ubuntu 8.04.3 LTS, kernel 2.6.24-24-generic" {
set root=(hd1,2)
linux  /boot/vmlinuz-2.6.24-24-generic root=UUID=0df17bc5-0056-4ef7-bfca-251194b6eb44 ro quiet splash
initrd   /boot/initrd.img-2.6.24-24-generic
}

The line
set root=(hd1,2)
sets the GRUB root device.  The GRUB root device is the partition containing the kernel vmlinuz and initrd files.  Thus, it is the partition containing the directory /boot.  Also, since the GRUB boot files are contained in /boot/grub, the GRUB files are in that same /boot partition.  Note this part of the linux line:  root=UUID=0df17bc5-0056-4ef7-bfca-251194b6eb44.  The UUID corresponds to the partition containing the root filesystem (/) of the OS (in this case, Ubuntu 8.04.3 LTS, kernel 2.6.24-24-generic)          That partition (identified by its UUID) is passed to the Linux kernel using  root=UUID=0df17bc5-0056-4ef7-bfca-251194b6eb44 in the linux line.
So, the line "set root=(hd1,2)" is a message to GRUB 2; and "root=UUID=0df17bc5-0056-4ef7-bfca-251194b6eb44" is a message to the Linux kernel.

Normally, for most users, the GRUB root partition (location of the kernel & initrd files) is the same as the root partition of the OS.  In this case, the GRUB root device (partition) (hd1,2) would be the same as the root of the Kubuntu filesystem (and thus the UUID  0df17bc5-0056-4ef7-bfca-251194b6eb44 would be that of (hd1,2)).  However, this need not be the case.  If you have a separate /boot partition (separate from the root filesystem of the OS), then the
set root=(hdx,y)
statement and the
root=UUID=xxx
statement in the linux line will correspond to two different partitions.


Another use of the word "root" and setting a "root" for GRUB occurs in the statement
sudo grub-install --root-directory=DIR INSTALL_DEVICE; for example
sudo grub-install --root-directory=/sdb1  sda
where DIR is sdb1 and INSTALL_DEVICE is sda (i.e., the MBR of drive sda).
This directs GRUB to install GRUB images to INSTALL_DEVICE (using the files in the GRUB image directory  /usr/lib/grub/i386-pc/) under the directory DIR instead of the root directory (/) of the OS. 



[b]Dual booting:  How To Set It Up[/b]
This should follow the same guidelines as for GRUB Legacy, so see my GRUB Legacy how-to:
How To GRUB Methods - Toolkit
http://kubuntuforums.net/forums/index.php?topic=3081671.0
(See Sections 5 and 6)

The differences will only involve how to edit things, especially the boot menu grub.cfg.  As you know, in GRUB 2, you do NOT edit grub.cfg directly.  Instead you edit the defaults file /etc/default/grub and the script files in /etc/grub.d following the present how-to you are reading now.
[u]TO DO[/u]:  More on this later.


- - - - - - - - - -

Cheat Sheet
[b]GRUB 2  Practical Reminders[/b] -- for those who know what they are doing  ;)

[u]Files[/u]    image:  [b]/usr/lib/grub/i386-pc/[/b]
boot/grub/grub.cfg   Configuration file for the boot menu. Do NOT edit.
/etc/default/grub   Default settings file (Timeout, Default OS, kernel options)
/etc/grub.d   Folder of boot menu scripts:
00_header; 05_debian_theme: Background, text colors, themes
10_hurd Locates Hurd kernels; 10_linux Locates Linux kernels; 20_memtest86+
30_os-prober: Searches for Linux and other OS's on all partitions
40_custom: Template for custom boot menu entries
More: /boot/grub/device.map, [b]boot.img[/b] (MBR), [b]core.img[/b]

[u]Fixing Things, Rescue[/u]
Ctrl+Alt+Del reboot PC;  Super Grub Disk
New grub.cfg:  [u]sudo update-grub[/u] or [u]sudo grub-mkconfig[/u]
Install, re-install GRUB 2:  [u]sudo grub-install [/u][INSTALL_DEVICE]
to MBR: sudo  grub-install /dev/sdx; partition:  sudo grub-install /dev/sdxn
[u]If error[/u]:  grub-install [b]--recheck[/b] /dev/sdx; sudo grub-install --recheck /dev/sdxn
Install GRUB 2 to MBR of sda using GRUB 2 in /dev/sdb1/boot/grub:
  sudo grub-install –root-directory=/media/sdb1  /dev/sda
Install GRUB 2 to PC (/usr/lib/grub/i386-pc/): sudo apt-get install grub-pc

[u]Live CD rescue: Re-install GRUB 2[/u]
sudo mkdir /media/sda2  /media/dev
sudo mount /dev/sda2 /media/sda2
sudo mount --bind /dev /media/dev
Install GRUB 2 to MBR of sdb [or to partition sda2] using GRUB 2 files in sda2:
sudo grub-install --root-directory=/media/sda2 /dev/sdb [or /dev/sda2]
umount  /media/sda2  /media/dev

[u]Drives, partitions, information[/u]  sudo fdisk -lu  &  grub>ls
Naming: (hdx,y) or sdzy: drive x starts at 0; [u]partitions y start at 1[/u]
Konsole: [b]sudo fdisk -lu[/b];  df -hT; mounting:  cat /etc/mtab; or: mount
   UUIDs:  sudo blkid; ls /dev/disk/by-uuid/  -alh
   Kernel ver: uname -r; cat  /proc/version; Linux ver: lsb_release -a
  [b]sudo grub-emu and then grub>ls[/b]
GRUB devices/drives:  [b]grub>ls[/b]; grub>ls -al directory
   UUID of (hdx,y):  grub>ls  (hdx,y)
Finding: grub>search /boot/grub/grub.cfg; grub>search /boot/grub/boot.img

[u]Syntax, booting choices[/u]
configfile: set root=(hdx,y) and configfile /boot/grub/grub.cfg; or:
configfile (hdx,y)/boot/grub/grub.cfg
symlinks: linux /vmlinuz  root=UUID= xxx ro quiet splash; initrd /initrd.img
symlinks: linux /vmlinuz  root=/dev/sdxn ro quiet splash
chainload: set root=(hdx,y) and chainloader +1; chainloader (hdx,y)+1
chainload a MBR: chainloader (hdx)+1

[u]Permissions[/u]
Executable: sudo chmod 744 /etc/grub.d/[i]file[/i]; Remove: sudo chmod -x /etc/grub.d/[i]file[/i]
Read only, everyone:  sudo chmod 444 /etc/grub.d/[i]file[/i]
GUI: kdesudo konqueror (dolphin), rt-click on [i]file,[/i] Properties, Permissions
grub.cfg: sudo chmod +w /boot/grub/grub.cfg; sudo chmod -w  /boot/grub/grub.cfg

[u]Create a script[/u] called /etc/grub.d/NN_myscript
Empty text doc: kdesudo kate; File > Save As /etc/grub.d/NN_myscript
Type it (see template below).
Make executable: sudo chmod 744 /etc/grub.d/NN_myscript
  or, sudo chmod +x  /etc/grub.d/NN_myscript
  GUI: kdesudo konqueror (dolphin), rt-click, Properties, Permissions
Make new grub.cfg:  sudo update-grub, sudo grub-mkconfig

> [u]Template,[/u] custom boot entry for file /etc/grub.d/NN_name
#!/bin/sh
echo "Adding name" >&2
cat << EOF
menuentry "name of OS boot entry"  {
set root=(hdx,y)
linux  /boot/vmlinuz-xyz root=UUID=xxx
initrd  /boot/initrd.img-xyz
}
EOF

[u]Edit a script[/u]
GUI, kdesudo konqueror, rt-click on script file, Open With Kate/Kwrite.
CLI, kdesudo kate /etc/grub.d/[i]script_name[/i]
Edit the file, File>Save, Exit. New grub.cfg: sudo up-date grub; sudo grub-mkconfig

[u]Flash drive[/u] /dev/sdc, sdc1 mounted at /media/disk; set boot flag; install GRUB 2:
sudo grub-install --root-directory=/media/disk  /dev/sdc

[u]Separate GRUB 2 partition[/u]: mounted at /media/sdb1; sda=MBR of 1st BIOS drive
sudo grub-install –root-directory=/media/sdb1  /dev/sda

[u]Working as root[/u] (8.10+: kdesudo; 8.04: kdesu)
kdesudo kate /path-to-file; kdesudo konqueror (or dolphin)
Terminal as root:  sudo –i;  sudo su
GUI file manager, navigate to file, right-click on file, Actions, Edit as Root.
sudo [COMMAND]; sudo grub-install [INSTALL_DEVICE];
sudo update-grub; sudo grub-mkconfig

[End of GRUB 2  Practical Reminders]




ΚΟΜΜΑΤΙ 6(Το ανέλαβε ο dimosfire)
Κώδικας: Επιλογή όλων
[b]SECTION 5[/b]
[b]Tutorials: Where to go to study GRUB 2[/b]

GRUB 2 Basics, by drs305
http://ubuntuforums.org/showthread.php?t=1195275
Absolutely excellent treatment of editing the boot menu and some basic key concepts of GRUB 2.

GRUB 2 Manual
http://grub.enbug.org/Manual
We hope this will be all you need, along with the man pages.

GNU GRUB 1.96/2
http://members.iinet.net/%7Eherman546/p20.html
Looks like an encyclopedic, comprehensive coverage.

Ubuntu versus Kubuntu tutorials:
A GRUB 2 tutorial written for Ubuntu applies to Kubuntu.  Watch for obvious differences in a few commands and OS tools.  In Ubuntu you will see
gksudo gedit /boot/grub/grub.cfg
used for opening grub.cfg as root using text editor gedit.
In Kubuntu, you would use
kdesudo kate /boot/grub/grub.cfg.
In Kubuntu, you will probably use Konqueror or Dolphin as your file manager.  Also, there are different package managers used in each OS, even within the same OS at times!  I think you'll be able to sort it out, and you can always post questions under one of the regular Kubuntu forums.
>>> The GRUB commands are the same in both Ubuntu and Kubuntu and other Linus OSs.

See also the [b]References[/b] which include both basic topics and advanced/special topics.

=  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =
=  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =
=  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =
[b]Appendix:   Techniques[/b]

---  Installing Kubuntu--GRUB 2 placement
---  Working as root -- see below
---  Permissions:  read, write, execute; change the execute bit -- see below
---  Chroot -- how to -- see below
---  Konsole, see:
        Commands at Konsole: Beginners: 3 parts
        http://kubuntuforums.net/forums/index.php?topic=3091607.0
---  GRUB Legacy, see:
        How To GRUB Methods - Toolkit
        http://kubuntuforums.net/forums/index.php?topic=3081671.0


=  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =
[b]Installing Kubuntu--GRUB 2 placement[/b]
Live CD method

The Live CD method of installing Kubuntu is easy, fast, and convenient because afterwards, you then have a Live CD to use for rescue and repair of your system.

[u]Installing GRUB 2 files[/u]

GRUB 2 is standard on Kubuntu starting with 9.10.  During its installation from the Live CD, you can specify if you want GRUB 2installed, and if so, where to put it.  Here's how:

Start the Live CD installer.
Step:  Disk Setup
     "Specify Partitions Manually"
Step:  Summary
     Advanced button at lower right
     Check or un-check to install GRUB 2 bootloader
     Choose from the drop-down list where to install GRUB 2
          sda = the MBR of drive sda
          sda1 = the first partition of drive sda
          sdb = the MBR of drive sdb
          etc.

[u]Caution:[/u]

>   If you install GRUB to a MBR (sda, sdb, sdc, etc.), it will overwrite any other bootloader already installed to that MBR, and the GRUB 2 from the OS you are currently installing will then control the boot menu you see when you boot up your PC.  That is OK, just so you know.

>   If you install GRUB 2 to the partition boot sector where you are currently installing the OS (e.g., sdan, for some n=1,2,3,4...), when you re-boot your PC, you will have to manually boot into your new OS you just installed.  Do so using chainloader, as follows:
--  Re-boot
--  If you get some boot menu (from a prior Linux OS installation), press the "c" key to get a GRUB prompt, grub>.  If you don't get a boot menu but only the GRUB prompt grub>, then that's OK, too.
--  Let's say your new Kubuntu OS was installed to sda9.  That is the same as (hd0,9). Then
grub>chainloader  (hd0,9)+1
grub>boot
and you will boot into your new OS.

[u]Building new boot menus[/u]

>  In your new OS, you can build a full boot menu simply by doing sudo update-grub or sudo grub-mkconfig.

>  In your existing OSs, you can re-build boot menus to include the new OS the same way:
Konsole
sudo update-grub or sudo grub-mkconfig

>  Worst case, if for some reason that doesn't work, you can make a custom boot entry to include your new OS.  See SECTION 4.  To get the details of the menuentry for the new OS for the existing   grub.cfg, you might have to boot into the new OS and copy details from its grub.cfg.  Or, simply boot your new OS using symlinks or chainloader (from another OS's boot menu), for which you do not need any details specific to the new OS.  See SECTION 4, "4 Ways to boot an OS."


=  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =
[b]Working as root[/b]

Opening a text editor (e.g., Kate, Kwrite, etc.) to see the file and/or to edit it:
kdesudo kate path-to-file
Example:   kdesudo kate /etc/fstab

Opening an empty text document as root:
kdesudo kate
(then File > Save As)

Opening a file manager as root:
   in 8.10 and after:   kdesudo konqueror (or dolphin)
   in 8.04:  kdesu konqueror (dolphin)

Opening a terminal as root:
sudo –i  (to get a “root” terminal)
or:
sudo su

Your file manager may support this feature:
Open the file manager, navigate to the file, right-click on the file, Actions, Edit as Root.

At Konsole (BASH) command line:  Use sudo.
Example:   sudo fdisk -lu
To open a [i]graphical[/i] application (a text editor, a file manager), use either kdesudo or kdesu (see above).


=  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =
[b]Permissions:  read, write, execute; change the execute bit[/b]

See Part 2 of
   Commands at Konsole: Beginners: 3 parts
   http://kubuntuforums.net/forums/index.php?topic=3091607.0
   Ownership and Permissions   Use ls -l to see them;  chown & chmod to change them.
See tuxfiles
   http://www.tuxfiles.org/linuxhelp/filepermissions.html
   (symbolic mode)
Here's a brief reminder sheet for those who know this stuff:

[u]Setting ownership and permissions in GUI[/u]
Open Konqueror or Dolphin as root (kdesudo konqueror), navigate to the file or directory, right-click, Properties, Permission, make changes, OK.  In Konqueror/Dolphin, click the Advanced Permissions button to see all choices: owner, group, others and read, write, execute.

[u]CLI[/u]
owner--group--others
For each class:  read, write,  execute
ls -l: list files, use a long listing format => shows ownership and permissions


Permissions – numerical mode
There are 8 possibilities (2*2*2) for read (on or off) - write (on or off) - execute (on or off) permissions on a file or directory (2*2*2 =  8 ). The octal equivalents for these binary numbers are:

0: ---;  1: --x;  2: -w-;  3: -wx;  4:  r--;  5:  r-x;  6:  rw-:  7:  rwx

744:  Owner can do anything, Group can only read, Others can only read

Permissions – symbolic mode
Suppose the file  xyzfile is owned by root.
[u]To make it executable[/u] for ALL users
sudo chmod +x xyzfile
[u]To remove the execute permission[/u] from all users
sudo chmod -x xyzfile

--> See Tuxfiles


=  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =
[b]Chroot -- how to[/b]
From, Part 3 of
Commands at Konsole: Beginners: 3 parts
http://kubuntuforums.net/forums/index.php?topic=3091607.0

To “chroot into a partition” is to enter the partition with root privileges (“as root”).  (The root directory is set equal to the partition.)
Here's how:
Let's say Kubuntu is in partition sda2, something is broken there, and you need to use your Kubuntu
Live CD to chroot into sda2 and fix the problem. From the Live Kubuntu CD at Konsole:
sudo mkdir /media/fixthings
sudo mount /dev/sda2  /media/fixthings
sudo chroot  /media/fixthings
=> Now you are “in” sda2 “as root” and can work from there as if you were actually booted into it. The command prompt is a root prompt “... :/#”  You can enter the commands you will use to fix the problem in sda2.  When done, type exit to leave the root prompt:
exit
Now the prompt is a regular, non-root prompt “...  :~$”
To be safe, unmount the partition:
sudo umount /dev/sda2  /media/fixthings
=> CAUTION    Do not use chroot unless you know what you are doing; you can damage your Kubuntu filesystem if you make a mistake while using chroot.


=  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =
=  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =
=  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =
[b]References[/b]

Grub 2 Basics, by drs305
http://ubuntuforums.org/showthread.php?t=1195275
Absolutely excellent treatment of editing the boot menu and some basic key concepts of Grub 2.

Grub 2 Manual
http://grub.enbug.org/Manual
We hope this will be all you need, along with the man pages.

GRUB 2: Live CD Install Guide
http://grub.enbug.org/Grub2LiveCdInstallGuide
Looks like this is the original and definitive treatment as of 9-9-2009.

GNU GRUB 1.96/2
http://members.iinet.net/%7Eherman546/p20.html
Looks like an encyclopedic, comprehensive coverage.

GRUB 2 now default for new installations
https://lists.ubuntu.com/archives/ubuntu-devel-announce/2009-June/000573.html

Grub 2 now default for Ubuntu 9.10
http://www.ubuntugeek.com/grub-2-now-default-for-ubuntu-910-karmic-koala.html

GRUB 2 -- Ubuntu Wiki -- FrontPage
http://grub.enbug.org/

GRUB 2 -- Ubuntu Wiki
https://wiki.ubuntu.com/Grub2

[b]FranklinPiat, Wiki -- good stuff![/b]
Grub v2 manual, Manpages
http://grub.enbug.org/FranklinPiat/GrubManual

GRUB 2, official site
http://www.gnu.org/software/grub/grub-2.en.html

GNU GRUB, main site, Legacy GRUB
http://www.gnu.org/software/grub/

GRUB Wiki: grub.cfg
http://grub.enbug.org/grub.cfg

GRUB 2 Commands, GRUB Wiki
http://grub.enbug.org/CommandList
Compares GRUB Legacy to GRUB 2 commands.

StartUp-Manager
https://help.ubuntu.com/community/StartUpManager

GRUB & GRUB 2 Boot Process
http://www.pixelbeat.org/docs/disk/

Bootloader
http://en.wikipedia.org/wiki/Boot_loader

GNU GRUB
http://en.wikipedia.org/wiki/GRUB

Boot Options
https://help.ubuntu.com/community/BootOptions

Kernel Parameters
http://www.kernel.org/doc/Documentation/kernel-parameters.txt

Grub Legacy
-- How To GRUB Methods - Toolkit
http://kubuntuforums.net/forums/index.php?topic=3081671.0

GParted Live CD
http://gparted.sourceforge.net/livecd.php
For partitioning, formatting your hard drive.

Super Grub Disk
http://www.supergrubdisk.org/
Will boot you into your OS when you can't do it alone.

Arch Linux, ArchWiki GRUB 2
http://wiki.archlinux.org/index.php/GRUB2

Experiences in the Community, Jaunty and GRUB2
http://flossexperiences.wordpress.com/2008/11/19/jaunty-and-grub2/

GRUB 2 installation
http://www.techenclave.com/guides-and-tutorials/grub-2-installation-92883.html

GRUB2 Theming
http://ubuntuforums.org/showthread.php?t=1182436

KernelTeam/Grub2Testing
https://wiki.ubuntu.com/KernelTeam/Grub2Testing

Using UUID
https://help.ubuntu.com/community/UsingUUID

BIOS Boot Partition, and what does GRUB use it for?
http://grub.enbug.org/BIOS_Boot_Partition

GUID Partition Table
http://en.wikipedia.org/wiki/GUID_Partition_Table

Technical Note TN2166, Secrets of the GPT
http://developer.apple.com/mac/library/technotes/tn2006/tn2166.html

Boot an iso via Grub 2
http://michael-prokop.at/blog/2009/05/25/boot-an-iso-via-grub2/

MultiBoot USB with Grub2 (boot directly from iso files)
http://www.panticz.de/MultiBootUSB

GRUB Graphical Menu Development Journal
http://grub.gibibit.com/Journal

Debian Wiki, GRUB, grub.cfg
http://wiki.debian.org/Grub/grub.cfg.manpage
As of 9-9-09, it doesn't exist.

Tweaking GRUB 2
http://www.drlock.com/blog/2008/07/11/tweaking-grub-2/

GRUB 2 configuration, shirish
http://www.techenclave.com/guides-and-tutorials/grub-2-configuration-93512.html

How To Install GRUB 2 On Ubuntu 9.04
http://www.linuxtoday.com/news_story.php3?ltsn=2009-09-02-005-35-OS-HL-SM

Making a Dedicated Grub Partition
http://www.troubleshooters.com/linux/grub/grubpartition.htm

Konsole, command line:
Commands at Konsole: Beginners: 3 parts
http://kubuntuforums.net/forums/index.php?topic=3091607.0
and
tuxfiles
http://www.tuxfiles.org/linuxhelp/dirs.html
Permissions, filesystems, using the command line.

Re: Grub 2 (οδηγός προς μετάφραση)

ΔημοσίευσηΔημοσιεύτηκε: 29 Σεπ 2009, 21:24
από vagrale13
Πες μας και μεχρι ποτε πρεπει να ειναι ετοιμη η μεταφραση περιπου!! :mrgreen:

Re: Grub 2 (οδηγός προς μετάφραση)

ΔημοσίευσηΔημοσιεύτηκε: 29 Σεπ 2009, 21:26
από ftso
Επειδή το 9.10 έρχεται σε λίγο καλό είναι να έχουμε μεταφρασμένο τον οδηγό όσο πιο νωρίς γίνεται. :)

Re: Grub 2 (οδηγός προς μετάφραση)

ΔημοσίευσηΔημοσιεύτηκε: 29 Σεπ 2009, 21:32
από vagrale13
Ενα κομματι θα το κανω εγω ......... αν χρειαστει και αλλα! :thumbup:

Re: Grub 2 (οδηγός προς μετάφραση)

ΔημοσίευσηΔημοσιεύτηκε: 29 Σεπ 2009, 21:43
από Epirotes
Κι εγώ μέσα είμαι. Ποιό να πάρω; το 1; :? :wave:

Re: Grub 2 (οδηγός προς μετάφραση)

ΔημοσίευσηΔημοσιεύτηκε: 29 Σεπ 2009, 21:44
από ftso
Υποθέτω ο vargale13 θα ξεκινήσει απο το 1.

Οπότε το ΚΟΜΜΑΤΙ 1 κατοχυρώθηκε.

Epitotes αναλαμβάνεις το 2?

Re: Grub 2 (οδηγός προς μετάφραση)

ΔημοσίευσηΔημοσιεύτηκε: 29 Σεπ 2009, 21:45
από Epirotes
Βεβαίως κι ότι άλλο χρειαστεί μόλις το τελειώσω. :thumbup: :wave: