You are not logged in.
Often it happens that I insert a USB storage device, and then expect it to find it in the output of
sudo fdisk -lbut I don't.
At that point I just reboot the machine, and the command above will show the device too. No need for me to even remove and re-plug the USB device.
So something must be happening while my system is up.
Is there something I can do now (I've just rebooted, so the USB has been detected) or next time the issue occurs to gather more info for you to help me?
At https://wiki.archlinux.org/title/USB_storage_devices, the https://wiki.archlinux.org/title/USB_st … e_detected section doesn't seem to apply to me, because in my case a reboot is enough to get the USBs detected.
Last edited by Enrico1989 (Today 10:50:53)
Offline
Next time it happens, check uname -r and pacman -Q linux (substitute with your kernel package). This usually happens because you've updated the kernel and don't have the necessary modules loaded. Since the modules for the old kernel are no longer on disk, it can't load anything new.
Offline
Well, I suppose given I often keep the system up for days and days, and that I'm running pacman -Syu everytime I see even a single update, I suppose it's most likely that's exactly what's happening.
(substitute with your kernel package)
pacman -Q linux tab-completes to just
linux linux-api-headers linux-firmware-whence linux-headersaccording to that and to https://wiki.archlinux.org/title/Kernel, I assume I've got the "linux" kernel package, right?
Next time it happens, check uname -r and pacman -Q linux
I suppose the expectation is that the former would give me an older version than the latter?
So is there nothing I can check now to verify that between the last boot and the previous one there was indeed a kernel update?
Offline
Check the /var/log/pacman.log if the previous update included the linux package that will be the relevant difference.
Offline
Although it is recommended to boot new kernel as soon as it is updated, sometimes you can't reboot immediately. To avoid lack of modules in such situation you can force some modules to be always loaded after boot.
E.g. in /etc/modules-load.d/usb.conf:
usb_storage
uas/etc/modules-load.d/filesystem.conf:
vfat
nls_utf8
nls_cp437
nls_iso8859-1Drawback is some tiny extra RAM usage. There is also another option to load important modules in kernel hook before update, but it's more tricky.
Offline
If you can get kernel logs from the last few boots (journalctl or something) then the first few lines of each log should tell which kernel version was booted.
Next time you see something like that it would make sense to run dmesg and see the final lines - was the device detected, are any drivers loading, are there any errors.
Last edited by mmy8x (Yesterday 23:41:40)
Offline
Check the /var/log/pacman.log if the previous update included the linux package that will be the relevant difference.
Thanks.
For my own reference, this tells me when the last update to the linux package occurred:
grep ' linux ' /var/log/pacman.log | tail -1
/var/log/pacman.log:[2026-02-14T10:18:05+0100] [ALPM] upgraded linux (6.18.8.arch2-1 -> 6.18.9.arch1-2)so last update to linux was on February the 14th.
This tells me the first time yesterday I was surprised running fdisk wouldn't show the usb drive I had physically plugged in:
history | grep ' 23/02/26 .* fdisk' | head -1
25097 23/02/26 14:11:55 sudo fdisk -lThis tells me the times of the last reboots:
for ((i=0; i<5; ++i)); do journalctl -b -$i 2>/dev/null | head -n 1; done | tac | cut -d' ' -f 1-3
Jan 30 23:13:28
Feb 03 17:00:05
Feb 10 17:00:56
Feb 23 14:19:34
Feb 24 07:41:38So yeah, when I experienced the issue, I had not rebooted since the last update to the linux package, and rebooting fixed the issue.
Although it is recommended to boot new kernel as soon as it is updated
I should keep this in mind!
Offline