Results 1 to 1 of 1
Hi,
Is there a way to determine if my disk will be recognized as hda or sda using only the kernel ?
I know that there are generic rules such ...
- 05-24-2007 #1Just Joined!
- Join Date
- May 2007
- Posts
- 1
hda sda, determine which one using the kernel
Hi,
Is there a way to determine if my disk will be recognized as hda or sda using only the kernel ?
I know that there are generic rules such as : IDE disk -> hda
but there are exceptions it seems, for 2 different distributions can map the same disk either in hda or in sda.
For my problem, I used to start a RAM disk containing the linux kernel and a small app that tried to open the disk like this :
But from version 2.6, the disk drivers are in a module and not contained in the kernel anymore.Code:int devices[]={ 0x300, 0x340, 0x1600, 0x1640 }; ... mknod("/mydev",S_IFBLK,devices[i])<0); fd=open("/mydev",O_RDWR);
I think that the only remaining way to proceed is to use the same logic used by the kernel to identify my disk, but I don't know where to look for this information.
Can anyone help ?
Thank you very much


Reply With Quote
