Qual è il contenuto del file 14.04 / etc / default / grub predefinito?


9

Anch'io come questo ragazzo ho accidentalmente distrutto il mio /etc/default/grubfile, anche se l'ho fatto usando >invece che >>in uno script di configurazione. La risposta fornita sembra diversa da quella che ricordo nel grubfile predefinito del desktop 14.04 ... cosa contiene?

Insegnare a pescare ... c'è qualche risorsa / metodo che potrei usare per trovare la risposta da solo senza dover fare una reinstallazione 14.04 solo per scoprirlo?


1
reinstallare 14.04 sarebbe troppo; sarebbe più facile reinstallare grub;)
Rinzwind

1
Se si apportano modifiche future /etc/default/grub, eseguire prima il backup utilizzando qualcosa di simile sudo cp /etc/default/grub /etc/default/grub-backup. Ciò significa che se si confonderà in futuro è più facile ripristinarlo, lo stesso può valere per la maggior parte dei file di configurazione in /etce altrove.
Wilf,

Risposte:


10

C'è ancora una risposta possibile alla parte della domanda " Insegnare a pescare ... ":

... potrei usare per trovare la risposta da solo senza dover effettuare una reinstallazione 14.04 solo per scoprirlo?

Ho fatto una ricerca /etc/default/grubsu http://packages.ubuntu.com/#search_contents :

Siamo spiacenti, la tua ricerca non ha prodotto risultati

Spogliato il primo /etc, quindi la seconda ricerca del nome del pacchetto sorgente è per /default/grub. I risultati danno un colpo:

/usr/share/grub/default/grub grub2-common

Ho ancora questo file sul mio computer Ubuntu?

$ sudo ls /usr/share/grub/default/grub
/usr/share/grub/default/grub

o, ad esempio:

$ sudo [ -f /usr/share/grub/default/grub ] && echo Found || echo Not\ found
Found

È un dato di fatto, è lì.

E quali sono i suoi contenuti?

$ sudo cat /usr/share/grub/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

Come potresti aver notato, c'è un'altra riga più ovvia rispetto all'output della risposta di Rinzwind :

#GRUB_HIDDEN_TIMEOUT=0

4

Ecco qui:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.