View Full Version : Aiuto con GRUB! Non mi si avvia Windows
Premesso che sono totalmente newbie con linux
Ho due hard disk, il primo con windows, a cui ho affiancato un secondo hard disk per provare ubuntu.
Successivamente ho creato una seconda partizione sul primo hard disk, ma questo non credo che sia rilevante.
Funzionava tutto a dovere, quando un giorno all'accensione del pc non c'e' piu' grub.
Come prima cosa ho provato a reinstallare ubuntu, pensando che la nuova installazione sistemasse grub, ma ancora grub non si avviava.
Leggendo in giro ho trovato Supergrub, ho fatto il disco, con quello ho "riparato" il boot di ubuntu, che ora mi si avvia correttamente (all'accensione grub e' tornato come prima, chiedendomi quale sistema operativo avviare).
Invece non riesco a "riparare" il boot di windows.
La cosa che mi fa pensare poi e' che anche il "file browser" di ubuntu mi vede le due partizioni dell'altro hard disk, ma provando ad accederci mi da l'errore "unable to mount the volume".
Cosa posso fare?
Intanto posta il risultato di
sudo fdisk -l (ELLE) e di
cat /boot/grub/menu.lst
DArK_N3tWoRk
25-02-2009, 20:02
Grub ha sempre dato problemi con gli OS su hard disk separati...
mastrobutti
25-02-2009, 20:34
Grub ha sempre dato problemi con gli OS su hard disk separati...
Mah io non direi: ho un multiboot di 5 SO su una mia workstation e ho realizzato una marea di pc con Linux + Winzozz (hd separati), e mai un problema: basta impostarlo pe bene.
Allora, questo e' sudo fdisk-l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x481cd431
Device Boot Start End Blocks Id System
/dev/sda1 * 1 38619 310207086 7 HPFS/NTFS
/dev/sda2 38620 60801 178176915 f W95 Ext'd (LBA)
/dev/sda5 38620 60801 178176883+ 7 HPFS/NTFS
Disk /dev/sdb: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xff5eff5e
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 9553 76734441 83 Linux
/dev/sdb2 9554 9964 3301357+ 5 Extended
/dev/sdb5 9554 9964 3301326 82 Linux swap / Solaris
Disk /dev/sdc: 4110 MB, 4110188544 bytes
255 heads, 63 sectors/track, 499 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x01f46ef6
Device Boot Start End Blocks Id System
/dev/sdc1 * 1 500 4013824+ c W95 FAT32 (LBA)
Partition 1 has different physical/logical endings:
phys=(498, 254, 63) logical=(499, 178, 63)
questo invece è 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=ecf89659-dd32-4f6c-9ccf-0dfb87bfd225 ro
## default grub root device
## e.g. groot=(hd0,0)
# groot=ecf89659-dd32-4f6c-9ccf-0dfb87bfd225
## 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
## 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 8.10, kernel 2.6.27-7-generic
uuid ecf89659-dd32-4f6c-9ccf-0dfb87bfd225
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=ecf89659-dd32-4f6c-9ccf-0dfb87bfd225 ro quiet splash
initrd /boot/initrd.img-2.6.27-7-generic
quiet
title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
uuid ecf89659-dd32-4f6c-9ccf-0dfb87bfd225
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=ecf89659-dd32-4f6c-9ccf-0dfb87bfd225 ro single
initrd /boot/initrd.img-2.6.27-7-generic
title Ubuntu 8.10, memtest86+
uuid ecf89659-dd32-4f6c-9ccf-0dfb87bfd225
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
root (hd0,0)
savedefault
makeactive
chainloader +1
mastrobutti
25-02-2009, 23:35
Allora, questo e' sudo fdisk-l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x481cd431
Device Boot Start End Blocks Id System
/dev/sda1 * 1 38619 310207086 7 HPFS/NTFS
/dev/sda2 38620 60801 178176915 f W95 Ext'd (LBA)
/dev/sda5 38620 60801 178176883+ 7 HPFS/NTFS
Disk /dev/sdb: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xff5eff5e
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 9553 76734441 83 Linux
/dev/sdb2 9554 9964 3301357+ 5 Extended
/dev/sdb5 9554 9964 3301326 82 Linux swap / Solaris
Disk /dev/sdc: 4110 MB, 4110188544 bytes
255 heads, 63 sectors/track, 499 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x01f46ef6
Device Boot Start End Blocks Id System
/dev/sdc1 * 1 500 4013824+ c W95 FAT32 (LBA)
Partition 1 has different physical/logical endings:
phys=(498, 254, 63) logical=(499, 178, 63)
questo invece è 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=ecf89659-dd32-4f6c-9ccf-0dfb87bfd225 ro
## default grub root device
## e.g. groot=(hd0,0)
# groot=ecf89659-dd32-4f6c-9ccf-0dfb87bfd225
## 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
## 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 8.10, kernel 2.6.27-7-generic
uuid ecf89659-dd32-4f6c-9ccf-0dfb87bfd225
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=ecf89659-dd32-4f6c-9ccf-0dfb87bfd225 ro quiet splash
initrd /boot/initrd.img-2.6.27-7-generic
quiet
title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
uuid ecf89659-dd32-4f6c-9ccf-0dfb87bfd225
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=ecf89659-dd32-4f6c-9ccf-0dfb87bfd225 ro single
initrd /boot/initrd.img-2.6.27-7-generic
title Ubuntu 8.10, memtest86+
uuid ecf89659-dd32-4f6c-9ccf-0dfb87bfd225
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
root (hd0,0)
savedefault
makeactive
chainloader +1
Da come la vedo, io cambierei
title Microsoft Windows XP Professional
root (hd0,0)
in
title Microsoft Windows XP Professional
root (hd1,0)
Se in
/dev/sda1
hai il SO di Windows da avviare.
Una volta modificato puoi sempre tornare in dietro agendo da Linux.
mastrobutti
25-02-2009, 23:46
Scusa forse ho letto male: quando selezioni da grub Winzozz non ti parte o devi solo fixare l'MBR di windows?
Se sei nel primo caso, prova con la modifica che ho messo sopra, se sei nel secondo il lavoro da fare è un altro.
Ad ogni modo quando si installa ubuntu (per le prossime volte) all'ultimo passo, quando ti da il riepilogo dell'instalazione, c'è un pulsante tipo avanzate, dove tu gli dici in quale disco mettere il grub.
a me sembra tutto a posto, quando cerchi di avviare win che tipo di errore ottieni ?
di grub o di win ?
sandman972
26-02-2009, 07:50
Ciao. :)
Ma nell'avvio per windows non ci deve essere anche la voce "boot" alla fine? Una cosa tipo
title Windows
rootnoverify (hd1,0)
makeactive
chainloader +1
boot
Allora, quando scelgo di avviare windows dal menu di grub ricevo questo errore di grub: "Error 13: Invalid or unsupported executable format".
Se provo a scrivere boot come consigliato da sandman972 ricevo sempre lo stesso errore.
Se provo a cambiare root (hd0,0) in root (hd1,0), quando scelgo di avviare windows grub mi da la scritta "starting up ...", ma il pc rimane cosi' con questa scritta, e non succede niente.
mastrobutti
26-02-2009, 09:07
Allora, quando scelgo di avviare windows dal menu di grub ricevo questo errore di grub: "Error 13: Invalid or unsupported executable format".
Se provo a scrivere boot come consigliato da sandman972 ricevo sempre lo stesso errore.
Se provo a cambiare root (hd0,0) in root (hd1,0), quando scelgo di avviare windows grub mi da la scritta "starting up ...", ma il pc rimane cosi' con questa scritta, e non succede niente.
Allora la mia dritta è giusta: a questo punto mi pare un errore di boot di winzozz.
A parer mio bisogna fixare l'MBR di Win, per questo non parte.
Come faccio a sistemare l'MBR di windows?
Ma e' normale che all'hard disk di windows non riesco ad accederci neanche da ubuntu? Non sarà rotto l'hard disk?
mastrobutti
26-02-2009, 12:58
Se la versione di ubuntu è l'ultima, hai ntfs-3g quindi dovresti accedervi.
Che errore ti da?
Mi dice: Unable to mount the volume.
Se clicco su details mi dice:
$Logfile indicates unclean shutdown (0,0) Failed to moun /dev/sda1
Poi dice che il filesistem risulta ancora aperto, di provare a chiuderlo spegnendo windows normalmente oppure posso provare a forzare il mount a mio rischio.
mastrobutti
26-02-2009, 13:54
Mi dice: Unable to mount the volume.
Se clicco su details mi dice:
$Logfile indicates unclean shutdown (0,0) Failed to moun /dev/sda1
Poi dice che il filesistem risulta ancora aperto, di provare a chiuderlo spegnendo windows normalmente oppure posso provare a forzare il mount a mio rischio.
Allora vuol dire che il fs di win è corrotto o ha problemi (ntfs-3g è molto delicato su queste cose: rileva problemi che da Win neanche te ne accorgi).
Devi provare a fare un check del FS di Win con il tool che preferisci (io per dire uso Bart PE da live).
Potresti anche forzare il montaggio, però non è cosa buona (ricordo che NTFS è uno dei FS più schifosi ed è molto delicato).
mastrobutti
26-02-2009, 14:30
Questo sempre se GRUB è installato sul disco di Win.
Ad ogni modo prova prima con il boot sector.
mastrobutti
26-02-2009, 15:03
Scusa ma se mettendo hd(1,0) gli trova windows vuol dire che va a cercaqre il secondo HD.
Ho provato a inserire il disco di windows ma non trovo il modo di arrivare alla console dei comandi.
Seguendo la procedura arrivo alla selezione delle partizioni da formattare per installare windows.
Durante il caricamento del disco, sotto mi compare il messaggio: premere f2 per la procedura di ripristino di windows.
Se premo f2 mi chiede di inserire il floppy di ripristino, che non ho (non ho neanche il lettore floppy).
Sono andato a cercare Bart PE, se ho capito bene va lanciato da dentro windows per creare il disco, giusto? Se windows non mi si avvia non posso farlo? O posso creare il disco con un altro pc (quello da cui sto scrivendo) e utilizzarlo in quello che non avvia windows?
Riguardo al fix del MBR di windows: se riesce a farmi partire winxp non dovrebbe essere un problema, poi una volta ripristinato il sistema si puo' sempre reinstallare grub, no?
mastrobutti
26-02-2009, 16:01
si da grub però, cioè grub è comunque installato sull MBR del primo hard disk. il problema suo non è a far partire linux ma windows, mi pare di aver capito. semplicemente credo che gli si sia sputtato NTLDR sul bootsector della partizione di windows.
mmmmm.... già vero....
mastrobutti
26-02-2009, 16:05
Ho provato a inserire il disco di windows ma non trovo il modo di arrivare alla console dei comandi.
Seguendo la procedura arrivo alla selezione delle partizioni da formattare per installare windows.
Durante il caricamento del disco, sotto mi compare il messaggio: premere f2 per la procedura di ripristino di windows.
Se premo f2 mi chiede di inserire il floppy di ripristino, che non ho (non ho neanche il lettore floppy).
Sono andato a cercare Bart PE, se ho capito bene va lanciato da dentro windows per creare il disco, giusto? Se windows non mi si avvia non posso farlo? O posso creare il disco con un altro pc (quello da cui sto scrivendo) e utilizzarlo in quello che non avvia windows?
Riguardo al fix del MBR di windows: se riesce a farmi partire winxp non dovrebbe essere un problema, poi una volta ripristinato il sistema si puo' sempre reinstallare grub, no?
Bart PE lo puoi fare con qualsiasi OS Win, meglio XP, e un cd di win originale.
La procedura di solito è:
- installare Win
- installare ubuntu (Linux in genere)
Se fai l'inverso, Win non ci pensa su molto e sovrascrive l'MBR. Reinstallare GRUB si può fare comunque.
A questo punto, perso per perso, forza prima il montaggio del disco di Win su linux, e ti tiri giù tutto quello che vuoi backuppare.
Strano che ti chieda floppy però, molto strano.
Aggiornamento: trovata la console di ripristino, bisognava spingere f10 durante l'avvio del disco.
Ho provato con fixboot c: ma mi dava sempre gli stessi errori (error 13 se impostavo hd0,0 e starting up permanente se impostavo hd1,0).
Ho provato con fixmbr, ora come previsto e' scomparso grub, all'avvio lo schermo e' tutto nero con la scritta: Error loading operating sistem.
C'e' un rimedio?
vBulletin® v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.