Ricerca

9.6. Comandi

download PDF
GRUB dispone di numerosi comandi nella propria interfaccia della linea di comando. Per alcuni di questi comandi è possibile digitare delle opzioni, dopo il nome, che vanno separate tramite spazi dal comando e da altre opzioni.
Qui di seguito viene riportato un elenco dei comandi più utili:
  • boot — Avvia il sistema operativo o il loader a catena 'chain loader' caricato per ultimo.
  • chainloader </path/to/file> — Loads the specified file as a chain loader. If the file is located on the first sector of the specified partition, use the blocklist notation, +1, instead of the file name.
    Il seguente è un esempio di comando chainloader:
    chainloader +1
  • displaymem — Visualizza l'uso corrente della memoria, in base alle informazioni provenienti dal BIOS. Ciò è utile per determinare la quantità di RAM di un sistema prima che lo stesso sia stato avviato.
  • initrd </path/to/initrd> — Enables users to specify an initial RAM disk to use when booting. An initrd is necessary when the kernel needs certain modules in order to boot properly, such as when the root partition is formatted with the ext3 file system.
    Il seguente è un esempio di comando initrd:
    initrd /initrd-2.6.8-1.523.img
  • install <stage-1> <install-disk> <stage-2> p config-file — Installs GRUB to the system MBR.
    • <stage-1> — Signifies a device, partition, and file where the first boot loader image can be found, such as (hd0,0)/grub/stage1.
    • <install-disk> — Specifies the disk where the stage 1 boot loader should be installed, such as (hd0).
    • <stage-2> — Passes the stage 2 boot loader location to the stage 1 boot loader, such as (hd0,0)/grub/stage2.
    • p <config-file> — This option tells the install command to look for the menu configuration file specified by <config-file>, such as (hd0,0)/grub/grub.conf.

    Avvertimento

    Il comando install sovrascrive qualsiasi informazione già presente sull'MBR.
  • kernel </path/to/kernel> <option-1> <option-N> ... — Specifies the kernel file to load when booting the operating system. Replace </path/to/kernel> with an absolute path from the partition specified by the root command. Replace <option-1> with options for the Linux kernel, such as root=/dev/VolGroup00/LogVol00 to specify the device on which the root partition for the system is located. Multiple options can be passed to the kernel in a space separated list.
    Quanto segue risulta essere un esempio di comando kernel:
    kernel /vmlinuz-2.6.8-1.523 ro root=/dev/VolGroup00/LogVol00
    L'opzione nell'esempio precedente specifica che il file system root per Linux si trova sulla partizione hda5.
  • root (<device-type><device-number>,<partition>) — Configures the root partition for GRUB, such as (hd0,0), and mounts the partition.
    Il seguente rappresenta un esempio del comando root:
    root (hd0,0)
  • rootnoverify (<device-type><device-number>,<partition>) — Configures the root partition for GRUB, just like the root command, but does not mount the partition.
Altri comandi sono disponibili; digitate help --all per un elenco completo di comandi. Per una descrizione di tutti i comandi di GRUB consultate la documentazione disponibile online http://www.gnu.org/software/grub/manual/.
Red Hat logoGithubRedditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita ilBlog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

© 2024 Red Hat, Inc.