HOWTO:Restore Grub
(→What do we need ?) |
|||
| Line 6: | Line 6: | ||
== What do we need ? == | == What do we need ? == | ||
| − | |||
* We need the Pardus Live or Installation CD or USB version. (see http://www.pardus.org.tr/eng/products/index.html) | * We need the Pardus Live or Installation CD or USB version. (see http://www.pardus.org.tr/eng/products/index.html) | ||
| − | |||
* Configure your BIOS settings for booting from CD or USB. | * Configure your BIOS settings for booting from CD or USB. | ||
| − | + | Its also possible to restore Grub from within a active Pardus session. In this case the above two points are not needed. | |
== Enter The Grub Menu == | == Enter The Grub Menu == | ||
=== With Pardus 2007.x CD === | === With Pardus 2007.x CD === | ||
| − | |||
*Reboot from CD and wait untill the language screen is shown. | *Reboot from CD and wait untill the language screen is shown. | ||
| Line 19: | Line 16: | ||
*Push the arrow-down key to stop the timer. | *Push the arrow-down key to stop the timer. | ||
| − | |||
*Push the '''c''' key and the grub screen will appear. | *Push the '''c''' key and the grub screen will appear. | ||
| − | |||
*Continue with "Installing Grub" | *Continue with "Installing Grub" | ||
| − | |||
=== With Pardus 2008.x/2009 CD and USB version=== | === With Pardus 2008.x/2009 CD and USB version=== | ||
| − | |||
* Boot "Pardus 2008/2009" with F2=English (US) language selected. (this is to have the proper keyboard layout) | * Boot "Pardus 2008/2009" with F2=English (US) language selected. (this is to have the proper keyboard layout) | ||
* When the "Welcome !!" (license) screen is shown press Ctrl+Alt+F1 (simultaneously). | * When the "Welcome !!" (license) screen is shown press Ctrl+Alt+F1 (simultaneously). | ||
* A console screen will appear with "pardus ~ #" as the last line. | * A console screen will appear with "pardus ~ #" as the last line. | ||
* Enter '''grub''' in the console, then press <enter> and the grub screen (with "grub>" as the last line) will appear. | * Enter '''grub''' in the console, then press <enter> and the grub screen (with "grub>" as the last line) will appear. | ||
| − | + | *Continue with "Installing Grub" | |
| + | === With an active Pardus session === | ||
| + | *Open a Konsole and switch to Grub-mode with the command '''sudo grub''' | ||
== Installing Grub == | == Installing Grub == | ||
| − | + | There are two methods to restore Grub. Follow one of them. | |
| − | + | ====Method 1==== | |
| + | 1. Search for the partition(s) containing the file /boot/grub/stage1 [The result will be in the form: '''(hdx,y)'''] | ||
| + | find /boot/grub/stage1 | ||
| + | 2. Set root partition with (replace x,y with the values found above) | ||
| + | root (hdx,y) | ||
| + | 3. Restore Grub in the first hard disk | ||
| + | setup (hd0) | ||
| + | ====Method 2==== | ||
| + | 1. Type '''root (''' and then press the Tab key. ( there is a blank between '''root''' and '''(''' ). This will list your possible disks (hd0 hd1). | ||
When there is only one disk installed the filling up of 'root ( +Tab' will be 'root (hd0,' | When there is only one disk installed the filling up of 'root ( +Tab' will be 'root (hd0,' | ||
and no disk selection is necessary (in this case skip the next step). | and no disk selection is necessary (in this case skip the next step). | ||
| − | + | 2. Press again the Tab key and the partitions from hd0/hd1 will be listed. | |
Check for the Pardus partition number by looking for disk format ext3 or ext2fs. | Check for the Pardus partition number by looking for disk format ext3 or ext2fs. | ||
In this example I presume partition number 4 is the Pardus partition. Change the number when necessary. | In this example I presume partition number 4 is the Pardus partition. Change the number when necessary. | ||
| − | + | 3. Write root (hd0,'''4)''' and press <enter>. ( 4 is the Pardus partition as mentioned in the previous item ) | |
| − | + | 4. Write '''setup (hd0)''' and press <enter>. (hd0 is the first hard disk from which the bios will boot) | |
When we get 'Error 15: File not found" it is not the correct partition and we can start at 'Type root (' again, | When we get 'Error 15: File not found" it is not the correct partition and we can start at 'Type root (' again, | ||
and when we get "...... succeeded. Done." Grub has been restored in MBR of hd0. | and when we get "...... succeeded. Done." Grub has been restored in MBR of hd0. | ||
| − | + | ==Restart the computer== | |
| − | + | 1. Exit Grub-mode | |
| − | + | quit | |
| − | = | + | 2. Press Ctrl+Alt+Del to restart your computer. |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
[[tr:Nasıl:Grub'u_Kurtarmak]] | [[tr:Nasıl:Grub'u_Kurtarmak]] | ||
= Tips = | = Tips = | ||
| − | + | ==Restore Windows bootloader == | |
| − | == | + | If the Grub installation failed, you can not access neither Pardus nor Windows. In such a scenerio you can delete Grub and get in Windows. Reboot your PC from a Windows Cd. Then press '''R''' ( restore ) button on installation screen. Select your installed Windows. And write this command: '''FIXMBR''' |
| − | + | ||
| − | If the Grub installation failed, you can not access neither Pardus nor Windows. In such a scenerio you can delete Grub and get in Windows. Reboot your PC from a Windows Cd. Then press '''R''' ( restore ) button on installation screen. Select your installed Windows. And write this command: | + | |
| − | + | ||
| − | '''FIXMBR''' | + | |
Press Enter. Answer all the question as '''y''' ( yes ). You're done. Just restart your pc. | Press Enter. Answer all the question as '''y''' ( yes ). You're done. Just restart your pc. | ||
Revision as of 10:00, 4 November 2009
Contents |
Introduction
A (re)installation of Windows will overwrite the Grub bootloader.
This is a manual to restore Grub without a new installation of Pardus.
What do we need ?
- We need the Pardus Live or Installation CD or USB version. (see http://www.pardus.org.tr/eng/products/index.html)
- Configure your BIOS settings for booting from CD or USB.
Its also possible to restore Grub from within a active Pardus session. In this case the above two points are not needed.
Enter The Grub Menu
With Pardus 2007.x CD
- Reboot from CD and wait untill the language screen is shown.
- Push the arrow-down key to stop the timer.
- Push the c key and the grub screen will appear.
- Continue with "Installing Grub"
With Pardus 2008.x/2009 CD and USB version
- Boot "Pardus 2008/2009" with F2=English (US) language selected. (this is to have the proper keyboard layout)
- When the "Welcome !!" (license) screen is shown press Ctrl+Alt+F1 (simultaneously).
- A console screen will appear with "pardus ~ #" as the last line.
- Enter grub in the console, then press <enter> and the grub screen (with "grub>" as the last line) will appear.
- Continue with "Installing Grub"
With an active Pardus session
- Open a Konsole and switch to Grub-mode with the command sudo grub
Installing Grub
There are two methods to restore Grub. Follow one of them.
Method 1
1. Search for the partition(s) containing the file /boot/grub/stage1 [The result will be in the form: (hdx,y)]
find /boot/grub/stage1
2. Set root partition with (replace x,y with the values found above)
root (hdx,y)
3. Restore Grub in the first hard disk
setup (hd0)
Method 2
1. Type root ( and then press the Tab key. ( there is a blank between root and ( ). This will list your possible disks (hd0 hd1).
When there is only one disk installed the filling up of 'root ( +Tab' will be 'root (hd0,' and no disk selection is necessary (in this case skip the next step).
2. Press again the Tab key and the partitions from hd0/hd1 will be listed.
Check for the Pardus partition number by looking for disk format ext3 or ext2fs. In this example I presume partition number 4 is the Pardus partition. Change the number when necessary.
3. Write root (hd0,4) and press <enter>. ( 4 is the Pardus partition as mentioned in the previous item ) 4. Write setup (hd0) and press <enter>. (hd0 is the first hard disk from which the bios will boot)
When we get 'Error 15: File not found" it is not the correct partition and we can start at 'Type root (' again,
and when we get "...... succeeded. Done." Grub has been restored in MBR of hd0.
Restart the computer
1. Exit Grub-mode
quit
2. Press Ctrl+Alt+Del to restart your computer.
Tips
Restore Windows bootloader
If the Grub installation failed, you can not access neither Pardus nor Windows. In such a scenerio you can delete Grub and get in Windows. Reboot your PC from a Windows Cd. Then press R ( restore ) button on installation screen. Select your installed Windows. And write this command: FIXMBR
Press Enter. Answer all the question as y ( yes ). You're done. Just restart your pc.
