LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-05-2005, 12:33 PM   #1
aenimax
LQ Newbie
 
Registered: Nov 2003
Location: Texas
Distribution: Mandrake 9.1
Posts: 28

Rep: Reputation: 15
getting grub to work after reinstalling windows


Im using Suse 9.3 pro. I've searched for this issue all day and none of the solutions seems to work for me, i must have some of the commands wrong. i reinstalled windows and it reset the bootloader, so i need to get grub to work again so i can boot into linux. I've tried to use the rescue from the first install CD, but when i get to the rescue prompt i dont know how to reisntall or reset grub to work. If anyone can help me with the commands i need to type please help me out.
 
Old 07-05-2005, 12:48 PM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,174
Blog Entries: 4

Rep: Reputation: 428Reputation: 428Reputation: 428Reputation: 428Reputation: 428
http://www.linuxquestions.org/questi...der=descending - try a Search for "reinstall grub"
 
Old 07-05-2005, 12:52 PM   #3
gnukish
Member
 
Registered: Apr 2005
Location: Neverland
Distribution: Slackware / Ubuntu
Posts: 171

Rep: Reputation: 30
Boot from the cd. Login as root.
Editing grub.conf using vi editor is the solution.

Follow these steps.

1) [root@box root]# vi /etc/grub.conf

2) [root@box root]# press insert key

Now leave the upper portion of the grub.conf file which has the info for booting linux.

3) [root@box root]# title Microsoft
rootnoverify(hd0,2)
chainloader +1

4)Press Esc key, now press ":wq" without quotes.

5)Reboot from hdd.

Note: hda -> Primary master , hdb -> Primary slave , hdc -> Secondary master , hdd -> Secondary slave

hda1 ===> 0th partition
hda2 ===> 1st partition
hda3 ===> 2nd partition

Mostly , this should fit in, because windows can't be installed in extended partition. It will want one of the primary partitions to get installed.

Regards
 
Old 07-05-2005, 06:01 PM   #4
aenimax
LQ Newbie
 
Registered: Nov 2003
Location: Texas
Distribution: Mandrake 9.1
Posts: 28

Original Poster
Rep: Reputation: 15
when i do grub-install /dev/hda1 (which is the correct partition) i get
: dev/root: not found or not a block device.
 
Old 07-05-2005, 06:08 PM   #5
ian_hopkins
LQ Newbie
 
Registered: Apr 2005
Distribution: Slackware 10.1/Gentoo 2005.0
Posts: 7

Rep: Reputation: 0
Are you trying to install grub on the MBR or the first partition?
 
Old 07-05-2005, 06:16 PM   #6
aenimax
LQ Newbie
 
Registered: Nov 2003
Location: Texas
Distribution: Mandrake 9.1
Posts: 28

Original Poster
Rep: Reputation: 15
im not sure, but i would guess the MBR. all i want it my grub bootloader to be back to normal to where i turn on my pc and grub comes up with choice of windows or suse.
sorry, im new at this, and im not very good with the code yet...
please help if you can.
 
Old 07-05-2005, 06:20 PM   #7
ian_hopkins
LQ Newbie
 
Registered: Apr 2005
Distribution: Slackware 10.1/Gentoo 2005.0
Posts: 7

Rep: Reputation: 0
If you wan't grub on your MBR do a "grub-install /dev/hda" (not hda1)

If your partitioning scheme is the same as it was before you reinstalled windows, you should not need to change your grub.conf file.
 
Old 07-05-2005, 06:31 PM   #8
aenimax
LQ Newbie
 
Registered: Nov 2003
Location: Texas
Distribution: Mandrake 9.1
Posts: 28

Original Poster
Rep: Reputation: 15
well my partitioning is the same...

but when i do grub-install /dev/hda i get the same message.
/dev/root: Not found or not a block device.
 
Old 07-05-2005, 06:35 PM   #9
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: LFS-Version SVN-20091202, Arch 2009.08
Posts: 1,484

Rep: Reputation: 66
actually is is eazy to do.


if you dident reinstall your linux system or change the drive geometry then you would not need to modify menu.lst in the /boot/grub


you just need to reinstall grub

boot from boot cd mount your parttion in /mnt/hd or something

and chroot into that parttion and run grub

then you need to tell grub where you are wanting to install it too.

note /dev/hda1 is hd0,0 in grub

i dont remeber the sequence at this point because im not home when i get there i can update
you if you need that info.
 
Old 07-05-2005, 06:49 PM   #10
ian_hopkins
LQ Newbie
 
Registered: Apr 2005
Distribution: Slackware 10.1/Gentoo 2005.0
Posts: 7

Rep: Reputation: 0
Try chrooting into your linux system first. I'll try to explain it here.

1. Boot your Linux CD and go into the rescue console.
2. Make a directory to mount your linux partition on.
"mkdir /mnt/root"
3. Mount your linux partiotion in your new directory.

"mount /dev/hdaX /mnt/root" --Make hdaX whatever your linux partition is.
4. chroot onto your disk
"chroot /mnt/root"
5. If your /boot is on a diferent partition than your root partion, mount it on /boot.
"mount /dev/hdaY /boot" --Make hdaY your boot partition, If you don't have a seperate partiotion for boot, then skip this step.

6. Fix grub.
"grub-install /dev/hda"

7. Exit the chrooted system.
"exit"
8. Unmount your linux partition.
"umount /dev/hdaX"
9. Reboot.
"shutdown -r now"


Hopefully, that will work.
 
Old 07-05-2005, 07:01 PM   #11
aenimax
LQ Newbie
 
Registered: Nov 2003
Location: Texas
Distribution: Mandrake 9.1
Posts: 28

Original Poster
Rep: Reputation: 15
all of that worked fine untill i got to the grub-install. then i got "The file /boot/grub/stage1 not read correctly."
If you know any way to fix this let me know, but if not i may just reinstall suse completely.
Thanks for helpin ian and others.
 
Old 07-05-2005, 07:39 PM   #12
ian_hopkins
LQ Newbie
 
Registered: Apr 2005
Distribution: Slackware 10.1/Gentoo 2005.0
Posts: 7

Rep: Reputation: 0
one last thing to try. Follow my previous instructions, then instead of grub-install, type in "grub".
At the grub prompt, type in "setup hd0".

Im not sure if that will work, but worth a try.
 
Old 07-06-2005, 04:31 AM   #13
miclare
LQ Newbie
 
Registered: Jul 2005
Posts: 2

Rep: Reputation: 0
You should boot from your suse cd and select the installation.In the third step Suse will show you some choices and you will select the Fix one or sth like this.Suse will automatically detect the problem and load the grub again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I have Windows XP and Fedora 3. If i install Slack, what i must do for grub to work? zahadumy Linux - Software 11 05-30-2005 03:08 PM
reinstalling GRUB 0perat0r Linux - Newbie 7 05-02-2005 02:30 PM
reinstalling windows deleted my grub master boot file; how do I restore it? sohmc Linux - General 3 01-12-2005 01:27 PM
I can't load windows! I need it for school but i can't get grub to work! help. l2ich84 Linux - Newbie 1 02-10-2004 07:23 AM
Reinstalling Windows, will Grub go away then? jlj Linux - Newbie 4 10-03-2003 08:57 PM


All times are GMT -5. The time now is 01:21 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration