Results 1 to 7 of 7
I've abandoned an earlier linux installation in another HDD sometime ago, but recently I've discovered that I'm still using some GRUB related thing that is written in the old partition. ...
- 11-04-2008 #1Linux Newbie
- Join Date
- Apr 2007
- Posts
- 211
Newbiesque but probably simple GRUB-related confusion
I've abandoned an earlier linux installation in another HDD sometime ago, but recently I've discovered that I'm still using some GRUB related thing that is written in the old partition. Not the /boot/grub, which is 100% surely on the current partition (as it does not exist in the other disk anymore), but whatever it writes on the MBR, I guess.
I've tried to install grub to the proper HDD by something like grub-install, and it succeeded partially. Now it does access the correct menu.lst (instead of stopping at the stage 1.5), but when it's load from the proper HDD, somehow if fails to find vmlinuz or whatever it points to on those menu.lst lines.
I thought that perhaps the HDD assignment as "hda" or "hdb" will change depending on which is the one I'm booting from. But I'm not sure it really makes sense.
If it does, then I think that all I'd have to do would be to switch the hda and hdb references on menu.lst and fstab. But is it really it?
Summarizing the situation in a flowchart-like manner:
Grub's MBR on hdb (current) -> grub menu loads, but fails to boot into linux
Grub's MBR on hda (old) -> loads the grub menu from hdb, and boots into linux
I'm not in a hurry to fix it, but I guess it's something good to do before I forget, as I may eventually remove the old HDD for some reason, and go crazy trying to figure what's happening.
- 11-04-2008 #2
Try setting hdb before hda in the boot order of your bios settings. It may simply be that the computer is getting confused there. If that doesn't fix it, you might have to erase the old GRUB from the MBR, although I'm not exactly sure how you would go about doing that.
- 11-06-2008 #3Linux Newbie
- Join Date
- Apr 2007
- Posts
- 211
Thanks for answering, but I just did some of that.
Part of what I've tried to describe already involved switching the HDD to boot from on the bios. And I don't think that it's really needed to erase the old grub from the MBR, since it's not been read, as it's not in the HDD I'm trying to boot from. It's somewhat like having to delete something from an HDD that's not even in the computer, I think (but who knows, maybe there's some seemingly illogical behavior going on).
Besides that, if I somehow delete it before acually fixing the new one, I'd not be able to boot.
- 11-07-2008 #4
What you could do is delete everything GRUB related on your machine, then re-install GRUB to the proper HDD using the Super GRUB Disk.
Jay
New users, read this first.
New Member FAQ
Registered Linux User #463940
I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.
- 11-08-2008 #5
Here's how it works. You have a disk that is set to be
the boot disk, either by default, or by BIOS setting.
When the BIOS boots, it loads the MBR of this disk
into memory and passes control of the computer to it.
If you have only one disk, The GRUB program in the MBR
will look for /boot/grub for configuration and next stage.
When you have a second disk it gets complicated.
Assume you have two disks, with linux on the first
one. The situation is the same as above. But now you
decide to install linux on the second disk, and quit using
the version on the first disk. Now, the MBR on the first
disk is still booting, but now goes to the second disk
for configuration etc. This boots the OS on the second
disk.
If you install GRUB on the MBR of the second disk, this will
not help, because the first disk is booted by the BIOS.
There are probably a lot of workarounds for this, but if
you intend to remove the first disk in the future, you
should probably reverse them, making the second disk
into the boot disk. It will be necessary to run the supergrub
cd at that point to update GRUB, because once you swap the
disks, the BIOS, and GRUB will rename them and get confused
- 11-08-2008 #6
You will need to fix /boot/grub/menu.lst entry, possibly /etc/fstab and ensure grub is installed to the MBR of the hard drive you want to boot from ...
If you need further help with this then boot Linux from the hard drive, open a terminal and post the output of the following:-
and we will try to figure out what is going on. As rcgreen indicated in the above post if you intend removing the old hdd then you are better fixing grub and config to boot from the second hard drive (the one with Linux on) first.Code:sudo fdisk -l sudo cat /boot/grub/menu.lst cat /etc/fstab
The -l is a small L rather than a one in the above code ... if sudo does not work with above commands then use
It may also be useful to post the output ofCode:su - fdisk -l cat /boot/grub/menu.lst cat etc/fstab
as well ... copy find output before typing quitCode:sudo grub find /boot/grub/menu.lst quit
- 11-09-2008 #7Linux Newbie
- Join Date
- Apr 2007
- Posts
- 211
I'm almost sure I already have grub on the MBR of the drive I intend to boot from, but I think that probably I didn't use the correct command to install, specifying what's the situation, so it was installed with incorrect parameters/"assumptions", expecting /boot to be somewhere else.
I'll make these things and post here again, thanks.


Reply With Quote