سبحان الله - الحمد لله - لا إله إلا الله - الله أكبر- سبحان الله و بحمده - سبحان الله العظيم - لا حول ولا قوة إلا بالله - رَبَّنَا آتِنَا فِي الدُّنْيَا حَسَنَةً وَفِي الآخِرَةِ حَسَنَةً وَقِنَا عَذَابَ النَّارِ - رَبَّنَا أَفْرِغْ عَلَيْنَا صَبْرًا وَثَبِّتْ أَقْدَامَنَا وَانصُرْنَا عَلَى الْقَوْمِ الْكَافِرِينَ - رَبَّنَا لاَ تُزِغْ قُلُوبَنَا بَعْدَ إِذْ هَدَيْتَنَا وَهَبْ لَنَا مِن لَّدُنكَ رَحْمَةً إِنَّكَ أَنتَ الْوَهَّابُ - أَعوذُ باللهِ العَظيـم وَبِوَجْهِـهِ الكَرِيـم وَسُلْطـانِه القَديـم مِنَ الشّيْـطانِ الرَّجـيم - لا إلهَ إلاّ اللّـه، وَلا نَعْـبُـدُ إِلاّ إيّـاه, لَهُ النِّعْـمَةُ وَلَهُ الفَضْل وَلَهُ الثَّـناءُ الحَـسَن، لا إلهَ إلاّ اللّهُ مخْلِصـينَ لَـهُ الدِّينَ وَلَوْ كَـرِهَ الكـافِرون - سبحان الله وبحمده عدد خلقه و رضا نفسه و زنة عرشه و مداد كلماته

1/26/08

How to Recovering Ubuntu after installing Windows ?

In this post i will show you how to recovering ubuntu linux after installing windows using ubuntu live CD,
but first we need to know the reason of making ubuntu gone after any windows installation and that's pretty easy the reason is that windows loader is installed in place of grub loader(the ubuntu loader) in your MBR(Master Boot Record).
so what we are going to do is to reinstalling grub loader again in the MBR in place of windows loader.
there is a wiki page that describe this process:
https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows


1. Boot the Desktop/Live CD.

2. Open a terminal (Applications -> Accessories -> Terminal)

3. Start grub as root with the following command :

sudo grub



4. You will get a grub prompt. We will use tab completion to find your root partition and install grub to the MBR (hd0,0)

< tab > = hit the Tab key : This will return your root partition, something like root (hd0,1). Hit the key and continue.

If you do not know your boot partition, use find /boot/grub/stage1

GNU GRUB version 0.97 (640K lower / 3072K upper memory)

[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]

grub> root (< tab > #grub will complete the line or list your partitions

#If you do not know your boot partition, use the find command instead

grub> find /boot/grub/stage1

grub> root (hd0,1) #Hit the < Enter > key

grub> setup (hd0) #Hit < Enter > key

grub> quit #Hit < Enter > key, quits grub



5. Reboot (to hard drive). Grub should be installed and both Ubuntu and Windows should have been automatically detected.

6. If, after installing grub, Windows will not boot you may need to edit /boot/grub/menu.lst (That is a small "L" and not the number 1 in menu.lst)

Open a terminal and enter :

gksu gedit /boot/grub/menu.lst




Your Windows stanza should look something like this :

title Windows XP/Vista # You can use any title you wish, this will appear on your grub boot menu
rootnoverify (hd0,0) #(hd0,0) will be most common, you may need to adjust accordingly
makeactive
chainloader +1

No comments: