Not loading sata driver .
I have an embedded linux box . I am trying to reduce boot time by making so many features as modules . So that i wll have a thin uImage .
I made sata driver (mv_sata ) as a loadable kernel module . But when the box boots up and trying to mount /dev/sda ( it is a sata harddisk ) . it is failing . $ fdisk /dev/sda the above command gives an error message " unable to open /dev/sda" $ mkfs.ext3 /dev/sda this commnand also gives the same message " unable to open /dev/sda" But after loading the driver using $ modprobe mv_sata i can do fdisk ,mkfs.ext3 and mount all . My question is : -> Is there any way linux can load the module by itself if it needs to mount a sata drive ?? |
You may need to add a line to your /etc/modprobe.preload file or something similar.
Code:
# /etc/modprobe.preload: kernel modules to load at boot time. Code:
install scsi_hostadapter /sbin/modprobe ahci; /sbin/modprobe ata_piix; (line continues) |
There doesn't seem to be much point in making a module loadable that you're going to have to load every boot. I guess I don't get it.
|
From what I recall, you may load it as a module dynamically (handy for joysticks and webcams)
or statically, it's loaded at boot and stays there until further notice (good for /boot and / partitions). If you need a small kernel, have the modules built in (static), saving heaps of space because you don't need to have all the rest of the worlds modules there in case you switch systems, or something. It will also speed up the boot times, because it won't have to search for the modules each time you boot it. To get started, add it to your /etc/modprobe.preload for my sata drives I am using "/sbin/modprobe ahci". But ahci must be enabled in bios. Cheers, Glenn |
I assume that mv_sata is in your boot image, but not loaded from the ramdisk.
The straightforward option is to build that into the kernel, i.e. not as module. |
are you sure ?
I'm not sure you are accessing the correct thing
when you do a fsck you point it to a partion not a disk itself i.e. fsck /dev/sda1 (or whatever partition to check) try it along those lines ,or create a partition if there isn't one. |
All times are GMT -5. The time now is 04:22 PM. |