How to find which drivers - configure kernel to boot off a USB stick without initrd
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.
How to find which drivers - configure kernel to boot off a USB stick without initrd
As a learning exercise I'm trying to build a really simple Linux system. (Grub, kernel, bash [static build]) on a usb stick (unbranded).
I'm having a lot of trouble configuring a kernel that will boot. Every time I get:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
According to what I've already read this is telling me that it cant read the root file system, probably because it doesn't have the right drivers.
If I take an ubuntu kernel and initrd everything works fine, but it needs the initrd otherwise it has the same problem.
How do I find which drivers are missing, or which drivers ubuntu is using to access the device?
Okay, tried all of those, still have the same problem. Have also tried turning on pretty much everything SATA, USB and SD. Is there a way to take a device (say /dev/sdd) and in some way back-track to find which drivers its using?
You can check dmesg or syslog; you might get one from running LiveCD. When I first configured my kernel, I compared some distros in detecting my devices by looking at dmesg and syslog.
ATM, my dmesg shows scsi0 and scsi1 load ata_piix (this is because I use Intel machine) while sr and sd load scsi generic, and scsi CD-ROM.
You can also check available controllers such as USB UHCI, USB2 EHCI, SATA IDE, from the machine via 'lspci'
Most usb-stick are a single type 06 partition formated vfat (fat16 fat32) & to boot them you must have the vfat driver built into your kernel. To check this try mounting your usb-stick & once mounted run the "df -T" command to display the filesystem type.
mount -t vfat /dev/sdd1 /mnt/misc
--or--
mount -t auto /dev/sdd1 /mnt/misc
df -T
Of course you can always repartition your usb-stick to a Linux type 83 partition & then format it to ext3 if you already have ext3 built into your kernel. But, regardless the filesystem format you have on your usb-stick must have a driver built into the kernel or you are forced to pre-load that driver via an initrd.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.