(NOTE: I’m doing this entire post from memory so forgive me if some things do not perfectly match up with your own Elyssa install. Also, the solution described below only works easily when working with 2 hard drives, one with Windows on it and the other with Linux on it (the more drives and partitions, the more painstaking and troublesome the various numerical/lettering edits as described below). I realize that this is a rather long post, but rest assured — the only permanent change to your system is the editing of the /boot/grub/menu.lst file, and nothing else.)
After a few hours of reinstalling a couple times, tweaking, and fiddling around, I’ve managed to successfully install Elyssa on my PC. Strange, since Daryna installed without a hitch (but then again, I chose an automatic disk resize option at the time, and Windows XP was the only OS installed in the system). I will try to suppress my joy at solving this problem in a matter of hours instead of days like some rather unfortunate people on the Ubuntu forums. First, a run-down of my hardware just before I tried to overwrite Daryna with Elyssa:
There are 2 hard drives:
- The first hard drive (let’s give it a name to avoid any overlap with other hard drive designations/settings discussed later in this post — let’s call it Vincent) is a SATA drive (3.0 Gbps or something like that). It has the basic C:\ partition for Windows, and 3 more partitions for various data/documents (D, E, and F).
- The second drive, let’s call it Jules, is an old IDE drive and has 3 partitions: a “G” drive, NTFS partition that is used yet again for data/documents; an ext3 partition for my old Daryna install; and finally, a basic swap partition.
In my first attempt at installing using the Elyssa live CD’s install wizard, when I got to the partitioning dialog box, I simply deleted the old ext3 and swap partitions, as I wanted a complete, fresh install of Elyssa. Also, I wanted to create a separate /home partition instead of just having one “/” (aka “root”) partition for everything as was the case before under Daryna’s automatic disk-resize install. So I went ahead and created two ext3 partitions — one mounted at “/” and the other at “/home”. (I do not recall the choices I made regarding the “primary” or “logical” option — I think I chose “/” as primary and “/home” as logical; however, I have a feeling that this setting did not affect the problems/solutions I will talk about in this post). Finally, I created a swap partition as usual. In the dialog box that followed that had an “Advanced…” button on it, I clicked it, and made sure to install GRUB onto Jules, not Vincent. This was because I only wanted to physically mess around with the drive that had the old GRUB loader on it, and leave Vincent untouched. (So for example, if Jules got screwed, and GRUB got corrupted somehow, that I would be able to go into BIOS and change the hard drive boot priority to make Vincent, instead of Jules w/ GRUB, load first. This way, as far as Windows is concerned, it’s as if nothing ever happened.)
Everything installed smoothly, but when GRUB loaded with the usual list of operating systems, it gave me an “Error 17” when I told it to load Mint, and additionally complained about the partition being unreadable or something to that effect.
Don’t worry, I realize now that nothing was damaged, and your system will be fine as well. It’s just a small technicality that tripping up GRUB.
I’ll keep to the essentials. The basic problem was: GRUB did not recognize the drives correctly; that is, it switched the order of drives so that it thought Jules was Vincent instead of Vincent being Jules, or vice versa.
The solution (from your perspective, with Jules and Vincent working as our hypothetical):
1. If you keep trying to press ENTER in the GRUB menu (to load into Mint), you’ll eventually be left with a low-tech looking version of the same with a blue/black background (I think those were the colors). But although it looks crappier than the first GRUB menu with prettier graphics, this version lets you customize how Mint reads from the hard drives and partitions! Perfect for figuring out what is on Mint’s mind. All you have to do is edit 3 things. Now, with the default Mint OS highlighted (the toppmost one, not the “recovery mode” one), just press “e” on the keyboard. (There is a list of commands at the bottom of the screen at this point, so you’re free to look if you’re curious.) This will bring up a cheap looking text editor. All we have to do is edit a few values (to boot into Mint successfully, whereupon you will make these custom options permanent):
- First, edit the top line that says something like “root (hd1,0)“. The first number is the drive number, and the second number is the partition number. Most likely, if it does say (hd1,0), this means that, for purposes of our Jules/Vincent situation, that Jules was recognized as hard drive 0, and Vincent was recognized as hard drive 1. That is, it tried to boot into Mint using hard drive 1, or Vincent, instead of Jules who has GRUB with him. (Mint, like Ubuntu, counts from 0. I know, it’s confusing, but it’s a programming thing, I think (array elements, anyone?).) Since we know that there are only 2 hard drives in our system — Vincent and Jules — the only possibilities for the first number is either 0 or 1. Change it to 0 if it is currently set as 1 (or 1 if it is currently set as 0 — and accordingly, do everything opposite for the rest of the steps below). So now, the top line looks like “root (hd0,0)“.
- Now that we’ve told Mint to look at Jules, things are looking good. However, there is a corresponding value that must be changed in a similar way to make this complete. In the second line, you’ll see something like “root=dev/sdb1” or something like that (push the left arrow so you can look back far enough — the line is a long line and didn’t show up completely on my monitor). Change this to say sda1 instead of sdb1. Yes, “a” and “b” again refer to hard drives, and you just need to harmonize them with the changes you made in the top line.
- Now just press “b” (it doesn’t matter whether you’re currently highlighting the top line or the second line), and GRUB will try to boot with those minute changes you’ve just made. If it still fails to boot and gives an Error 17, never fear, just press enter and you’ll be brought back to the same screen. Make sure that the customized lines still look the same, but this time, change the second/partition number in “root (hd0,0)“. So, change it to “root (hd0,1)“. Voila, Mint boots successfully!! (If it doesn’t, stop reading this post, and consult the Ubuntu/Mint forums instead.)
The whole point of the above 3 steps is to intelligently guess the correct numbers. And the guesswork should be a breeze, since we only have 2 drives and GRUB will reload instantly after each failure. The second number discussed in step 3 is limited to the number of partitions you have (probably something like 0, 1, or 2, again depending on the number of partitions you saw in the live CD Mint installer’s partitioning dialog box). Keep repeating steps 1 + 2 and 3 until you can boot into Mint without a hitch.
Now that we can boot into Mint, we need to make these changes permanent. Just type sudo su in the terminal, and then type in gedit /boot/grub/menu.lst. This is the only file we’ll be editing, so you’re almost there!
- If you go down near to the bottom of the file, you’ll see some lines that look very familiar to the ones you just edited. Change them accordingly to what you did above — both the (hd#,#) and the sda/sdb values.
- If you go up a bit, you’ll see a value called groot. It also references the same (hd#,#) value that is the default topmost line in GRUB’s menu (the one we just edited above). Change it accordingly. (In our case, (hd0,1).)
- Right above groot is another line that has a sda/sdb value in it (I think it was kopt or something like that). Again, change this to match the setting that worked. (In our case, sda1).
- Save the changes.
Now, restart. If you did everything correctly, all of the Mint options in the GRUB menu should work. So far so good! But if your problem was exactly like my problem, then Windows should not boot from within the GRUB menu, and it will complain about NTLDR being missing. Again, this is just a problem that can be fixed from the /boot/grub/menu.lst file. So, go back into Mint and edit the file, and go down to the very bottom, where it has settings for Windows. By this point, you should be able to recognize that the (hd#,#) setting is wrong. Change it to look like this (hd1,0). This is the solution pursuant to the hypothetical above. And, it makes sense: it now reads so that it looks at hd1 (Vincent), not hd0 (Jules); and within hd1, it says to look at the very first partition (your C:\ drive).
Reboot, and try to go into Windows from GRUB. If it works, great! But for me, I still couldn’t get into Windows by this point. So what I did was edit the Windows entry in /boot/grub/menu.lst again, and add two lines,
map (hd0) (hd1) map (hd1) (hd0)
below the word “savedefault” (this order probably does not matter, but the two “map” lines above should come after the “root” line, I think). Save, and reboot, and try to boot into Windows. It should work just fine. What these two “map” lines did was basically tell Windows to look at Vincent first, not Jules, because Jules only has Linux and some other NTFS data on it.
So there you have it. In retrospect, the crux of the matter was that GRUB had Vincent and Jules switched around, and thought that Vincent has Linux on it. The steps we took above simply swapped Jules and Vincent into their correct positions. Again, the beauty of this solution is that, essentially, you only have to edit /boot/grub/menu.lst! No grub repair or update-grub or using a “Super GRUB disK” or anything like that. But of course, this only works well and quickly if you have 2 hard drives. If you have more drives, and thus more partitions, you’ll have to edit more things and exhaust more possibilities — but now that I think about it, the same principles should apply, and this solution should still work.
And yes, Pulp Fiction was a fun movie. Vincent and Jules are characters from the film.