[Boot] Ho fatto un macello con grub
Inviato: mercoledì 2 giugno 2010, 11:57
Avevo un disco con Windows XP e Ubuntu 9.10 perfettamente funzionanti. Ho eseguito l'avanzamento a Ubuntu 10.04 ed ho avuto il problema descritto anche da altri utenti: effettuando la scelta Win XP dal grub il risultato era uno schermo nero con una lineetta lampeggiante in alto a sinistra. Cercando di applicare maldestramente i consigli trovati qua e la ho installato ed usato testdisk ma niente, in seguito ho creato un cdrom bootabile con supergrubdisk ma in seguito allo smanettamento selvaggio e disinformato ho creato un casino non indifferente (non chiedetemi cosa ho fatto di preciso!!!) e il risultato era che lo schermo nero e lineetta lampeggiante comparivano subito e non compariva più la schermata di grub. Avviando Ubuntu dal livecd di supergrubdisk ho avuto accesso al mio Ubuntu (ma non appare lo sfondo del desktop) e da lì ho ulteriormente smanettato installando grub2 (credo...) ma il risultato è stato che ora se faccio reboot parte la schermata del grub ma compare la sola opzione relativa a Win XP, che comunque continua a non partire. Spero che qualcuno mi aiuti, tutte le cartelle di windows sono presenti e navigabili da Ubuntu, perciò spero di poter ripristinare la possibilità di utilizzare entrambi i sistemi operativi (purtroppo per il mio lavoro ho ancora una dipendenza da microsoft).
Riporto di seguito il risultato di alcuni comandi diagnostici.
sudo fdisk -l:
Disco /dev/sda: 80.0 GB, 80026361856 byte
255 testine, 63 settori/tracce, 9729 cilindri
Unità = cilindri di 16065 * 512 = 8225280 byte
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identificativo disco: 0x249583ed
Dispositivo Boot Start End Blocks Id System
/dev/sda1 * 1 438 3518203+ b W95 FAT32
/dev/sda2 439 7051 53118922+ 7 HPFS/NTFS
/dev/sda3 7052 9729 21511035 5 Esteso
/dev/sda5 7052 8165 8948173+ 83 Linux
/dev/sda6 9631 9729 795186 82 Linux swap / Solaris
/dev/sda7 8166 9630 11767581 83 Linux
Le voci nella tabella delle partizioni non sono nello stesso ordine del disco
Disco /dev/sdb: 300.1 GB, 300090728448 byte
255 testine, 63 settori/tracce, 36483 cilindri
Unità = cilindri di 16065 * 512 = 8225280 byte
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identificativo disco: 0x57e96e56
Dispositivo Boot Start End Blocks Id System
/dev/sdb1 1 36483 293049666 7 HPFS/NTFS
Disco /dev/sde: 32 MB, 32768000 byte
3 testine, 32 settori/tracce, 666 cilindri
Unità = cilindri di 96 * 512 = 49152 byte
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identificativo disco: 0x3fff0502
Dispositivo Boot Start End Blocks Id System
/dev/sde1 * 1 667 31983 4 FAT16 <32M
La partizione 1 ha diversi elementi finali fisici/logici:
phys=(1000, 2, 32) logico=(666, 1, 30)
e questo è il risultato di cat /boot/grub/grub.cfg:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
set saved_entry=${prev_saved_entry}
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z ${boot_once} ]; then
saved_entry=${chosen}
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 763743c5-4875-47aa-961e-ed6cbe07b5ef
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 763743c5-4875-47aa-961e-ed6cbe07b5ef
set locale_dir=($root)/boot/grub/locale
set lang=it
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, con Linux 2.6.32-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 763743c5-4875-47aa-961e-ed6cbe07b5ef
linux /boot/vmlinuz-2.6.32-22-generic root=UUID=763743c5-4875-47aa-961e-ed6cbe07b5ef ro quiet splash
initrd /boot/initrd.img-2.6.32-22-generic
}
menuentry 'Ubuntu, con Linux 2.6.32-22-generic (modalità ripristino)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 763743c5-4875-47aa-961e-ed6cbe07b5ef
echo 'Caricamento Linux 2.6.32-22-generic...'
linux /boot/vmlinuz-2.6.32-22-generic root=UUID=763743c5-4875-47aa-961e-ed6cbe07b5ef ro single
echo 'Caricamento ramdisk iniziale...'
initrd /boot/initrd.img-2.6.32-22-generic
}
menuentry 'Ubuntu, con Linux 2.6.31-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 763743c5-4875-47aa-961e-ed6cbe07b5ef
linux /boot/vmlinuz-2.6.31-21-generic root=UUID=763743c5-4875-47aa-961e-ed6cbe07b5ef ro quiet splash
initrd /boot/initrd.img-2.6.31-21-generic
}
menuentry 'Ubuntu, con Linux 2.6.31-21-generic (modalità ripristino)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 763743c5-4875-47aa-961e-ed6cbe07b5ef
echo 'Caricamento Linux 2.6.31-21-generic...'
linux /boot/vmlinuz-2.6.31-21-generic root=UUID=763743c5-4875-47aa-961e-ed6cbe07b5ef ro single
echo 'Caricamento ramdisk iniziale...'
initrd /boot/initrd.img-2.6.31-21-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 763743c5-4875-47aa-961e-ed6cbe07b5ef
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 763743c5-4875-47aa-961e-ed6cbe07b5ef
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows NT/2000/XP (on /dev/sda1)" {
insmod fat
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 1420-55fa
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Microsoft Windows XP Home Edition (on /dev/sda2)" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 22dc6853dc682371
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
Riporto di seguito il risultato di alcuni comandi diagnostici.
sudo fdisk -l:
Disco /dev/sda: 80.0 GB, 80026361856 byte
255 testine, 63 settori/tracce, 9729 cilindri
Unità = cilindri di 16065 * 512 = 8225280 byte
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identificativo disco: 0x249583ed
Dispositivo Boot Start End Blocks Id System
/dev/sda1 * 1 438 3518203+ b W95 FAT32
/dev/sda2 439 7051 53118922+ 7 HPFS/NTFS
/dev/sda3 7052 9729 21511035 5 Esteso
/dev/sda5 7052 8165 8948173+ 83 Linux
/dev/sda6 9631 9729 795186 82 Linux swap / Solaris
/dev/sda7 8166 9630 11767581 83 Linux
Le voci nella tabella delle partizioni non sono nello stesso ordine del disco
Disco /dev/sdb: 300.1 GB, 300090728448 byte
255 testine, 63 settori/tracce, 36483 cilindri
Unità = cilindri di 16065 * 512 = 8225280 byte
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identificativo disco: 0x57e96e56
Dispositivo Boot Start End Blocks Id System
/dev/sdb1 1 36483 293049666 7 HPFS/NTFS
Disco /dev/sde: 32 MB, 32768000 byte
3 testine, 32 settori/tracce, 666 cilindri
Unità = cilindri di 96 * 512 = 49152 byte
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identificativo disco: 0x3fff0502
Dispositivo Boot Start End Blocks Id System
/dev/sde1 * 1 667 31983 4 FAT16 <32M
La partizione 1 ha diversi elementi finali fisici/logici:
phys=(1000, 2, 32) logico=(666, 1, 30)
e questo è il risultato di cat /boot/grub/grub.cfg:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
set saved_entry=${prev_saved_entry}
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z ${boot_once} ]; then
saved_entry=${chosen}
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 763743c5-4875-47aa-961e-ed6cbe07b5ef
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 763743c5-4875-47aa-961e-ed6cbe07b5ef
set locale_dir=($root)/boot/grub/locale
set lang=it
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, con Linux 2.6.32-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 763743c5-4875-47aa-961e-ed6cbe07b5ef
linux /boot/vmlinuz-2.6.32-22-generic root=UUID=763743c5-4875-47aa-961e-ed6cbe07b5ef ro quiet splash
initrd /boot/initrd.img-2.6.32-22-generic
}
menuentry 'Ubuntu, con Linux 2.6.32-22-generic (modalità ripristino)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 763743c5-4875-47aa-961e-ed6cbe07b5ef
echo 'Caricamento Linux 2.6.32-22-generic...'
linux /boot/vmlinuz-2.6.32-22-generic root=UUID=763743c5-4875-47aa-961e-ed6cbe07b5ef ro single
echo 'Caricamento ramdisk iniziale...'
initrd /boot/initrd.img-2.6.32-22-generic
}
menuentry 'Ubuntu, con Linux 2.6.31-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 763743c5-4875-47aa-961e-ed6cbe07b5ef
linux /boot/vmlinuz-2.6.31-21-generic root=UUID=763743c5-4875-47aa-961e-ed6cbe07b5ef ro quiet splash
initrd /boot/initrd.img-2.6.31-21-generic
}
menuentry 'Ubuntu, con Linux 2.6.31-21-generic (modalità ripristino)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 763743c5-4875-47aa-961e-ed6cbe07b5ef
echo 'Caricamento Linux 2.6.31-21-generic...'
linux /boot/vmlinuz-2.6.31-21-generic root=UUID=763743c5-4875-47aa-961e-ed6cbe07b5ef ro single
echo 'Caricamento ramdisk iniziale...'
initrd /boot/initrd.img-2.6.31-21-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 763743c5-4875-47aa-961e-ed6cbe07b5ef
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set 763743c5-4875-47aa-961e-ed6cbe07b5ef
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows NT/2000/XP (on /dev/sda1)" {
insmod fat
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 1420-55fa
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Microsoft Windows XP Home Edition (on /dev/sda2)" {
insmod ntfs
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 22dc6853dc682371
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###