Forum     

Go Back   Digit Technology Discussion Forum > Software > Open Source
Register FAQ Calendar Mark Forums Read

Open Source A place where you can talk to like-minded people about the fastest growing software movement today! Discuss anything and everything about Open Source software and Operating Systems.


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 29-08-2007, 04:30 PM   #1 (permalink)
Wise Old Owl
 
Dark Star's Avatar
 
Join Date: Feb 2006
Location: /dev/hd0
Posts: 1,487
Default 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/
Dark Star is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 29-08-2007, 04:42 PM   #2 (permalink)
Wire muncher!
 
infra_red_dude's Avatar
 
Join Date: Nov 2003
Posts: 6,173
Default 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
infra_red_dude is offline  
Old 29-08-2007, 05:06 PM   #3 (permalink)
Wise Old Owl
 
Dark Star's Avatar
 
Join Date: Feb 2006
Location: /dev/hd0
Posts: 1,487
Default 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/
Dark Star is offline  
Old 29-08-2007, 05:15 PM   #4 (permalink)
Wire muncher!
 
infra_red_dude's Avatar
 
Join Date: Nov 2003
Posts: 6,173
Default 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
infra_red_dude is offline  
Old 29-08-2007, 05:35 PM   #5 (permalink)
Wise Old Owl
 
Dark Star's Avatar
 
Join Date: Feb 2006
Location: /dev/hd0
Posts: 1,487
Default 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/
Dark Star is offline  
Old 30-08-2007, 12:52 AM   #6 (permalink)
Broken In
 
mak1012's Avatar
 
Join Date: Mar 2005
Location: mumbai
Posts: 168
Default 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.
mak1012 is offline  
Old 30-08-2007, 09:07 AM   #7 (permalink)
left this forum longback
 
praka123's Avatar
 
Join Date: Sep 2005
Location: -
Posts: 7,536
Post How to Grub restore via Live CD

boot from live-cd(ubuntu).then find ur ubuntu partitions.use the o/p of
Code:
sudo fdisk -l
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
praka123 is offline  
Old 30-08-2007, 11:08 AM   #8 (permalink)
Wire muncher!
 
infra_red_dude's Avatar
 
Join Date: Nov 2003
Posts: 6,173
Default 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
infra_red_dude is offline  
Old 30-08-2007, 07:12 PM   #9 (permalink)
die blizzard die! D3?
 
The_Devil_Himself's Avatar
 
Join Date: Aug 2007
Location: Event horizon
Posts: 2,361
Default 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.
The_Devil_Himself is offline  
Old 31-08-2007, 06:45 AM   #10 (permalink)
The blackholeŽ
 
desai_amogh's Avatar
 
Join Date: Apr 2007
Location: Goa/Pune
Posts: 312
Default 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 !
desai_amogh is offline  
Old 31-08-2007, 07:32 AM   #11 (permalink)
In Pursuit of "Happyness"
 
kalpik's Avatar
 
Join Date: May 2005
Location: New Delhi
Posts: 3,432
Default 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
kalpik is offline  
Old 31-08-2007, 07:39 AM   #12 (permalink)
The blackholeŽ
 
desai_amogh's Avatar
 
Join Date: Apr 2007
Location: Goa/Pune
Posts: 312
Default 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 !
desai_amogh is offline  
Old 31-08-2007, 08:34 AM   #13 (permalink)
Wire muncher!
 
infra_red_dude's Avatar
 
Join Date: Nov 2003
Posts: 6,173
Default 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
infra_red_dude is offline  
Old 31-08-2007, 08:41 AM   #14 (permalink)
left this forum longback
 
praka123's Avatar
 
Join Date: Sep 2005
Location: -
Posts: 7,536
Default 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
praka123 is offline  
Old 31-08-2007, 09:05 AM   #15 (permalink)
The blackholeŽ
 
desai_amogh's Avatar
 
Join Date: Apr 2007
Location: Goa/Pune
Posts: 312
Default 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
desai_amogh is offline  
Old 31-08-2007, 10:20 AM   #16 (permalink)
Wire muncher!
 
infra_red_dude's Avatar
 
Join Date: Nov 2003
Posts: 6,173
Default Re: Grub Lost!!!

hey remove the quotes from that line. type:
Code:
root (hd0,8)
and then
Code:
setup (hd0)
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
infra_red_dude is offline  
Old 31-08-2007, 12:16 PM   #17 (permalink)
Broken In
 
mak1012's Avatar
 
Join Date: Mar 2005
Location: mumbai
Posts: 168
Default 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.
mak1012 is offline  
Old 31-08-2007, 12:23 PM   #18 (permalink)
The blackholeŽ
 
desai_amogh's Avatar
 
Join Date: Apr 2007
Location: Goa/Pune
Posts: 312
Default Re: Grub Lost!!!

Quote:
Originally Posted by infra_red_dude
hey remove the quotes from that line. type:
Code:
root (hd0,8)
and then
Code:
setup (hd0)
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 !
desai_amogh is offline  
Old 31-08-2007, 12:41 PM   #19 (permalink)
Broken In
 
mak1012's Avatar
 
Join Date: Mar 2005
Location: mumbai
Posts: 168
Default 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.
mak1012 is offline  
Old 31-08-2007, 01:35 PM   #20 (permalink)
Wire muncher!
 
infra_red_dude's Avatar
 
Join Date: Nov 2003
Posts: 6,173
Default 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
Code:
linux rescue
if this doesn't work then simply enter
Code:
rescue
after you get the shell type this:

Code:
mkdir /mnt/linux
(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...

Code:
chroot /mnt/linux
this command will change the root FS to ur installed linux system.

then type:
Code:
mount /proc
this is to mount the proc file system.

now type this to install grub:
Code:
grub-install /dev/hda
or type:
Code:
update-grub
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
infra_red_dude is offline  
Old 31-08-2007, 11:22 PM   #21 (permalink)
"The Gentleman"
 
vish786's Avatar
 
Join Date: Sep 2006
Posts: 1,434
Default 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
vish786 is offline  
Old 01-09-2007, 08:35 AM   #22 (permalink)
Wise Old Owl
 
Dark Star's Avatar
 
Join Date: Feb 2006
Location: /dev/hd0
Posts: 1,487
Default Re: Grub Lost!!!

I'll post the output soon damn busy these days
__________________
Me Myself and My Tux Blog :- http://tuxenclave.wordpress.com/
Dark Star is offline  
Old 03-09-2007, 10:00 PM   #23 (permalink)
Wise Old Owl
 
Dark Star's Avatar
 
Join Date: Feb 2006
Location: /dev/hd0
Posts: 1,487
Default 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
Dark Star is offline  
Old 03-09-2007, 11:07 PM   #24 (permalink)
Wire muncher!
 
infra_red_dude's Avatar
 
Join Date: Nov 2003
Posts: 6,173
Default 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
infra_red_dude is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I have lost My 42 GBHow can I gain My lost space. Kaushal Hiwarkar Software Q&A 4 20-02-2007 03:14 PM
Lost Coast Vs. Farcry : winner Lost coast ammusk Gamerz 2 28-10-2005 08:59 AM
GRUB champ_rock Open Source 1 07-10-2005 10:16 AM
GRUB zerohourkill Open Source 28 28-04-2005 10:26 PM
Grub bernie Open Source 8 17-11-2004 12:00 PM

 
Latest Threads
- by Sujeet
- by soumya
- by clmlbx
- by Charan

Advertisement




All times are GMT +5.5. The time now is 12:58 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2