LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 10-15-2008, 08:44 AM   #1
91change
Member
 
Registered: Jul 2008
Posts: 42

Rep: Reputation: 15
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 ??
 
Old 10-15-2008, 10:20 AM   #2
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,649
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
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.
#
# This file should contain the names of kernel modules that are
# to be loaded at boot time, one per line.  Comments begin with
# a `#', and everything on the line after them are ignored.
# this file is for module-init-tools (kernel 2.5 and above) ONLY
# for old kernel use /etc/modules

psmouse
pcspkr
amd64_agp
evdev
Or /etc/modprobe.conf I'm using ahci instead of nv_sata or whatever it was called.
Code:
install scsi_hostadapter /sbin/modprobe ahci; /sbin/modprobe ata_piix; (line continues)
 /sbin/modprobe pata_amd; /sbin/modprobe usb_storage; /bin/true
install usb-interface /sbin/modprobe ehci_hcd; /sbin/modprobe ohci_hcd; /bin/true
options usb_storage delay_use=10 swi_tru_install=1
remove snd_hda_intel /sbin/modprobe --first-time -r --ignore-remove snd_hda_intel
install snd_hda_intel /sbin/modprobe --first-time --ignore-install snd_hda_intel
Hope that helps you, cheers, Glenn

Last edited by GlennsPref; 10-15-2008 at 04:48 PM. Reason: lines too long...
 
Old 10-15-2008, 12:01 PM   #3
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
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.
 
Old 10-15-2008, 04:45 PM   #4
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,649
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
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

Last edited by GlennsPref; 10-15-2008 at 04:47 PM. Reason: spelling
 
Old 10-16-2008, 05:03 AM   #5
tzp
LQ Newbie
 
Registered: Apr 2005
Location: Hungary
Distribution: Suse, Debian
Posts: 6

Rep: Reputation: 0
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.

Last edited by tzp; 10-16-2008 at 05:12 AM.
 
Old 10-18-2008, 05:52 PM   #6
axobeauvi
Member
 
Registered: Apr 2003
Posts: 128

Rep: Reputation: 16
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.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Etch continue loading old network card driver after new driver installation rtmex Linux - Networking 3 11-27-2007 06:07 AM
Mandriva 2007 PowerPack not Loading NVIDIA SATA Driver tobias_r33per Mandriva 1 01-20-2007 07:19 AM
Loading Sticks on Loading Sound Driver nis_hurock Linux - General 8 06-03-2006 05:57 PM
SATA Driver loading after fstab mount? funbags Linux - Hardware 3 12-02-2005 07:39 PM
loading sata modules at boot trscookie Linux - Software 2 08-30-2005 09:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 01:49 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