Pagina 1 di 2

[Risolto][Boot] impostazioni grub...di nuovo

Inviato: giovedì 6 maggio 2010, 12:56
da yghson
salve a tutti.
ieri sera subito dopo aver cancellato dei kernel vecchi con ubuntutweak, il gestore aggiornamenti mi avvisa di nuovi aggiornamenti e tra gli aggiornamenti vari mi scarica anche il kernel in oggetto, per fortuna (almeno al momento) come mi è successo da quando ho la 10.04 anche questo kernel funziona a meraviglia (sto smanettando da 5 ore)...ma il "problema" se così vogliamo dire è un altro: avevo cancellato i kernel vecchi perchè volevo "pulire" il grub, adesso (dopo che avrò testato ancora meglio l'ultimo kernel) ho bisogno di qualche amico che mi indichi come eseguire altre operazioni oltre a pulire i kernel vecchi che faccio semplicemente con ubuntutweak e sono:

1) togliere recovery mode e nemtest (ho seguito altre discussioni ed il wiki"aggiungere eliminare voci"...senza risultato...
2) impostare xp come sistema che parte per primo visto che "PURTROPPO" il pc non lo uso solo io...anche qui ho letto un mare di discussioni ma forse sono io che non ci arrivo...non sono riuscito proprio a modificare....

grazie anticipatamente.
CIAO

Re: [Boot] impostazioni grub...di nuovo

Inviato: giovedì 6 maggio 2010, 13:51
da steff
a) togliere il recovery mode equivale a buttare l'anello di salvataggio dalla nave  8)
b) nella documentazione (incima su questa pagina) cerca "grub", c' è descritto come mettere in default un sistema.

Re: [Boot] impostazioni grub...di nuovo

Inviato: giovedì 6 maggio 2010, 15:00
da yghson
grazie delle risposte....
volevo solo dirti che non volevo togliere "definitivamente" il recovery mode...ma ho sentito una volta parlare di una procedura per "nasconderla"...questo è quello che voglio fare...non visualizzarla nel grub....non eliminarla definitivamente
per la seconda richiesta, quando parlavo del wiki che ho consultato era la documentazione che dicevi tu!!! purtroppo non riesco a fare le operazioni che vengono descritte, tipo c'è un comando bello e pronto per togliere il nemtest....ma pur eseguendolo e aggiornando successivamente il grub (come descritto)...al riavvio del pc mi ricompare sempre. per il recovery mode mi ricordo di un cancelletto da inserire da qualche parte......

P.S. ho installato anche startupmanager....ma non so perchè...mi esce solo una barra di caricamento dove c'è scritto "operazioni di pre-configurazioni in corso" poi finisce e scompare...non visualizzandomi il programma...da come ho potuto capire da li avrei potuto risolvere un bel po di problemi.

Re: [Boot] impostazioni grub...di nuovo

Inviato: giovedì 6 maggio 2010, 15:56
da yghson
aggiungo inoltre che seguendo la guida (documentazione) volevo fare come "semplicemente spiegato" e cioè modificare il file presente nel percorso: etc/default/grub. Ma c'è un piccolo problema...il file all'apertura con Gedit risulta "vuoto" come è possibile?...pensavo che fosse invisibile il contenuto o qualcosa di simile...ma in proprietà effettivamente il file risulta 0 Kb...ammetto che non è un grande problema...ma ripeto non utilizzo solo io il pc e quando lo accende qualcun altro e attende il caricamento...questo parte dalla posizione "tre" dove c'è una recovery di ubuntu e si trova tutti i codici e numeri sullo schermo anziche win xp...poi io spesso non ci sono...

qualche altro aiuto?

Re: [Boot] impostazioni grub...di nuovo

Inviato: giovedì 6 maggio 2010, 17:28
da Petr
yghson ha scritto: aggiungo inoltre che seguendo la guida (documentazione) volevo fare come "semplicemente spiegato" e cioè modificare il file presente nel percorso: etc/default/grub. Ma c'è un piccolo problema...il file all'apertura con Gedit risulta "vuoto" come è possibile?...pensavo che fosse invisibile il contenuto o qualcosa di simile...ma in proprietà effettivamente il file risulta 0 Kb...ammetto che non è un grande problema...ma ripeto non utilizzo solo io il pc e quando lo accende qualcun altro e attende il caricamento...questo parte dalla posizione "tre" dove c'è una recovery di ubuntu e si trova tutti i codici e numeri sullo schermo anziche win xp...poi io spesso non ci sono...

qualche altro aiuto?
Se il file è vuoto due sono le possibilità:
o hai digitato male il comando, oppure hai grub1.

Per verificare la prima opzione digita da terminale

Codice: Seleziona tutto

sudo gedit /etc/default/grub
( fai copia e incolla così sei sicuro di non sbagliare )
Per la seconda opzione digita

Codice: Seleziona tutto

sudo gedit /boot/grub/menu.lst
e posta il risultato.
Saluti

Re: [Boot] impostazioni grub...di nuovo

Inviato: giovedì 6 maggio 2010, 18:10
da kernel.panic
Ubuntu Tweak serve a semplificare operazioni normalmente piu laboriose, però per cose "delicate" come queste non ti conviene usarlo. Per togliere i vecchi kernel usa Synaptic e vai sicuro al 100% (ricorda che per togliere un vecchio kernel vanno rimossi 3 pacchetti in totale, ne piu ne meno). Per impostare il grub come timer o OS primario da far partire puoi editare a mano il file

Codice: Seleziona tutto

sudo gedit /etc/default/grub
e poi dare

Codice: Seleziona tutto

sudo update-grub2

Re: [Boot] impostazioni grub...di nuovo

Inviato: giovedì 6 maggio 2010, 19:40
da yghson
grazie ancora delle risposte.

comunque con il primo comando mi esce il file gedit vuoto...come prima.
il secondo comando invece mi dà questo risultato:

# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 1

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 5

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
#      password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=1ec9fb15-3570-4f84-80c9-86fabde8c40d ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=1ec9fb15-3570-4f84-80c9-86fabde8c40d

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
##      indomU=true
##      indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 10.04 LTS, kernel 2.6.32-22-generic
uuid 1ec9fb15-3570-4f84-80c9-86fabde8c40d
kernel /boot/vmlinuz-2.6.32-22-generic root=UUID=1ec9fb15-3570-4f84-80c9-86fabde8c40d ro quiet splash
initrd /boot/initrd.img-2.6.32-22-generic
quiet

title Ubuntu 10.04 LTS, kernel 2.6.32-22-generic (recovery mode)
uuid 1ec9fb15-3570-4f84-80c9-86fabde8c40d
kernel /boot/vmlinuz-2.6.32-22-generic root=UUID=1ec9fb15-3570-4f84-80c9-86fabde8c40d ro  single
initrd /boot/initrd.img-2.6.32-22-generic

title Ubuntu 10.04 LTS, kernel 2.6.32-21-generic
uuid 1ec9fb15-3570-4f84-80c9-86fabde8c40d
kernel /boot/vmlinuz-2.6.32-21-generic root=UUID=1ec9fb15-3570-4f84-80c9-86fabde8c40d ro quiet splash
initrd /boot/initrd.img-2.6.32-21-generic
quiet

title Ubuntu 10.04 LTS, kernel 2.6.32-21-generic (recovery mode)
uuid 1ec9fb15-3570-4f84-80c9-86fabde8c40d
kernel /boot/vmlinuz-2.6.32-21-generic root=UUID=1ec9fb15-3570-4f84-80c9-86fabde8c40d ro  single
initrd /boot/initrd.img-2.6.32-21-generic

title Ubuntu 10.04 LTS, memtest86+
uuid 1ec9fb15-3570-4f84-80c9-86fabde8c40d
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
#title Other operating systems:
#root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Professional
rootnoverify (hd0,0)
savedefault
makeactive
chainloader +1



ma questo significa che ho Grub 1 ? io da qualche parte avevo letto che con la 10.04 c'era automaticamente grub 2...boh!!!

Re: [Boot] impostazioni grub...di nuovo

Inviato: giovedì 6 maggio 2010, 19:41
da Petr
Per sapere quale grub hai installato

Codice: Seleziona tutto

sudo grub-install -v
anche se hai evidentemente Grub Legacy.

Re: [Boot] impostazioni grub...di nuovo

Inviato: giovedì 6 maggio 2010, 19:53
da yghson
Petr....risultato gnu grub 0.97 ?????
e il legacy che dicevi tu?

boh....non saprei a questo punto...vabbè non è che mi importa tanto avere per forza l'ultimo grub...mi interessa solo come fare per settare come ti dicevo io....windows all'avvio e solo due righe : Ubuntu e windows...

P.S. ma ho questo grub perchè ho sempre aggiornato dal gestore aggiornamenti dalla 9.04 in poi? e può portare problemi avere questo piuttosto che il 2?

grazie ancora.

Re: [Boot] impostazioni grub...di nuovo

Inviato: giovedì 6 maggio 2010, 20:05
da Petr
yghson ha scritto: Petr....risultato gnu grub 0.97 ?????
e il legacy che dicevi tu?

boh....non saprei a questo punto...vabbè non è che mi importa tanto avere per forza l'ultimo grub...mi interessa solo come fare per settare come ti dicevo io....windows all'avvio e solo due righe : Ubuntu e windows...

P.S. ma ho questo grub perchè ho sempre aggiornato dal gestore aggiornamenti dalla 9.04 in poi? e può portare problemi avere questo piuttosto che il 2?

grazie ancora.
Esattamente. Grub Legacy.
Per molti è meglio perchè è più facilmente gestibile, anche se tutte le distribuzioni oramai stanno adottando grub2.
Posta il risultato di

Codice: Seleziona tutto

sudo fdisk -l
e vediamo di inserire win.

Edit- Mi correggo. Win ti parte.

Re: [Boot] impostazioni grub...di nuovo

Inviato: giovedì 6 maggio 2010, 20:10
da yghson
si win parte e funziona così come tutti e due i kernel (2.6.32-21 / 2.6.32-22 )......
al momento la schermata di grub si presenta con i due kernel linux e relativi recovery mode, poi il nemtest e infine windows xp...

Re: [Boot] impostazioni grub...di nuovo

Inviato: giovedì 6 maggio 2010, 20:18
da kernel.panic
yghson ha scritto: Petr....risultato gnu grub 0.97 ?????
e il legacy che dicevi tu?

boh....non saprei a questo punto...vabbè non è che mi importa tanto avere per forza l'ultimo grub...mi interessa solo come fare per settare come ti dicevo io....windows all'avvio e solo due righe : Ubuntu e windows...

P.S. ma ho questo grub perchè ho sempre aggiornato dal gestore aggiornamenti dalla 9.04 in poi? e può portare problemi avere questo piuttosto che il 2?

grazie ancora.
pazzo! il GRUB2 è mooooooolto meglio! è piu semplice e funzionale! se poi vuoi esagerare come ho fatto io allora usa BURG (basato su grub2)  (rotfl)

[img width=800 height=500]http://img691.imageshack.us/img691/930/burg.png[/img]

Re: [Boot] impostazioni grub...di nuovo

Inviato: giovedì 6 maggio 2010, 20:18
da Petr
Puoi leggere qui per le modifiche che ti interessano.
Saluti

Re: [Boot] impostazioni grub...di nuovo

Inviato: giovedì 6 maggio 2010, 20:24
da Petr
kernel.panic ha scritto:
pazzo! il GRUB2 è mooooooolto meglio! è piu semplice e funzionale! se poi vuoi esagerare come ho fatto io allora usa BURG (basato su grub2)  (rotfl)
Magari c'è chi preferisce cose più "minimaliste".  ;D

Re: [Boot] impostazioni grub...di nuovo

Inviato: giovedì 6 maggio 2010, 20:32
da yghson
grazie petr..quindi devo guardare la sezione "versioni precedenti al 9.10" e modificare il file menu.lst? spero di capire bene e non fare ca###te...

kernel panic grazie anche a te ma al momento non so se ho voglia di fare casini per sostituire il grub (non riesco a gestire questo!!!) e poi di tutto il sistema operativo...del menu grub non è che mi interessi tanto l'importante è che riesco a settare bene come dico io...

saluti.

Re: [Boot] impostazioni grub...di nuovo

Inviato: giovedì 6 maggio 2010, 20:58
da Petr
yghson ha scritto: grazie petr..quindi devo guardare la sezione "versioni precedenti al 9.10" e modificare il file menu.lst? spero di capire bene e non fare ca###te...

kernel panic grazie anche a te ma al momento non so se ho voglia di fare casini per sostituire il grub (non riesco a gestire questo!!!) e poi di tutto il sistema operativo...del menu grub non è che mi interessi tanto l'importante è che riesco a settare bene come dico io...

saluti.
Se hai difficoltà e vuoi chiarimenti siamo qui.
Saluti

Re: [Boot] impostazioni grub...di nuovo

Inviato: venerdì 7 maggio 2010, 15:15
da yghson
si si lo so..sono io che sono un pò tarato  >:(
ho fatto come mi diceva la guida...ma non mi fa modificare proprio nulla...mi fà copiare ma non mi fa incollare "prima come dice la guida...questo è quello che c'è scritto nel file menu.lst :


# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 1

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 5

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
#      password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=1ec9fb15-3570-4f84-80c9-86fabde8c40d ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=1ec9fb15-3570-4f84-80c9-86fabde8c40d

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
##      indomU=true
##      indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 10.04 LTS, kernel 2.6.32-22-generic
uuid 1ec9fb15-3570-4f84-80c9-86fabde8c40d
kernel /boot/vmlinuz-2.6.32-22-generic root=UUID=1ec9fb15-3570-4f84-80c9-86fabde8c40d ro quiet splash
initrd /boot/initrd.img-2.6.32-22-generic
quiet

title Ubuntu 10.04 LTS, kernel 2.6.32-22-generic (recovery mode)
uuid 1ec9fb15-3570-4f84-80c9-86fabde8c40d
kernel /boot/vmlinuz-2.6.32-22-generic root=UUID=1ec9fb15-3570-4f84-80c9-86fabde8c40d ro  single
initrd /boot/initrd.img-2.6.32-22-generic

title Ubuntu 10.04 LTS, memtest86+
uuid 1ec9fb15-3570-4f84-80c9-86fabde8c40d
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
#title Other operating systems:
#root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Professional
rootnoverify (hd0,0)
savedefault
makeactive
chainloader +1


che cavolo devo fare?

Re: [Boot] impostazioni grub...di nuovo

Inviato: venerdì 7 maggio 2010, 19:30
da yghson
in parole povere mi dice che il file è di sola lettura.......

Re: [Boot] impostazioni grub...di nuovo

Inviato: venerdì 7 maggio 2010, 22:24
da steff
Devi aprirlo con permessi admin:

Codice: Seleziona tutto

sudo gedit /boot/grub/menu.lst
Prossima volta incolla cose lunghe come questo in tag "codice" (il bottone # sopra i smiley)

[Risolto] Re: [Boot] impostazioni grub...di nuovo

Inviato: sabato 8 maggio 2010, 14:26
da yghson
grazie a tutti...
ho lasciato lì sia il nemtest che il recovery mode...l'importante è che parta in default windows...

P.S. verrò a darvi fastidio di nuovo appena mi verrà voglia di smanettare per cambiarlo proprio il grub...sperando già da ora che non sia una cosa troppo complicata....

ciao.