LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Arrg... Messed up Grub and partition table... (https://www.linuxquestions.org/questions/linux-software-2/arrg-messed-up-grub-and-partition-table-101996/)

raid517 10-09-2003 05:14 AM

Arrg... Messed up Grub and partition table...
 
oHi, I have a weird problem with my partition table. I recently installed a raid IDE controller card and attached two additional 120GB drives to my system, giving a total of about 360GB. Anyway after installing the card and the drives the Gentoo linux install I had refused to boot... Asssuming that this was because the partition table had now changed, I did my best to try and correct the situation to reflect the new state of affairs. Previously my main partitions had been on /dev/hdc, this was simply because I got the primary and secondary ide channels mixed up, so ineffect, hdc was my secondary master drive. Anyway after adding an IDE PCI Raid controller (I have no intention of using the raid features, I just wanted additional IDE channels) my dev/hdc suddenly switched to being /dev/hdg.

My partition table was divided up into 4 partitions /dev/hdc (now apparently /dev/hdg) was partitioned as 200MB /boot ext3 514MB Swap 31GB / EXT3. and about 80GB NTFS for Windows.

Anyhoo, as far as I understood grub, this meant (when my disc was listed as hdc) that /boot was (hd1,0) / was (hd1,2) and swap well... swap isn't relevant to grub at this point I think.


Anyway now that my partition table had changed to hdg I assumed this meant that /boot was now (hd6,0) and root was now (hd6,2)

In any case I edited Grub accordingly as now follows:

Code:

default 0
timeout 30
splashimage=(hd6,0)/boot/grub/splash.xpm.gz

title=Gentoo Linux
root (hd6,0)
kernel (hd6,0)/boot/kernel-2.6.0-test6
initrd (hd6,0)/boot/initrd-2.6.0-test6 /root=/dev/discs/disc6/part2 vga=791

# non linux partition
title=Windows XP Professional
root (hd6,3)
chainloader (hd0,3)+1

However, despite doing this I still cannot boot gentoo, or Windows for that matter, and the bootloader quits with a message saying /root hdg2 not found (or something similar).

What am I missing? How should grub.conf look if I am to make sure I can boot both Gentoo and windows - and also get my boot splash partition selection image back again?

Any input anybody can offer would be appreciated.

Q

PS,

M'k... I kind of worked it out that, as I have 3 harddisks, the third harddisk should always appear to grub to be (hd2,0) - since it should go in the order (0,0) (0,1) (0,2) and so on...

However since adding the card, there is no longer any directory called /dev/discs which is where grub is looking for some of my partitions above. Instead there appears only to be a reference in /dev to /dev/hda2 /dev/hdc (both NTFS) /dev/hdg1 /dev/hdg2 and /dev/hdg3 which are /boot swap and / respectively. So the whole patition table arrangement has changed - and I am I'm afraid utterly confused. Is there some way i can see my partition table in the same way Gentoo linux sees it? Like some kind of Gui like CFDISK or something, or is there a way to automatically configure grub to find the correct partitions to boot from?

jailbait 10-09-2003 06:18 PM

You have an onboard IDE controller and a PCI raid IDE controller card with a bios extension on it. Somehow the two bios interact so that the add-on IDE controller is addressed as IDE 0 and 1, and the motherboard IDE controller is now IDE 2 and 3.

It is very common with add on IDE controller cards not to be able to boot from the add on card regardless of the address.

I suggest that you go into your bios and see if you can rearrange the IDE port numbers to what you originally set up for; motherboard is 0 and 1, PCI card is 2 and 3.

You might be able to boot a / partition on the PCI controller using a boot floppy. I am refering to a boot floppy that has a kernel on it as well as a boot loader, assuming that your kernel is small enough to fit on a floppy.

If you leave the IDE port configuration as it is you might be able to tell the bios to boot from /dev/hdg since that is on the motherboard card.


___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites


All times are GMT -5. The time now is 02:58 AM.