Problems With Grub
Hello,
Thank you for taking the time to read this post. I am still very new to Linux and I don't understand a lot about this OS yet but I'm learning. Here's the story. I installed Windows 7 Beta (I know the Beta is outdated but a friend gave it to me a while ago and I was unable to install it because my computer was broken. My computer works now and I decided to give it a whirl.) After installing Windows I installed Linux Mint 8 on a separate partition. As you probably know the Beta will shut down, so I installed Windows 7 over that Beta partition. Linux was no more but the partition was still there. I tried re-installing grub through a live cd but it wouldn't let me so I installed Linux Mint 8 a SECOND time. Everything works but I have 3 OS's on my computer and the newest Linux Mint is serving me no good. How can I delete it but still have grub installed? Hope this makes sense (noobs, like myself, tend not to) Thanks, -Matt |
I'm not quite sure about the 3 OS's, except that if I understand you correctly, it sounds as though you really didn't install Windows 7 over the Windows 7 beta, even though you may have wanted to do so.
As to Linux not being there, if you appear to have 3 OS's, then you likely do have 3 OS's. I'm not sure about Windows 7, but various versions of Windows have had this unfortunate tendency to mark partitions where other OS's are, as in-active/not-boot-able, which generally makes them ineligible for booting. I've had that sort of problem running Vista and Linux on the same machine. I generally try to avoid even looking at Linux partitions with Vista, and generally shut Vista down fully, rather than allowing it to re-start. That seems to keep both OS's boot-able. You should double check that your Linux partition is marked active/boot-able. If it isn't, re-gaining access to Linux could be as simple as marking the Linux partition as active/boot-able. |
When you install grub, it does a couple of things. It will overwrite the MBR (master boot record) so that it will be loaded when the computer boots. It will also need a place to put it's configuration files. That is typically in the /boot directory of your Linux OS. For instance, on Fedora, grub will be installed in /boot/grub.
Typically, part of your install procedure determines the location of that directory and informs grub. If you don't tell grub where those files can go, then it won't install. I said all that to say that if you have two copies of Linux Mint and don't want one of them, be sure that grub's files are on the one that you will keep. Otherwise grub will fail to know to boot your system. Keep a live CD handy and move the grub directory out of place to be sure that it isn't accessing those file before you delete the partition. Also, you could just back up your files and reinstall. |
Sorry, the newest Linux Mint *is* , or is *not* working?
|
can you please post the output of fdisk -l
if poossible, determine from the above output what you want to keep/ delete. what i think you need to do (if i understand your post) is to use gparted to move/copy/delete/resize/mark bootable/... your partitions. |
You have to just reinstall the grub ,
Boot from cd and getin by rescue mode , then chroot /mnt/sysimage then grub-install /dev/<hdd-name> name- hda/sda/or what u have ,check it and put here . |
Ah yes, I have to stop trying to answer questions in the middle of the night. I broke my own rule, if it's unclear, don't make suggestions, ask for output!
schneidz has the perfect next step. That output will provide the type and status ( whether it's active/bootable ) of each partition. If you are able to boot some installed Linux, if you could also provide us with the /boot/grub/menu.lst file from that system, that could give us even more information about situation. |
Quote:
I don't use this partition for anything. I installed it so that when I boot up my computer it asks what I want to boot into. After installing Windows 7 over the beta copy, every time I reboot it doesn't give me a choice, it automatically boots into windows. For a quick fix I installed Linux on a 2.5 gb partition (just enough so I could actually install it) now when I boot it give me the choice to boot into Linux Mint 8 (2.5 gb useless partition) Linux Mint 8 (the one I actually use) and Windows 7. I hope this is making sense because even as I try to explain it I don't think I'm making much sense. |
Quote:
|
OK!
So this is the sequence of events that happened: 1) Install Windows 7 - beta, in first partition 2) Install Linux Mint 8, on a second partition of substantial size 3) Install Windows 7 - standard released version, in first partition 4) Discovered you could no longer boot Linux on second partition 5) Installed Linux on third partition, of just 2.5 GB size Now when you boot, you get the grub menu from the third partition, which allows you to boot any of the 3 installed OS's. If you want to boot Linux, you usually boot the Linux you installed on the second partition, from the grub menu on the third partition. Is that right? If it is right, then we *probably* have a pretty good idea what's going on, and what you need to do, to fix it. In fact, I understand what other people have said in this thread, it is all valid advice, if it's properly applied. But as schneidz suggested, we could use the output from an fdisk -l. It would be nice if you could also show us the contents of the /boot/grub/menu.lst file from the Linux in the 2.5 GB partition. If I understand correctly, you normally don't want to use that Linux, but you can boot into it, and it is what you are usually using to boot one of the other two OS's. So for example, if the disk drive you have partitioned shows up in linux as device /dev/sda then if you boot fully into the Linux in the 2.5 GB partition and login as root, you would issue these commands: Code:
fdisk -l /dev/sda If you could then copy the output of those two commands, and post it in this thread, that would be great. |
^ thanks for the order of events kakaka.
Quote:
fyi, window's ntldr is only capable of booting windows. it automatically installs to the master boot record and wipes out any existing boot loader. also windows must be in the first partition of the first harddisk. because windows isnt as flexible it is always a good idea to install windows first then set-up linux around it. i wouldnt delete anything until you know what boot directory you are using (this is probably why red-hat distros like fedora use a separate boot partition). there are 2 possibilities: 1. the 2nd linux mint install simply repaired the existing grub directory from the first linux mint install then installed in a small partition (unlikely). 2. the 2nd linux mint install ignored the grub directory from the first linux mint install and created a new one in someplace like /dev/sda3 (probable). assuming the 2nd to be correct i would just rm everything in the 2nd install except for the /boot directory (essentially preserving a boot partition) then you can shrink it. without seeing your fdisk -l as well as your /boot/grub/menu.lst it is close to impossible to guess what partition/s you need to modify. my advice is to run gparted to get a graphical layout of your harddisk but dont commit any changes. |
Quote:
After running the fdisk -l command in my primary Linux partition nothing happens? It just starts a new line in the terminal? What did I do wrong? If it helps I know where all the partitions are. My primary windows partition is /dev/sda1 my primary linux partition is /dev/sda5 and the new 2.5 gb partition is /dev/sda7. If it helps I can take a picture of my grub screen. |
Hi magic8ball88,
My main disk drive is identified to Linux as /dev/sda. So if, as root, I run fdisk -l /dev/sda you can see below, I get this output: Code:
# fdisk -l /dev/sda and in the column labeled Boot an asterisk * indicates that the partition is bootable/active, whichever you wish to call it. Could you perhaps paste into this thread, the characters you see on your screen as you go to execute the command, starting with the command prompt prior to entering the command and continuing up to and including the command prompt, after the command concludes. That could be helpful in determining what the problem is with command execution. It looks like your most recent message to this thread wasn't made very long ago. I'll try to stick around for a while and watch this thread. If you are still available, if you would be willing to provide that information and are able to do it soon, perhaps I could get back to you soon with some idea what's happening. |
Okay just to clarify, to run a command as root I first type in sudo correct?
|
sudo or su, whichever you prefer.
|
All times are GMT -5. The time now is 06:02 PM. |