accessing usb partition in initrd

5 views
Skip to first unread message

b.mah...@gmail.com

unread,
Feb 21, 2009, 11:56:22 AM2/21/09
to linuxgurus
Hello Groups

This is Maheshwar,i am working on Embedded O.S.i have created the
customized kernel with initrd support(Busy box + static compilling).i
will login into the shell in the initrd itself(that means i am
creating the real root file system).
upto heare every thing fine.problem is how to access the USB partition
which is connected to system?.

what are the kernel configuration i have to select?.

If anybody knows pls replay it.

With Regards
Maheshwar

Lokesh

unread,
Feb 26, 2009, 7:09:00 AM2/26/09
to linuxgurus
To access the USB disk, you need some minimal kernel modues. Need to
include them in modules list and load then
during the boot time if you want to detect the USB mouse / keyboard.
If not can be loaded based on the requirement whenever need it.

These are the basic driver required

usbcore, etc., just see the lsmod output for more precise names. For
your query.. get the USB storage drivers loaded.

One problem and caution which is very imp in the embedded
envirnoment.

Problem
When we load the drivers during the boot time. You load scsi drivers
and usb storage drivers. The parttition and disk recognition will
identify based on
the order in which u loaded the drivers.

Example:
Frist Load the scsi driver first then all HDD drives will be named as /
dev/sda* etc.,
Second load the usb storage drivers now it will select as /dev/sdb or /
dev/sdc based on the availability of the disks.

suppose if you have installed the /boot partition with boot loaded in
the hdd /dev/sda1 so we always need this way of loading the drivers.
So, if you really want to see the magic just replace the order and see
how your system behaves.

Solution:
So, dont load any USB storage drivers during the boot time before the
HDD or SCSI drivers, you may encounter the GRUB failure problem. So
end up repairing the
OS which is not failed in anyway...

Have a happy hacking
Lokesh

Lokesh

unread,
Feb 26, 2009, 7:23:29 AM2/26/09
to linuxgurus
I forgot to mention, there is a good article on the embedded system.
The document is attached in file list.

The document courtecy by http://free-electrons.com

http://linuxgurus.googlegroups.com/web/embedded_linux_tools_labs.pdf?hl=en&gsc=BTJQ7RYAAACZ1bJQTZm4vV_OKMiYya7WOkh0iBmraMEV23BitRBh_w

keep reading
Lokesh
Reply all
Reply to author
Forward
0 new messages