View Full Version : mancato ripristino grub in dual boot
poldosbaffini
03-11-2010, 14:23
Ciao a tutti, prima di piallare Ubuntu e reistallarlo,provo a spegarvi il mio problema.
ho avuto un problema con il grub dopo l'avanzamento di versione da Lucid a Maverick su di una macchina con dual boot con xp e ubuntu.
Ho seguito la guida ufficiale senza riportare nessun errore,nonostante questo, all'avvio il grub non si visualizza e si avvia solo windows.qualcuno ha idea di cosa si tratti?
questa?
http://wiki.ubuntu-it.org/AmministrazioneSistema/Grub/Ripristino
ma lo volevi reinstallare per questo motivo?
se selezioni il vecchio kernel parte?
poldosbaffini
03-11-2010, 19:25
Non parte l'mrb quindi non posso scegliere nessun Kernel
A meno che tu mi spieghi da live cd come accedervi.
Ora sono su live cd.
mai fare gli avanzamenti, meglio reinstallare, comunque ripeti la procedura indicata nella guida, copia e incolla qui da terminale tutti i comandi che dai ed il risultato.
hai eseguito quella guida punto per punto?
hai errori?
poldosbaffini
03-11-2010, 20:09
Questo è il bello non da errori. Ora riprovo.
ubuntu@ubuntu:~$ sudo fdisk -l
Disk /dev/sdf: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x353762d5
Device Boot Start End Blocks Id System
/dev/sdf1 * 1 15057 120945321 7 HPFS/NTFS
/dev/sdf2 15058 30133 121093120 83 Linux
/dev/sdf3 30133 30402 2158593 5 Extended
/dev/sdf5 30133 30402 2158592 82 Linux swap / Solaris
ubuntu@ubuntu:~$ sudo mount /dev/sdf2 /mnt
mount: /dev/sdf2 already mounted or /mnt busy
mount: according to mtab, /dev/sdf2 is already mounted on /mnt
ubuntu@ubuntu:~$ sudo mount --bind /dev /mnt/dev
ubuntu@ubuntu:~$ sudo mount --bind /proc /mnt/proc
ubuntu@ubuntu:~$ sudo mount --bind /sys /mnt/sys
ubuntu@ubuntu:~$ sudo chroot /mnt
root@ubuntu:/# grub-install /dev/sdf
Installation finished. No error reported.
root@ubuntu:/# update-grub2
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.35-23-generic
Found initrd image: /boot/initrd.img-2.6.35-23-generic
Found linux image: /boot/vmlinuz-2.6.33-02063305-generic
Found initrd image: /boot/initrd.img-2.6.33-02063305-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows XP Home Edition on /dev/sdf1
done
root@ubuntu:/# exit
ubuntu@ubuntu:~$ cd ~
ubuntu@ubuntu:~$ sudo umount /mnt/dev
ubuntu@ubuntu:~$ sudo umount /mnt/proc
ubuntu@ubuntu:~$ sudo umount /mnt/sys
ubuntu@ubuntu:~$ sudo umount /mnt/
ubuntu@ubuntu:~$
se installi sul sdf
devi mettere tale disco come primo di boot nel BIOS
poldosbaffini
03-11-2010, 20:17
Come faccio?
nel bios vai alla sezione:
sequenza di boot
(sdf vuol dire che e' il sesto HD?)
oppure c'e' un menu-boot col quale scegli te quale HD avviare
poldosbaffini
03-11-2010, 20:36
Non riesco a capirti...all'avvio non compare nulla e si avvia direttamente windows.
Per avviare il live cd, schiaccio f8 e modifico l'avvio dal dvd rom.
quando schiacci f8, puoi anche avviare il disco sdf ?
p.s.
quanto dischi hai?
poldosbaffini
03-11-2010, 20:51
uno solo con le partizioni. Anche a me sembra strano che non si chiami sda invece si chiama sdf
dal live cd, che vedi con:
dmesg | grep sd
se vedi sda , io proverei a fare i comandi della guida ,
installandolo su sda
poldosbaffini
03-11-2010, 21:00
Questa è la schermata di gparted.
http://www.flickr.com/photos/55083771@N00/5131657732/
poldosbaffini
03-11-2010, 21:05
questo da terminale della live
ubuntu@ubuntu:~$ dmesg | grep sd
[ 4.540105] sd 2:0:0:0: Attached scsi generic sg1 type 0
[ 4.540608] sd 2:0:0:1: Attached scsi generic sg2 type 0
[ 4.541469] sd 2:0:0:2: Attached scsi generic sg3 type 0
[ 4.542000] sd 2:0:0:3: Attached scsi generic sg4 type 0
[ 4.542884] sd 2:0:0:4: Attached scsi generic sg5 type 0
[ 4.543360] sd 2:0:0:0: [sda] Attached SCSI removable disk
[ 4.545739] sd 2:0:0:1: [sdb] Attached SCSI removable disk
[ 4.549187] sd 2:0:0:2: [sdc] Attached SCSI removable disk
[ 4.551485] sd 2:0:0:3: [sdd] Attached SCSI removable disk
[ 4.552600] sd 2:0:0:4: [sde] Attached SCSI removable disk
[ 5.016441] sd 7:0:0:0: Attached scsi generic sg7 type 0
[ 5.017718] sd 7:0:0:0: [sdf] 488397168 512-byte logical blocks: (250 GB/232 GiB)
[ 5.017764] sd 7:0:0:0: [sdf] Write Protect is off
[ 5.017767] sd 7:0:0:0: [sdf] Mode Sense: 00 3a 00 00
[ 5.017787] sd 7:0:0:0: [sdf] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 5.017929] sdf: sdf1 sdf2 sdf3 < sdf5 >
[ 5.052548] sd 7:0:0:0: [sdf] Attached SCSI disk
[ 7.048210] EXT4-fs (sdf2): mounted filesystem with ordered data mode. Opts: (null)
[ 66.580962] Adding 2158588k swap on /dev/sdf5. Priority:-1 extents:1 across:2158588k
[ 3722.383329] EXT4-fs (sdf2): mounted filesystem with ordered data mode. Opts: (null)
ubuntu@ubuntu:~$
Non so leggere il codice, mi speghi cosa vuol dire?
ma questi che sono?
sd 2:0:0:0: [sda] Attached SCSI removable disk
[ 4.545739] sd 2:0:0:1: [sdb] Attached SCSI removable disk
[ 4.549187] sd 2:0:0:2: [sdc] Attached SCSI removable disk
[ 4.551485] sd 2:0:0:3: [sdd] Attached SCSI removable disk
[ 4.552600] sd 2:0:0:4: [sde] Attached SCSI removable disk
poldosbaffini
03-11-2010, 22:12
Giuro che non ho altri dischi, ne ho uno solo da 250 Gb diviso in 2 partizioni...non riesco a capire
Lollauser
04-11-2010, 00:17
Sparo: hai un portatile o un fisso?
se fisso, il case ha un lettore di schedine (sd, xd, ecc...)?
poldosbaffini
04-11-2010, 09:14
Esatto, mi ha sempre dato problemi, in poche parole non ha mai funzionato. Ne con win ma nemmeno con ubuntu.
hai provato a avviare a mano tramite il grub del livecd?
entrare nella command-line di grub e caricarlo
poldosbaffini
04-11-2010, 09:41
Non l'ho mai fatto, se mi spiehi come lo faccio. Scusami ma non sono proprio alle prime armi ma è la prima volta che mi capita. :mc:
per grub 1
avvii il cdlive
al grub premi "c" entri in command-line
selezioni il disco:
root (hd5,0) (se e' vero che grub vede gli altri 5)
kernel /boot/...... ecc.
initrd /boot/....
boot
poldosbaffini
04-11-2010, 10:08
Non c'è nessun grub all'avvio del live cd.Non riesco a capire cosa intendi.
Il disco di Ubuntu si avvia e la prima schermata che compare è quella dove mi chiede se installare o provare ubuntu.
ah, scusa...
devi selezionare:
boot from HD
poldosbaffini
04-11-2010, 10:17
Ho capito cosa vorresti fare, ma con Maverick la scelta avviene da interfaccia grafica, e non ho idea di come si faccia a visualizzare quel menu che compariva nelle vecchie versioni di Ubuntu. Dal terminale non è possibile accedere con i privilegi di root?
io lo sto facendo da maverik
premi CTRL o shift all'avvio
poldosbaffini
04-11-2010, 10:28
per favore spiegami bene tutti i passi perchè non ho un altro pc e non vorrei fare danni.
Quindi riavvio la live e premo ctrl o shift e poi?
dovrebbe comparire il menu:
- fai partire da live
- mem test
e ultimo
- esegui sistema su HD
poldosbaffini
04-11-2010, 10:37
Grazie Sacarde ora riprovo! a dopo!
poldosbaffini
04-11-2010, 12:48
Purtroppo non si avvia.
posso provare a staccare il lettore di schede?
poldosbaffini
04-11-2010, 12:51
Assurdo ora da terminale da questo...i dischi ora sono sda.
ubuntu@ubuntu:~$ sudo fdisk -l
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x353762d5
Device Boot Start End Blocks Id System
/dev/sda1 * 1 15057 120945321 7 HPFS/NTFS
/dev/sda2 15058 30133 121093120 83 Linux
/dev/sda3 30133 30402 2158593 5 Extended
/dev/sda5 30133 30402 2158592 82 Linux swap / Solaris
ubuntu@ubuntu:~$
poldosbaffini
04-11-2010, 12:54
Anche questo è cambiato.
ubuntu@ubuntu:~$ sudo fdisk -l
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x353762d5
Device Boot Start End Blocks Id System
/dev/sda1 * 1 15057 120945321 7 HPFS/NTFS
/dev/sda2 15058 30133 121093120 83 Linux
/dev/sda3 30133 30402 2158593 5 Extended
/dev/sda5 30133 30402 2158592 82 Linux swap / Solaris
ubuntu@ubuntu:~$ dmesg | grep sd
[ 4.532453] sd 5:0:0:0: Attached scsi generic sg1 type 0
[ 4.533731] sd 5:0:0:0: [sda] 488397168 512-byte logical blocks: (250 GB/232 GiB)
[ 4.533775] sd 5:0:0:0: [sda] Write Protect is off
[ 4.533778] sd 5:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 4.533796] sd 5:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 4.533928] sda: sda1 sda2 sda3 <
[ 4.547765] sd 6:0:0:0: Attached scsi generic sg2 type 0
[ 4.548047] sd 6:0:0:1: Attached scsi generic sg3 type 0
[ 4.548298] sd 6:0:0:2: Attached scsi generic sg4 type 0
[ 4.548548] sd 6:0:0:3: Attached scsi generic sg5 type 0
[ 4.549174] sd 6:0:0:4: Attached scsi generic sg6 type 0
[ 4.553242] sd 6:0:0:0: [sdb] Attached SCSI removable disk
[ 4.555368] sd 6:0:0:1: [sdc] Attached SCSI removable disk
[ 4.556365] sd 6:0:0:2: [sdd] Attached SCSI removable disk
[ 4.557364] sd 6:0:0:3: [sde] Attached SCSI removable disk
[ 4.558366] sd 6:0:0:4: [sdf] Attached SCSI removable disk
[ 4.568508] sda5 >
[ 4.569469] sd 5:0:0:0: [sda] Attached SCSI disk
[ 7.006691] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[ 67.150885] Adding 2158588k swap on /dev/sda5. Priority:-1 extents:1 across:2158588k
ok
mi sembra la situazione corretta...
devi solo modificare /etc/fstab
e ogni altro posto (grub) dove faceva riferimanti a: sdf--in---> sda
poldosbaffini
04-11-2010, 13:14
Mi spieghi la procedura da live?
hai modificato fstab e grub?
seguendo il link del ripristino grub
poldosbaffini
04-11-2010, 16:02
quello della guida ufficiale?
poldosbaffini
04-11-2010, 16:06
risultato
ubuntu@ubuntu:~$ sudo grub
sudo: grub: command not found
ubuntu@ubuntu:~$
poldosbaffini
04-11-2010, 16:08
dentro fstab c'è questo
aufs / aufs rw 0 0
tmpfs /tmp tmpfs nosuid,nodev 0 0
/dev/sda5 swap swap defaults 0 0
poldosbaffini
04-11-2010, 16:21
Io ho seguito la procedura per il grub 2 non per grub
intendo questa guida:
http://wiki.ubuntu-it.org/AmministrazioneSistema/Grub/Ripristino
fstab da modificare e' quello del sistema installato su HD
poldosbaffini
04-11-2010, 16:29
Risultato
ubuntu@ubuntu:~$ sudo fdisk -l
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x353762d5
Device Boot Start End Blocks Id System
/dev/sda1 * 1 15057 120945321 7 HPFS/NTFS
/dev/sda2 15058 30133 121093120 83 Linux
/dev/sda3 30133 30402 2158593 5 Extended
/dev/sda5 30133 30402 2158592 82 Linux swap / Solaris
ubuntu@ubuntu:~$ sudo grub-install /dev/sda
/usr/sbin/grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?).
ubuntu@ubuntu:~$ sudo grub-install (hd0)
bash: syntax error near unexpected token `('
ubuntu@ubuntu:~$
poldosbaffini
04-11-2010, 16:31
Quella è la guida che ho seguito fino a poco fa.
Provo a ripetere la procedura di nuovo?
li hai fatti?
(sda2 e' il tuo disco, al posto di sda1 nell'esempio della guida)
sudo mount /dev/sda2 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt
poldosbaffini
04-11-2010, 16:55
Fino a qui niente errori.
Il passo successivo lo salto?
poldosbaffini
04-11-2010, 17:09
ubuntu@ubuntu:~$ sudo mount /dev/sda2 /mnt
ubuntu@ubuntu:~$ sudo mount --bind /dev /mnt/dev
ubuntu@ubuntu:~$ sudo mount --bind /proc /mnt/proc
ubuntu@ubuntu:~$ sudo mount --bind /sys /mnt/sys
ubuntu@ubuntu:~$ sudo chroot /mnt
Il passo successivo lo devo saltare?
Il Boot è nella partizione sda1
poldosbaffini
04-11-2010, 17:44
Questo è proprio strano...
root@ubuntu:/# grub-install /dev/sda
/dev/sdf2: Not found or not a block device.
root@ubuntu:/#
Il Boot è nella partizione sda1
non ho capito...... hai /boot su una partizione a se?
Questo è proprio strano...
root@ubuntu:/# grub-install /dev/sda
/dev/sdf2: Not found or not a block device.
root@ubuntu:/#
non capisco da dove viene fuori questo "/dev/sdf2"
poldosbaffini
04-11-2010, 20:58
Non riesco a capire neanche io. Stavo piallando tutto ma non è stato possibile neanche quello.mi dice che /mnt è occupato
che intendi?
con df dovresti vedere se la partizione e' ancora montata
poldosbaffini
04-11-2010, 22:03
Non potresti essere più preciso cosa vuol dire con df?
vBulletin® v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.