LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 06-20-2006, 11:16 AM   #1
VIR3NT
Member
 
Registered: Sep 2005
Posts: 58

Rep: Reputation: 15
Reinstalling Grub and/or Suse 10.0


I recently had to reinstall windows because of corrupt system files. I knew that once i did this the windows boot and mbr would be written by windows and overwrite grub. I still have suse 10 on the other drive and it is fully setup the way i want it and i do NOT want to tweak a fresh install. Can i get some detailed instructions to just install grub?
If it comes to it i would be happy to reinstall suse as long as it wont format or erase the file system. My most important docs are in /home and /root and i can not access them from windows to back them up.
Thank you!
 
Old 06-20-2006, 12:16 PM   #2
Gethyn
Member
 
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900

Rep: Reputation: 31
There are several things you can do. First, I would advise backing up your documents. If you're using ext3 for your filesystem, try downloading a program called explore2fs. It is free, and allows you to read files from ext3 in Windows. If you're using reiser, I believe there is a similar program, although I forget its name.

There seem to be a lot of people asking about grub at the moment. The way I'd do it is to boot from a grub floppy (assuming you can boot from floppy). Booting from your distro's rescue CD would probably also do the trick. You want to manually issue the commands that grub needs to boot your Linux distro. Once you're back inside Linux you can reinstall grub on your MBR.

To begin with, use explore2fs to grab your grub configuration. It should be in /boot/grub/grub.conf or /boot/grub/menu.lst. I'm not familiar with Suse, but the instruction for a kernel will look something like this:
Code:
title Suse Linux
root (hd1,0)
kernel vmlinuz-2.6.15 ro
There might also be a mention of something called initrd on the line after the one that begins 'kernel ...'

Make a note of what this configuration file says - you don't need the whole thing, just the entries for the kernel you usually boot. Once you've done that, reboot the computer and boot to a grub prompt (using a grub floppy or rescue CD as mentioned above). The grub prompt will look like this:
Code:
grub>
Enter the grub configuration data you noted down, one line at a time. You don't need the "Title" line. Once it's entered, put 'boot' on the last line. When you hit Enter, your Linux install should boot as usual. E.g. to boot my computer from floppy I would enter
Code:
grub> root (hd0,0)
grub> kernel /vmlinuz-2.6.15-gentoo-r1 ro root=/dev/hda3
grub> boot
Now to reinstall grub to your MBR. Open up a prompt and type (as root) 'grub-install hdx' where x is the letter of your primary hard drive - the one where Windows is installed, as that's where your computer looks for boot information. I expect that this is hda, but it might be sda or something else.

That should do it. Let us know if you have any problems!
 
Old 06-20-2006, 01:47 PM   #3
tskears
Member
 
Registered: Apr 2005
Location: Ottawa, Canada.
Distribution: PCLinuxOS.
Posts: 122

Rep: Reputation: 15
If you have the install CDs, the easiest way to fix this is to boot from CD 1, and when you get to the window with "Type of install (Initial or Upgrade)", select the button marked "Other". This will take you into a suite of system repair utilities, one of which is to rebuild GRUB.

It's been a while since I was running SUSE, but I think this is correct...
 
Old 06-20-2006, 02:51 PM   #4
VIR3NT
Member
 
Registered: Sep 2005
Posts: 58

Original Poster
Rep: Reputation: 15
Thanks for all that work you put into that reply Gethyn, but tskears was able to help me with the simple answer
I used the repair to put grub back on and it even kept my custom background and logos . Thank you for the help! I was even able to fix some package problems and repair my glibc which wasn't working right.
YAY!
 
  


Reply

Tags
grub, mbr


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
reinstalling grub in SuSE 10 crapodino Suse/Novell 5 12-18-2005 02:45 PM
reinstalling grub in SuSE 10 crapodino Suse/Novell 1 12-17-2005 05:00 PM
problem reinstalling grub in suse thearchitect Linux - Newbie 1 08-21-2005 04:33 PM
Reinstalling GRUB Petelow Linux - Newbie 1 05-24-2004 04:03 AM


All times are GMT -5. The time now is 12:27 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
Open Source Consulting | Domain Registration