3

I have an external hard drive (Transcend TS500GSJ25M - not sure M1, M2 or M3, but guess it's M1) and I'd like to install Gentoo on it. It's pretty easy, using genkernel, though it compile a lot of useless garbage and don't compile drivers necessary for my hardware. Using menuconfig I turned off almost all modules and turned on ones I need.
However, today I had to recompile kernel to add FUSE support and decided to turn off all unnecessary features like huge heap of special SCSI drivers. After building kernel system wouldn't mount root.

Yes, I encountered such problems before I used genkernel.

Yes, I mounting root by "root=LABEL=" and of course pass "--disklabel" to genkernel.

The question is which modules do I need built-in in kernel to successfully mount external USB hard drive as root?

I guess it's some of SCSI, USB and maybe EFI, but there is a lot of them, and it's not possible to get one by turning on, compile and trying to boot.

2 Answers 2

3

There are different options available in order to know what modules you need :

  1. lspci -k
  2. lsmod (only those who are used)
  3. Take a look at dmesg or /var/log/kern.log. Kernel module messages are often prefixed by the module name.

For me, an usb hdd needs :

  • usbstorage
  • usbhid
  • ehci_hcd

And, of course, the module for the filesystem in use.

2
  • The funny thing is that now it isn't booting even compiled with old(baсk-uped) configuration. Doubtfully it's FUSE module fault. But at least I tried your option(i.e. included usbhid) - still the same. I guess my next Gentoo installation would be only on normal hdd on normal desktop computer.
    – MadRunner
    Commented Mar 5, 2012 at 11:24
  • +10 just for lspci -k Commented Oct 9, 2012 at 0:04
0

If you disable too much of the SCSI-related modules, it's very likely that you can no longer boot from USB devices.

especially:

CONFIG_SCSI:
If you want to use a SCSI hard disk, SCSI tape drive, SCSI CD-ROM or
any other SCSI device under Linux, say Y and make sure that you know
the name of your SCSI host adapter (the card inside your computer
that "speaks" the SCSI protocol, also called SCSI controller),
because you will be asked for it.

You also need to say Y here if you have a device which speaks  
the SCSI protocol.  Examples of this include the parallel port
version of the IOMEGA ZIP drive, USB storage devices, ...

read  <file:Documentation/scsi/scsi.txt>.

The module will be called scsi_mod.

However, do not compile this as a module if your root file system
(the one containing the directory /) is located on a SCSI device.

and

CONFIG_BLK_DEV_SD:  
If you want to use SCSI hard disks, Fibre Channel disks,
Serial ATA (SATA) or Parallel ATA (PATA) hard disks,
USB storage or

You should check your configuration there.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .