Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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?
"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.
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?
"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.
[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.
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,305
Rep:
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:
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.
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.
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.
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,305
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.