LinuxQuestions.org
Review your favorite Linux distribution.
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 08-15-2006, 07:16 PM   #1
linda
Member
 
Registered: Apr 2001
Location: New Jersey
Distribution: Slackware
Posts: 222

Rep: Reputation: 30
Grub question for a Windows person


I had a working Grub setup for my computer, and I know I can get it working again fairly easily. My question is, why did it get messed up? so I can avoid messing it up again!

Here's how my computer was setup:
hd0,0 winxp, not active
hd0,1 Grub, active
hd0,x all my other partitions containing data, and Suse, and Ubuntu, etc
hd1,0 winxp that was botched, not active
hd1,x other vaious partitions

This setup was working nicely for me. I had Grub installed to the PBR of the second partition so nothing would ever touch my winxp MBR.

Today, I decided to use Paragon Partition Manager to copy hd0,0 to hd1,0 so I would have a backup. It went fine, but it made me reboot to do the process. When it rebooted I told Grub to boot WinXP, whc it did, and the process proceeded. When it completed, I rebooted, and Grub didn't work. I had to set my hd0,0 back to being active, and then booted WinXP fine without grub.

So, does anyone have any idea why a simple copying of partitions in a piece of software would corrupt Grub?
 
Old 08-15-2006, 09:25 PM   #2
skale
LQ Newbie
 
Registered: Jul 2006
Location: Atlanta, GA
Distribution: Arch Linux
Posts: 22

Rep: Reputation: 15
I suspect either that the partition software did not copy everything or that Grub got confused. Check /boot/grub/menu.lst and match all the partitions correctly. You can post menu.lst if you like, leave out the lines that start with #.
 
Old 08-16-2006, 06:49 AM   #3
linda
Member
 
Registered: Apr 2001
Location: New Jersey
Distribution: Slackware
Posts: 222

Original Poster
Rep: Reputation: 30
I'm pretty sure it copied everything correctly, because I tested it by booting up that copied partition.

Also, the menu.lst is fine. I checked that too.

When I booted, I never got to Grub (I got a message like "can't load operating system". I forget exactly what it was, but it wasn't "ntloader is missing" or "no system disk". I can check it to see exactly what it was if anyone wants to know.

I suspect the software corrupted the PBR for some reason. I can't take a look at what is written in a PBR, right? like I can with something like Konqueror? Because everything else looks fine, that must be where the problem lies. I don't understand why the software would have touched the PBR on a partition it wasn't even doing any operations on...
 
Old 08-16-2006, 07:29 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,719

Rep: Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550
This doesn't make any sense at all - what do you mean ???
Quote:
Originally Posted by linda
I had a working Grub setup for my computer,
...
This setup was working nicely for me. I had Grub installed to the PBR of the second partition so nothing would ever touch my winxp MBR.
...
When it rebooted I told Grub to boot WinXP, whc it did, and the process proceeded.
Huh ???.
If grub wasn't in the MBR how did you tell it to boot XP ???.
If you didn't have the XP partition on hd0 marked active, you were not using the M$oft loader - you did have grub in the MBR.
The mickey mouse software you used obviously "helpfully" restored the M$oft MBR for you - the message you got was because you didn't have the XP partition marked active.
Stupid but true.

Grub isn't broken, it has merely had its loader code removed from the MBR. The Linux partition(s) will likely be untouched.

In future I'd suggest you use decent software (free) to do the backup - have a look at ntfsclone
 
Old 08-16-2006, 09:26 AM   #5
linda
Member
 
Registered: Apr 2001
Location: New Jersey
Distribution: Slackware
Posts: 222

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by syg00
This doesn't make any sense at all - what do you mean ???
Huh ???.
If grub wasn't in the MBR how did you tell it to boot XP ???.
If you didn't have the XP partition on hd0 marked active, you were not using the M$oft loader - you did have grub in the MBR.
The mickey mouse software you used obviously "helpfully" restored the M$oft MBR for you - the message you got was because you didn't have the XP partition marked active.
Stupid but true.

Grub isn't broken, it has merely had its loader code removed from the MBR. The Linux partition(s) will likely be untouched.

In future I'd suggest you use decent software (free) to do the backup - have a look at ntfsclone
I guess my post wasn't clear to you, but I do have evrything set up as I described, and not in the Master Boot Record which is on hd0,0, rather it is on the Partition Boot Record of hd0,1. Grub does not have to be in the MBR. In my case, I left my MBR the way WinXP likes it, but I kept it set as inactive so my computer wouldn't boot from the MBR.

I set my second partition active, because THAT was where I put Grub. And it worked fine, and yes, it boots WinXP, Ubuntu, Suse, Slackware, and all of the other distros I play around with from time to time. I like keeping Grub off of the first partitions MBR so I always have an easy way to boot into WinXP if needed: I set the first partition active and boot off of the MBR.

The way Grub booted XP was as follows:
root (hd0,0)
chainloader +1
boot.

I know that the Linux partitions aren't touched: they are fine. And the Grub files on /boot are ok.

You're right in a way: my software "helpfully" did something not to the MBR, but to the PBR of the second partition, and that bothers me.

ntfsclone does look interesting. Now I know I can't use Partition Manager to do this. But I would like to find a nice graphical partitioner software that doesn't touch partitions that it hasn't been told to touch!
 
Old 08-16-2006, 09:40 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,719

Rep: Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550
Hmmm - you obviously don't understand how boot-loaders work. The M$oft loader checks for the presence of the active flag - not the other way round as you seem to believe.

Grub (and non-M$oft loaders in general) don't use the "active" flag at all.
You had grub in the MBR prior to your efforts - no argument.
 
Old 08-16-2006, 10:34 AM   #7
linda
Member
 
Registered: Apr 2001
Location: New Jersey
Distribution: Slackware
Posts: 222

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by syg00
Hmmm - you obviously don't understand how boot-loaders work. The M$oft loader checks for the presence of the active flag - not the other way round as you seem to believe.

Grub (and non-M$oft loaders in general) don't use the "active" flag at all.
You had grub in the MBR prior to your efforts - no argument.
No, really. I read lots about how to do this, on this forum and others. And I can do it again. How can I show you that that is what I have done? You're right, I don't totally understand how they work, but I know how to follow directions! :-)
 
Old 08-16-2006, 10:37 AM   #8
linda
Member
 
Registered: Apr 2001
Location: New Jersey
Distribution: Slackware
Posts: 222

Original Poster
Rep: Reputation: 30
Oh, I know... Have you ever installed Suse? It asks you where to put the bootloader (Grub): into the MBR, or into the PBR of other partitions. And that is what I choose: NOT the MBR but the second partition. If I install it into the MBR, then I wouldn't be able to boot XP without Grub, and I can. :-)
So again, let me prove it to you... or I'll find myself wrong, and that's okay too!
 
Old 08-16-2006, 03:36 PM   #9
skale
LQ Newbie
 
Registered: Jul 2006
Location: Atlanta, GA
Distribution: Arch Linux
Posts: 22

Rep: Reputation: 15
I don't get it. If it boots, then whats the problem?
 
Old 08-16-2006, 04:19 PM   #10
linda
Member
 
Registered: Apr 2001
Location: New Jersey
Distribution: Slackware
Posts: 222

Original Poster
Rep: Reputation: 30
The problem is what I wrote in the first post: What messed it up? Why would a piece of software mess something up that isn't even on the partition?

It doesn't really matter, I guess: I learned my lesson. I shouldn't use those Partition programs for Windows, i guess. I've used Partition Magic for years, but it messed me up when I got a sata hard drive (with the above configuaration). So then I got Paragon's Partition Manager, and it didn't make the mistake that Partition Magic made, but it did this.

I just found GParted Live-CD, and that looks pretty cool. Maybe I can use this from now on...
 
Old 08-16-2006, 04:30 PM   #11
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,719

Rep: Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550Reputation: 3550
gparted is good as a GUI interface - the liveCD is best as it avoids any issues with mounted partitions. Never had a problem with it.

It invokes other utilities (including ntfsprogs) to get the work done.
 
  


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
grub question changing boot order making windows boot first nfsutim Linux - Newbie 29 10-27-2012 12:53 PM
Question about something a person told... RHLinuxGUY General 10 04-12-2006 05:15 AM
uninstall question, difficulties for a non computer literate person 123cats Mandriva 6 02-24-2006 02:46 AM
Question on GRUB with SuSE, Mandrake and Windows... ronkymac Linux - Software 1 01-06-2005 01:50 PM
Redhat / Windows XP / Grub question bmar Linux - General 3 04-07-2003 01:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:56 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration