Rebuilding GRUB

Questions about applications and software
Forum rules
Before you post please read this

Rebuilding GRUB

Postby Tak178 on Sat Apr 25, 2009 8:24 pm

Hey guys,

Silly me, but I thought I would try to play around with Ubuntu 9.04. Consequently, I got it to run, but still can't configure drivers to work properly. As such, Ubuntu rewrote my MBR, and so it is using the GRUB prefs from the Ubuntu partition. How do I reassert Mints right over the MBR?
User avatar
Tak178
Level 1
Level 1
 
Posts: 27
Joined: Sat Jun 21, 2008 2:37 am
Location: Seattle, WA

Linux Mint is funded by ads and donations.
 

Re: Rebuilding GRUB

Postby fwc on Sun Apr 26, 2009 3:21 am

Were you using the Ubuntu boot CD? Whatever you did while on that CD, you could probably do with the Mint CD and get similar results.
User avatar
fwc
Level 4
Level 4
 
Posts: 249
Joined: Sun Feb 15, 2009 12:23 am

Re: Rebuilding GRUB

Postby distoaddict on Sun Apr 26, 2009 3:23 am

distoaddict
Level 4
Level 4
 
Posts: 212
Joined: Thu Dec 04, 2008 6:35 am
Location: Glasgow Scotland

Re: Rebuilding GRUB

Postby DataMan on Sun Apr 26, 2009 6:19 am

I think the original poster was talking about an install vs a LiveCD.

It's really quite simple to restore your Mint menu.lst.

1. You need to know what the partition is that Mint resides on (sda2,3, 4 or whatever).
2. Boot to any Linux (even Ubuntu).
3. Initiate the terminal mode.
4. $sudo grub.
5. Assuming your Mint is on sda4 and your mbr is on hd0 : grub > root (hd0,3)
6. grub > setup (hd0)
7. Exit and re-boot.

DataMan
Linux'd since 2005 Linux ID 422356 Ubuntu ID 15015
User avatar
DataMan
Level 6
Level 6
 
Posts: 1192
Joined: Thu Dec 04, 2008 6:47 am
Location: Carmel, Indiana USA at /var/www

Re: Rebuilding GRUB

Postby DataMan on Sun Apr 26, 2009 6:22 am

One additional thing I forgot to mention in my post. By restoring your Mint menu.lst , you will probably loose visability to the Ubuntu ops. If you want to continue to access this ops, you will need to modify your Mint menu.lst to include the Ubuntu ops.

DataMan
Linux'd since 2005 Linux ID 422356 Ubuntu ID 15015
User avatar
DataMan
Level 6
Level 6
 
Posts: 1192
Joined: Thu Dec 04, 2008 6:47 am
Location: Carmel, Indiana USA at /var/www

Re: Rebuilding GRUB

Postby Tak178 on Tue Apr 28, 2009 11:07 pm

Thank you, everyone!

Since I will installing Linux Mint when it arrives, I am probably going to wait and let the new version rebuild the MBR from the install CD.

I appreciate your info, and I will keep it in case I need it in the future.

Cheers,
tak178
User avatar
Tak178
Level 1
Level 1
 
Posts: 27
Joined: Sat Jun 21, 2008 2:37 am
Location: Seattle, WA

Re: Rebuilding GRUB

Postby Shaddix on Thu Apr 30, 2009 6:15 pm

from my experience, messing around with GRUB can be very tricky, especially if you don't know what you are doing it can cause little disasters
waiting for the new release may not be the most efficient way to solve the problem, but it will certainly be the safest and cleanest way to handle the problem
a state of mint..
User avatar
Shaddix
Level 2
Level 2
 
Posts: 57
Joined: Thu Apr 30, 2009 6:11 pm
Location: Belgium

Re: Rebuilding GRUB

Postby ckesp on Mon May 04, 2009 1:27 pm

Hi, I am still an absolute Newb; and this is only my second post to this forum. ANYWAY, the subject of "rebuilding GRUB" seems to relate to my current problem; which is :

My Windoze OS shares the same SATA Hdd with Linux Mint 6 KDE CE. Windoze was there fiest and most of my daily data are accumulated in this drive. On a smaller partition I installed Mint 6 KDE CE; wheb it came to install GRUB. I just left it as default. I guess it was installed in the MBR somewhere of the SATA Hdd. When this Hdd boots, a list of Linux Mint 6 boot options show up on top; followed by Win XP. I have the choice to boot either, which is just perfect for me.

Now last week I had to back up my C drive (windoze). I used Macrium Refelct to make an image of the drive. The problem occured when I restored the image BACK to the C drive; which was done fine. But in my inexperience I missed the correct way to restore GRUB to the MBR. So on my next boot, there was no GRUB; no Linux nor Windoze. I got a bit panicky, but I srill had sense enough to remember there was a provision in Macrium Reflect to re-load a "standard xp MBR" So I re-installed my image files once more to C Drive and towards the end of it put in a "standard xp MBR" Sure enough I got my windoze back but no Linux.

I realise that I have to put GRUB back into the SATA Hdd MBR somehow. But I don't know the mechanics of getting it done.

Now I can't boot into the Linux partition. But I know I can access it by putting a LIVE distro into my DVD drive. I can use the Mint 6 Live distro or I can use my PUPPY Linux distro which has a much shorter boot time. But from then on I shall need detailed instructions from senior members of this forum.

Thank you very much.
ckesp
Level 1
Level 1
 
Posts: 6
Joined: Wed Apr 15, 2009 6:03 am

Re: Rebuilding GRUB

Postby emorrp1 on Mon May 04, 2009 1:50 pm

Hi ckeep, and welcome. The directions DataMan gave above are good, and they will work from any linux, live or otherwise, so feel free to use puppy.

If, however you get stuck at step 1 of his directions, skip over it and do the following after step 4:
Code: Select all
find /boot/grub/stage1

This will give you the code to use in step 5 (e.g. (hd0,3))
If you have a question that has been answered and solved, then please edit your original post and put a [SOLVED] at the end of your subject header
Hint - use a google search including the search term site:forums.linuxmint.com
emorrp1
Level 8
Level 8
 
Posts: 2322
Joined: Thu Feb 26, 2009 8:58 pm

Re: Rebuilding GRUB

Postby ckesp on Mon May 04, 2009 11:53 pm

Hi, emorrp1 and DataMan, thank you for the help. DataMan's intructions are easy enough, even for a Newbie, to follow. So I thought. But there will always be "unexpected" twists.

Step1 I know where my linux is. It is in sda6. So in step 5, I should type (hd0,5) Right? I checked this out with my GParted rescue live CD. It is indeed where it is.
Whilst in GParted, I noticed I could also use a Terminal. So I tried to be clever and used it.

Type at the prompt sudo grub enter I got a line " bash : sudo : command not found"
Type at the prompt grub > root (hd0,5) enter I got the line " bash : syntax error near unexpected token ' ( '

I then switched over to the Puppy distro Terminal and re-did the whole thing. I got extactly the same answers " command not found and syntax error"

I am really disappointed with myself not being able to accomplish such a simple task.
ckesp
Level 1
Level 1
 
Posts: 6
Joined: Wed Apr 15, 2009 6:03 am

Re: Rebuilding GRUB

Postby ckesp on Tue May 05, 2009 5:13 am

Hi, I am back with a successful report.
After a while I booted up with my Mint 6 KDE CE LIVE Disk, and ran the Terminal in there.
This time I was allowed to enter all the grub commands. And they ran.
In a second I got my Grub Boot menu back. It is now just like before.

Thank You Very Much.

ckesp
ckesp
Level 1
Level 1
 
Posts: 6
Joined: Wed Apr 15, 2009 6:03 am

Linux Mint is funded by ads and donations.
 

Return to Software & Applications

Who is online

Users browsing this forum: MSNbot Media and 8 guests