 |
29-08-2007, 04:30 PM
|
#1 (permalink)
|
|
Wise Old Owl
Join Date: Feb 2006
Location: /dev/hd0
Posts: 1,487
|
Grub Lost!!!
Hi all
I was having Ubuntu only. Now my sis got a new phone and to see its Cd she installed windows now my grub is lost ...  How can I re install the grub so that I can boot into Ubuntu and Xp both  So plz lemme know soon  If there are easy method then plz lemme know
I know this link but easy steps needed  I press tab key after that I get annoyed
https://help.ubuntu.com/community/Re...tallingWindows
__________________
Me Myself and My Tux Blog :- http://tuxenclave.wordpress.com/
|
|
|
|
Advertisements. Register and be a member of the community to get rid of them.
|
|
Advertisement
|
|
29-08-2007, 04:42 PM
|
#2 (permalink)
|
|
Wire muncher!
Join Date: Nov 2003
Posts: 6,173
|
Re: Grub Lost!!!
simple steps to recover grub.
boot into the live cd and open a terminal windows. now type:
"sudo grub"
it'll then give you a grub prompt, "grub>"
now type: "find /boot/grub/stage1" at the grub prompt.
it'll give a output like this (hd0,7) 7 is here the example boot partition. note this down.
now type:"root (hd0,7)" (replace hd0,7 wid whatever output u'd got in the prev. step.
then type: "setup (hd0)"
it'll setup grub again.
now type:"quit"
its over! you get the grub menu now  if at all the windows entry is not there. boot into linux after performing the above mentioned steps and add this line in /boot/grub/menu.lst:
title Microsoft Windows
root (hd0,0)
savedefault
makeactive
chainloader +1
hd0,0 above assumes that you've installed windows in the first partition of the first hard disk. if this is not the case then replace 0,0 wid relevant data to ur system.
__________________
"The true measure of a man is how he treats someone who can do him absolutely no good."
http://phoenix-ani.blogspot.com
|
|
|
29-08-2007, 05:06 PM
|
#3 (permalink)
|
|
Wise Old Owl
Join Date: Feb 2006
Location: /dev/hd0
Posts: 1,487
|
Re: Grub Lost!!!
That didn't helped still I am not getting I got (Hd0,2) I did as you told but grub did not appear  it directly started windows
__________________
Me Myself and My Tux Blog :- http://tuxenclave.wordpress.com/
|
|
|
29-08-2007, 05:15 PM
|
#4 (permalink)
|
|
Wire muncher!
Join Date: Nov 2003
Posts: 6,173
|
Re: Grub Lost!!!
don't use a capital "H" there and try and see if it works.
__________________
"The true measure of a man is how he treats someone who can do him absolutely no good."
http://phoenix-ani.blogspot.com
|
|
|
29-08-2007, 05:35 PM
|
#5 (permalink)
|
|
Wise Old Owl
Join Date: Feb 2006
Location: /dev/hd0
Posts: 1,487
|
Re: Grub Lost!!!
No I didn't used H i used h .. but it doesn't showed up
__________________
Me Myself and My Tux Blog :- http://tuxenclave.wordpress.com/
|
|
|
30-08-2007, 12:52 AM
|
#6 (permalink)
|
|
Broken In
Join Date: Mar 2005
Location: mumbai
Posts: 168
|
Re: Grub Lost!!!
even i have the same problem.... which au password should i wright i tryed all the password which i had given but non of them worked....
__________________
Every Body Says I'm Fine.
|
|
|
30-08-2007, 09:07 AM
|
#7 (permalink)
|
|
left this forum longback
Join Date: Sep 2005
Location: -
Posts: 7,536
|
How to Grub restore via Live CD
boot from live-cd(ubuntu).then find ur ubuntu partitions.use the o/p of
for details.
manually mount ur ubuntu partitions.if u have a separate /boot partition,u have to mount it inside ubuntu / partition's /boot directory.
post ur sudo fdisk -l
and will try to explain what to do.
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
|
|
|
30-08-2007, 11:08 AM
|
#8 (permalink)
|
|
Wire muncher!
Join Date: Nov 2003
Posts: 6,173
|
Re: Grub Lost!!!
yeah, thats a longer process. but this should've worked too. dunno whats the problem. @shashwat, when you execute those commands do u get any error msgs?
__________________
"The true measure of a man is how he treats someone who can do him absolutely no good."
http://phoenix-ani.blogspot.com
|
|
|
30-08-2007, 07:12 PM
|
#9 (permalink)
|
|
die blizzard die! D3?
Join Date: Aug 2007
Location: Event horizon
Posts: 2,361
|
Re: Grub Lost!!!
I don't use ubuntu but in mandriva you just boot from the dvd and choose recovery and then install grub\lilo.
__________________
Stealing your women and horses since 1843.
|
|
|
31-08-2007, 06:45 AM
|
#10 (permalink)
|
|
The blackholeŽ
Join Date: Apr 2007
Location: Goa/Pune
Posts: 312
|
Re: Grub Lost!!!
im facing the same problem..i dont mind reinstalling ubuntu ..
but thr is lot of data in it >> i need to copy it in a diff drive..
but it asks for root permissions for copying >> i know my root password >> but i dont know how to login using root >>
i am using the same cd which i used to install ubuntu ..
__________________
AMD Athlon II X4 635, MSI 880GMA - E45, Corsair value 2GB x 2, FSP Saga II 500W, APC UPS 600VA, Zebronix Bijli, Logitec Classic Mouse and keyboard
Lumix FZ35 Camera
Blog@ http://amoghdesai.com
+1 < click here to Rep me if I was helpful !
|
|
|
31-08-2007, 07:32 AM
|
#11 (permalink)
|
|
In Pursuit of "Happyness"
Join Date: May 2005
Location: New Delhi
Posts: 3,432
|
Re: Grub Lost!!!
If you are on ubuntu, there IS no root password. Just type gksu nautilus, and use your own password. Then you can copy-paste. Just be very care full with nautilus in super user mode!
__________________
Whenever you find yourself on the side of the majority, it is time to pause and reflect. - Mark Twain
|
|
|
31-08-2007, 07:39 AM
|
#12 (permalink)
|
|
The blackholeŽ
Join Date: Apr 2007
Location: Goa/Pune
Posts: 312
|
Re: Grub Lost!!!
Quote:
|
Originally Posted by kalpik
If you are on ubuntu, there IS no root password. Just type gksu nautilus, and use your own password. Then you can copy-paste. Just be very care full with nautilus in super user mode!
|
so du u mean tht .. when i use live cd .. it doesnt need a root password to for user permissions ??
& u have to use the super mode to activate the user permissions ??
__________________
AMD Athlon II X4 635, MSI 880GMA - E45, Corsair value 2GB x 2, FSP Saga II 500W, APC UPS 600VA, Zebronix Bijli, Logitec Classic Mouse and keyboard
Lumix FZ35 Camera
Blog@ http://amoghdesai.com
+1 < click here to Rep me if I was helpful !
|
|
|
31-08-2007, 08:34 AM
|
#13 (permalink)
|
|
Wire muncher!
Join Date: Nov 2003
Posts: 6,173
|
Re: Grub Lost!!!
Quote:
|
Originally Posted by desai_amogh
im facing the same problem..i dont mind reinstalling ubuntu ..
but thr is lot of data in it >> i need to copy it in a diff drive..
but it asks for root permissions for copying >> i know my root password >> but i dont know how to login using root >>
i am using the same cd which i used to install ubuntu ..
|
plz try the above method first. why do you wanna go the long way? are you getting any errors or problems while recovering grub?
__________________
"The true measure of a man is how he treats someone who can do him absolutely no good."
http://phoenix-ani.blogspot.com
|
|
|
31-08-2007, 08:41 AM
|
#14 (permalink)
|
|
left this forum longback
Join Date: Sep 2005
Location: -
Posts: 7,536
|
Re: Grub Lost!!!
the soltn in simple words is to boot from livecd,mount ur ubuntu / (/boot partn too if any) manually.then chroot into ur hdd ubuntu / partn.install grub(grub-install /dev/sdx or if the grub is completely gone.use grub> prompt to set grub in the place of MBR)
.i think that is well documented in ubuntu link @OP gave.
btwn if it is ubuntu,u can get root access via "sudo" or if u insist a "#" prompt.then "sudo su -" will gave u root prompt.
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
|
|
|
31-08-2007, 09:05 AM
|
#15 (permalink)
|
|
The blackholeŽ
Join Date: Apr 2007
Location: Goa/Pune
Posts: 312
|
Re: Grub Lost!!!
when i do find /boot/grub/stage1
i get the output as "(hd0,8)"
but when i do root "(hd0,8)"
it says something like the disk is not reconized .. i dont remember the exact error ..
it was hd0,8 but it was replaced to a smiley
__________________
AMD Athlon II X4 635, MSI 880GMA - E45, Corsair value 2GB x 2, FSP Saga II 500W, APC UPS 600VA, Zebronix Bijli, Logitec Classic Mouse and keyboard
Lumix FZ35 Camera
Blog@ http://amoghdesai.com
+1 < click here to Rep me if I was helpful !
Last edited by desai_amogh; 31-08-2007 at 09:05 AM.
Reason: Automerged Doublepost
|
|
|
31-08-2007, 10:20 AM
|
#16 (permalink)
|
|
Wire muncher!
Join Date: Nov 2003
Posts: 6,173
|
Re: Grub Lost!!!
hey remove the quotes from that line. type:
and then
widout quotes everywhere.
@shashwat
is ur problem solved?
__________________
"The true measure of a man is how he treats someone who can do him absolutely no good."
http://phoenix-ani.blogspot.com
|
|
|
31-08-2007, 12:16 PM
|
#17 (permalink)
|
|
Broken In
Join Date: Mar 2005
Location: mumbai
Posts: 168
|
Re: Grub Lost!!!
when i do give this command in grub> "find/boot/grub/stage1" it gives me this error
"Unrecognized command".
__________________
Every Body Says I'm Fine.
|
|
|
31-08-2007, 12:23 PM
|
#18 (permalink)
|
|
The blackholeŽ
Join Date: Apr 2007
Location: Goa/Pune
Posts: 312
|
Re: Grub Lost!!!
Quote:
|
Originally Posted by infra_red_dude
hey remove the quotes from that line. type:
and then
widout quotes everywhere.
|
hey im not using the quotes .. tht was just a copy paste business..
@mak1012
u r using the same mistake we r talking abt..
dont use the '' doublequotes
instead type it this way grub> find/boot/grub/stage1
and it 'should' work for u.
__________________
AMD Athlon II X4 635, MSI 880GMA - E45, Corsair value 2GB x 2, FSP Saga II 500W, APC UPS 600VA, Zebronix Bijli, Logitec Classic Mouse and keyboard
Lumix FZ35 Camera
Blog@ http://amoghdesai.com
+1 < click here to Rep me if I was helpful !
|
|
|
31-08-2007, 12:41 PM
|
#19 (permalink)
|
|
Broken In
Join Date: Mar 2005
Location: mumbai
Posts: 168
|
Re: Grub Lost!!!
Quote:
|
Originally Posted by desai_amogh
hey im not using the quotes .. tht was just a copy paste business..
@mak1012
u r using the same mistake we r talking abt..
dont use the '' doublequotes
instead type it this way grub> find/boot/grub/stage1
and it 'should' work for u.
|
no its not working i'm not using any quotes.....
Device Boot Start End Blocks Id sytem
/dev/sda1 * 1 2611 7 HPFS/NTFS
like that i have in sda3 System is Linux and in sda6 System is Linux swap /Solaris
__________________
Every Body Says I'm Fine.
|
|
|
31-08-2007, 01:35 PM
|
#20 (permalink)
|
|
Wire muncher!
Join Date: Nov 2003
Posts: 6,173
|
Re: Grub Lost!!!
there's a space between "find" and "/boot...."
here's the alternative (but a longer) proces, which prakash was talking about. you'll need a live cd wid rescue option (ubuntu 6.1,7.04 won't do). get something like a knoppix cd etc...
boot from the live cd. at the prompt where it asks you to boot, enter
if this doesn't work then simply enter
after you get the shell type this:
(this is to create a folder to use as a mount point)
then type:
Code:
mount /dev/hda6 /mnt/linux
here hda6 is the partition where linux is installed. for others it maybe hda5,hda7,hda9 or sda6,sda7 etc. or whatever...
this command will change the root FS to ur installed linux system.
then type:
this is to mount the proc file system.
now type this to install grub:
Code:
grub-install /dev/hda
or type:
if you are using grub-install then replace hda wid sda if thats relevant to ur installation.
__________________
"The true measure of a man is how he treats someone who can do him absolutely no good."
http://phoenix-ani.blogspot.com
Last edited by infra_red_dude; 31-08-2007 at 01:35 PM.
Reason: Automerged Doublepost
|
|
|
31-08-2007, 11:22 PM
|
#21 (permalink)
|
|
"The Gentleman"
Join Date: Sep 2006
Posts: 1,434
|
Re: Grub Lost!!!
do u hav mandriva dvd try it, sometimes it works best for recovery of grub, when most distro's fail to rescue grub/or reinstall grub.
__________________
"The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense."
- Dijkstra
|
|
|
01-09-2007, 08:35 AM
|
#22 (permalink)
|
|
Wise Old Owl
Join Date: Feb 2006
Location: /dev/hd0
Posts: 1,487
|
Re: Grub Lost!!!
I'll post the output soon damn busy these days
__________________
Me Myself and My Tux Blog :- http://tuxenclave.wordpress.com/
|
|
|
03-09-2007, 10:00 PM
|
#23 (permalink)
|
|
Wise Old Owl
Join Date: Feb 2006
Location: /dev/hd0
Posts: 1,487
|
Re: Grub Lost!!!
Code:
ubuntu@ubuntu:~$ sudo fdisk -l
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1275 10241406 7 HPFS/NTFS
/dev/sda2 1276 6949 45576405 f W95 Ext'd (LBA)
/dev/sda3 6950 9728 22322317+ 83 Linux
/dev/sda5 1276 3825 20482843+ b W95 FAT32
/dev/sda6 3826 6757 23551258+ 7 HPFS/NTFS
/dev/sda7 6758 6949 1542208+ 82 Linux swap / Solaris
Quote:
|
Originally Posted by infra_red_dude
simple steps to recover grub.
boot into the live cd and open a terminal windows. now type:
"sudo grub"
it'll then give you a grub prompt, "grub>"
now type: "find /boot/grub/stage1" at the grub prompt.
it'll give a output like this (hd0,7) 7 is here the example boot partition. note this down.
now type:"root (hd0,7)" (replace hd0,7 wid whatever output u'd got in the prev. step.
then type: "setup (hd0)"
it'll setup grub again.
now type:"quit"
its over! you get the grub menu now  if at all the windows entry is not there. boot into linux after performing the above mentioned steps and add this line in /boot/grub/menu.lst:
title Microsoft Windows
root (hd0,0)
savedefault
makeactive
chainloader +1
hd0,0 above assumes that you've installed windows in the first partition of the first hard disk. if this is not the case then replace 0,0 wid relevant data to ur system.
|
This 1 did not help  Well I did everything right but damn it
__________________
Me Myself and My Tux Blog :- http://tuxenclave.wordpress.com/
Last edited by Dark Star; 03-09-2007 at 10:00 PM.
Reason: Automerged Doublepost
|
|
|
03-09-2007, 11:07 PM
|
#24 (permalink)
|
|
Wire muncher!
Join Date: Nov 2003
Posts: 6,173
|
Re: Grub Lost!!!
i dunno whats wrong.. its NOT possible that all the methods fail!!! i'd say get hold of a knoppix cd or similar which has a s rescue mode and then install grub the way mentioned before in this thread. it'll hafta work.
and from the fdisk -l output linux root sure is hd0,2. it shudn't give you any probs!!!! i fail to understand what is being done wrong and where!
ok wait.. ur partition structure looks a bit quirky to me!! sda2 is an extended partition. how come you haf one more extended partition on which linux is installed? (sda3)??? i think there has been some mess up while installing!!! and thats why all the above methods are failing...
__________________
"The true measure of a man is how he treats someone who can do him absolutely no good."
http://phoenix-ani.blogspot.com
Last edited by infra_red_dude; 03-09-2007 at 11:07 PM.
Reason: Automerged Doublepost
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|