Reinstalled Windows, lost ability to boot into Linux

Hello Experts:

I just reinstalled Windows on two machines, on which there were also Linux installations on their own partitions.  The partitions still show as existing in Disk Management, but I have lost the ability to choose which OS to boot into at start up.  I'm guessing it is because the reinstallation of Windows over-wrote the existing boot configuration.  I have Linux Mint Maya on an older XP Home, 32 bit machine, and Linux Mint Cinnamon on a newer Windows 7 Ultimate, 64 bit machine,  

I'm guessing this can be remedied through some kind of command prompt or booting from the install CDs and accessing that way, but I don't want to try this without some sound advice.   As always, thanks in advance.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

1. Boot your machine from Mint Live CD (best to use the same version as the one you are running on your computer)
2. Find a location of your grub images. Open terminal and execute as root 'fdisk -l' command. You will see something like
/dev/sda1   *           1        7180    57668608    7  HPFS/NTFS
/dev/sda2            7180        7244      512000   83  Linux
/dev/sda3            7244        9730    19969024   8e  Linux LVM

Open in new window

In first column you can see partition names. Show me what your fdisk says, so I'll try to find it for you. You may need another steps here, because that location depends on your decisions during system setup.
3. Mount partition which contains '/boot' directory and files: mkdir /mnt/grub; mount /dev/sdXY /mnt/grub where sdXY is your partition containing grub files
4. Reinstall grub: grub-install --root-directory=/mnt/grub /dev/sdX. sdX not sdXY because we want to reinstall grub on MBR of your disk, not on your Linux partition.
BTW, all above has to be done as root.
ChristopherNlsAuthor Commented:
Slubek:  I'm guessing that by "Mint Live CD" you mean that I can use the installation cd I burned from the original .iso image I first downloaded;  (-just realized that I'm not sure where it is, so I may have to download  and burn it again!)  :-}

Let me know if this is what I need.  Thanks for your help so far.

All you need to do is repair grub on the XP machine.

On the Win7 Ultimate machine, I would use Windows Virtual PC... create a new VM and point it to the partition where linux is installed... then you can run it without having to exit from Win7.  When the next service pack for 7 is released, it will most-likely fail to install if you're using grub to choose what OS to boot into... the SP installer wants to see a stock windows MBR, not grub.
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

By LiveCD I mean system you can boot from CD/DVD to get Linux tools ready. I don't know Mint well, but user guide says that you can run system from installation DVD. So - yes, you have to download .iso file again and burn it onto DVD. Then boot from that DVD.
ChristopherNlsAuthor Commented:
Slubek & Darr247: The computer won't boot from the Mint DVD- it just sits there doing nothing.  With XP running I then on the drive where the DVD is, in order to see its contents. It shows an "install Mint" install file.  Clicking on that offers to install Mint "alongside Windows," but- detecting the other Mint installation, (the one I'm trying to get into,) it says that the current installation must be uninstalled first.  I'm afraid that I will lose the pictures and documents I have there if I do.  

The installer also offers to run Mint from the DVD by installing some file enabling that.  I allowed this, but it doesn't work.  It shows an error message: { "Try (hd0,0) : NTFS5: error:  "prefix" is not set.}

OK, plan B: download, install and run Paragon ExtFS for Windows, which supposedly will mount a Linux partition as a drive in Windows, so I could access the pictures and documents and save them elsewhere- after which I would install Mint "alongside Windows", not having to worry about wiping out my documents and pictures.  That doesn't work right either, throwing an exception error.  When I click "continue," the dialog appears locating the Linux partition.  I click on it, and then click "mount."  It then says that every single drive letter I try to assign all the way out to "Z" has been used.  Huh?  I can't win on this one.

I want to use only Linux on this machine, because I still can't get XP Home to work right, even after three drive reformats and yet another reinstall.  I installed first Service Pack 2 immediately followed by Service Pack 3, and I am in the process of allowing Windows to install every damn update it wants.  But I'm still not convinced it will work right.  Perhaps it is the age of the hard drive- 5+ years.  Windows has been acting odd on this disk for a while, (Linux worked fine,) so I thought a fresh reinstall would clear things up.  No dice.

If I can just get the pictures and documents off the Linux partition, I'd invest in a new, inexpensive hard drive and install only Linux on that.  But I would need to download a version that will install fresh on an empty drive, and not offer to install it "alongside Windows," like the one I have now.  Being a Linux Newbie, I’m not sure I’d be able to figure out which one to use, and how to use it.

I am increasing the points to 500, because I sense that this will be a tough one.

Thanks for all your help so far.
Linux Mint should really boot from the DVD. If it doesn't you either have a bad DVD drive, bad download of Mint, didn't burn the DVD properly, or your BIOS is buggy. Linux Mint comes as a liveDVD, so you have too be able to boot from it. You can also use the utility unetbootin to create a bootable USB stick, if your PC can boot from USB sticks. This tool can either download mint directly and put it on the stick, or you can select the iso file to get it on the stick:

I suggest you get mint again, and if you burn it to DVD, use the lowest available burning speed. I've sometimes seen issues that were caused because a too high speed had been used. If your PC is older, I suggest using the Linux Mint mate version, as that goes easier on the hardware (in particular the video card), when compared to the Cinnamon version.

Once you have booted into the Live DVD or USB stick, you can copy any data off the original mint partition. In future make sure you have a good backup strategy...

when you install Mint, you can select whether you want it alongside the already installed OS's in which case it'll resize the current partitions ad create a new one, for the fresh installation. You can also remove all previous OS's etc.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Does this tutorial on reinstalling grub mesh with what you're seeing when you boot from the Mint Live CD?
Reinstall grub2 from LiveCD
ChristopherNlsAuthor Commented:
Darr247:  Reading through that tutorial, I got as far as the section on "Gparted".  Using that, I scanned the hard drive where the existing Windows and (maybe) existing Linux installations are.  Gparted reported the drive to be empty- showing neither partition. Maybe by design it doesn't show the Windows installation- I can't understand that because it was there this morning!  :-}  Maybe by design it doesn't show a Windows partition. But that wouldn't make sense, because a partition is a partition- regardless of what is on it.

But why it doesn't show the Linux, I can't understand- since I don't know of anything I did that would have removed it. It shows the entire 150 GB drive to be "unallocated."

Oddly, I couldn't use gparted through Terminal- it telling me that root privileges were required.  But I could start it from within the desktop.  Maybe root privileges are needed to actually view partitions?  If so, how do I get root privileges for the Terminal, using only the Linux running off the DVD?

Any other suggestions for viewing existing Linux partitions, preferably through a Linux boot disk?  I don't trust the Windows installation to work correctly.

Or is it possible to put a second copy of the same Linux version on the disk, without destroying the data on the first one- then using that to view the original and rescue my documents and photos from it?

The gparted program knows about and can operate on NTFS partitions (assuming ntfs-3g is loaded by Mint)... I've used it many times to resize (both shrink and grow) windows partitions.

$ sudo su
to get the root prompt (#) in mint's Live environment.

> Or is it possible to put a second copy of the same Linux version on the disk
I was under the impression that the windows installations were still accessible during boot, but that you had lost the grub menu[s] from which to choose the OS you wanted to boot.

Is that not the case with both machines?
ChristopherNlsAuthor Commented:
Slubek, Darr247 and Rindi:

The problem has now been solved.

Thanks for all your help.  Each of you has contributed in steering my thinking in the right direction.  Rindi: you were correct about burning the Mint .iso file at the slowest speed possible.  I downloaded a fresh copy and burned it at 4X speed, which then booted nicely.  Slubek: the DVD booted up, and I was able to run a copy of Mint from it- which made reading Expert comments and Googling things a lot easier: no need to disconnect the laptop from its nest on the 2nd floor and bring it downstairs alongside the ailing desktop.   Unfortunately, I couldn’t get anything to read the existing Linux partition from within the temporary Linux installation running off the disk.

Darr247: your suggestion to take a look at “Reinstall grub2 from LiveCD” looks like a good reference for the future, but at this time I didn’t want to continue any further experimentation.  I Googled “How to view and access Linux partitions” and found another application for this purpose.  It is “DiskInternals Linux Reader:  -and it worked perfectly on the same XP Home machine where “Paragon ExtFS for Windows” would not. (BTW: the Paragon app works fine on Windows 7, so the problem is something with the XP Home machine, or that particular flavor of XP.)

I was able to access and recover all the documents and pictures I had on that Linux partition.  I have now deleted both it and the swap partition, and  will proceed to install Linux Mint fresh all over again. I’ve increased the points so there are more to go around, in recognition of your joint efforts.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 7

From novice to tech pro — start learning today.