ripristino boot grub

Problemi riscontrati durante l'installazione di Ubuntu, degli aggiornamenti e degli avanzamenti del sistema.
lillo03
Prode Principiante
Messaggi: 81
Iscrizione: martedì 7 aprile 2009, 14:43

ripristino boot grub

Messaggio da lillo03 »

Per una ignota causa si è danneggiato il grub di avvio di Ubuntu.
Nel Pc ho installato in ordine WinXp32 poi Vista 64bit ed infine Ubuntu64bit.
Tutto funzionava perfettamente potendo scegliere Ubuntu o Win (e nella successiva schermata win vista o precedente)
Dopo il problema ho usato Super Grub Disk ed ho corretto il Grub di Ubuntu (che ora funziona) ma volendo far partire il PC con Windows (la riga per farlo c'è) il pc mi dice "reboot and select proper boot device win vista".
Come posso ripristinare anche questa parte?
Grazie
dani.deb
Imperturbabile Insigne
Imperturbabile Insigne
Messaggi: 3902
Iscrizione: sabato 20 dicembre 2008, 22:40
Desktop: Lubuntu + Unity + Kubuntu
Distribuzione: ubuntu 12.04 64bit + 13.04

Re: ripristino boot grub

Messaggio da dani.deb »

posta i risultati di

Codice: Seleziona tutto

sudo fdisk -l
e

Codice: Seleziona tutto

cat /boot/grub/menu.lst
lillo03
Prode Principiante
Messaggi: 81
Iscrizione: martedì 7 aprile 2009, 14:43

Re: ripristino boot grub

Messaggio da lillo03 »

ecco:

Codice: Seleziona tutto

alberto@alberto-desktop:~$ sudo fdisk -1
[sudo] password for alberto: 
fdisk: opzione non valida -- "1"

Uso:  fdisk [-b SSZ] [-u] DISCO     Modifica la tabella delle partizioni
      fdisk -l [-b SSZ] [-u] DISCO  Elenca la tabella delle partizioni
      fdisk -s PARTIZIONE           Mostra la dimensione della partizione
                                    in blocchi
      fdisk -v                      Mostra la versione di fdisk
In questo caso DISCO è qualcosa come /dev/hdb o /dev/sda
e PARTIZIONE è qualcosa come /dev/hda7
-u: indica Inizio e Fine in numero di settori (invece che in cilindri)
-b 2048: (per alcune unità MO) usa settori a 2048 byte
alberto@alberto-desktop:~$ cat /boot/grub/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		0

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

## 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=86c159b8-bec9-403a-8bfd-80358a5e5aaa ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=86c159b8-bec9-403a-8bfd-80358a5e5aaa

## 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 9.04, kernel 2.6.28-11-generic
uuid		86c159b8-bec9-403a-8bfd-80358a5e5aaa
kernel		/boot/vmlinuz-2.6.28-11-generic root=UUID=86c159b8-bec9-403a-8bfd-80358a5e5aaa ro quiet splash 
initrd		/boot/initrd.img-2.6.28-11-generic
quiet

title		Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
uuid		86c159b8-bec9-403a-8bfd-80358a5e5aaa
kernel		/boot/vmlinuz-2.6.28-11-generic root=UUID=86c159b8-bec9-403a-8bfd-80358a5e5aaa ro  single
initrd		/boot/initrd.img-2.6.28-11-generic

title		Ubuntu 9.04, kernel 2.6.27-11-generic
uuid		86c159b8-bec9-403a-8bfd-80358a5e5aaa
kernel		/boot/vmlinuz-2.6.27-11-generic root=UUID=86c159b8-bec9-403a-8bfd-80358a5e5aaa ro quiet splash 
initrd		/boot/initrd.img-2.6.27-11-generic
quiet

title		Ubuntu 9.04, kernel 2.6.27-11-generic (recovery mode)
uuid		86c159b8-bec9-403a-8bfd-80358a5e5aaa
kernel		/boot/vmlinuz-2.6.27-11-generic root=UUID=86c159b8-bec9-403a-8bfd-80358a5e5aaa ro  single
initrd		/boot/initrd.img-2.6.27-11-generic

title		Ubuntu 9.04, memtest86+
uuid		86c159b8-bec9-403a-8bfd-80358a5e5aaa
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		Windows Vista/Longhorn (loader)
root		(hd0,0)
savedefault
makeactive
chainloader	+1

alberto@alberto-desktop:~$ 
Avatar utente
gianmpu
Rampante Reduce
Rampante Reduce
Messaggi: 7721
Iscrizione: giovedì 15 novembre 2007, 17:11

Re: ripristino boot grub

Messaggio da gianmpu »

Non è un 1, ma una elle.
@dani.deb: quando posti questo comando è bene specificare sempre che il parametro è una elle, altrimenti si generano errori come questo.  ;)
"Chi c**a sott' 'a neve, pure si ffa 'a bbuca e poi 'a copre, quanno 'a neve se scioje, 'a mm***a vie' sempre fori" T. Milian
lillo03
Prode Principiante
Messaggi: 81
Iscrizione: martedì 7 aprile 2009, 14:43

Re: ripristino boot grub

Messaggio da lillo03 »

rifatto... spero di non aver fatto danni!

Codice: Seleziona tutto

alberto@alberto-desktop:~$ sudo fdisk -l

Disco /dev/sda: 500.1 GB, 500107862016 byte
255 testine, 63 settori/tracce, 60801 cilindri
Unità = cilindri di 16065 * 512 = 8225280 byte
Identificativo disco: 0x4d8c4d8c

Dispositivo Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2611    20972826    7  HPFS/NTFS
/dev/sda2            2612        9138    52428127+   7  HPFS/NTFS
/dev/sda3            9139       11749    20972857+  83  Linux
/dev/sda4           11750       60801   394010190    5  Esteso
/dev/sda5           11750       12271     4192933+  82  Linux swap / Solaris
/dev/sda6           12272       60801   389817193+   7  HPFS/NTFS

Disco /dev/sdb: 123.5 GB, 123522416640 byte
255 testine, 63 settori/tracce, 15017 cilindri
Unità = cilindri di 16065 * 512 = 8225280 byte
Identificativo disco: 0xf56df8fe

Dispositivo Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1       15017   120624021    c  W95 FAT32 (LBA)
alberto@alberto-desktop:~$ cat /boot/grub/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		0

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

## 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=86c159b8-bec9-403a-8bfd-80358a5e5aaa ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=86c159b8-bec9-403a-8bfd-80358a5e5aaa

## 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 9.04, kernel 2.6.28-11-generic
uuid		86c159b8-bec9-403a-8bfd-80358a5e5aaa
kernel		/boot/vmlinuz-2.6.28-11-generic root=UUID=86c159b8-bec9-403a-8bfd-80358a5e5aaa ro quiet splash 
initrd		/boot/initrd.img-2.6.28-11-generic
quiet

title		Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
uuid		86c159b8-bec9-403a-8bfd-80358a5e5aaa
kernel		/boot/vmlinuz-2.6.28-11-generic root=UUID=86c159b8-bec9-403a-8bfd-80358a5e5aaa ro  single
initrd		/boot/initrd.img-2.6.28-11-generic

title		Ubuntu 9.04, kernel 2.6.27-11-generic
uuid		86c159b8-bec9-403a-8bfd-80358a5e5aaa
kernel		/boot/vmlinuz-2.6.27-11-generic root=UUID=86c159b8-bec9-403a-8bfd-80358a5e5aaa ro quiet splash 
initrd		/boot/initrd.img-2.6.27-11-generic
quiet

title		Ubuntu 9.04, kernel 2.6.27-11-generic (recovery mode)
uuid		86c159b8-bec9-403a-8bfd-80358a5e5aaa
kernel		/boot/vmlinuz-2.6.27-11-generic root=UUID=86c159b8-bec9-403a-8bfd-80358a5e5aaa ro  single
initrd		/boot/initrd.img-2.6.27-11-generic

title		Ubuntu 9.04, memtest86+
uuid		86c159b8-bec9-403a-8bfd-80358a5e5aaa
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		Windows Vista/Longhorn (loader)
root		(hd0,0)
savedefault
makeactive
chainloader	+1
Avatar utente
gianmpu
Rampante Reduce
Rampante Reduce
Messaggi: 7721
Iscrizione: giovedì 15 novembre 2007, 17:11

Re: ripristino boot grub

Messaggio da gianmpu »

Grub sembra puntare alla partizione corretta. Prova a ripristinare il boot manager di windows e poi a ripristinare grub.
"Chi c**a sott' 'a neve, pure si ffa 'a bbuca e poi 'a copre, quanno 'a neve se scioje, 'a mm***a vie' sempre fori" T. Milian
dani.deb
Imperturbabile Insigne
Imperturbabile Insigne
Messaggi: 3902
Iscrizione: sabato 20 dicembre 2008, 22:40
Desktop: Lubuntu + Unity + Kubuntu
Distribuzione: ubuntu 12.04 64bit + 13.04

Re: ripristino boot grub

Messaggio da dani.deb »

@ gianmpu

lo faccio in tutti i post, ogni tanto si prova a vedere se l'altro utente non è proprio digiuno del tutto
visto che con questo comando 1 al posto di l non genera errori.. al massimo devi ridare il comando
lillo03
Prode Principiante
Messaggi: 81
Iscrizione: martedì 7 aprile 2009, 14:43

Re: ripristino boot grub

Messaggio da lillo03 »

Io sono proprio "digiuno" e mi hai trovato!
Ho ripristinato l'avvio di Vista con il suo CD. Sembra che sistemi tutto....
Riavviando si ripropone ancora l'avvio di Ubuntu con il collegamento a windows che ancora non funziona.
Riproverei con Super Grub Disk. Suggeritemi per favore la procedura corretta..... grazie
Avatar utente
gianmpu
Rampante Reduce
Rampante Reduce
Messaggi: 7721
Iscrizione: giovedì 15 novembre 2007, 17:11

Re: ripristino boot grub

Messaggio da gianmpu »

Mi dispiace, per windows non so che dirti. Il problema è evidentemente il boot manager di windows che si è corrotto. Il super grub disk, in questo caso, non può recuperare la situazione.
"Chi c**a sott' 'a neve, pure si ffa 'a bbuca e poi 'a copre, quanno 'a neve se scioje, 'a mm***a vie' sempre fori" T. Milian
Scrivi risposta

Ritorna a “Installazione e aggiornamento del sistema operativo”

Chi c’è in linea

Visualizzano questa sezione: 0 utenti iscritti e 13 ospiti