Tiny Core Linux
Tiny Core Base => CorePlus => Topic started by: malikawan on March 31, 2019, 10:19:43 PM
-
I want to disable usb drive. When Tinycore login after that if any one plug usb drive it will never work.
-
Please any idea how to block usb storage.
-
The second search hit for “linux block usb storage “ suggests “blacklist usb-storage”.
See the tinycore faq for how to use the blacklist boot code.
-
Thanks for reply.
I have search but never found any code which block usb storage device. I also try suggested code blacklist=usb-storage but its also never work for me.
-
Perhaps the problem is that usb-storage is compiled into the kernel rather than as a module
-
Hi malikawan
Some ideas found from:
https://www.mjmwired.net/kernel/Documentation/kernel-parameters.txt
Do you require any USB support? If not, the boot code:
usbcore.nousb
should disable the whole USB subsystem.
Or, try the following boot code set to 0
usbcore.authorized_default=
[USB] Default USB device authorization:
(default -1 = authorized except for wireless USB,
0 = not authorized, 1 = authorized)
If those don't work, try adding this to your /opt/bootlocal.sh file:
echo 3600 > /sys/module/usb_storage/parameters/delay_use
Now if someone plugs in a USB device, it will take an hour before before it gets scanned and is usable.
-
Hi Rich
Thanks the last one works like a charm
If those don't work, try adding this to your /opt/bootlocal.sh file:
echo 3600 > /sys/module/usb_storage/parameters/delay_use
-
Hi malikawan
You are welcome. Bear in mind that:
IF
the user has access to a keyboard
AND
has root access (sudo)
AND
knows how you increased the USB detection delay
THEN
they could undo the delayed USB detection.
It will however keep the average user out which is whom I presume you are targeting.
-
Hi
When i plug usb and restart it will never add delay and is available to mount. But when i unplug the usb and plug again then its not available. Means if user connect usb and start PC then it will be able to mount usb.
Any idea to remove usb if user attach at startup.
-
Hi malikawan
We could try it as a kernel parameter instead so it occurs earlier. Try the boot code:
usb-storage.delay_use=3600