2

I boot a remote server that has a USB pendrive plugged.
It creates a shift in the devices names (/dev/sda becomes /dev/sdb, ...) because the USB pendrive is detected before the SCSI disks.
In a normal situation I could manage that at the operating system level but here I must install the server remotely with a quickstart script in a ISO image that I cannot change.
The only settings I have access to are the boot parameters.

How can I prevent the USB pendrive detection ?

5
  • 1
    I found it ironic you tagging it ILO. The no-brains approach is evidently disabling it at BIOS level via ILO. Commented Aug 29, 2018 at 16:25
  • Yes you are right, It is just that I need to select some options after boot and I'm not sure it will impact the keyboard, I will try anyway, I would have prefered not to disable all USB.
    – Emmanuel
    Commented Aug 29, 2018 at 16:29
  • 1
    Do you need any other USB peripheral to work? If you don’t, this approach should work. Commented Aug 29, 2018 at 16:30
  • 2
    @StephenKitt I just found usb-storage.quirks=VID:PID:i on kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt
    – Emmanuel
    Commented Aug 29, 2018 at 16:51
  • Ah yes, that looks more appropriate. If it works, you could write your own answer! Commented Aug 29, 2018 at 18:00

2 Answers 2

1

If you need to disable all USB storage devices, these boot options might work for distributions that are using dracut their initramfs generator:

rd.driver.blacklist=usb-storage,uas 

And this for distributions using Debian's initramfs-tools respectively:

blacklist=usb-storage,uas
0

It was long time ago
Identifying the USB ids was a bit difficult, but I manage to by viewing the boot messages and also with find /sys -ls piped to some grep filter. In the same time I found a remote help to remove that key so I couldn't test that solution.
In any case this may perhaps helps you to disable an usb device at boot:

Try usb-storage.quirks=VID:PID:i kernel parameter as described on kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt

2
  • In usb-storage.quirks=VID:PID:i, the VID and PID both need to be 4 digit hexadecimal numbers, specifying the vendor and product ID of the USB storage device to ignore. So it works in avoiding one specific pendrive, with known vendor and product IDs.
    – telcoM
    Commented May 17, 2019 at 12:05
  • Identifying the ID was not easy on a minimal linux environment (almost no tools). I will details here how to do it here.
    – Emmanuel
    Commented May 17, 2019 at 14:00

You must log in to answer this question.

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