Pagina 1 di 2

[Grub] Il Grub non si ripristina e dal live cd non mi permette di aprire i file!!!

Inviato: martedì 27 aprile 2010, 17:58
da Dario_SRD
Salve a tutti, ho nel mio computer 2 OS, ubuntu 9.10 è windows xp appena reinstallato. Il problema e che seguendo le guide del forum non sono riuscito a ripristinare grub2! arrivati al passaggio "Montare il resto dei dispositivi con il comando:

sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys" mi dice che i file non esistono! E se comunque cerco di continuare l'operazione con chroot non funziona lo stesso!
Mi chiedevo se avevo combinato qualche casino prima (molto probabile) e se è possibile cancellare il grub e reinstallarlo da capo!

Un altro problema si propone quando dal live cd tento di copiare i file della partizione di ubuntu e copiarli su Win!
Sopra molte cartelle è spuntata una strana "X" e quando tento di aprirle mi spunta "The folder contents could not be displayed.  You do not have the permissions necessary to view the contents of "Setup"." e non mi permette la copia dicendomi che non ho i permessi!

Confido nella vostra infinita sapienza  ;D

Re: [Grub] Il Grub non si ripristina e dal live cd non mi permette di aprire i file!!!

Inviato: martedì 27 aprile 2010, 18:11
da patel
dai i comandi previsti dal wiki e copia e incolla qui tutto quello che vedi sul terminale, comandi compresi, anche il

Codice: Seleziona tutto

sudo fdisk -l

Re: [Grub] Il Grub non si ripristina e dal live cd non mi permette di aprire i file!!!

Inviato: martedì 27 aprile 2010, 18:25
da Dario_SRD
Fino qui và bene??

Codice: Seleziona tutto

ubuntu@ubuntu:~$ 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: 0x6d3f6d3f

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       32757   263120571    7  HPFS/NTFS
/dev/sda2           32758       33753     8000370   82  Linux swap / Solaris
/dev/sda3           33754       39890    49295452+  83  Linux
/dev/sda4           39891       60801   167967607+  83  Linux

Disk /dev/sdb: 1056 MB, 1056177152 bytes
64 heads, 32 sectors/track, 1007 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x96c64eb4

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        1008     1031391    6  FAT16
Partition 1 has different physical/logical endings:
     phys=(1023, 63, 32) logical=(1007, 14, 30)
ubuntu@ubuntu:~$ sudo mount /dev/sda4 /mnt
mount: /dev/sda4 already mounted or /mnt busy
mount: according to mtab, /dev/sda4 is already mounted on /mnt
ubuntu@ubuntu:~$ sudo mount --bind /dev /mnt/dev
mount: mount point /mnt/dev does not exist
ubuntu@ubuntu:~$ sudo mount --bind /proc /mnt/proc
mount: mount point /mnt/proc does not exist
ubuntu@ubuntu:~$ sudo mount --bind /sys /mnt/sys
mount: mount point /mnt/sys does not exist
ubuntu@ubuntu:~$ sudo chroot /mnt
chroot: cannot run command `/bin/bash': No such file or directory

Re: [Grub] Il Grub non si ripristina e dal live cd non mi permette di aprire i file!!!

Inviato: martedì 27 aprile 2010, 18:31
da patel
sicuro che il sistema sia in sda4 e non in sda3 ?

Re: [Grub] Il Grub non si ripristina e dal live cd non mi permette di aprire i file!!!

Inviato: martedì 27 aprile 2010, 18:33
da Dario_SRD
Non sono sicuro..come faccio a confermare la cosa?? Io avevo basato tutto sulla grandezza della partizione..per questo!

Re: [Grub] Il Grub non si ripristina e dal live cd non mi permette di aprire i file!!!

Inviato: martedì 27 aprile 2010, 18:34
da patel
semplice, prova con sda3, senza utilizzare nautilus e quindi senza montare alcuna partizione.

Re: [Grub] Il Grub non si ripristina e dal live cd non mi permette di aprire i file!!!

Inviato: martedì 27 aprile 2010, 18:36
da Petr
Digita da terminale

Codice: Seleziona tutto

cat /etc/fstab
e posta il risultato


EDIT - patel è andato per esclusione! Se non è l'una e l'altra.  ;D

Re: [Grub] Il Grub non si ripristina e dal live cd non mi permette di aprire i file!!!

Inviato: martedì 27 aprile 2010, 18:37
da Dario_SRD
Ecco fatto:

Codice: Seleziona tutto

ubuntu@ubuntu:~$ 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: 0x6d3f6d3f

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       32757   263120571    7  HPFS/NTFS
/dev/sda2           32758       33753     8000370   82  Linux swap / Solaris
/dev/sda3           33754       39890    49295452+  83  Linux
/dev/sda4           39891       60801   167967607+  83  Linux

Disk /dev/sdb: 1056 MB, 1056177152 bytes
64 heads, 32 sectors/track, 1007 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x96c64eb4

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        1008     1031391    6  FAT16
Partition 1 has different physical/logical endings:
     phys=(1023, 63, 32) logical=(1007, 14, 30)
ubuntu@ubuntu:~$ sudo mount /dev/sda3 /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
chroot: impossibile eseguire il comando "/bin/bash": Errore di formato di exec

Re: [Grub] Il Grub non si ripristina e dal live cd non mi permette di aprire i file!!!

Inviato: martedì 27 aprile 2010, 18:57
da patel
http://developer.berlios.de/project/sho ... p_id=10921
scarica la iso, masterizza e avvia, se riesci ad avviare Ubuntu dai il comando

Codice: Seleziona tutto

sudo grub-install /dev/sda

Re: [Grub] Il Grub non si ripristina e dal live cd non mi permette di aprire i file!!!

Inviato: martedì 27 aprile 2010, 20:08
da Dario_SRD
Rieccomi scusate! Devo scaricare  "  1.30    sgd_cdrom_1.30.iso"??

Re: [Grub] Il Grub non si ripristina e dal live cd non mi permette di aprire i file!!!

Inviato: martedì 27 aprile 2010, 20:29
da patel
esatto

Re: [Grub] Il Grub non si ripristina e dal live cd non mi permette di aprire i file!!!

Inviato: martedì 27 aprile 2010, 21:20
da Dario_SRD
Ho eseguito tutto, ecco il risultato!

Codice: Seleziona tutto

dario@dario-desktop:~$ sudo grub-install /dev/sda
[sudo] password for dario: 
Searching for GRUB installation directory ... found: /boot/grub
Installing GRUB to /dev/sda as (hd0)...
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(hd0)	/dev/sda

Re: [Grub] Il Grub non si ripristina e dal live cd non mi permette di aprire i file!!!

Inviato: martedì 27 aprile 2010, 22:13
da patel
ora riavvia e vedi se funziona

Re: [Grub] Il Grub non si ripristina e dal live cd non mi permette di aprire i file!!!

Inviato: martedì 27 aprile 2010, 22:25
da Dario_SRD
Ho riavviato! Adesso si è ribaltato tutto! prima entrava con Windows Xp, ora invece entra direttamente in ubuntu! Come faccio adesso ad abilitare il DualBoot?

Re: [Grub] Il Grub non si ripristina e dal live cd non mi permette di aprire i file!!!

Inviato: martedì 27 aprile 2010, 22:26
da Petr
Sempre da terminale

Codice: Seleziona tutto

sudo update-grub
e riavvia.

Re: [Grub] Il Grub non si ripristina e dal live cd non mi permette di aprire i file!!!

Inviato: martedì 27 aprile 2010, 22:28
da Dario_SRD
Mi è spuntato questo, ora riavvio!

Codice: Seleziona tutto

dario@dario-desktop:~$ sudo update-grub
[sudo] password for dario: 
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.31-20-generic
Found kernel: /boot/vmlinuz-2.6.31-19-generic
Found kernel: /boot/vmlinuz-2.6.31-14-generic
Found GRUB 2: /boot/grub/core.img
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done

Re: [Grub] Il Grub non si ripristina e dal live cd non mi permette di aprire i file!!!

Inviato: martedì 27 aprile 2010, 22:35
da Dario_SRD
L'ho fatto, è strano quello che succede! Dove la solita schermata (credo della scheda madre) mi spunta una schermata nera a scritte bianche e se non premo subito esc (entro 3 sec credo) parte subito ubuntu. Se lo premo in tempo mi spunta la schermata di dualboot però non è presente windows..ma solo le solite schermata di ubuntu più una strana "Grub 2" (se non ricordo male) e un'ultima di ubuntu molto particolare.

Re: [Grub] Il Grub non si ripristina e dal live cd non mi permette di aprire i file!!!

Inviato: martedì 27 aprile 2010, 22:40
da Petr
Si è installto il vecchio grub Legacy.
Da terminale

Codice: Seleziona tutto

cat /boot/grub/menu.lst
e posta il risultato.

Comunque ti consiglio di:
Avviare Ubuntu, aprire il gestore pacchetti, nella ricerca scrivi "grub-pc", marcalo per l'installazione.
Trova "grub" ( 0.97 ), marcalo per la disinstallazione.
Applica.
Alla fine chiudi il gestore pacchetti e apri un terminale e dai

Codice: Seleziona tutto

sudo update-grub
riavvia.

Re: [Grub] Il Grub non si ripristina e dal live cd non mi permette di aprire i file!!!

Inviato: martedì 27 aprile 2010, 22:43
da Dario_SRD
Questo è quello che mi è spuntato, ora cerco di seguire le altre indicazioni (se le ho capite bene  ;D )

Codice: Seleziona tutto

dario@dario-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		3

## 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=1277a426-c2f0-438e-b565-860f92ab3d89 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=1277a426-c2f0-438e-b565-860f92ab3d89

## 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.10, kernel 2.6.31-20-generic
uuid		1277a426-c2f0-438e-b565-860f92ab3d89
kernel		/boot/vmlinuz-2.6.31-20-generic root=UUID=1277a426-c2f0-438e-b565-860f92ab3d89 ro quiet splash 
initrd		/boot/initrd.img-2.6.31-20-generic
quiet

title		Ubuntu 9.10, kernel 2.6.31-20-generic (recovery mode)
uuid		1277a426-c2f0-438e-b565-860f92ab3d89
kernel		/boot/vmlinuz-2.6.31-20-generic root=UUID=1277a426-c2f0-438e-b565-860f92ab3d89 ro  single
initrd		/boot/initrd.img-2.6.31-20-generic

title		Ubuntu 9.10, kernel 2.6.31-19-generic
uuid		1277a426-c2f0-438e-b565-860f92ab3d89
kernel		/boot/vmlinuz-2.6.31-19-generic root=UUID=1277a426-c2f0-438e-b565-860f92ab3d89 ro quiet splash 
initrd		/boot/initrd.img-2.6.31-19-generic
quiet

title		Ubuntu 9.10, kernel 2.6.31-19-generic (recovery mode)
uuid		1277a426-c2f0-438e-b565-860f92ab3d89
kernel		/boot/vmlinuz-2.6.31-19-generic root=UUID=1277a426-c2f0-438e-b565-860f92ab3d89 ro  single
initrd		/boot/initrd.img-2.6.31-19-generic

title		Ubuntu 9.10, kernel 2.6.31-14-generic
uuid		1277a426-c2f0-438e-b565-860f92ab3d89
kernel		/boot/vmlinuz-2.6.31-14-generic root=UUID=1277a426-c2f0-438e-b565-860f92ab3d89 ro quiet splash 
initrd		/boot/initrd.img-2.6.31-14-generic
quiet

title		Ubuntu 9.10, kernel 2.6.31-14-generic (recovery mode)
uuid		1277a426-c2f0-438e-b565-860f92ab3d89
kernel		/boot/vmlinuz-2.6.31-14-generic root=UUID=1277a426-c2f0-438e-b565-860f92ab3d89 ro  single
initrd		/boot/initrd.img-2.6.31-14-generic

title		Chainload into GRUB 2
root		1277a426-c2f0-438e-b565-860f92ab3d89
kernel		/boot/grub/core.img

title		Ubuntu 9.10, memtest86+
uuid		1277a426-c2f0-438e-b565-860f92ab3d89
kernel		/boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

Re: [Grub] Il Grub non si ripristina e dal live cd non mi permette di aprire i file!!!

Inviato: martedì 27 aprile 2010, 22:51
da Dario_SRD
Durante l'installazione mi si apre una finestra con scritto "cosa si vuol fare di grub?" Poi cè un menù a tendina che mi da la possibilità di mettere:
Installare la versione del manutentore del pacchetto.
Mantenere la propria versione attualmente installata.
Mostrare le differenze tra le versioni.
Mostrare le differenze tra le versioni del file disponibili.
Integrare le differenze tra 3 versioni del file disponibili (molto sperimentale).
Eseguire una nuova shell per esaminare la situazione.

Che metto?? La prima?