LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-05-2003, 10:42 AM   #1
sambartle
Member
 
Registered: Jan 2003
Location: UK
Distribution: Slackware 9.0
Posts: 34

Rep: Reputation: 15
grub, onboard ide and ide add-in cards


I have a problem using grub (or lilo) to boot -any- distribution. I know why the problem happens but need help to solve it.

My system is set up as follows:

I have my Standard Onboard (via vt8235) onboard ide controller:
PM: 120GB HDD
PS:
SM: Pioneer DVD-R
SS: LiteOn 24x CDRW

Silicon Image CMD649(number1) add-in card (pci)
PM:
PS:
SM: Zip 100
SS:

Silicon Image CMD649(number2) add-in card (pci)
PM: LiteOn 52x CDRW
PS:
SM: 80GB HDD
SS:

the 120GB HDD
partition 1: ntfs

the 80GB HDD:
partition 1: linux /boot
partition 2: linux swap
partition 4: linux ReiserFS /
partition 5: fat32
partition 6: fat32

Linux is installed and configured on the 80GB HDD.

My 120GB is ntfs (win2k) and boots as default. I use Smart Boot Manager on a floppy to start linux.

The problem is this: my bios detects the onboard ide devices first, and the CMD cards afterwards. Linux detects the CMD cards first and the onboard afterwards.

When i install GRUB to the MBR of the 80GB (in linux) my root is hd0,0 and kernel is on (hd0,x)/kernelxx

(if i reboot with the floppy disk in: the kernel becomes (hd1,x)/kernelxxx and this is how i figured out the problem to begin with the allocations were different)

However when i reboot and use Smart Boot Manager (or any thing else (like the GRUB boot disk)) to boot i get kernel panic as the hard drives are in the wrong place because of the BIOS

I'm not explaining this well... i think my question is therefore: how do i force linux to detect the onboard ide devices first and how can i make sure the two pci cards are detected in the same order as the BIOD to ensure that the drives that SBM (or GRUB) sees at startup are the same once the kernel begins to boot and can therefore find the root drive.

Any suggestions are welcome as im not too bothered about ruining the linux system to get this working, theres nothing of use on there yet anyway as i cant boot to it to install things.

Thanks i advance.

If more info is needed i will try to provide it in a more clear manner

Last edited by sambartle; 11-05-2003 at 10:44 AM.
 
Old 11-05-2003, 01:39 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,352

Rep: Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552
If you are compiling your own kernels there is a kernel option for the kernel to reverse the order of the IDE cards that it finds. You might take a look at that option and see if it is of any use in solving your problem.


------------------
Steve Stites
 
Old 11-05-2003, 02:11 PM   #3
sambartle
Member
 
Registered: Jan 2003
Location: UK
Distribution: Slackware 9.0
Posts: 34

Original Poster
Rep: Reputation: 15
i will try that now.

will this mean i need to reinstall everything if it works (all partition's will be different to where it was /dev/hdc instead of /dev/hdg for example) or ewill linux notice the changes and just work?

Thanks for the suggestion
 
Old 11-05-2003, 02:42 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,352

Rep: Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552
"will this mean i need to reinstall everything if it works (all partition's will be different to where it was /dev/hdc instead of /dev/hdg for example) or ewill linux notice the changes and just work?"

You will have to change your bootloader and /etc/fstab every time that you rearrange your IDE controllers.

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

Steve Stites
 
Old 11-05-2003, 03:18 PM   #5
sambartle
Member
 
Registered: Jan 2003
Location: UK
Distribution: Slackware 9.0
Posts: 34

Original Poster
Rep: Reputation: 15
Ok tried that option in kernel config... the problem is that it enables the behaviour i am already seeing.

The offboard chipset IS already booting first even with the option not set in kernel config (the CMD controllers are on PCI cards and in linux take hda through hdh and the onboard via gets hdi through hdl)

The kernel option "Boot Offboard Chipsets First" doesnt change this behaviour as this is already what happens.


I think this is because the CMD cards somehow pretend to be part of my BIOS (they come up just after my bios screen - and the final part of mny BIOS happens AFTER the initialisation of the CMD cards) and can somehow make the hard drive appear as if it was onboard when its not.

I actually think it may be impossible to get linux to work on this system with windows 2000 as well. (my system is totally standard apart from the ide cards though so i think there must be a way)


Are there any ways to swap /dev/hdg for another id very very very early in the linux boot process?
 
Old 11-05-2003, 03:52 PM   #6
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,352

Rep: Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552
"I think this is because the CMD cards somehow pretend to be part of my BIOS (they come up just after my bios screen - and the final part of mny BIOS happens AFTER the initialisation of the CMD cards) and can somehow make the hard drive appear as if it was onboard when its not."

I have a motherboard IDE controller and a PCI card IDE controller. In my BIOS I can set the address order for these two controllers to either one being first. Your BIOS may or may not have such a feature.

"The kernel option "Boot Offboard Chipsets First" doesnt change this behaviour as this is already what happens."

I looked at this option when I set up my PCI IDE controller. I decided not to use it because Linux does what I want anyway. As I remember the option it switches the order that Linux configures the controllers. So if Linux naturally sees the controllers backward then the "Boot Offboard Chipsets First" option should switch Linux to using the correct order. That is how I remember the description but since I never actually tried it things may work differently in practice than I think they do.

"Are there any ways to swap /dev/hdg for another id very very very early in the linux boot process?"

If you cannot get Linux to order the IDE controllers the way that you want then you could try configuring /etc/fstab and grub to the configuration that Linux insists on using.


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

Steve Stites
 
Old 11-05-2003, 04:28 PM   #7
sambartle
Member
 
Registered: Jan 2003
Location: UK
Distribution: Slackware 9.0
Posts: 34

Original Poster
Rep: Reputation: 15
[QUOTE]Originally posted by jailbait
"I have a motherboard IDE controller and a PCI card IDE controller. In my BIOS I can set the address order for these two controllers to either one being first. Your BIOS may or may not have such a feature."

I will have a look but i dont think my BIOS has this option.

" That is how I remember the description but since I never actually tried it things may work differently in practice than I think they do."

I did try changing the option anyway to see what happens and for future reference i dont think it is a swap i think it only sets offboard to be first, and so as they are swapped by default it will not correct the problem.

"If you cannot get Linux to order the IDE controllers the way that you want then you could try configuring /etc/fstab and grub to the configuration that Linux insists on using."

Would attempting this step without changing fstab cause the kernel to panic... this is almost exactly what i think i have done wrong... i have attempted to force grub to use the settings i think are correct but didnt change fstab..

Ill have a look at this now, you might well just have solved this for me.

Thank You
 
Old 11-05-2003, 07:15 PM   #8
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,352

Rep: Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552
"Would attempting this step without changing fstab cause the kernel to panic.."

Yes.

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

Steve Stites
 
Old 11-05-2003, 07:26 PM   #9
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,305

Rep: Reputation: 66
i'm saying this because sambartle is a newbie, and a lot of times things
get assumed, but the newbie doesn't know. so please don't take insult.
you did recompile and install the kernel after changing the config, right?
the config just changes how the kernel gets compiled.

also, there are bootloader remap options to change the drive order

"One more important command is the "map" command, which you can use when you have two hard disks and an operating system such as Windows which doesn't like to be booted from the second hard disk. For example, you can map hd0 as hd1 and hd1 as hd0. In other words, you can virtually swap the two hard disks and load the desired operating system. The commands are as follows:

grub> map (hd0) (hd1)
grub> map (hd1) (hd0)"


that was from here:
http://gazette.euskal-linux.org/issue64/kohli.html
 
Old 11-05-2003, 07:35 PM   #10
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,352

Rep: Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552
"i'm saying this because sambartle is a newbie, and a lot of times things
get assumed, but the newbie doesn't know. so please don't take insult."

I know that some people are thin skinned about being corrected on the forum but I am not. No insult taken.

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

Steve Stites
 
Old 11-06-2003, 10:07 AM   #11
sambartle
Member
 
Registered: Jan 2003
Location: UK
Distribution: Slackware 9.0
Posts: 34

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by whansard
[B]"i'm saying this because sambartle is a newbie, and a lot of times things
get assumed, but the newbie doesn't know. so please don't take insult.
you did recompile and install the kernel after changing the config, right?
the config just changes how the kernel gets compiled."

Yep recomiled and reinstalled but still no change. I'm certain that, that option really has no effect in this case as the drives all appear to be onboard for some strange reason.


"grub> map (hd0) (hd1)
grub> map (hd1) (hd0)"

This looks promising as this is the problem i need to fix, the drives being inverted by linux compared to my BIOS i think. But then again linux will boot fine from any HDD right?
I tried playing with fstab, but i found a few problems, firstly i think its correct, second: is fstab actually accessible before the partition containing it is mounted? As my root partition is not mounted id guess that fstab has little to no effect on the problem.
Because the kernel panic's trying to mount the root file system after getting through the initrd stuff i guess it wont.
 
Old 11-06-2003, 10:10 AM   #12
sambartle
Member
 
Registered: Jan 2003
Location: UK
Distribution: Slackware 9.0
Posts: 34

Original Poster
Rep: Reputation: 15
Thanks to whansard and jailbait, i can now boot from the hdd properly, but the Kernel still gets into a panic trying to access /dev/hdg

I get VFS: Kernel Panic.. Please specify a correct root="" option

I can see above this that the HDFD is detected as /dev/hdg and i know the correct partition is /dev/hdg4, so root=/dev/hdg4 in grub should be correct from what i understand?

Hiowever this still doesnt work, my ReiserFS is compiled into the kernel so it should be able to mount the filesystem ok.

Thanks for your help guys, i will continue trying.
 
Old 11-06-2003, 12:45 PM   #13
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,352

Rep: Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552
"As my root partition is not mounted id guess that fstab has little to no effect on the problem."

If /etc/fstab is incorrect you will not be able to boot.

----------------------
Steve Stites
 
Old 11-06-2003, 06:04 PM   #14
sambartle
Member
 
Registered: Jan 2003
Location: UK
Distribution: Slackware 9.0
Posts: 34

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by jailbait
"As my root partition is not mounted id guess that fstab has little to no effect on the problem."

If /etc/fstab is incorrect you will not be able to boot.


Sorry i may not have been clear there: i meant since /etc/fstab is on the partition it fails to mount, then it wont be a part of the problem as surely it cannot be read until after the partition containing it is mounted.

The problem i have now is that it looks very like the ReiserFS support for / partition isnt in my kernel, but it definitly is as i have checked twice.
 
Old 11-06-2003, 08:25 PM   #15
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,305

Rep: Reputation: 66
grub or lilo points to the kernel's address on the hard drive, and the
kernel takes the option for root, which is the partition the kernel will
load as read-only to look for the stuff it needs. grub or lilo is what passes
the root option to the kernel. the kernel will try to load the partition it is
told is root, read-only, then look at fstab, and mount what it is told there.
if fstab is incorrect, it will die there.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Device IDs and IDE Raids (PCI and Onboard) Micah Linux - Hardware 2 06-17-2005 12:57 PM
Problems with Nforce4 and onboard ide controller TheDude05 Linux - Hardware 18 01-21-2005 11:56 AM
IDE pci cards r_jensen11 Linux - Hardware 4 04-04-2004 01:38 PM
Problems With Onboard VIA8235 IDE-Controller scahrossar Linux - Hardware 0 12-26-2003 03:58 PM
To stupid for P4C800 onboard IDE ?? 7even Linux - Hardware 2 08-28-2003 11:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration