LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   Dual-boot Linux Mint and XP destroyed XP MBR (https://www.linuxquestions.org/questions/general-10/dual-boot-linux-mint-and-xp-destroyed-xp-mbr-943302/)

Shoebox49 05-04-2012 01:03 PM

Dual-boot Linux Mint and XP destroyed XP MBR
 
Not knowing where to start this, I will start here, if another place is better, someone let me know. Also, this may not really be a Linux question, but hope someone can help!

I have used XP as work for several years but needed to move to Win 7 for day to day work. I have/had a lot of data on my XP drive I did not want to lose. Also, I wanted to set up a Linux distro to have available to look at when I could. Plans were to set up here and at home to run the software and learn. I decided to load Mint on one drive and XP on the original drive and use a dual boot to select either OS I needed/wanted each time I booted. I set the XP drive in the first position (I believe), and set up another drive in the second position and installed Mint, with few issues. Was able to log into either one, but had to change the positions of the SATA cable. So I used the Linux distro to set up the dual boot. Now, when I start up XP, I receive this error:

GRUB Loading stage1.5.


GRUB loading, please wait...
error 21.

I can access all my files in XP as a slave unit so I know they are there. I have attempted to use the Restore function but do not have access to the Administrator password. We have an admin account (named Admin) but that password does not work. I used Ophcrack Password Breaker live CD, no help. I have tried to copy MBR and sys files from a new XP build, no help. If this were a Mac, I could install the OS again and probably not lose any files. However, it is a PC......

At this point, appears my solution is to move all the files to another disk set up for XP. But not sure if all the programs installed will survive the move and still work.

the computer is a Dell Optiplex 620 with an Intel(R) Pentium(R) 4 CPU 3.00GHz. I have installed 4 1GB sticks of 2.99GHz RAM, computer shows 3.50 GB. The XP drive is about 250GB and the Linux is 160GB. Not sure if there is other info you need to help.

Any ideas?

flamelord 05-04-2012 05:23 PM

Have you tried reinstalling grub?

yancek 05-04-2012 07:03 PM

Boot into Mint and open a terminal and run: sudo update-grub

syg00 05-04-2012 10:50 PM

Quote:

Originally Posted by Shoebox49 (Post 4670519)
Now, when I start up XP,

What does this mean - exactly. Do you change the boot disk in the BIOS ?. Do you merely select XP from the Mint (grub) boot menu ?.

From Mint, go here, do as it says, and post the RESULTS.txt file it generates. That way we can see the boot environment.

Shoebox49 05-07-2012 04:36 PM

Greetings all, and thank you to all who responded. So far, an interesting day with this situation. IF I connect the drive with the XP as the only drive, I receive the Grub error 21. When I say 'connect the drive', I have turned off the computer and disconnected all drives and connected the SATA cable from the 0 drive to the drive i am wanting to use.

If I connect the drive with the Mint, I now go to the grub menu where I can select what to open. I select Mint and and log into the Mint OS.

Then I turned off the computer connected the 0 to the Mint and the 1 to the XP drive. On restart, I am directed to the grub and have the choice of Linux, Linux-nonfb, failsafe, windows. Selecting either Linux or Linux-nonfb will take me to the Linux log in screen where I can successfully log into Linux. Just selected the failsafe and am back into Linux.

If I select windows, I go to a page where XP splash screen and then to a windows set up page where the computer is wanting to complete the set up. Appears somewhere along the way, when I was trying to repair the boot of the XP, setup started again so now I guess I do not have XP installed.

From Mint, I do see the files on the XP disk, so I have not lost them all - yet - anyway. Now it appears I may have to copy the files and programs to another drive and reimage the XP. But still have the question of whether all the programs on that drive will run correctly after all the moving.

syg00 says From Mint, go here, do as it says, and post the RESULTS.txt file it generates. That way we can see the boot environment. I have tried that and now am receiving an error when I enter my password that Walter is not in the sudoers file. Earlier I received an error about no such file or path. I have extracted the file to the desktop and it set a folder named Firefox. drilling through the folder and I have not found that specific file.

Thanks in advance,
Walter

yancek 05-07-2012 10:20 PM

At the Sourceforge site for bootinfoscript, read the directions. Click the Download tab and download the Boot Info Script. You said you did download it to your Desktop. You should see this file: bootinfoscript-061.tar.gz. You need to extract it to get the bash bootinfoscript. Then run the commands as instructed. You should be logged in the terminal as whichever user you initally created when you installed Mint. That user should have root (sudo) permissions so that you can run the script with the commands shown at the Sourceforge site:

Code:

sudo bash ~/Desktop/boot_info_script.sh
The above is if it is extracted to your Desktop for that specific user. When I extracted it, there were no underscores so you need to type it in exactly as named for it to work. A folder named Firefox would be totally unrelated so I don't know what you did there? You should just see the tar.gz file named above and when extracted the bash bootinfoscript.

Shoebox49 05-08-2012 11:21 AM

Thanks again for continued assistance. I am not quite ready to give up even though I continue to struggle! Do not know where the Firefox file come from, but it is now gone. Still cannot get the script to run, though.

Started again at the sourceforge.net web; selected to download and save the file bootinfoscript-061.tar.gz. I save it the downloads folder. And I right click in the downloads to open the containing folder. In that folder, I right click and extract to desktop - i read the file path as home/walter/desktop. On the right side I see Extraction into subfolder: and bootinfoscript-061 is in the box, and set to preserve paths when extracting. On my desktop, I see a folder called bootinfoscript-061; and inside are 3 files: bootinfoscript, CHANGELOG, AND README.

I have terminal open, so I enter sudo bash /home/desktop/bootinfoscript and enter and receive the message No such file or directory.
Then I try sudo bash /home/walter/desktop/bootinfoscript and enter and receive the no such file/directory
I add a tilde (~) before /home, no such file/directory
Adding the -061 does not change, adding .sh at the end does not change.

Just FYI, to the left of the # I see [root@localhost ~]. When I first installed Mint, I set Walter as the main account.

The bootinfoscript appears to be a text file, I can open and read directions on how to run. first line:

#!/bin/bash
Version='0.61'
Release date='1 April 2012'
last_GIT_commit=''
retrieval_date=''
then starts with license.

Any ideas?

flamelord 05-08-2012 03:16 PM

the command shell is case sensitive, and your desktop folder is probably capitalized, also you need to go inside the folder and run the actual script, so it is going to be something like

Code:

/home/walter/Desktop/bootinfoscript-061/bootinfoscript

Shoebox49 05-08-2012 03:32 PM

Thank you! Thank you! Thank you, flamelord! That was the ticket - it worked! Now how do I add to your reputation for the help? I have a results.txt file on a USB thumb drive - how do I add/attach it to this post for you or someone to review?

Shoebox49 05-08-2012 03:36 PM

Results.txt
 
1 Attachment(s)
Thanks to flamelord, i have successfully (finally) run the boot info script on my machine. I have - hopefully - attached the text file to this reply so someone can read it. This is new to me so it is a learning curve - more like a learning cliff - straight up granite faced rock.

syg00 05-08-2012 06:40 PM

There should almost never be a need to pull the drive cables - better to select the drives from the BIOS boot selection list. The old days of worrying about master/slave have basically long gone. Although with an XP disk I'd be inclined to leave it (always) as the master, even though I always use "cable select" on the jumpers.

You have installed grub (at least) twice, which again was unnecessary, and have replaced the M$oft boot-loader on the XP disk - hence the grub issues with only that disk attached; the boot-loader looks for its (config) files on the other disk, which obviously isn't there.
With the Mint disk as disk0 and XP as disk1, things (including XP) should work as hoped.
Quote:

If I select windows, I go to a page where XP splash screen and then to a windows set up page where the computer is wanting to complete the set up. Appears somewhere along the way, when I was trying to repair the boot of the XP, setup started again so now I guess I do not have XP installed.
With the minimal data we have, it actually looks like XP is (largely) intact, but yes, it seems like you did start a (re-)install. I don't know how to deal with that - hopefully it will offer to "upgrade" rather than replace the entire XP. Might regress some DLLs though if applications have updated them.

What I might try is to recover just the boot code for XP - for this you will need to make the XP drive disk0. And disconnect the Mint drive for safety maybe. Boot the XP install disk, get into recovery mode and run fixmbr - and probably fixboot, although that appears unnecessary. Then see what a re-boot (with only the XP disk attached) brings up.

Once you get XP working, you can re-connect the Mint disk as disk0 and XP as disk1, and all should work from the (Mint) grub menu.

Shoebox49 05-09-2012 04:08 PM

I have tried to go into recovery mode - but you have to have the Administrator password, and the admin account we set up is not acceptable. I have heard various things about the Administrator password, none of which help me right now. And I do not know of a way to set the actual Administrator password, either when you set up the OS or after. So far, that has not been a route available to me. What I am thinking of now is to close the drive so I have a full backup of everything and then let the set up continue to see if I can select a repair or what happens.

I am still not sure what I did to initially corrupt the MBR for XP version. Don't mind learning from my mistakes - but I have to know what I did wrong before I can really learn anything!!!

yancek 05-09-2012 05:17 PM

Quote:

I am still not sure what I did to initially corrupt the MBR for XP version
Look at the very top of the results.txt file. You installed the Grub bootloader to the master boot record of both hard drives.
You keep referring to Linux Mint but the bootinfoscript shows the only Linux entry in the boot menu file as Mandriva?
Linux Mint hasn't used Grub Legacy which you have for three years.

Do you not have a Repair option with your xp installation CD? I've never used it so...? Good luck if you don't have the password.o

Shoebox49 05-11-2012 08:59 AM

Greetings all! I am back with good news! Miracles still do happen!! I finally decided to just let set up continue. I cloned the XP drive to make sure I had all my files. Then placed the Linux drive in the drive 0 slot and the XP into the drive 1 slot and restarted. I selected XP from the grub menu, and waited for the XP splash screen, which then led to a warning that set up would continue, just needed the correct DVD. I put the DVD into the drive and let it go. It finished late yesterday and I started the computer selecting Windows. It did not come up before I left so I tried again this am. The XP log on page appeared and I chose to log into workstation only first. ALL files were there! I scanned through enough to know everything was there. Now I have shutdown and logging into our Novell network. Looks like I may need to reinstall the Novell software again, but that is a small issue! So I feel much better now!

As for the version of Linux - well I thought I had Linux Mint. That is what I downloaded, least ways, I thought so. But it appears I have a version of Mandriva. Personally, I do not have a preference, not yet anyway. I want a version I can work with be better understand Linux and learn to manipulate it via command line. So unless someone can convince me otherwise, I will stay with what I have.

XP is running slow, not sure what is going on there. I have max RAM installed and the drive is not even half full of data. I may attempt to run a repair later, but for now, think I will just leave well enough alone! As for the data, I may be able to access some of the files from the Linux, have not tried so that will be a learning experience.

Thank each of you for you assistance and ideas. You have helped me get to this point and my plans are to continue to learn. I do need to determine how to give reputation to those who have provided help for me. Guess I should read the helps again!!


All times are GMT -5. The time now is 01:10 PM.