1

Whenever we plug in a new thumb drive, we get a pop-up saying Installing Device Driver and then after sometime the autorun dialog pops-up.

So when installing another OS from bootable flash drive - how does the BIOS, which i suppose is very rudimentary compared to the OS itself, manage to quickly read data from flash drive (that too at the very begining of boot) without any need of installing device drivers.


Edit: I have noticed Linux (Ubuntu 12.04 in my case) also doesn't need to install the device driver & the drive automatically opens in Nautilus. How does this work?

1
  • Linux needs and uses device drivers just like Windows does. – Karan May 25 '15 at 18:28
1

Since the past two decades, certain hardware aspects have become very standardized, so that it is easy to actually embed these drivers in the firmware (or in the case of linux, the kernel). If you look at the drivers in use for USB storage, it is nearly always the same, regardless of manufacturer, size, etc.

The same goes for (most) USB keyboards and other common input devices, as they all beling to the HID class of peripderals.


As for linux automatically showing you the contents of the drive, the rough outline is as follows:

  1. The kernel registers the newly attached device. This can be seen if you do a dmesg after plugging it in
  2. The drive is then automatically mounted, as can be seen in mount -l. Usually you'll see a line starting with something along the lines of /dev/sdc1 on /media/username/Something... matching the device node listed in #1.
  3. Your desktop environment sees this new mountpoint for your username, and opens up a file manager for said mount point.
1

The whole “installing driver” shebang appears only on Windows. It’s actually more like “registering new device instance” anyway. On other operating systems, the process is essentially the same, of course, but managed differently. For example, there are two ways to handle multiple similar devices: Either an isolated driver instance is running for each of them or a single instance is able to handle multiple devices.

There are some requirements that must be met: A driver must exist in a place where the kernel (or a program loading drivers into the kernel) will find it automatically. Something like /lib/modules on Linux. If a driver isn’t available or built into the kernel, the device cannot be used.

For firmware like UEFI or BIOS, the driver would be built-in, because these must be self-contained.

Like Jarmund already mentioned, interfaces to input and storage devices are largely standardized these days. A single driver is enough the use almost every USB storage device out there. That’s how BIOS and UEFI let’s you use your keyboard and mouse and USB storage and whatnot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.