⇤ ← Versione 1 del 20/10/2009 09.36.22
1765
Commento: Creata
|
3433
Tradotta, anche questa da ricontrollare..
|
Le cancellazioni sono segnalate in questo modo. | Le aggiunte sono segnalate in questo modo. |
Linea 8: | Linea 8: |
= Introduzione = In questa guida verrà mostrato come ripristinare '''Grub 2''' su un sistema. = Ripristinare Grub con una Live CD = 0. Scaricare, masterizzare e lanciare una '''LiveCD''', per ulteriori informazioni consultare [http://www.ubuntu-it.org/index.php?page=Ottenere_Ubuntu questa pagina]. 0. Da riga di comando digitare: {{{ sudo fdisk -l }}} Prendere nota della partizione sulla quale si è installato '''Ubuntu'''. Nei prossimi passi verrà assunto come partizione di installazione `/dev/sda1`. 0. Montare la partizione sulla quale risiede il sistema, da riga di comando digitare: {{{ sudo mount /dev/sda1 /mnt }}} Se si possiede una partizione di boot separata, sarà necessaria montarla. In questo esempio la partizione di boot è `/dev/sda2`. Digitare in un terminale il comando: {{{ sudo mount /dev/sda2 /mnt/boot }}} 0. Montare il resto dei dispositivi con il comando: {{{ sudo mount --bind /dev /mnt/dev }}} 0. Effettuare un '''chroot''' sul proprio sistema, digitare da riga di comando: {{{ sudo chroot /mnt }}} 0. Per installare '''Grub 2''' nel MBR digitare nel terminale il seguente comando: {{{ grub-install /dev/sda }}} Se si ricevono errori è possibile riprovare con il comando: {{{ grub-install --recheck /dev/sda }}} 0. Uscire dal '''chroot''' premendo la combinazione di tasti '''Ctrl+D''' e smontare tutti i dispositivi digitando: {{{ cd ~ sudo umount /mnt/dev sudo umount /mnt/ }}} 0. Riavviare il sistema. Se la procedura è andata a buon fine, '''Grub''' dovrebbe essere stato ripristinato. |
|
Linea 10: | Linea 56: |
= Recover Grub 2 via LiveCD = | |
Linea 12: | Linea 57: |
* First, grab a copy of the latest [[http://www.ubuntu.com/getubuntu/download|Ubuntu LiveCD]] and boot it. * Open a terminal and type {{{$ sudo fdisk -l}}} * Now, you need to remember which device listed is your linux distribution, for reference, /dev/sda1 will be used. Now we need to mount the filesystem to /mnt {{{$ sudo mount /dev/sda1 /mnt}}} *If you have /boot on a separate partition, that need's to be mounted aswell. For reference, /dev/sda2 will be used. {{{$ sudo mount /dev/sda2 /mnt/boot}}} ''Make sure you don't mix these up, pay attention to the output of FDISK'' Now mount the rest of your devices {{{$ sudo mount --bind /dev /mnt/dev}}} * Now chroot into your system {{{$ sudo chroot /mnt}}} |
## * First, grab a copy of the latest [[http://www.ubuntu.com/getubuntu/download|Ubuntu LiveCD]] and boot it. ## * Open a terminal and type ##{{{$ sudo fdisk -l}}} ## * Now, you need to remember which device listed is your linux distribution, for reference, /dev/sda1 will be used. Now we need to mount the filesystem to /mnt ##{{{$ sudo mount /dev/sda1 /mnt}}} ## *If you have /boot on a separate partition, that need's to be mounted aswell. For reference, /dev/sda2 will be used. ##{{{$ sudo mount /dev/sda2 /mnt/boot}}} ##''Make sure you don't mix these up, pay attention to the output of FDISK'' ## Now mount the rest of your devices ##{{{$ sudo mount --bind /dev /mnt/dev}}} ## * Now chroot into your system ##{{{$ sudo chroot /mnt}}} |
Linea 25: | Linea 70: |
You should be chroot'd into your system as root, you can now run commands as root, without the need for sudo. | ##You should be chroot'd into your system as root, you can now run commands as root, without the need for sudo. |
Linea 27: | Linea 72: |
* Now you need to edit the '''/etc/default/grub''' file to fit your system {{{$ nano /etc/default/grub}}} * When that is done you need to run '''update-grub''' to create the configuration file. {{{$ update-grub}}} * To install GRUB 2 to the MBR, next you need to run '''grub-install /dev/sda''' {{{$ grub-install /dev/sda}}} * If you encounter any errors, try '''grub-install --recheck /dev/sda''' {{{$ grub-install --recheck /dev/sda}}} * Press Ctrl+D to exit out of the chroot. * Once you exit back to your regular console, undo all the mounting, first the /dev {{{$ sudo umount /mnt/dev}}} * Now you can unmount the root system {{{$ sudo umount /mnt}}} * And you should be free to restart your system right into GRUB 2 and then into your system installation. |
## * Now you need to edit the '''/etc/default/grub''' file to fit your system ##{{{$ nano /etc/default/grub}}} ## * When that is done you need to run '''update-grub''' to create the configuration file. ##{{{$ update-grub}}} ## * To install GRUB 2 to the MBR, next you need to run '''grub-install /dev/sda''' ##{{{$ grub-install /dev/sda}}} ## * If you encounter any errors, try '''grub-install --recheck /dev/sda''' ##{{{$ grub-install --recheck /dev/sda}}} ## * Press Ctrl+D to exit out of the chroot. ## * Once you exit back to your regular console, undo all the mounting, first the /dev ##{{{$ sudo umount /mnt/dev}}} ## * Now you can unmount the root system ##{{{$ sudo umount /mnt}}} ## * And you should be free to restart your system right into GRUB 2 and then into your system installation. ---- CategoryNuoviDocumenti CategoryInTraduzione |
BR WikiBanner(ArticoloInTraduzione) BR Indice()
Introduzione
In questa guida verrà mostrato come ripristinare Grub 2 su un sistema.
Ripristinare Grub con una Live CD
Scaricare, masterizzare e lanciare una LiveCD, per ulteriori informazioni consultare [http://www.ubuntu-it.org/index.php?page=Ottenere_Ubuntu questa pagina].
- Da riga di comando digitare:
sudo fdisk -l
Prendere nota della partizione sulla quale si è installato Ubuntu. Nei prossimi passi verrà assunto come partizione di installazione /dev/sda1.
- Montare la partizione sulla quale risiede il sistema, da riga di comando digitare:
sudo mount /dev/sda1 /mnt
Se si possiede una partizione di boot separata, sarà necessaria montarla. In questo esempio la partizione di boot è /dev/sda2. Digitare in un terminale il comando:
sudo mount /dev/sda2 /mnt/boot
- Montare il resto dei dispositivi con il comando:
sudo mount --bind /dev /mnt/dev
Effettuare un chroot sul proprio sistema, digitare da riga di comando:
sudo chroot /mnt
Per installare Grub 2 nel MBR digitare nel terminale il seguente comando:
grub-install /dev/sda
- Se si ricevono errori è possibile riprovare con il comando:
grub-install --recheck /dev/sda
Uscire dal chroot premendo la combinazione di tasti Ctrl+D e smontare tutti i dispositivi digitando:
cd ~ sudo umount /mnt/dev sudo umount /mnt/
- Riavviare il sistema.
Se la procedura è andata a buon fine, Grub dovrebbe essere stato ripristinato.